/* =========================================================
   Natasha Yemelyanova: styles
   Brand rules: website/brand-guide.md (Lake & Lantern)
   Motion kept on purpose (13 Nov): the How it works progress line,
   gentle hover lifts, and the FAQ accordion. Nothing else moves.
   ========================================================= */

:root {
  /* Colors */
  --deep-water:  #1C2B2E;
  --lake-teal:   #1F5C63;
  --candlelight: #E6C17A;
  --whitewash:   #F7F6F2;
  --white:       #FFFFFF;
  --lake-mist:   #E0E8E4;
  --brass:       #8A6420;

  /* Type */
  --font-heading: "Spectral", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --header-h: 68px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
  --radius: 8px;
  --section-pad: clamp(64px, 9vw, 112px);

  /* Motion: ease-out curve (starts quickly, settles gently) */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --btn-dur: .25s;   /* hover speed for buttons and links (chosen 14 Nov) */
  --card-dur: .35s;  /* hover speed for service cards: bigger, so a touch slower */
}

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

html { scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--whitewash);
  color: var(--deep-water);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(30px, 5.4vw, 60px); line-height: 1.12; }
h2 { font-size: clamp(30px, 3.6vw, 40px); max-width: 42ch; }
/* Long headings: one sentence per line on wider screens */
.h-line { display: block; }
h3 { font-size: clamp(21px, 2vw, 24px); font-weight: 600; line-height: 1.3; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.center { text-align: center; }
.lead { font-size: 20px; max-width: 62ch; }

/* Small labels above headings */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass);           /* Brass only on Whitewash/White */
  margin-bottom: 16px;
}
/* On Lake mist: Brass, larger and bold (chosen 13 Nov). 19px bold counts as
   large text, so Brass on Lake mist (4.3:1) passes the 3:1 rule. */
.eyebrow-plain { color: var(--brass); font-size: 19px; font-weight: 700; }
.eyebrow-dark  { color: var(--candlelight); }  /* on dark */

/* Links and focus */
a { color: var(--lake-teal); }
.text-link { font-weight: 600; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--lake-teal); outline-offset: 3px; border-radius: 4px; }
.panel-hero :focus-visible,
.panel-closing .closing-text :focus-visible,
.panel-footer :focus-visible { outline-color: var(--candlelight); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--deep-water); color: var(--whitewash);
  padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
  padding: 17px 26px;
  border-radius: var(--radius);
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--btn-dur) var(--ease), box-shadow var(--btn-dur) var(--ease);
}
.btn-primary { background: var(--lake-teal); color: var(--white); }
.btn-glow { background: var(--candlelight); color: var(--deep-water); }
/* Hover effects only on devices with a real mouse, so they never "stick" after a tap on phones/tablets */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(28, 43, 46, .45); }
  .btn-glow:hover { box-shadow: 0 10px 30px -8px rgba(230, 193, 122, .55); }
}
.btn-small { padding: 11px 18px; font-size: 16px; }

/* ---------- Header (stays at the top) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(247, 246, 242, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--lake-mist);
}
.header-inner {
  max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark {
  font-family: var(--font-heading); font-weight: 500; font-size: 22px;
  letter-spacing: .02em; color: var(--deep-water); text-decoration: none; white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { color: var(--deep-water); text-decoration: none; font-weight: 600; font-size: 16px; }
@media (hover: hover) and (pointer: fine) {
  .site-nav a:not(.btn):hover { color: var(--lake-teal); text-decoration: underline; text-underline-offset: 4px; }
}
.menu-toggle {
  display: none;
  font: 600 16px var(--font-body); color: var(--deep-water);
  background: none; border: 1px solid var(--deep-water); border-radius: var(--radius);
  padding: 8px 14px; cursor: pointer;
}

/* ---------- Sections ---------- */
.panel { padding: var(--section-pad) 0; background: var(--whitewash); }
.panel-light { background: var(--whitewash); }
.panel-mist { background: var(--lake-mist); }

/* ---------- 1. Hero ---------- */
.panel-hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--header-h) + var(--section-pad));
  color: var(--whitewash);
  background:
    linear-gradient(180deg, rgba(28, 43, 46, .55) 0%, rgba(28, 43, 46, .72) 100%),
    url("../images/background3.jpg") center / cover no-repeat var(--deep-water);
}
.hero-inner h1 { max-width: 30ch; }
.hero-inner .eyebrow { font-size: 18px; margin-bottom: 20px; }
.hero-sub { font-size: clamp(19px, 2vw, 23px); max-width: 44ch; margin-bottom: 36px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.hero-person { display: flex; align-items: center; gap: 14px; }
.hero-person img {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--candlelight);
}
.hero-person p { margin: 0; font-size: 15px; line-height: 1.45; }

