/* goethita.com — tokens e regras em docs/design.md */
@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --s0: #F7F6F2;
  --s1: #EFEDE7;
  --s2: #E7E3DA;
  --s3: #E2DDD3;
  --rock: #12100E;
  --deep: #0A0908;
  --ink: #0C0C0D;
  --ink-2: #3A3A3E;
  --muted: #5E5E64;
  --line: #DCD8CF;
  --card: #FFFFFF;
  --ochre: #9C4A1A;
  --on-ochre: #FFFFFF;

  --rock-ink: #F5F3EE;
  --rock-muted: #A8A29A;
  --rock-card: #1A1715;
  --rock-line: #2A2622;
  --rock-ochre: #E39A5B;

  --alk-bg: #0C0C0D;
  --alk-panel: #141416;
  --alk-line: #26262A;
  --alk-ink: #F5F4F0;
  --alk-muted: #A1A1A6;
  --alk-gold: #C9A227;
  --tm: #4338CA;
  --tm-soft: #EEF2FF;
  --tm-col: #F1F1F4;
  --danger: #B91C1C;
  --warn: #A16207;

  /* camadas do testemunho de sondagem */
  --l1: #EFEDE7; --l1-ink: var(--ink);
  --l2: #E2DED4; --l2-ink: var(--ink);
  --l3: #CFC8BA; --l3-ink: var(--ink);
  --l3b: #B8AF9F; --l3b-ink: var(--ink);
  --l4: #2A2622; --l4-ink: var(--rock-ink);
  --l5: #12100E; --l5-ink: var(--rock-ink);

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --max: 1200px;
  --gutter: 16px;
  --radius: 28px;
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1280px) { :root { --gutter: 80px; } }
@media (max-width: 559px) { :root { --radius: 20px; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --s0: #141312; --s1: #11100F; --s2: #0E0D0C; --s3: #0C0B0A; --rock: #0A0909; --deep: #060505;
    --ink: #F5F3EE; --ink-2: #CFCAC2; --muted: #A39D95; --line: #2A2724;
    --card: #1C1A18; --ochre: #E39A5B; --on-ochre: #12100E;
    --alk-line: #2E2E33;
    --tm: #818CF8; --tm-soft: #1E1B4B; --tm-col: #24222A; --danger: #F87171; --warn: #FACC15;
    --l1: #24211E; --l2: #1E1C1A; --l3: #191715; --l3b: #161412; --l4: #12100F; --l5: #0A0909;
    --l1-ink: var(--ink); --l2-ink: var(--ink); --l3-ink: var(--ink); --l3b-ink: var(--ink);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --s0: #141312; --s1: #11100F; --s2: #0E0D0C; --s3: #0C0B0A; --rock: #0A0909; --deep: #060505;
  --ink: #F5F3EE; --ink-2: #CFCAC2; --muted: #A39D95; --line: #2A2724;
  --card: #1C1A18; --ochre: #E39A5B; --on-ochre: #12100E;
  --alk-line: #2E2E33;
  --tm: #818CF8; --tm-soft: #1E1B4B; --tm-col: #24222A; --danger: #F87171; --warn: #FACC15;
  --l1: #24211E; --l2: #1E1C1A; --l3: #191715; --l3b: #161412; --l4: #12100F; --l5: #0A0909;
  --l1-ink: var(--ink); --l2-ink: var(--ink); --l3-ink: var(--ink); --l3b-ink: var(--ink);
  color-scheme: dark;
}

/* ── base ───────────────────────────────────────────── */
* { box-sizing: border-box; }
html { background: var(--deep); scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--s0); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  font-feature-settings: "kern", "calt";
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ochre); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 30; background: var(--ink); color: var(--s0); padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ── cabeçalho ──────────────────────────────────────── */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--s0) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: .02em; font-size: 1.0625rem; min-height: 44px; }
.mark { width: 22px; height: 22px; flex: none; }
.mark .m-rock { fill: currentColor; }
.mark .m-vein { fill: var(--ochre); }
.nav { display: none; gap: 32px; margin-left: auto; font-size: .9375rem; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 10px 0; }
.nav a:hover { color: var(--ink); }
.top-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 900px) { .nav { display: flex; } .top-end { margin-left: 24px; } }
.lang { display: flex; gap: 4px; }
.lang a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 999px;
  font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .06em;
  color: var(--muted); text-decoration: none;
}
.lang a[aria-current="page"] { color: var(--ink); background: var(--s2); }
.top .btn { display: none; }
@media (min-width: 560px) { .top .btn { display: inline-flex; } }

