/* ==========================================================================
   Kuvello — WhatsApp Bot Services by david belikov
   styles.css — plain CSS, no frameworks, no external fonts, no CDN assets.
   Aesthetic: warm editorial "personal practice" — cream paper, system serif
   headlines, flat rules and borders, restrained ink-green + ochre accents.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  --paper:      #f4f7f7;
  --paper-deep: #e8eeee;
  --surface:    #ffffff;
  --surface-2:  #edf2f1;

  --ink:        #152228;
  --ink-soft:   #3e5054;
  --ink-mute:   #64787c;

  --brand:      #0f5e63;
  --brand-deep: #0b474c;
  --brand-dark: #07333a;
  --brand-tint: #e2eef0;
  --brand-tint-2:#cfe1e4;

  --accent:     #3f6ea6;
  --chat-out:   #d9ece9;

  --line:       #d3dcdc;
  --line-soft:  #e2e9e9;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", "Noto Sans Hebrew", "Arial Hebrew", sans-serif;
  --serif: "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia,
           "Times New Roman", serif;

  --r-xs: 4px;
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 12px;
  --r-pill: 8px;

  --shadow-sm: 0 1px 2px rgba(21, 34, 40, .05);
  --shadow:    0 8px 24px -14px rgba(21, 34, 40, .18);
  --shadow-lg: 0 18px 40px -22px rgba(7, 51, 58, .28);

  --container: 1080px;
  --gutter: clamp(1.1rem, 4vw, 2.25rem);
}

/* ---- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.008em;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.8vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.05rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--brand-dark);
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--accent); }

img, svg { max-width: 100%; display: block; }

strong { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- Layout helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(3rem, 2rem + 5vw, 5rem); }
.section-tight { padding-block: clamp(2.25rem, 1.5rem + 4vw, 3.75rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .65rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand-deep);
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: ""; width: 1.6rem; height: 2px; background: var(--accent); flex: none;
}

.section-head { max-width: 44rem; margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.5rem); }
.section-head p { color: var(--ink-soft); font-size: 1.04rem; margin-bottom: 0; }

.lead {
  font-size: clamp(1.05rem, 1rem + .4vw, 1.2rem);
  color: var(--ink-soft);
  line-height: 1.7;
}

/* Skip link */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--brand-dark); color: #fff; padding: .6rem 1rem;
  border-radius: var(--r-xs); z-index: 100; font-weight: 600;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 650; line-height: 1;
  padding: .8rem 1.2rem; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--brand-deep); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--brand-dark); border-color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--brand-dark); background: var(--brand-tint); }
.btn svg { width: 1.05em; height: 1.05em; }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 70px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 38px; height: 38px; flex: none; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--brand-deep);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.brand-tag { font-size: .74rem; color: var(--ink-mute); }

.site-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .95rem;
  padding: .3rem 0; border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover { color: var(--brand-dark); border-bottom-color: var(--accent); }
.site-nav .nav-cta {
  border: 1px solid var(--brand-deep); color: var(--brand-dark);
  padding: .5rem .95rem; border-radius: var(--r-pill);
}
.site-nav .nav-cta:hover { background: var(--brand-deep); color: #fff; border-bottom-color: transparent; }

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  padding-block: clamp(2.75rem, 1.5rem + 4.5vw, 4.5rem);
  border-bottom: 1px solid var(--line-soft);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}