/* ---------- 2. Problem ---------- */
.pain-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px; margin: 36px 0 32px;
}
.pain h3 { margin-bottom: .35em; }
.pain p { margin: 0; }

/* ---------- 3. About ---------- */
.about-grid {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  gap: 56px; align-items: start; margin-bottom: 56px;
}
.about-grid .about-photo { margin-top: 44px; } /* lines the photo up with the heading */
.about-photo { width: 300px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.about-grid p:not(.eyebrow) { max-width: 62ch; }
.stats {
  list-style: none; padding: 0; margin: 0 0 48px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
}
.stats li { border-top: 2px solid var(--lake-teal); padding-top: 16px; }
.stat-num { display: block; font-family: var(--font-heading); font-weight: 500; font-size: clamp(28px, 3vw, 38px); line-height: 1.15; }
.stat-label { display: block; font-size: 16px; line-height: 1.45; margin-top: 6px; }
.logos {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 12px 44px;
  font-family: var(--font-heading); font-size: 22px; font-weight: 500;
}

/* ---------- 4. Services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 36px 0 28px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 30px 28px;
  display: flex; flex-direction: column;
  transition: transform var(--card-dur) var(--ease), box-shadow var(--card-dur) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(28, 43, 46, .45); }
}
.card-promise { font-family: var(--font-heading); font-size: 19px; line-height: 1.45; }
.card-meta { font-size: 15px; font-weight: 600; color: var(--lake-teal); }
.card ul { padding-left: 20px; margin: 0 0 20px; font-size: 16px; }
.card li { margin-bottom: 8px; }
.card-fit { margin-top: auto; font-size: 16px; padding-top: 16px; border-top: 1px solid var(--lake-mist); }
.custom-line { text-align: center; margin-bottom: 24px; }

/* ---------- 5. How it works + progress line ----------
   A light track runs from the first dot to the last. It fills in Lake
   teal as the visitor scrolls (main.js sets --progress from 0 to 1),
   and each dot turns teal with a soft glow when the line reaches it. */
.how-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.how-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }

.steps-wrap { position: relative; margin-top: 32px; --dot: 22px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { position: relative; padding-left: 56px; padding-bottom: 34px; }
.step:last-child { padding-bottom: 0; }
.step h3 { margin-bottom: .25em; }
.step p { margin: 0; }

.steps-track {
  position: absolute; left: calc(var(--dot) / 2 - 2px); width: 4px;
  top: var(--track-top, 12px); height: var(--track-h, 0px);
  background: var(--lake-mist);
  border-radius: 2px; overflow: hidden;
}
.steps-fill {
  position: absolute; inset: 0;
  background: var(--lake-teal);
  transform-origin: top;
  transform: scaleY(var(--progress, 0));
  will-change: transform;
}
.step-dot {
  position: absolute; left: 0; top: 6px;
  width: var(--dot); height: var(--dot); border-radius: 50%;
  background: var(--white);
  border: 2px solid rgba(28, 43, 46, .35);
  z-index: 1;
  transition: background-color .45s var(--ease), border-color .45s var(--ease), box-shadow .6s var(--ease), transform .45s var(--ease);
}
.step.is-reached .step-dot {
  background: var(--lake-teal);
  border-color: var(--lake-teal);
  box-shadow: 0 0 0 6px rgba(31, 92, 99, .14), 0 0 22px 4px rgba(31, 92, 99, .35);
  transform: scale(1.06);
}
/* Without JavaScript the line is simply full */
html:not(.js) .steps-fill { transform: none; }
html:not(.js) .step-dot { background: var(--lake-teal); border-color: var(--lake-teal); }

/* ---------- 6. Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.quote { margin: 0; background: var(--white); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.quote blockquote { margin: 0 0 20px; font-family: var(--font-heading); font-style: italic; font-size: 19px; line-height: 1.55; }
.quote figcaption { margin-top: auto; font-size: 16px; }

/* ---------- 7. FAQ ---------- */
.faq { margin-top: 28px; border-top: 1px solid rgba(28, 43, 46, .2); }
.faq details { border-bottom: 1px solid rgba(28, 43, 46, .2); }
.faq summary {
  list-style: none; cursor: pointer;
  font-family: var(--font-heading); font-weight: 500; font-size: 21px; line-height: 1.4;
  padding: 22px 44px 22px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 18px;
  font-family: var(--font-body); font-size: 28px; color: var(--lake-teal);
  transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
@media (hover: hover) and (pointer: fine) {
  .faq summary:hover { color: var(--lake-teal); }
}
.faq details p { padding: 0 0 22px; margin: 0; max-width: 64ch; }
/* Smooth version: main.js animates the answer's height (0.4s ease-out) */
.faq details p.is-animating { overflow: hidden; box-sizing: border-box; }

/* ---------- 8. Closing ---------- */
.panel-closing {
  color: var(--whitewash);
  background:
    linear-gradient(180deg, rgba(28, 43, 46, .66) 0%, rgba(28, 43, 46, .80) 100%),
    url("../images/background1.jpg") center / cover no-repeat var(--deep-water);
}
.closing-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; align-items: center; }
.closing-text h2 { position: relative; padding-bottom: 18px; }
.closing-text h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 2px; background: var(--candlelight); }
.closing-text p { max-width: 48ch; }

