/*
  Layout concept: a diopter scale. A thin horizontal ruled line runs the
  length of the page like the markings on a trial-lens gauge; the career
  timeline reads as tick marks along it, and section labels borrow the
  notation of a refraction prescription (OD/OS/SPH/CYL/ADD) rather than
  generic numbering — the same notation repeats in the header nav, so the
  two-letter codes double as a wayfinding index across the whole site.
*/
:root{
  --bg:#FAF9F6;
  --surface:#ffffff;
  --surface-tint:#E8E9E6;
  --ink:#252D2C;
  --muted:#55635F;
  --accent:#14766B;
  --accent-soft:#dcebe8;
  --accent-ink:#FAF9F6;
  --line:#e0e1de;
  --line-strong:#c5c6c4;
  --gold:#C79B42;
  --shadow-btn: rgba(20,118,107,.32);
  --shadow-photo: rgba(7,60,56,.28);
  /* dark-section tokens — used only by .arvista-intro, the mobile hoidot cards and footer, never globally */
  --dark-petrol:#073C38;
  --on-dark-ink:#FAF9F6;
  --on-dark-muted:#aebdb9;
  --on-dark-accent:#7fcabf;
  color-scheme: light;
}

*{box-sizing:border-box;}
html,body{ margin:0; padding:0; }
body{
  background:var(--bg);
  color:var(--ink);
  font-family:"Work Sans", "Segoe UI", sans-serif;
  padding-left:max(16px, env(safe-area-inset-left,0px));
  padding-right:max(16px, env(safe-area-inset-right,0px));
}
h1,h2,h3{
  font-family:"Newsreader", "Iowan Old Style", Georgia, serif;
  font-weight:500;
  text-wrap:balance;
  margin:0;
}
.mono{ font-family:"Manrope", ui-sans-serif, sans-serif; font-weight:700; font-variant-numeric: tabular-nums; }

a{ color:var(--accent); }
a, button, [role="button"]{ cursor:pointer; }

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

.skip-link{
  position:absolute; left:16px; top:-48px; z-index:100;
  background:var(--accent); color:var(--accent-ink);
  padding:10px 16px; border-radius:4px; text-decoration:none; font-weight:600;
  transition:top .15s ease;
}
.skip-link:focus{ top:16px; }

.wrap{ max-width:880px; margin:0 auto; }
.wrap-wide{ max-width:1120px; margin:0 auto; }

/* ---------- header ---------- */
header.top{
  position:sticky; top:0; z-index:40; background:var(--bg);
  display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center;
  gap:12px; padding-block:18px; border-bottom:1px solid var(--line);
}
header.top .brand{
  display:flex; align-items:center; gap:16px;
  text-decoration:none; color:var(--ink);
}
header.top .brand-mark{ width:46px; height:46px; flex:none; object-fit:contain; display:block; }
.brand-divider{ width:1px; height:40px; background:var(--line-strong); opacity:.4; flex:none; }
.brand-word{ display:flex; flex-direction:column; justify-content:center; line-height:1.15; }
.brand-name{
  font-family:"Newsreader", Georgia, serif; font-weight:500; font-style:normal;
  font-size:1.5rem; letter-spacing:.005em; color:var(--ink);
}
.brand-tag{
  font-family:"Manrope", sans-serif; font-weight:700; font-size:.68rem; letter-spacing:.15em;
  text-transform:uppercase; color:var(--accent); margin-top:7px;
}
@media (max-width:560px){
  header.top .brand-mark{ width:36px; height:36px; }
  .brand-divider{ height:30px; }
  .brand-name{ font-size:1.18rem; }
  .brand-tag{ font-size:.58rem; letter-spacing:.12em; margin-top:5px; }
}
header.top nav{ display:flex; flex-wrap:wrap; align-items:center; }
header.top nav a{
  display:inline-block; color:var(--muted); text-decoration:none; font-size:.9rem;
  margin-left:18px; padding:10px 4px;
}
header.top nav a:first-child{ margin-left:0; }
header.top nav a:hover{ color:var(--accent); }
header.top nav a.nav-book{
  margin-left:18px; background:var(--accent); color:var(--accent-ink);
  border-radius:4px; padding:9px 16px; font-weight:600;
}
header.top nav a.nav-book:hover{ color:var(--accent-ink); opacity:.92; }
@media (max-width:760px){
  header.top nav a.nav-book{ display:none; }
}