.hero h1 { margin-bottom: .65rem; }
.hero .lead { margin-bottom: 1.5rem; max-width: 36rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.hero-meta { font-size: .94rem; color: var(--ink-mute); margin: 0; }

/* Chat preview card */
.hero-visual { display: grid; place-items: center; }
.chat-card {
  width: min(360px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: .7rem;
  padding: .8rem 1rem; color: #e8f2f3;
  background: var(--brand-deep);
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,.15); color: #fff;
}
.chat-avatar svg { width: 19px; height: 19px; }
.chat-name { margin: 0; font-weight: 700; font-size: .95rem; color: #fff; line-height: 1.2; }
.chat-status { margin: 0; font-size: .75rem; color: #bcd9dd; line-height: 1.3; }
.chat-body {
  padding: 1rem; display: flex; flex-direction: column; gap: .55rem;
  background-color: #f0f4f4;
}
.bubble {
  max-width: 84%; padding: .55rem .8rem; border-radius: 10px; font-size: .9rem; line-height: 1.45;
  color: var(--ink); border: 1px solid var(--line-soft);
}
.bubble.in  { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--chat-out); border-bottom-right-radius: 4px; }

/* ---- Trust strip --------------------------------------------------------- */
.trust {
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
}
.trust-grid {
  display: flex; flex-wrap: wrap; gap: .8rem 2.2rem; align-items: center; justify-content: space-between;
  padding-block: 1rem;
}
.trust-item { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink-soft); font-weight: 600; font-size: .9rem; }
.trust-item svg { width: 1.1rem; height: 1.1rem; color: var(--brand); flex: none; }

/* ---- Cards (services) ---------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.4rem 1.35rem;
  transition: border-color .15s ease;
}
.card:hover { border-color: var(--brand); }
.card-icon {
  width: 42px; height: 42px; border-radius: var(--r-sm); display: grid; place-items: center; margin-bottom: .95rem;
  background: var(--brand-tint); color: var(--brand-deep); border: 1px solid var(--brand-tint-2);
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: .4rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---- About + how it works ------------------------------------------------ */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.75rem, 1rem + 3vw, 3.25rem); align-items: start; }
.prose p { color: var(--ink-soft); }
.prose p + p { margin-top: 1rem; }
.signoff {
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink);
  margin-top: 1.25rem;
}

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.3rem, 1rem + 1.2vw, 1.8rem);
}
.panel h3 { margin-top: 0; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.facts li { display: flex; gap: .65rem; align-items: flex-start; color: var(--ink-soft); }
.facts svg { width: 1.2rem; height: 1.2rem; color: var(--brand); flex: none; margin-top: .18rem; }

/* Numbered steps — big serif numerals, rule-separated */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps li {
  position: relative; counter-increment: step;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.15rem 1.3rem 1.15rem 4.1rem;
}
.steps li::before {
  content: counter(step); position: absolute; left: 1.15rem; top: .85rem;
  font-family: var(--serif); font-weight: 700; font-size: 1.9rem; line-height: 1;
  color: var(--brand);
}
.steps li::after {
  content: ""; position: absolute; left: 1.1rem; top: 3rem; bottom: 1.1rem;
  width: 2px; background: var(--brand-tint-2);
}
.steps h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
@media (min-width: 720px) { .steps { grid-template-columns: 1fr 1fr; } }

/* ---- FAQ ----------------------------------------------------------------- */
.faq { display: grid; gap: .7rem; max-width: 50rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  overflow: hidden; transition: border-color .15s ease;
}
.faq details[open] { border-color: var(--brand); }
.faq summary {
  cursor: pointer; font-weight: 650; color: var(--ink);
  padding: .95rem 1.15rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--serif); font-weight: 700; color: var(--accent);
  font-size: 1.3rem; line-height: 1; flex: none; transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--brand-dark); }
.faq details p { margin: 0; padding: 0 1.15rem 1.05rem; color: var(--ink-soft); }