.form-card { background: var(--white); color: var(--deep-water); border-radius: var(--radius); padding: 30px 28px; }
.form-card h3 { margin-bottom: .2em; }
.contact-form label { display: block; font-weight: 600; font-size: 16px; margin: 14px 0 6px; }
.optional { font-weight: 400; }
.contact-form input, .contact-form textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--deep-water);
  background: var(--white);
  border: 1.5px solid rgba(28, 43, 46, .6); border-radius: var(--radius);
  padding: 11px 13px;
}
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline-offset: 1px; }
.contact-form .btn { margin-top: 20px; width: 100%; }
.form-status { margin: 14px 0 0; font-weight: 600; }
.form-status a { color: var(--lake-teal); text-underline-offset: 2px; }
.form-note { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--deep-water); }
.form-note a { color: var(--lake-teal); text-underline-offset: 2px; }
/* Loading → success button */
.contact-form .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.contact-form .btn:disabled { cursor: default; transform: none; box-shadow: none; }
.btn-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: var(--white);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.contact-form .btn.is-sent { background: var(--deep-water); }
.hp { position: absolute; left: -9999px; }

/* ---------- Privacy page ---------- */
.legal { padding: calc(var(--header-h) + 56px) 0 80px; }
.legal h1 { font-size: clamp(32px, 4vw, 44px); }
.legal h2 { font-size: clamp(24px, 2.6vw, 30px); margin-top: 1.6em; }
.legal h3 { font-size: 20px; margin: 1.4em 0 .4em; }
.legal-date { color: var(--deep-water); font-size: 15px; margin-bottom: 2em; }
.legal-basis { font-size: 16px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal-table { overflow-x: auto; margin: 8px 0 16px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 480px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--lake-mist); vertical-align: top; }
.legal th { font-weight: 600; }
.legal-back { margin-top: 2.5em; }

/* ---------- 404 page ---------- */
.not-found {
  min-height: calc(100vh - 160px); min-height: calc(100svh - 160px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 64px) 0 80px;
}
.not-found h1 { font-size: clamp(32px, 4.4vw, 48px); }
.not-found-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }

/* ---------- Footer ---------- */
.panel-footer { background: var(--deep-water); color: var(--lake-mist); padding: 48px 0; font-size: 16px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; align-items: flex-start; }
.footer-name { font-family: var(--font-heading); font-size: 20px; color: var(--whitewash); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.panel-footer a { color: var(--whitewash); text-underline-offset: 3px; }
.copyright { width: 100%; margin: 0; color: var(--lake-mist); }

/* =========================================================
   Tablet and phone
   ========================================================= */
@media (max-width: 960px) {
  .cards, .quotes { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-grid, .closing-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .how-photo { aspect-ratio: 16 / 10; }
  /* Tablets: photo above the bio instead of a narrow side column */
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .about-grid .about-photo { width: 200px; margin-top: 0; }
}

@media (max-width: 820px) {
  :root { --header-h: 60px; }
  .wordmark { font-size: 19px; }
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--whitewash); border-bottom: 1px solid var(--lake-mist);
    padding: 12px var(--gutter) 20px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 10px 0; font-size: 18px; }
  .site-nav .btn { margin-top: 8px; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .lead { font-size: 18px; }
  .pain-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-bottom: 40px; }
  .about-photo { width: 180px; }
  .stats { gap: 20px 16px; }
  .logos { gap: 8px 28px; font-size: 19px; }
  .card, .quote, .form-card { padding: 24px 20px; }
  .faq summary { font-size: 19px; }
  .eyebrow { font-size: 15px; }
  .eyebrow-plain { font-size: 19px; } /* keep it large (and passing) on phones */
  .hero-inner .eyebrow { font-size: 16px; }
  .h-line { display: inline; } /* phones: let headings wrap naturally */
}

/* =========================================================
   Reduce motion: no hover lifts, no easing on the dots.
   The progress line still shows progress (it follows the
   visitor's own scrolling and doesn't play by itself).
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .btn, .card, .step-dot, .faq summary::after, .site-nav a { transition: none !important; }
  .btn:hover, .card:hover { transform: none !important; }
  .btn-spinner { animation: none; }
}