/* ---------- hero ---------- */
.hero{ position:relative; overflow:hidden; padding-block:56px 48px; }
.hero::before{
  content:""; position:absolute; top:-170px; right:-190px; width:540px; height:540px;
  background:radial-gradient(circle, var(--accent-soft) 0%, transparent 68%);
  pointer-events:none;
}
.hero-grid{ position:relative; z-index:1; display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap:48px; align-items:center; }
@media (max-width:860px){ .hero-grid{ grid-template-columns:minmax(0,1fr); } }
.hero h1{ font-size:clamp(2.3rem, 4.8vw, 3.9rem); line-height:1.07; max-width:13ch; }
.hero .role{ color:var(--muted); font-size:1.08rem; margin-top:16px; max-width:52ch; line-height:1.6; }
.badges{ display:flex; flex-wrap:wrap; gap:8px; margin-top:22px; }
.badge{
  font-family:"Manrope", sans-serif; font-weight:700; font-size:.74rem; letter-spacing:.03em;
  border:1px solid var(--line); border-radius:999px; padding:5px 12px; color:var(--muted);
}
.cta-row{ display:flex; flex-wrap:wrap; gap:12px; margin-top:28px; }
.btn{
  display:inline-flex; align-items:center; gap:8px; min-height:44px;
  padding:13px 22px; border-radius:4px; font-size:.95rem; text-decoration:none;
  font-weight:600;
}
.btn-primary{ background:var(--accent); color:var(--accent-ink); box-shadow:0 6px 18px -6px var(--shadow-btn); }
.btn-ghost{ border:1px solid var(--line-strong); color:var(--ink); }

/* ---------- portrait ---------- */
.portrait{ position:relative; width:400px; height:500px; justify-self:center; max-width:100%; }
.portrait svg{ position:absolute; inset:-28px; width:calc(100% + 56px); height:calc(100% + 56px); pointer-events:none; }
.portrait img{
  position:absolute; inset:0; width:100%; height:100%;
  border-radius:16px; object-fit:cover; border:1px solid var(--line-strong);
  box-shadow:0 24px 54px -16px var(--shadow-photo);
}
@media (max-width:860px){ .portrait{ width:300px; height:375px; order:-1; margin-bottom:24px; } }
@media (max-width:420px){ .portrait{ width:240px; height:300px; } }

section{ padding-block:60px; border-top:1px solid var(--line); }
@media (max-width:720px){ section{ padding-block:40px; } }
.rx{
  font-family:"Manrope", sans-serif; font-weight:700; font-size:.76rem; letter-spacing:.06em;
  color:var(--accent); margin-bottom:12px; display:block;
}
section h2{ font-size:clamp(1.7rem,2.9vw,2.35rem); margin-bottom:18px; }
.lede{ color:var(--muted); max-width:62ch; line-height:1.6; }

blockquote{
  margin:0; padding-left:18px; border-left:2px solid var(--accent);
  font-family:"Newsreader", Georgia, serif; font-style:italic; font-size:1.08rem;
  line-height:1.6; color:var(--ink);
}