/* ── botões ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  font-size: .9375rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: background-color .2s ease, border-color .2s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-solid { background: var(--ink); color: var(--s0); }
.btn-solid:hover { background: var(--ink-2); }
.btn-line { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-line:hover { border-color: var(--muted); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }

/* ── tipografia comum ───────────────────────────────── */
.eyebrow { font-size: .8125rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.depth { font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.depth b { color: var(--ochre); font-weight: 500; }
.depth::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .35; max-width: 120px; }
h1 { font-size: clamp(2.75rem, 7.4vw, 6rem); line-height: .98; font-weight: 600; letter-spacing: -.045em; }
h2 { font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.03; font-weight: 600; letter-spacing: -.035em; max-width: 18ch; }
h3 { font-size: 1.5rem; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.lead { font-size: clamp(1.125rem, 1.7vw, 1.3125rem); line-height: 1.5; color: var(--ink-2); max-width: 40rem; }
.sec-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 64px); }
.sec-head .lead { max-width: 38rem; }

/* ── estratos ───────────────────────────────────────── */
.stratum { position: relative; padding: clamp(88px, 12vw, 140px) 0; }
.stratum::before {
  content: ""; position: absolute; left: 0; right: 0; top: -27px; height: 28px;
  background: inherit; pointer-events: none;
  clip-path: polygon(0 62%, 6% 40%, 13% 55%, 21% 22%, 29% 48%, 37% 35%, 44% 60%, 52% 30%, 60% 45%, 67% 18%, 75% 42%, 83% 28%, 90% 52%, 96% 36%, 100% 46%, 100% 100%, 0 100%);
}
.stratum.e2::before { clip-path: polygon(0 40%, 8% 58%, 15% 30%, 24% 46%, 31% 20%, 40% 52%, 49% 38%, 57% 62%, 64% 34%, 73% 50%, 81% 24%, 88% 44%, 95% 30%, 100% 55%, 100% 100%, 0 100%); }
.stratum.e3::before { clip-path: polygon(0 30%, 7% 46%, 16% 24%, 23% 54%, 33% 40%, 41% 18%, 50% 44%, 58% 30%, 66% 58%, 74% 36%, 82% 50%, 89% 22%, 100% 40%, 100% 100%, 0 100%); }
.s1 { background: var(--s1); }
.s2 { background: var(--s2); }
.s3 { background: var(--s3); }
.rock { background: var(--rock); color: var(--rock-ink); }
.deep { background: var(--deep); color: var(--rock-ink); }
.rock .eyebrow, .deep .eyebrow, .rock .depth, .deep .depth { color: var(--rock-muted); }
.rock .depth b, .deep .depth b, .rock a, .deep a { color: var(--rock-ochre); }
.rock .lead, .deep .lead { color: var(--rock-muted); }

/* ── hero ───────────────────────────────────────────── */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(88px, 10vw, 128px); }
.hero-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 64px; } }
.hero-copy { display: grid; gap: 28px; justify-items: start; }
.hero .lead { max-width: 34rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.fine { font-size: .8125rem; color: var(--muted); }

/* testemunho de sondagem */
.core { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); box-shadow: 0 50px 100px -40px rgba(12, 12, 13, .35); }
.core-head { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.core ol { list-style: none; margin: 0; padding: 0; }
.core-l {
  position: relative; display: grid; grid-template-columns: 5.25rem minmax(0, 1fr) auto; gap: 12px; align-items: center;
  min-height: 64px; padding: 14px 20px; text-decoration: none;
  background-color: var(--lb); color: var(--li);
  background-image: var(--tex, none);
  transition: padding-left .3s ease;
}
.core-l:hover { padding-left: 28px; }
.core-l .cd { font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; opacity: .8; }
.core-l .cn { font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; }
.core-l .cn small { display: block; font-weight: 400; font-size: .8125rem; opacity: .8; letter-spacing: 0; }
.core-l .ca { font-size: 1rem; opacity: .6; }
.core li:nth-child(1) .core-l { --lb: var(--l1); --li: var(--l1-ink); min-height: 76px;
  --tex: repeating-linear-gradient(0deg, transparent 0 9px, color-mix(in srgb, var(--l1-ink) 6%, transparent) 9px 10px); }
.core li:nth-child(2) .core-l { --lb: var(--l2); --li: var(--l2-ink); min-height: 92px;
  --tex: radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--l2-ink) 9%, transparent) 1.5px, transparent 2px) 0 0 / 14px 12px; }
