/* =========================================================
   Dr. Horacio Salles — styles.css
   Full rationale for every token lives in CLAUDE.md → "Style guide".
   ========================================================= */

/* ---------- 0. Fonts ---------- */
/* Newsreader, self-hosted (SIL OFL 1.1 — see assets/fonts/OFL.txt). Variable: wght + opsz axes.
   Files come from Google Fonts v26; latin covers Portuguese, latin-ext is a fallback for rare glyphs. */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url(../fonts/newsreader-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url(../fonts/newsreader-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url(../fonts/newsreader-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url(../fonts/newsreader-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- 1. Tokens ---------- */
:root {
  /* Palette: "Linho e petróleo" (warm sand off-white + petrol teal) */
  --bg:       #f8f5ea;  /* page background — very light yellow-sand off-white */
  --hdr:      rgba(248, 245, 234, 0.92); /* sticky header (bg @ 92% + blur) */
  --card:     #fcfaf3;  /* raised surfaces: form card, quote card, carousel */
  --surf:     #efead8;  /* alternate section band (Consultório), hover fills */
  --line:     #e6e0cc;  /* hairlines on bg */
  --line2:    #d9d2ba;  /* hairlines in lists / tables (slightly stronger) */
  --bd:       #cbc3a8;  /* input borders, inactive chips/dots */
  --bd2:      #b5ad90;  /* underline of text links */
  --ink:      #1f2628;  /* primary text, primary buttons */
  --ink2:     #3d4648;  /* body copy */
  --inkh:     #2f3d40;  /* primary button hover */
  --muted:    #5f6a6b;  /* labels, meta, captions (≥4.5:1 on bg) */
  --accent:   #2f6a6e;  /* petrol teal: eyebrows, italic emphasis, focus */
  --deep:     #22474a;  /* dark band (Fibromialgia, footer) ≈ oklch(0.36 0.04 200) */
  --ondeep:   #eef2f1;  /* headings on deep */
  --ondeep2:  #c8d8d7;  /* body on deep */
  --ondeep-line: rgba(255, 255, 255, 0.16);
  --dot:      #5f9a9b;  /* success dot */
  --error:    #9a3b2e;
  --ph-a:     #e9e3d0;  /* image placeholder stripes */
  --ph-b:     #efead9;

  /* Type */
  --font: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, Menlo, monospace;

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(80px, 10vw, 140px);
  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 16px;
  --pill: 999px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
input, textarea, select, button { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; transition: color .2s, background-color .2s, border-color .2s; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: #d6e3e2; }
em { font-style: italic; }
address { font-style: normal; }

.skip-link { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 12px; color: var(--bg); }

/* ---------- 3. Layout helpers ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(40px, 6vw, 96px); align-items: start; }
.grid-2-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.align-end { align-items: end; }
.stack-8  { display: flex; flex-direction: column; gap: 8px; }
.stack-18 { display: flex; flex-direction: column; gap: 18px; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; }
.stack-28 { display: flex; flex-direction: column; gap: 28px; }
.stack-32 { display: flex; flex-direction: column; gap: 32px; }
.stack-section    { display: flex; flex-direction: column; gap: clamp(48px, 6vw, 80px); }
.stack-section-sm { display: flex; flex-direction: column; gap: clamp(48px, 6vw, 72px); }
.row-12 { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-16 { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.max-760 { max-width: 760px; }
.rule-top { border-top: 1px solid var(--line); }
.band-surface { background: var(--surf); }
.band-deep { background: var(--deep); color: var(--ondeep); }

/* ---------- 4. Typography ---------- */
.eyebrow { font-size: 16px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.eyebrow-ondeep { color: var(--ondeep2); }
.display { font-weight: 300; font-size: clamp(46px, 6.4vw, 88px); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
.h2 { font-weight: 300; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.h3 { font-weight: 400; font-size: 26px; line-height: 1.25; }
.h3-step { font-weight: 400; font-size: 25px; line-height: 1.25; }
.accent { color: var(--accent); }
.lead { max-width: 520px; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.55; color: var(--ink2); text-wrap: pretty; }
.body-lg { font-size: 20px; line-height: 1.6; color: var(--ink2); text-wrap: pretty; }
.body { font-size: 19px; line-height: 1.6; text-wrap: pretty; }
.pull { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.35; font-weight: 300; text-wrap: pretty; }
.muted { color: var(--muted); }
.ondeep2 { color: var(--ondeep2); }
.label { font-size: 16px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* Placeholder copy: visibly marked so nothing ships unnoticed. Remove class once real text is in. */
.placeholder { background: rgba(47, 106, 110, .08); outline: 1px dashed rgba(47, 106, 110, .35); outline-offset: 2px; border-radius: 3px; }
.band-deep .placeholder, .site-footer .placeholder { background: rgba(255,255,255,.08); outline-color: rgba(255,255,255,.3); }

/* ---------- 5. Buttons & links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--pill); font-size: 18px; padding: 16px 30px; line-height: 1.2; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn-sm { font-size: 17px; padding: 11px 22px; }
.btn-md { font-size: 17px; padding: 14px 26px; }
.btn-lg { font-size: 19px; padding: 18px 30px; }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--inkh); border-color: var(--inkh); color: var(--bg); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-ghost { border-color: var(--bd); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.link-underline { padding: 16px 8px; font-size: 18px; font-style: italic; color: var(--ink); border-bottom: 1px solid var(--bd2); }
.link-underline:hover { border-bottom-color: var(--ink); }
.link-btn { align-self: flex-start; padding: 0; border: 0; background: none; font-size: 17px; font-style: italic; color: var(--accent); cursor: pointer; border-bottom: 1px solid var(--bd); }
.icon-btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--bd); background: transparent; color: var(--ink); font-size: 22px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background-color .2s, border-color .2s; }
.icon-btn:hover { border-color: var(--ink); background: var(--surf); }
.icon-btn-solid { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.icon-btn-solid:hover { background: var(--inkh); border-color: var(--inkh); }

/* ---------- 6. Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--hdr); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; flex-direction: column; gap: 2px; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-name { font-size: 22px; letter-spacing: -.01em; }
.brand-sub { font-size: 16px; font-style: italic; color: var(--muted); }
.nav-desktop { display: flex; align-items: center; gap: 26px; font-size: 17px; white-space: nowrap; flex-shrink: 0; }
.nav-desktop a:not(.btn) { color: var(--ink2); }
.nav-desktop a:not(.btn):hover { color: var(--accent); }
.nav-mobile { display: none; flex-shrink: 0; }
@media (max-width: 1179px) {
  .nav-desktop { display: none; }
  .nav-mobile { display: inline-flex; }
}

/* ---------- 7. Hero ---------- */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(40px, 6vw, 88px); align-items: center; padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(64px, 8vw, 120px); }
.hero-meta { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.hero-media { position: relative; }
.quote-card { position: absolute; left: clamp(-24px, -2vw, 0px); bottom: 40px; max-width: 290px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 18px 40px -24px rgba(40, 40, 20, .35); }
.quote-card blockquote { font-size: 18px; line-height: 1.45; font-style: italic; color: var(--ink); }
.quote-card figcaption { font-size: 16px; color: var(--muted); }
@media (max-width: 520px) { .quote-card { position: static; margin-top: -48px; margin-left: 16px; margin-right: 16px; max-width: none; } }

/* ---------- 8. Image slots ---------- */
/* Placeholder until the real photo exists. To swap: replace the .img-slot div with
   <img class="photo [img-arch|ratio-3-4|ratio-5-4]" src="assets/img/NAME.jpg" alt="…" loading="lazy"> */
.img-slot { background: repeating-linear-gradient(135deg, var(--ph-a) 0 10px, var(--ph-b) 10px 20px); border-radius: var(--radius); display: flex; align-items: flex-end; justify-content: flex-start; padding: 20px; overflow: hidden; }
.img-slot-surface { --ph-a: #e0d9c2; --ph-b: #e7e1cd; }
.img-slot-label { font-family: var(--mono); font-size: 13px; color: #6f6a58; background: var(--bg); padding: 6px 10px; border-radius: 4px; }
.img-arch { aspect-ratio: 4 / 5; border-radius: 240px 240px var(--radius) var(--radius); justify-content: center; padding: 28px; }
.ratio-3-4 { aspect-ratio: 3 / 4; }
.ratio-5-4 { aspect-ratio: 5 / 4; }
.photo { width: 100%; object-fit: cover; border-radius: var(--radius); }
.photo.img-arch { border-radius: 240px 240px var(--radius) var(--radius); padding: 0; }

/* ---------- 9. Carousel ---------- */
.carousel { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.carousel-viewport { overflow: hidden; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); touch-action: pan-y; }
.carousel-track { display: flex; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
.carousel-slide { flex: 0 0 100%; min-width: 0; padding: clamp(36px, 5vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 28px; min-height: clamp(300px, 30vw, 380px); }
.phrase-heard { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.18; font-weight: 300; font-style: italic; color: var(--ink2); text-wrap: balance; }
.phrase-truth { font-size: clamp(19px, 1.6vw, 21px); line-height: 1.55; color: var(--ink); padding-left: 22px; border-left: 2px solid var(--accent); text-wrap: pretty; }
.carousel-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.carousel-dots { display: flex; gap: 10px; align-items: center; }
.carousel-dots button { width: 10px; height: 10px; border-radius: var(--pill); border: 0; padding: 0; cursor: pointer; background: var(--bd); transition: width .3s, background-color .3s; }
.carousel-dots button[aria-current="true"] { width: 28px; background: var(--accent); }
.carousel-counter { font-size: 17px; color: var(--muted); min-width: 48px; text-align: right; }

/* ---------- 10. Fibromialgia band ---------- */
.signs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1px; background: var(--ondeep-line); border: 1px solid var(--ondeep-line); border-radius: var(--radius); overflow: hidden; }
.sign { background: var(--deep); padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; }
.sign p { font-size: 18px; line-height: 1.55; color: var(--ondeep2); }
.treatment { gap: clamp(32px, 5vw, 80px); padding-top: 8px; }
.band-deep .grid-2 { gap: clamp(32px, 5vw, 80px); }

/* ---------- 11. Key/value lists (Sobre, Consultório) ---------- */
.kv { border-top: 1px solid var(--line2); }
.kv > div { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line2); font-size: 18px; }
.kv-narrow > div { grid-template-columns: minmax(120px, 160px) 1fr; padding: 14px 0; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--ink); }
.address { display: flex; flex-direction: column; gap: 4px; font-size: 21px; line-height: 1.5; }

/* ---------- 12. Steps & facts ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: clamp(28px, 3vw, 40px); }
.steps li { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; border-top: 1px solid var(--ink); }
.steps p { font-size: 18px; line-height: 1.55; color: var(--ink2); text-wrap: pretty; }
.step-n { font-size: 48px; font-weight: 300; font-style: italic; color: var(--accent); line-height: 1; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.facts > div { padding: 28px 28px 28px 0; display: flex; flex-direction: column; gap: 6px; }
.fact { font-size: 24px; }
.fact-text { font-size: 19px; line-height: 1.45; color: var(--ink2); text-wrap: pretty; }

/* ---------- 13. Form ---------- */
.contact-alt { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 17px; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-label { font-size: 16px; color: var(--ink2); padding: 0; }
fieldset.field .field-label { margin-bottom: 4px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 22px; }
.input { font-size: 19px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--bd); background: transparent; color: var(--ink); outline: none; border-radius: 0; transition: border-color .2s; }
.input:focus { border-bottom-color: var(--ink); }
.textarea { font-size: 19px; line-height: 1.5; padding: 14px 16px; border: 1px solid var(--bd); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); outline: none; resize: vertical; transition: border-color .2s; }
.textarea:focus { border-color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: #8a9393; }
.input[aria-invalid="true"] { border-bottom-color: var(--error); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 11px 22px; border-radius: var(--pill); font-size: 17px; border: 1px solid var(--bd); color: var(--ink); transition: background-color .2s, border-color .2s, color .2s; }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.5; color: var(--ink2); cursor: pointer; }
.consent a { border-bottom: 1px solid var(--bd2); }
.consent a:hover { border-bottom-color: var(--ink); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.form-card .btn-lg { margin-top: 6px; width: 100%; }
.form-card .btn-lg[disabled] { opacity: .7; cursor: progress; }
.form-error { font-size: 16px; line-height: 1.5; color: var(--error); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-success { min-height: 420px; justify-content: center; gap: 20px; padding: clamp(36px, 5vw, 56px); outline: none; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dot); }
.success-title { font-size: clamp(30px, 3vw, 40px); font-weight: 300; line-height: 1.15; }

/* ---------- 14. Footer ---------- */
.site-footer { background: var(--deep); color: var(--ondeep); }
.footer-inner { padding-top: clamp(64px, 8vw, 96px); padding-bottom: 40px; display: flex; flex-direction: column; gap: 56px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 40px; }
.footer-name { font-size: clamp(30px, 3vw, 38px); font-weight: 300; letter-spacing: -.01em; }
.footer-sub { font-size: 17px; font-style: italic; color: var(--ondeep2); }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.5; color: var(--ondeep2); }
.footer-col a { color: var(--ondeep2); }
.footer-col a:hover { color: var(--ondeep); }
.footer-label { font-size: 16px; letter-spacing: .14em; text-transform: uppercase; color: var(--ondeep); }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--ondeep-line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 16px; color: var(--ondeep2); }
.site-footer :focus-visible, .band-deep :focus-visible { outline-color: var(--ondeep); }
.footer-bottom a { color: var(--ondeep2); border-bottom: 1px solid var(--ondeep-line); }
.footer-bottom a:hover { color: var(--ondeep); border-bottom-color: var(--ondeep); }

/* ---------- 15. Inner pages (privacidade, 404) ---------- */
.page-intro { padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(40px, 5vw, 64px); }
.legal { max-width: 760px; display: flex; flex-direction: column; gap: 40px; padding-bottom: var(--section-y); }
.legal section { display: flex; flex-direction: column; gap: 16px; padding-top: 32px; border-top: 1px solid var(--line2); }
.legal p, .legal li { font-size: 19px; line-height: 1.6; color: var(--ink2); text-wrap: pretty; }
.legal ul { display: flex; flex-direction: column; gap: 10px; padding-left: 22px; list-style: disc; }
.legal li::marker { color: var(--accent); }
.legal a { border-bottom: 1px solid var(--bd2); }
.legal a:hover { border-bottom-color: var(--ink); }

/* ---------- 16. Motion ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .carousel-track, .carousel-dots button { transition: none; }
}