/* ---------- Arvista: merged intro + merits, dark petrol section ---------- */
.arvista-intro{
  position:relative; overflow:hidden; background:var(--dark-petrol); color:var(--on-dark-ink);
  border-top:none;
}
.arvista-intro .rx{ color:var(--on-dark-accent); }
.arvista-intro h2{ color:var(--on-dark-ink); font-size:clamp(1.5rem,2.2vw,2rem); }
.arvista-intro .lede{ color:var(--on-dark-muted); }
.arvista-intro blockquote{ border-left-color:var(--gold); color:var(--on-dark-ink); margin-top:24px; }
.gold-rule{ display:block; width:44px; height:3px; background:var(--gold); border-radius:2px; margin:10px 0 20px; }
.arvista-grid{ position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:56px; align-items:start; }
@media (max-width:860px){ .arvista-grid{ grid-template-columns:minmax(0,1fr); gap:32px; } }
.arvista-photo{ position:relative; margin-top:8px; max-width:440px; margin-left:auto; }
@media (max-width:860px){ .arvista-photo{ margin-top:0; max-width:360px; margin-left:auto; margin-right:auto; order:-1; margin-bottom:24px; } }
.arvista-photo img{
  display:block; width:100%; height:auto; aspect-ratio:1/1; object-fit:cover; object-position:50% 85%;
  border-radius:16px; box-shadow:0 24px 56px rgba(0,0,0,.45);
}
.arvista-watermark{
  position:absolute; top:-120px; right:-110px; width:520px; height:520px;
  object-fit:contain; opacity:.14; pointer-events:none; z-index:0;
}
@media (max-width:720px){ .arvista-watermark{ width:260px; height:260px; top:-50px; right:-80px; opacity:.16; } }
.arvista-intro .badges{ position:relative; z-index:1; }
.arvista-intro .badge{ border-color:rgba(250,249,246,.3); color:var(--on-dark-ink); }

/* ---------- hoidot section background ---------- */
#hoidot{ background:var(--surface-tint); }

/* ---------- treatment cards ---------- */
.paths-intro{ margin-bottom:8px; }
.hoidot-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px; margin-top:36px; }
@media (max-width:900px){ .hoidot-grid{ grid-template-columns:minmax(0,1fr); gap:14px; } }
@media (max-width:720px){ .hoidot-sub{ margin-top:32px; } }

.hoidot-card{
  background:var(--surface); border:1px solid var(--line); border-radius:10px; overflow:hidden; min-width:0;
  display:grid; grid-template-columns:1fr; grid-template-areas:"img" "title" "text";
}
.hoidot-card-img{ grid-area:img; display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; }
.hoidot-card h3{ grid-area:title; font-size:clamp(1.15rem,1.6vw,1.35rem); line-height:1.25; margin:18px 20px 8px; }
.hoidot-card p{ grid-area:text; color:var(--muted); line-height:1.6; font-size:.95rem; margin:0 20px 22px; }

/* mobile: compact dark card — thumbnail + title + chevron, text below */
@media (max-width:900px){
  .hoidot-card{
    background:var(--dark-petrol); border:none; border-radius:16px; padding:16px;
    grid-template-columns:80px 1fr; column-gap:12px; row-gap:10px; align-items:center;
    grid-template-areas:
      "img title"
      "text text";
  }
  .hoidot-card-img{ width:80px; height:80px; aspect-ratio:1/1; border-radius:12px; }
  .hoidot-card h3{ margin:0; font-size:1rem; color:var(--on-dark-ink); }
  .hoidot-card p{ margin:0; font-size:.87rem; color:var(--on-dark-muted); }
}

/* ---------- section photos (small inline figures) ---------- */
figcaption{ margin-top:6px; font-size:.74rem; color:var(--muted); }

/* ---------- quick-scan specialty chips ---------- */
.spec-groups{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 40px; margin-top:28px; }
@media (max-width:720px){ .spec-groups{ grid-template-columns:1fr; gap:22px; } }
.spec-group h3{ font-size:1rem; font-weight:600; font-family:"Work Sans",sans-serif; margin:0 0 12px; color:var(--ink); }
.chip-row{ display:flex; flex-wrap:wrap; gap:9px; }
.chip{
  font-family:"Manrope", sans-serif; font-weight:600; font-size:.82rem;
  border:1px solid var(--line-strong); border-radius:999px; padding:7px 14px;
  color:var(--ink); background:var(--surface);
}
.hoidot-sub{ margin:48px 0 0; font-size:1.05rem; font-weight:600; font-family:"Work Sans",sans-serif; color:var(--ink); }