.core li:nth-child(3) .core-l { --lb: var(--l3); --li: var(--l3-ink); min-height: 72px;
  --tex: repeating-linear-gradient(-35deg, transparent 0 7px, color-mix(in srgb, var(--l3-ink) 7%, transparent) 7px 8px); }
.core li:nth-child(4) .core-l { --lb: var(--l3b); --li: var(--l3b-ink); min-height: 68px;
  --tex: repeating-linear-gradient(90deg, transparent 0 13px, color-mix(in srgb, var(--l3b-ink) 7%, transparent) 13px 14px); }
.core li:nth-child(5) .core-l { --lb: var(--l4); --li: var(--l4-ink); min-height: 84px;
  --tex: radial-gradient(ellipse at 50% 50%, rgba(245, 243, 238, .06) 2px, transparent 3px) 0 0 / 22px 16px; }
.core li:nth-child(6) .core-l { --lb: var(--l5); --li: var(--l5-ink); min-height: 96px; }
.core .vein { position: absolute; grid-column: 1 / -1; left: 0; right: 0; bottom: 18px; height: 22px; width: 100%; pointer-events: none; }
.core .vein path { fill: none; stroke: var(--rock-ochre); stroke-width: 3; stroke-linecap: round; }
.core li:nth-child(6) .core-l > * { position: relative; z-index: 1; }

/* ── projetos ───────────────────────────────────────── */
.projects { display: grid; gap: 20px; }
@media (min-width: 1024px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.proj { border-radius: var(--radius); padding: clamp(24px, 3.4vw, 40px); display: grid; gap: 24px; align-content: start; }
.proj-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.proj .pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.proj .pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.proj h3 { font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -.03em; line-height: 1.08; }
.proj > p { font-size: .9375rem; line-height: 1.55; max-width: 34rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: .9375rem; }
.facts li { padding: 12px 0; border-top: 1px solid; display: flex; gap: 12px; }
.facts li::before { content: "—"; opacity: .5; }
.proj-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; min-height: 44px; }
.proj-link svg { width: 16px; height: 16px; }
.demo { margin: 0; border-radius: 18px; padding: 16px; display: grid; gap: 12px; }
.demo figcaption { font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }

/* ALKMIA */
.alk { background: var(--alk-bg); color: var(--alk-ink); border: 1px solid var(--alk-line); }
.alk-word { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .32em; font-size: .9375rem; }
.alk-word svg { width: 20px; height: 17px; }
.alk-word path { fill: var(--alk-gold); }
.alk .pill { color: var(--alk-gold); background: rgba(201, 162, 39, .12); }
.alk > p { color: var(--alk-muted); }
.alk .facts li { border-color: var(--alk-line); color: var(--alk-muted); }
.alk .proj-link { color: var(--alk-ink); }
.alk .proj-link:hover { color: var(--alk-gold); }
.alk .demo { background: var(--alk-panel); border: 1px solid var(--alk-line); }
.alk .demo figcaption { color: var(--alk-muted); }
.sets { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) minmax(0, 1fr) 1.75rem; gap: 8px 10px; align-items: center; font-size: .875rem; font-variant-numeric: tabular-nums; }
.sets .n { color: var(--alk-muted); }
.sets .ok { width: 24px; height: 24px; border-radius: 50%; background: var(--alk-ink); display: grid; place-items: center; }
.sets .ok svg { width: 12px; height: 12px; stroke: var(--alk-bg); }
.sets .todo { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--alk-line); }
.sets .sug { font-weight: 600; padding: 4px 8px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--alk-gold); width: fit-content; }
.ex-title { font-weight: 600; font-size: .9375rem; }
.ex-title small { display: block; font-weight: 400; font-size: .75rem; color: var(--alk-muted); margin-top: 2px; }
.alk .why { font-size: .8125rem; color: var(--alk-muted); border-top: 1px solid var(--alk-line); padding-top: 12px; }