/* ---- Contact block ------------------------------------------------------- */
.contact-band { background: var(--brand-dark); color: #e3eef0; }
.contact-band h2, .contact-band h3 { color: #fff; }
.contact-band .eyebrow { color: #c4dbdf; }
.contact-band .eyebrow::before { background: var(--accent); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 1rem + 2vw, 3rem); align-items: start; }
.contact-card {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--r); padding: clamp(1.3rem, 1rem + 1.2vw, 1.8rem);
}
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: .8rem; align-items: flex-start; }
.contact-list .ci {
  width: 2.3rem; height: 2.3rem; border-radius: var(--r-sm); flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,.1); color: #d9eaed; border: 1px solid rgba(255,255,255,.2);
}
.contact-list .ci svg { width: 1.2rem; height: 1.2rem; }
.contact-list .ck { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: #9cc0c6; margin-bottom: .1rem; }
.contact-list .cv { color: #fff; font-weight: 600; font-size: 1rem; }
.contact-list a.cv { color: #fff; text-decoration-color: rgba(255,255,255,.45); }
.contact-list a.cv:hover { text-decoration-color: var(--accent); }
.addr-line { display: block; }
.addr-translit { display: block; font-weight: 500; font-size: .88rem; color: #a8c9cf; margin-top: .12rem; }

/* ---- Standard (light) page content -------------------------------------- */
.page-hero {
  padding-block: clamp(2.5rem, 1.5rem + 3.5vw, 3.75rem) clamp(1rem, .5rem + 2vw, 2rem);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}
.page-hero h1 { margin-bottom: .4rem; }
.page-hero .lead { max-width: 44rem; }
.breadcrumb { font-size: .85rem; color: var(--ink-mute); margin-bottom: .9rem; }
.breadcrumb a { color: var(--ink-mute); }
.breadcrumb a:hover { color: var(--brand-dark); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(1.75rem, 1rem + 3vw, 3rem); align-items: start; }

article.doc { max-width: 46rem; }
article.doc h2 {
  margin-top: 2.2rem; padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
}
article.doc h2:first-of-type { margin-top: .5rem; border-top: 0; padding-top: 0; }
article.doc h3 { margin-top: 1.6rem; }
article.doc ul, article.doc ol { padding-left: 1.2rem; }
article.doc li { margin-bottom: .5rem; }
article.doc .updated { color: var(--ink-mute); font-size: .9rem; }

/* Definition list — business details (stacked: label above value, wraps in narrow aside) */
.details-dl {
  margin: 0; display: grid; grid-template-columns: 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.details-dl > div { display: contents; }
.details-dl dt {
  padding: .75rem 1.15rem .15rem; margin: 0;
  font-weight: 700; color: var(--ink-mute); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .1em;
  border-top: 1px solid var(--line-soft);
}
.details-dl dd {
  padding: 0 1.15rem .8rem; margin: 0;
  color: var(--ink); font-weight: 600;
  overflow-wrap: anywhere;
}
.details-dl > div:first-child dt { border-top: 0; }

/* Aside contact card (contact/legal pages) */
.aside-card {
  position: sticky; top: 88px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.35rem;
}
.aside-card h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.aside-card .contact-list .ci { background: var(--brand-tint); color: var(--brand-deep); border-color: var(--brand-tint-2); }
.aside-card .contact-list .ck { color: var(--ink-mute); }
.aside-card .contact-list .cv { color: var(--ink); }
.aside-card .contact-list a.cv { color: var(--brand-dark); }
.aside-card .addr-translit { color: var(--ink-mute); }

/* ---- Form ---------------------------------------------------------------- */
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.3rem, 1rem + 1.2vw, 1.8rem);
}
.form-note {
  font-size: .9rem; color: var(--ink-mute); background: var(--surface-2);
  border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: .8rem 1rem; margin-bottom: 1.3rem;
}
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-weight: 650; color: var(--ink); margin-bottom: .35rem; font-size: .94rem; }
.field .req { color: var(--accent); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.field textarea { min-height: 140px; resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.form-alt { font-size: .9rem; color: var(--ink-mute); margin: 0; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background: #0f1a1d; color: #bcccd0;
  border-top: 3px solid var(--brand-deep);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
  padding-block: clamp(2.25rem, 1.5rem + 2.5vw, 3.25rem);
}
.footer-brand .brand-name { color: #fff; font-size: 1.35rem; }
.footer-line { color: #e3edf0; font-weight: 600; margin: .5rem 0 .5rem; }
.footer-desc { color: #8ba0a5; font-size: .92rem; margin: 0; max-width: 32ch; }
.footer-h {
  color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 1rem;
}
.footer-address { font-style: normal; display: grid; gap: .5rem; }
.footer-address a { color: #e3edf0; text-decoration-color: rgba(227,237,240,.4); }
.footer-address a:hover { text-decoration-color: var(--accent); }
.footer-address .addr-line { color: #bcccd0; }
.footer-address .addr-translit { color: #7c9198; margin-top: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-links a { color: #bcccd0; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-block: 1.25rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; justify-content: space-between;
}
.footer-bottom p { margin: 0; font-size: .85rem; color: #7c9198; }
.footer-note { max-width: 60ch; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .aside-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .header-inner { min-height: 62px; }
  .brand-tag { display: none; }
  .site-nav { gap: .8rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; }
  .form-actions .btn { width: 100%; }
}

/* ---- Motion / print preferences ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
  .site-header, .chat-card, .form-card { box-shadow: none; }
  body { background: #fff; }
}