/* ---------- specialties mini-grid (legacy, still used on treatment stub pages) ---------- */
.spec-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--line); margin-top:28px; border:1px solid var(--line); }
@media (max-width:720px){ .spec-grid{ grid-template-columns:1fr; } }
.spec{ background:var(--surface); padding:26px 22px; }
.spec .num{ font-family:"Manrope", sans-serif; font-weight:700; color:var(--accent); font-size:.78rem; }
.spec h3{ font-size:1.12rem; margin:10px 0 8px; font-weight:600; font-family:"Work Sans",sans-serif; }
.spec p{ color:var(--muted); font-size:.92rem; line-height:1.55; margin:0; }
.spec .tags{ margin-top:12px; display:flex; flex-wrap:wrap; gap:6px; }
.spec .tags span{ font-size:.72rem; color:var(--muted); border:1px solid var(--line); border-radius:3px; padding:2px 7px; }

/* ---------- clinics ---------- */
.clinics{ margin-top:28px; display:grid; gap:0; }
.clinic{
  display:grid; grid-template-columns: 1fr auto; gap:10px; align-items:baseline;
  padding-block:16px; border-bottom:1px solid var(--line);
}
.clinic .name{ font-weight:600; }
.clinic .loc{ color:var(--muted); font-size:.9rem; }
.clinic .tag{ font-family:"Manrope", sans-serif; font-weight:700; font-size:.72rem; color:var(--accent); }

/* ---------- philosophy (light — follows the dark Arvista section, so two quote cards instead of another dark wall) ---------- */
.philosophy{ background:var(--surface-tint); color:var(--ink); }
.philosophy .wrap-wide{ padding-top:0; padding-bottom:54px; }
.philosophy-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; margin-top:8px; }
@media (max-width:720px){ .philosophy-grid{ grid-template-columns:1fr; } }
.philosophy blockquote{ font-size:1.05rem; border-left:2px solid var(--accent); padding-left:16px; margin:0; max-width:none; color:var(--ink); }
.philosophy blockquote p{ margin:0; }
.philosophy .signature{ margin-top:22px; }
.philosophy .signature-img{ display:block; height:46px; width:auto; margin-bottom:2px; }
@media (min-width:721px){ .philosophy .signature-img{ height:72px; } }
.philosophy cite{ display:block; font-style:normal; color:var(--muted); font-size:.9rem; font-weight:600; }

/* ---------- feedback / testimonials ---------- */
.testimonials{ background:var(--surface-tint); padding-top:28px; }
.experience-links-intro{ margin-top:28px; }
.experience-links{ list-style:none; margin:10px 0 0; padding:0; display:grid; gap:8px; }
.experience-links a{ font-size:.95rem; }

/* ---------- vastaanotto ---------- */
.vastaanotto-grid{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:48px; align-items:center; margin-top:28px; }
@media (max-width:860px){ .vastaanotto-grid{ grid-template-columns:minmax(0,1fr); gap:28px; } }
.vastaanotto-photo{ margin:0; }
.vastaanotto-photo img{
  display:block; width:100%; height:auto; aspect-ratio:16/11; object-fit:cover;
  border-radius:16px; box-shadow:0 24px 56px -16px var(--shadow-photo);
}
.vastaanotto-content .clinics{ margin-top:22px; }
.vastaanotto-content .contact-list{ margin-top:16px; }
.contact-list{ display:grid; gap:10px; }
.contact-list .row{ display:flex; justify-content:space-between; gap:12px; border-bottom:1px dashed var(--line); padding-bottom:8px; font-size:.92rem; }
.contact-list .row span:first-child{ color:var(--muted); }
.contact-list .row span:last-child{ font-family:"Manrope", sans-serif; font-weight:700; }

