/* BackPain — Dawn skin, shared by the landing (es + en) and the legal pages.
   Tokens mirror brand.md: eucalyptus on porcelain, warm night in dark mode. */

/* ---------- Fonts (self-hosted, subset latin) ---------- */
@font-face {
  font-family: "Hanken Grotesk";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/hanken-400.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/hanken-600.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("fonts/hanken-800.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --bg: #FBF6F0;
  --surface: #FFFFFF;
  --ink: #2C2723;
  --ink-2: #6E655D;
  --green: #217A66;
  --green-ink: #FFFFFF;
  --green-deep: #0E3D31;
  --green-tint: #DDEFE8;
  --apricot: #CF6A44;
  --brick: #B4462B;
  --hairline: #ECE3DA;
  --outline: #D7CDC2;
  --header-bg: rgba(251, 246, 240, 0.86);
  --shadow: 0 2px 6px rgba(44, 39, 35, 0.05), 0 20px 48px -20px rgba(44, 39, 35, 0.18);
  --shadow-soft: 0 1px 3px rgba(44, 39, 35, 0.05), 0 10px 28px -14px rgba(44, 39, 35, 0.12);
  --radius: 20px;
  --radius-s: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130F;
    --surface: #211C17;
    --ink: #F1EAE1;
    --ink-2: #B4A99E;
    --green: #57B99E;
    --green-ink: #17130F;
    --green-deep: #CFE8DE;
    --green-tint: #14231E;
    --apricot: #EBAE8C;
    --brick: #E08464;
    --hairline: #2C251E;
    --outline: #3B322A;
    --header-bg: rgba(23, 19, 15, 0.86);
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 20px 48px -20px rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.4);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.35rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1080px; margin-inline: auto; padding-inline: 24px; }
.muted { color: var(--ink-2); }
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--hairline); }
.site-header .bar {
  display: flex; align-items: center; gap: 16px;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.2rem; color: var(--ink);
  text-decoration: none; margin-right: auto;
}
.mark { width: 15px; height: auto; display: block; }
.lang {
  font-weight: 600; font-size: 0.95rem; color: var(--ink-2); text-decoration: none;
  padding: 10px 14px; border-radius: 999px;
}
.lang:hover { color: var(--ink); background: var(--green-tint); }

/* ---------- Buttons / pills / chips ---------- */
.btn {
  display: inline-block;
  background: var(--green); color: var(--green-ink);
  font-weight: 600; font-size: 0.98rem; line-height: 1;
  padding: 13px 22px; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); filter: brightness(1.05); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 8px 14px;
  font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--shadow-soft);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-brick { background: var(--brick); }
.dot-green { background: var(--green); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: clip; padding: clamp(48px, 8vh, 96px) 0 clamp(56px, 9vh, 110px); }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-copy .lede { font-size: clamp(1.1rem, 1.9vw, 1.3rem); color: var(--ink-2); max-width: 34em; }
.hero-cta { margin-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.badge-play { display: inline-block; line-height: 0; }
.badge-play img { height: 58px; width: auto; }
.fineprint { font-size: 0.92rem; color: var(--ink-2); margin: 0; }

.hero-visual { position: relative; display: grid; place-items: center; }
.hero-visual::before {
  content: ""; position: absolute; inset: -8% -14%;
  background: radial-gradient(closest-side, var(--green-tint), transparent 72%);
  z-index: 0;
}
.phone {
  position: relative; z-index: 1;
  width: min(310px, 76vw);
  background: #2C2723;
  border-radius: 46px; padding: 10px;
  box-shadow: var(--shadow);
}
@media (prefers-color-scheme: dark) { .phone { background: #3B322A; } }
.phone::after {
  /* punch-hole camera */
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); z-index: 2;
}
.phone img { display: block; border-radius: 37px; }
.float-chip { position: absolute; z-index: 2; }
.float-chip.a { top: 16%; right: -4%; }
.float-chip.b { bottom: 3%; left: -6%; }

@media (prefers-reduced-motion: no-preference) {
  .phone { animation: float 9s ease-in-out infinite; }
  .float-chip.a { animation: float 11s ease-in-out infinite reverse; }
  .float-chip.b { animation: float 13s ease-in-out infinite; }
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
  }
}

/* ---------- Sections ---------- */
section { padding: clamp(48px, 8vh, 88px) 0; }
.kicker {
  display: inline-block; font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green); margin-bottom: 14px;
}
.section-head { max-width: 620px; margin-bottom: clamp(28px, 4vh, 44px); }

/* Hook band */
.hook { text-align: center; }
.hook h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); max-width: 17em; margin-inline: auto; }
.hook p { max-width: 36em; margin-inline: auto; font-size: clamp(1.05rem, 1.7vw, 1.2rem); }

/* Cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green-tint); color: var(--green-deep);
  font-weight: 800; font-size: 1rem; margin-bottom: 16px;
}
.card .art { display: grid; place-items: center; height: 170px; margin-bottom: 18px; }
.card .art img { max-height: 170px; width: auto; }
.card p:last-child { margin-bottom: 0; color: var(--ink-2); }

/* Score ring (step 3) */
.scorebox { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; height: 170px; }
.ringwrap { position: relative; width: 132px; height: 132px; flex: none; }
.ring { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring-track { fill: none; stroke: var(--hairline); stroke-width: 9; }
.ring-arc {
  fill: none; stroke: var(--green); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 28;
}
@media (prefers-reduced-motion: no-preference) {
  .ring-arc { stroke-dashoffset: 100; transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
  .ringwrap.in .ring-arc { stroke-dashoffset: 28; }
}
.score-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 800; font-size: 2.3rem; color: var(--green);
  font-variant-numeric: tabular-nums;
}
.score-side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.score-side .cap { font-size: 0.88rem; color: var(--ink-2); line-height: 1.4; }
.chip-brick { color: var(--brick); }

/* Feature cards with mini phone */
.card .mini {
  background: var(--green-tint);
  border-radius: var(--radius-s);
  padding: 22px 22px 0;
  margin: -28px -28px 20px; /* bleed to card edge */
  border-radius: var(--radius) var(--radius) 0 0;
  display: grid; place-items: end center;
  height: 230px; overflow: hidden;
}
.card .mini img {
  width: 200px;
  border-radius: 24px 24px 0 0;
  border: 6px solid #2C2723;
  border-bottom: none;
  display: block;
}
@media (prefers-color-scheme: dark) { .card .mini img { border-color: #3B322A; } }

/* Privacy band */
.privacy { background: var(--green-tint); }
.privacy .inner { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
.privacy h2, .privacy p, .privacy li { color: var(--green-deep); }
.privacy .lock { width: 54px; height: auto; margin-top: 6px; }
.privacy ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.privacy li { display: flex; gap: 10px; align-items: baseline; font-weight: 600; }
.privacy li::before { content: "✓"; color: var(--green); font-weight: 800; }
@media (prefers-color-scheme: dark) { .privacy li::before { color: var(--green); } }

/* Pull quote */
.quote { text-align: center; }
.quote blockquote {
  margin: 0 auto; max-width: 21em;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 800; line-height: 1.25; letter-spacing: -0.01em;
}
.quote blockquote::before { content: "“"; display: block; font-size: 3rem; color: var(--apricot); line-height: 0.6; margin-bottom: 18px; }
.quote figcaption { margin-top: 18px; color: var(--ink-2); font-size: 0.95rem; }

/* Final CTA band */
.cta-final { background: var(--green); }
.cta-final .inner { text-align: center; padding: clamp(16px, 3vh, 32px) 0; }
.cta-final h2 { color: var(--green-ink); }
.cta-final p { color: var(--green-ink); opacity: 0.88; max-width: 32em; margin-inline: auto; }
.cta-final .badge-play { margin-top: 18px; }

/* FAQ */
.faq .inner { max-width: 720px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 600; font-size: 1.05rem; padding: 18px 4px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg); transition: transform 0.2s ease; margin-right: 6px;
}
.faq details[open] summary::after { transform: rotate(225deg); }
.faq details p { color: var(--ink-2); padding: 0 4px 18px; margin: 0; max-width: 60ch; }

/* Disclaimer */
.disclaimer .inner {
  max-width: 720px; margin-inline: auto;
  border: 1px solid var(--outline); border-radius: var(--radius-s);
  padding: 20px 24px; font-size: 0.95rem; color: var(--ink-2);
}
.disclaimer p { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 36px 0 48px; font-size: 0.95rem; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.site-footer .brand { font-size: 1.05rem; margin-right: 0; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }
.site-footer .copy { width: 100%; color: var(--ink-2); margin-top: 8px; }

/* ---------- Legal pages ---------- */
.legal {
  max-width: 720px; margin-inline: auto;
  padding: 40px 24px 80px;
}
.legal h1 { font-size: 1.9rem; }
.legal h2 { font-size: 1.2rem; margin-top: 2em; }
.legal code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; }

/* ---------- Proof shot + team (profesionales) ---------- */
.proof { margin: 30px 0 0; }
.proof img {
  display: block;
  width: 100%;
  border-radius: var(--radius-s);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-soft);
}
.proof figcaption { margin-top: 12px; max-width: 62ch; color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.card .role {
  margin: -0.3em 0 0.7em;
  color: var(--green);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Creator application form (profesionales) ---------- */
.apply { position: relative; max-width: 560px; display: grid; gap: 18px; }
.apply .field { display: grid; gap: 6px; }
.apply label { font-weight: 600; font-size: 0.95rem; }
.apply input, .apply select {
  font: inherit; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-s);
  padding: 12px 16px;
  width: 100%;
}
.apply input::placeholder { color: var(--ink-2); opacity: 0.75; }
.apply .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.apply .consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--green); flex: none; }
.apply .fineprint { margin: 0; }
.apply button { border: 0; cursor: pointer; justify-self: start; font-family: inherit; }
/* Honeypot: parked off-screen, never display:none — bots skip invisible fields. */
.apply .hp { position: absolute; left: -9999px; top: 0; }
.form-msg { font-weight: 600; color: var(--green); margin: 0; }
.form-msg.error { color: var(--brick); }

/* ---------- Reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease var(--d, 0s), transform 0.6s ease var(--d, 0s); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Reduced motion: kill the rest ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards-3 { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .cards-2 { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lede { margin-inline: auto; }
  .hero-cta { align-items: center; }
  .hero-visual { margin-top: 12px; }
  .privacy .inner { grid-template-columns: 1fr; }
  .privacy .lock { margin-top: 0; }
  .section-head { margin-inline: auto; text-align: center; }
}
@media (max-width: 520px) {
  .btn.header-cta { display: none; }
  .float-chip.a { right: 0; }
  .float-chip.b { left: 0; }
  .badge-play img { height: 52px; }
  .card { padding: 24px; }
  .card .mini { margin: -24px -24px 18px; }
}

/* ---------- Guías (SEO articles + hub) ---------- */
/* Same measure as the legal pages: one column of prose, no landing furniture.
   Every color comes from the Dawn tokens, so a new article needs zero CSS. */
.guia {
  max-width: 720px; margin-inline: auto;
  padding: 32px 24px 80px;
}
.guia .crumbs { font-size: 0.92rem; color: var(--ink-2); margin-bottom: 28px; }
.guia .crumbs a { color: var(--ink-2); }
.guia .crumbs a:hover { color: var(--ink); }
.guia .kicker { display: inline-block; margin-bottom: 10px; }
.guia h1 { font-size: 2.15rem; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 12px; }
.guia h2 { font-size: 1.35rem; line-height: 1.25; margin-top: 2.4em; }
.guia h3 { font-size: 1.05rem; margin-top: 1.9em; margin-bottom: 0.4em; }
.guia .meta { color: var(--ink-2); font-size: 0.93rem; margin: 0 0 26px; }
.guia .lede { font-size: 1.2rem; line-height: 1.5; margin-bottom: 1.1em; }
.guia ul, .guia ol { padding-left: 1.2em; }
.guia li { margin: 10px 0; }
.guia li::marker { color: var(--green); font-weight: 600; }

.guia .toc {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-s); padding: 20px 24px; margin: 32px 0;
}
.guia .toc ol { margin: 0; }
.guia .toc li { margin: 6px 0; }
.toc-title {
  margin: 0 0 8px; font-weight: 800; font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}