/* Gestor de tarefas */
.tm { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.tm-word { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .9375rem; }
.tm-word svg { width: 20px; height: 20px; }
.tm-word rect { fill: var(--tm); }
.tm .pill { color: var(--tm); background: var(--tm-soft); }
.tm > p { color: var(--ink-2); }
.tm .facts li { border-color: var(--line); color: var(--ink-2); }
.tm .proj-link { color: var(--muted); }
.tm .demo { background: var(--s0); border: 1px solid var(--line); }
.tm .demo figcaption { color: var(--muted); }
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.board .col:nth-child(3) { display: none; }
@media (min-width: 560px) { .board .col:nth-child(3) { display: grid; } }
.col { background: var(--tm-col); border-radius: 12px; padding: 8px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.col-h { display: flex; justify-content: space-between; font-size: .75rem; font-weight: 600; padding: 2px 4px; }
.col-h span { color: var(--muted); font-weight: 400; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: .75rem; line-height: 1.35; display: grid; gap: 6px; }
.tcard b { font-weight: 550; }
.tmeta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .6875rem; color: var(--muted); }
.tag-u { color: var(--danger); font-weight: 600; }
.tag-h { color: var(--warn); font-weight: 600; }
.tcard.done b { text-decoration: line-through; color: var(--muted); }
.tcard.drag { box-shadow: 0 0 0 1.5px var(--tm); }

/* próximos veios: projetos ainda por abrir, contorno tracejado */
.fut-head { display: grid; gap: 6px; margin-top: clamp(48px, 6vw, 72px); }
.fut-head p { color: var(--ink-2); }
.futures { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 768px) { .futures { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fut { border: 1px dashed var(--muted); border-radius: var(--radius); padding: clamp(22px, 2.6vw, 30px); display: grid; gap: 8px; align-content: start; }
.fut .st { font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ochre); }
.fut h4 { margin: 4px 0 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.fut p { color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }

/* ── serviços ───────────────────────────────────────── */
.services { display: grid; gap: 20px; }
@media (min-width: 768px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.svc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); display: grid; gap: 14px; align-content: start; }
.svc .num { font-family: var(--mono); font-size: .75rem; color: var(--ochre); letter-spacing: .06em; }
.svc p { color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }
.svc .proof { font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line); margin-top: 6px; }
.svc-cta { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); border: 1px dashed var(--muted); }
.svc-cta p { flex: 1 1 22rem; font-size: 1.0625rem; color: var(--ink-2); }
.svc-cta strong { color: var(--ink); font-weight: 600; }