footer{ background:var(--dark-petrol); padding-block:30px; border-top:none; color:var(--on-dark-muted); font-size:.8rem; line-height:1.6; }
footer a{ color:var(--on-dark-accent); text-decoration:underline; }
.footer-brand{ display:flex; align-items:flex-start; gap:14px; }
.footer-logo{ width:26px; height:26px; flex:none; object-fit:contain; margin-top:2px; }
.footer-gold-rule{ display:block; width:60px; height:1px; background:var(--gold); opacity:.7; margin-top:18px; }
.footer-legal{ margin-top:10px; }

.visually-hidden{
  position:absolute; width:1px; height:1px; margin:-1px; border:0; padding:0;
  clip:rect(0 0 0 0); clip-path:inset(50%); overflow:hidden; white-space:nowrap;
}

/* ---------- mobile booking bar (own idea #2) ---------- */
.mobile-book{ display:none; }
@media (max-width:720px){
  body{ padding-bottom:78px; }
  .mobile-book{
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:50;
    width:100%; max-width:100vw; box-sizing:border-box;
    padding:10px max(16px, env(safe-area-inset-left,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(16px, env(safe-area-inset-right,0px));
    background:var(--surface); border-top:1px solid var(--line);
  }
  .mobile-book a{ flex:1; justify-content:center; }
}

/* ---------- cookie consent ---------- */
.cookie-backdrop{
  position:fixed; inset:0; z-index:69;
  background:rgba(13,20,22,.5);
}
.cookie-backdrop[hidden]{ display:none; }
.cookie-consent{
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); z-index:70;
  width:calc(100vw - 32px); max-width:420px; max-height:calc(100vh - 32px); overflow:auto;
  box-sizing:border-box;
  background:var(--surface-tint); border:1px solid var(--line-strong); border-radius:8px;
  padding:18px; box-shadow:0 18px 40px -16px var(--shadow-btn);
}
.cookie-consent[hidden]{ display:none; }
.cookie-consent p{ margin:0 0 14px; font-size:.86rem; line-height:1.55; color:var(--muted); }
.cookie-consent p a{ color:var(--accent); }
.cookie-consent-actions{ display:flex; gap:10px; }
.cookie-consent-actions .btn{ flex:1; justify-content:center; padding:10px 14px; font-size:.86rem; min-height:40px; }
.cookie-consent p.cookie-status{ margin:10px 0 0; font-size:.76rem; }
.cookie-status:empty{ display:none; }

/* ---------- scroll reveal, own idea #3 (progressively enhanced, JS-gated) ---------- */
.js-reveal .reveal{ opacity:0; filter:blur(6px); transition:opacity .7s ease, filter .7s ease; }
.js-reveal .reveal.is-visible{ opacity:1; filter:blur(0); }
@media (prefers-reduced-motion: reduce){
  .js-reveal .reveal{ opacity:1 !important; filter:none !important; transition:none !important; }
}

/* ---------- stub / pending notice (knowledge base articles) ---------- */
.pending{
  margin-top:16px; padding:16px 18px; border:1px dashed var(--line-strong); border-radius:6px;
  background:var(--surface-tint); color:var(--muted); font-size:.92rem; line-height:1.6;
}
.article-grid{ display:grid; grid-template-columns:1fr; gap:0; margin-top:8px; max-width:70ch; }
.article-block{ padding-block:22px; border-top:1px solid var(--line); }
.article-block:last-child{ border-bottom:1px solid var(--line); }
.article-block h2{ font-size:1.2rem; margin-bottom:10px; }
.breadcrumb{ font-size:.82rem; color:var(--muted); margin-bottom:18px; }
.breadcrumb a{ color:var(--muted); }

/* ---------- small utilities ---------- */
.no-border-top{ border-top:none; }
.lede-source{ margin-top:16px; font-size:.82rem; }
.mt-16{ margin-top:16px; }
.cta-row-tight{ margin-top:8px; }
.article-h1{ font-size:clamp(1.8rem,4vw,2.4rem); line-height:1.15; }