/* Aside worth stopping at. Tinted, never a colored border alone:
   the green/apricot pair is not separable by hue for every reader. */
.guia .callout {
  background: var(--green-tint); border-radius: var(--radius-s);
  padding: 20px 24px; margin: 30px 0;
}
.guia .callout p:last-child { margin-bottom: 0; }

/* The "go see a professional" block. Outlined so it reads as a warning
   without leaning on color, since the health lane makes it the one block
   that must never be skimmed past. */
.guia .health-note {
  border: 1px solid var(--outline); border-left: 4px solid var(--brick);
  border-radius: var(--radius-s); padding: 20px 24px; margin: 32px 0;
  background: var(--surface);
}
.guia .health-note p { margin: 0; }

.guia .app-cta {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
  padding: 28px 26px; margin: 44px 0;
}
.guia .app-cta .cta-title { font-size: 1.3rem; margin: 0 0 12px; }
.guia .app-cta .badge-play { margin-top: 6px; }

.guia details {
  border-bottom: 1px solid var(--hairline); padding: 14px 0;
}
.guia details summary { cursor: pointer; font-weight: 600; }
.guia details p { margin: 10px 0 4px; color: var(--ink-2); }

.guia .more-guias { margin-top: 48px; }
.guia .more-guias ul { margin: 0; }

.disclaimer-inline {
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--hairline);
  font-size: 0.9rem; line-height: 1.55; color: var(--ink-2);
}

.guias-hub .guia-list { list-style: none; padding: 0; margin: 40px 0 0; }
.guias-hub .guia-card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 26px; margin: 0 0 18px;
  box-shadow: var(--shadow-soft);
}
.guias-hub .guia-card h2 { font-size: 1.3rem; margin: 6px 0 10px; }
.guias-hub .guia-card h2 a { color: var(--ink); text-decoration: none; }
.guias-hub .guia-card h2 a:hover { text-decoration: underline; }
.guias-hub .guia-card p { margin: 0 0 8px; }
.guias-hub .guia-card .meta { margin: 0; }

@media (max-width: 560px) {
  .guia h1 { font-size: 1.75rem; }
  .guia h2 { font-size: 1.2rem; }
  .guia .lede { font-size: 1.1rem; }
  .guia .app-cta { padding: 22px 20px; }
}