/* ── o nome ─────────────────────────────────────────── */
.name-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .name-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 80px; } }
.specimen { position: relative; aspect-ratio: 1 / 1; max-width: 460px; width: 100%; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.specimen svg.crystal { width: 78%; height: auto; color: var(--ink); }
.crystal line, .crystal path { fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; }
.crystal .tip { stroke: var(--ochre); stroke-width: 1.6; }
.specimen .formula { position: absolute; left: 20px; bottom: 16px; font-family: var(--mono); font-size: .875rem; color: var(--muted); }
.specimen .formula b { color: var(--ochre); font-weight: 500; }
.specimen .label { position: absolute; right: 20px; top: 16px; font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.name-copy { display: grid; gap: 28px; }
.name-copy p { max-width: 62ch; color: var(--ink-2); }
.pair { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
@media (min-width: 560px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair > div { background: var(--s2); padding: 20px 22px; display: grid; gap: 6px; align-content: start; }
.pair h3 { font-size: 1.0625rem; letter-spacing: -.01em; }
.pair p { font-size: .9375rem; line-height: 1.55; }

/* ── o mineiro ──────────────────────────────────────── */
.founder-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .founder-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 80px; } }
.founder-copy { display: grid; gap: 24px; justify-items: start; }
.founder-copy > p:not(.depth):not(.lead) { max-width: 62ch; color: var(--ink-2); }
/* ficha de amostra, como as etiquetas das coleções de minerais */
.ficha { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 2.8vw, 32px); display: grid; gap: 18px; width: 100%; max-width: 460px; justify-self: center; box-shadow: 0 30px 70px -40px rgba(12, 12, 13, .35); }
.ficha-h { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.ficha dl { margin: 0; display: grid; }
.ficha dl > div { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.ficha dt { font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ficha dd { margin: 0; font-size: .9375rem; font-weight: 500; }
.ficha-f { font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ochre); }
@media (max-width: 400px) { .ficha dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* ── princípios (rocha) ─────────────────────────────── */
.grid3 { display: grid; gap: 1px; background: var(--rock-line); border: 1px solid var(--rock-line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 900px) { .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid3 > div { background: var(--rock-card); padding: clamp(28px, 3.4vw, 40px); display: grid; gap: 14px; align-content: start; }
.grid3 .big { font-size: 2.75rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--rock-ink); }
.grid3 h3 { font-size: 1.25rem; }
.grid3 p { font-size: .9375rem; line-height: 1.55; color: var(--rock-muted); }

/* ── contacto (rocha-mãe) ───────────────────────────── */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); align-items: end; } }
.contact h2 { font-size: clamp(2.5rem, 6.5vw, 5.25rem); max-width: 14ch; }
.contact-links { display: grid; gap: 12px; justify-items: start; }
.btn-ochre { background: var(--rock-ochre); color: #12100E; }
.btn-ochre:hover { background: #ECB07D; }
.btn-ghost { border-color: var(--rock-line); color: var(--rock-ink); }
.btn-ghost:hover { border-color: var(--rock-muted); }
.deep .btn-ochre, .deep .btn-ghost { color: inherit; }
.deep .btn-ochre { color: #12100E; }

/* ── documentos legais ──────────────────────────────── */
.doc { padding: clamp(40px, 7vw, 88px) 0 clamp(72px, 10vw, 120px); }
.doc p, .doc li { color: var(--ink-2); max-width: 68ch; }
.doc ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 8px; }
.doc-hero { display: grid; gap: 20px; max-width: 820px; padding-bottom: clamp(32px, 4vw, 48px); margin-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.doc h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.doc-meta { display: flex; flex-wrap: wrap; margin: 0; width: fit-content; max-width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.doc-meta > div { display: grid; gap: 2px; padding: 10px 18px; border-right: 1px solid var(--line); }
.doc-meta > div:last-child { border-right: 0; }
.doc-meta dt { font-family: var(--mono); font-size: .625rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.doc-meta dd { margin: 0; font-size: .875rem; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 559px) {
  .doc-meta { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .doc-meta > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .doc-meta > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .doc-meta > div:nth-last-child(-n+2) { border-bottom: 0; }
}
.draft { border: 1px dashed var(--ochre); border-radius: 14px; padding: 14px 18px; font-size: .9375rem; max-width: 760px !important; }
.draft strong { font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ochre); margin-right: 8px; }

/* índice: cartão recolhível no telemóvel, coluna fixa no computador */
.doc-layout { display: grid; gap: 32px; }
.toc details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.toc summary { display: flex; align-items: center; min-height: 48px; padding: 0 18px; cursor: pointer; font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0 8px 10px; display: grid; gap: 2px; }
.toc a { display: flex; gap: 10px; align-items: baseline; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .875rem; line-height: 1.35; }
.toc a:hover { color: var(--ink); background: var(--s1); }
.toc a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.toc-n { font-family: var(--mono); font-size: .6875rem; font-weight: 400; color: var(--muted); min-width: 1.1rem; }
@media (min-width: 1024px) {
  .doc-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 72px; align-items: start; }
  .toc { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); }
  .toc details { background: none; border: 0; border-radius: 0; }
  .toc summary { pointer-events: none; list-style: none; padding: 0 0 12px; min-height: 0; }
  .toc summary::-webkit-details-marker { display: none; }
  .toc ol { padding: 0; border-left: 1px solid var(--line); }
  .toc a { border-radius: 0; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; }
  .toc a:hover { background: none; }
  .toc a[aria-current="true"] { border-left-color: var(--ochre); }
}

.doc-body { display: grid; gap: clamp(44px, 5vw, 64px); min-width: 0; max-width: 820px; }
.clause { display: grid; gap: 16px; scroll-margin-top: calc(88px + env(safe-area-inset-top, 0px)); }
.clause h2 { max-width: none; font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.2; letter-spacing: -.02em; }
.clause-n { display: inline-block; margin-right: 14px; vertical-align: .3em; font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .04em; color: var(--ochre); }
.anchor { margin-left: 10px; font-weight: 400; color: var(--muted); text-decoration: none; opacity: 0; transition: opacity .2s ease; }
.clause h2:hover .anchor, .anchor:focus-visible { opacity: 1; }
@media (hover: none) { .anchor { opacity: .5; } }

.essentials { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 768px) { .essentials { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ess { background: var(--card); padding: clamp(20px, 2.6vw, 28px); display: grid; gap: 8px; align-content: start; }
.ess h3 { font-size: 1.0625rem; letter-spacing: -.01em; }
.ess p { font-size: .9375rem; line-height: 1.55; }

.ficha-doc { max-width: 760px; justify-self: stretch; box-shadow: none; display: grid; gap: 0; margin: 0; padding: 4px clamp(18px, 2.6vw, 28px); }
.ficha-doc > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.ficha-doc > div:last-child { border-bottom: 0; }
.ficha-doc dd { overflow-wrap: anywhere; }
@media (max-width: 480px) { .ficha-doc > div { grid-template-columns: 1fr; gap: 2px; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.table-wrap table { width: 100%; min-width: 44rem; border-collapse: collapse; font-size: .875rem; line-height: 1.5; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 14px 16px; border-top: 1px solid var(--line); }
.table-wrap thead th { border-top: 0; font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.table-wrap tbody th { font-weight: 600; color: var(--ink); }
.table-wrap td { color: var(--ink-2); }
/* abaixo de 768 px cada linha passa a cartão, com o rótulo da coluna */
@media (max-width: 767px) {
  .table-wrap:has(.stack) { border: 0; background: none; border-radius: 0; overflow: visible; }
  .stack, .stack tbody, .stack tr, .stack th, .stack td { display: block; }
  .table-wrap .stack { min-width: 0; }
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack tr { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; }
  .stack tr + tr { margin-top: 12px; }
  .table-wrap .stack th, .table-wrap .stack td { display: grid; gap: 2px; padding: 11px 0; border-top: 1px dashed var(--line); }
  .table-wrap .stack tr > :first-child { border-top: 0; font-size: .9375rem; }
  .stack [data-label]::before { content: attr(data-label); font-family: var(--mono); font-size: .625rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
}

.plain { list-style: none; padding: 0 !important; gap: 0 !important; background: var(--card); border: 1px solid var(--line); border-radius: 16px; max-width: 560px; }
.plain li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 13px 18px; border-top: 1px solid var(--line); max-width: none; }
.plain li:first-child { border-top: 0; }
.plain span { font-size: .875rem; color: var(--muted); }
.plain strong { font-size: .9375rem; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }

.rights { list-style: none; padding: 0 !important; display: grid !important; gap: 12px !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.rights li { max-width: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: grid; gap: 4px; align-content: start; }
.rights strong { font-size: 1rem; font-weight: 600; color: var(--ink); }
.rights span { font-size: .9375rem; line-height: 1.5; }
.rights small { font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ochre); margin-top: 6px; }

.act { display: grid; gap: 1px; background: var(--rock-line); border: 1px solid var(--rock-line); border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
@media (min-width: 768px) { .act { grid-template-columns: 1fr 1fr; } }
.act > div { background: var(--rock); padding: clamp(22px, 3vw, 32px); display: grid; gap: 10px; align-content: start; }
.act h3 { font-size: 1.125rem; color: var(--rock-ink); }
.doc .act p { color: var(--rock-muted); font-size: .9375rem; line-height: 1.55; }
.act strong { color: var(--rock-ink); font-weight: 500; overflow-wrap: anywhere; }
.act a { color: var(--rock-ochre); }

.doc-end { display: grid; gap: 20px; padding-top: 32px; border-top: 1px solid var(--line); }
.doc-end h2 { font-size: 1.125rem; letter-spacing: -.01em; max-width: none; }
@media (min-width: 768px) { .doc-end .table-wrap table { min-width: 28rem; } }
.see-also { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 12px; }
.see-also .eyebrow { width: 100%; }
.see-card { display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 26px; border-radius: 999px; background: var(--ink); color: var(--s0); text-decoration: none; font-weight: 500; }
.see-card svg { width: 16px; height: 16px; }
.see-card:hover { background: var(--ink-2); }
.see-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
footer .legal a[aria-current="page"] { color: var(--rock-ink); }

/* impressão: só o documento, a preto sobre branco */
@media print {
  .top, footer, .toc, .skip, .anchor, .see-also, .probe { display: none !important; }
  html, body, .doc { background: #FFFFFF !important; color: #000000 !important; }
  .doc { padding: 0; }
  .doc-layout { display: block; }
  .doc p, .doc li, .doc td, .doc dd, .doc .act p, .act h3, .act strong { color: #000000 !important; }
  .essentials, .ess, .rights li, .act, .act > div, .plain, .table-wrap, .doc-meta, .ficha-doc { background: #FFFFFF !important; border-color: #999999 !important; box-shadow: none !important; }
  .clause { break-inside: avoid; }
  a { color: #000000 !important; }
}

/* ── rodapé ─────────────────────────────────────────── */
footer { background: var(--deep); color: var(--rock-muted); font-size: .875rem; padding: 0 0 48px; }
footer .wrap { display: grid; gap: 20px; border-top: 1px solid var(--rock-line); padding-top: 32px; }
@media (min-width: 900px) { footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
footer .brand { color: var(--rock-ink); }
footer .brand .m-vein { fill: var(--rock-ochre); }
footer p { overflow-wrap: anywhere; }
footer .legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
footer a { color: var(--rock-muted); min-height: 44px; display: inline-flex; align-items: center; }
footer a:hover { color: var(--rock-ink); }

/* ── sonda de profundidade ──────────────────────────── */
.probe { display: none; }
@media (min-width: 1280px) {
  .js .probe {
    display: block; position: fixed; left: 28px; top: 50%; transform: translateY(-50%); z-index: 15;
    height: 44vh; width: 1px; background: color-mix(in srgb, var(--muted) 45%, transparent);
    pointer-events: none; mix-blend-mode: normal;
  }
  .probe-m { position: absolute; left: -4px; top: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ochre); transform: translateY(calc(var(--p, 0) * 44vh - 4px)); transition: transform .15s linear; }
  .probe-v { position: absolute; left: 14px; top: 0; transform: translateY(calc(var(--p, 0) * 44vh - 50%)); transition: transform .15s linear; font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
  .probe.on-rock { background: rgba(168, 162, 154, .35); }
  .probe.on-rock .probe-v { color: var(--rock-muted); }
  .probe.on-rock .probe-m { background: var(--rock-ochre); }
}

/* ── movimento ──────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .draw { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); }
.js .draw.is-in { animation: draw 2.4s cubic-bezier(.3, .1, .2, 1) forwards; animation-delay: var(--d, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .draw { stroke-dashoffset: 0; animation: none; }
  .core-l, .core-l:hover { transition: none; padding-left: 20px; }
  .probe-m, .probe-v { transition: none; }
}

/* ── 404: uma galeria sem saída, na rocha-mãe ──────── */
.lost { background: var(--deep); color: var(--rock-ink); min-height: 100vh; }
.lost-main { padding: clamp(32px, 6vw, 64px) 0 clamp(64px, 10vw, 120px); }
.lost-grid { display: grid; gap: clamp(48px, 8vw, 96px); }
.lost .brand { color: var(--rock-ink); }
.lost .brand .m-vein { fill: var(--rock-ochre); }
.lost-block { display: grid; gap: 20px; justify-items: start; max-width: 40rem; }
.lost .depth { color: var(--rock-muted); }
.lost .depth b { color: var(--rock-ochre); }
.lost h1 { font-size: clamp(2.5rem, 7vw, 5rem); }
.lost .lead, .lost p { color: var(--rock-muted); }
.lost-en { padding-top: clamp(32px, 5vw, 48px); border-top: 1px solid var(--rock-line); }
.lost-en h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
