/* AtheneaLab — sitio general. Paleta oficial: Deep Teal, Soft Peach, Ice White. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-wght-normal.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;
}

:root {
  --ice: #f4f8fa;
  --white: #ffffff;
  --teal: #0f3d47;
  --teal-hover: #0b2f37;
  --peach: #f59e7b;
  --peach-soft: #fde5da;
  --text: #16343b;
  --muted: #526b72;
  --border: #d6e2e5;
  --radius: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: var(--ice);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; gap: 6px; }
.nav a {
  position: relative;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px; font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { background: var(--peach-soft); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 3px; border-radius: 3px; background: var(--peach);
}

/* ---------- Portada ---------- */
.hero {
  background-image:
    radial-gradient(48rem 32rem at 88% -10%, rgba(245, 158, 123, 0.20), transparent 60%),
    radial-gradient(40rem 30rem at -10% 110%, rgba(15, 61, 71, 0.08), transparent 60%);
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 48px;
  padding-top: 72px; padding-bottom: 80px;
}
.status {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px; padding: 7px 16px;
  border: 1px solid var(--peach); border-radius: 999px;
  background: var(--peach-soft); color: var(--teal);
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 0 rgba(15, 61, 71, 0.45);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(15, 61, 71, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(15, 61, 71, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 61, 71, 0); }
}
.hero h1 {
  margin: 0; max-width: 14ch;
  color: var(--teal);
  font-size: clamp(36px, 5.6vw, 62px); line-height: 1.06; font-weight: 750; letter-spacing: -0.03em;
  text-wrap: balance;
}
.lead { margin: 20px 0 0; max-width: 34ch; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px; border-radius: 12px;
  font-size: 16px; font-weight: 650; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--teal); color: #fff; border: 2px solid var(--teal); }
.btn-primary:hover { background: var(--teal-hover); border-color: var(--teal-hover); }
.btn-ghost { background: var(--white); color: var(--teal); border: 2px solid var(--border); }
.btn-ghost:hover { border-color: var(--peach); }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art .halo {
  position: absolute; width: 88%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, var(--peach-soft) 55%, rgba(253, 229, 218, 0) 72%);
}
.hero-art img { position: relative; width: min(340px, 80%); filter: drop-shadow(0 18px 30px rgba(15, 61, 71, 0.12)); }

/* ---------- Franja de espacios ---------- */
.strip { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item {
  display: flex; align-items: center; gap: 12px;
  padding: 24px 18px; text-decoration: none; color: var(--teal);
  border-left: 1px solid var(--border);
}
.strip-item:first-child { border-left: none; padding-left: 0; }
.strip-item:last-child { padding-right: 0; }
.strip-icon {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--peach-soft); color: var(--teal);
}
.strip-icon svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.strip-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.strip-text strong { font-size: 17px; line-height: 1.3; }
.strip-text span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.strip-arrow { flex: none; font-size: 18px; color: var(--peach); font-weight: 700; }
.strip-item:hover strong { text-decoration: underline; text-decoration-color: var(--peach); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- Páginas internas ---------- */
.page-hero {
  padding: 64px 0 56px;
  background-image: radial-gradient(44rem 28rem at 90% -20%, rgba(245, 158, 123, 0.18), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a84d33; }
.page-hero h1 { margin: 0; color: var(--teal); font-size: clamp(34px, 4.8vw, 52px); line-height: 1.08; letter-spacing: -0.03em; }
.page-hero .lead { max-width: 46ch; }
.page-body { padding: 56px 0 72px; background: var(--white); }
.prose { max-width: 70ch; }
.prose h2 { margin: 40px 0 10px; font-size: 24px; line-height: 1.25; color: var(--teal); letter-spacing: -0.01em; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; font-size: 17px; }
.prose ul { margin: 0 0 16px; padding-left: 0; list-style: none; display: grid; gap: 12px; }
.prose li { display: flex; gap: 12px; align-items: baseline; font-size: 17px; }
.prose li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--peach); transform: translateY(-2px); }
.prose a { color: var(--teal); font-weight: 650; text-decoration: underline; text-decoration-color: var(--peach); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tag-soon { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 650; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--ice); }
.empty-state {
  display: flex; gap: 20px; align-items: flex-start; max-width: 70ch;
  padding: 28px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--ice);
}
.empty-state img { width: 72px; flex: none; }
.empty-state h2 { margin: 0 0 6px; font-size: 22px; color: var(--teal); }
.empty-state p { margin: 0; color: var(--muted); font-size: 17px; }

/* ---------- Contacto ---------- */
.contact-band { padding: 44px 0; }
.contact-inner p { margin: 0; text-align: center; font-size: 17px; color: var(--muted); }
.contact-inner a, .contact a {
  color: var(--teal); font-weight: 650; white-space: nowrap;
  text-decoration: underline; text-decoration-color: var(--peach); text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.contact-inner a:hover, .contact a:hover { text-decoration-color: var(--teal); }

/* ---------- Pie ---------- */
.site-footer { margin-top: auto; background: var(--white); border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.footer-inner img { height: 28px; width: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.footer-nav a:hover { color: var(--teal); text-decoration: underline; }
.copy { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- Página 404 ---------- */
.notfound { flex: 1; padding: 72px 0 80px; }
.notfound h1 { margin: 0; color: var(--teal); font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; letter-spacing: -0.02em; }

/* ---------- Tableta y celular ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 8px; padding-top: 40px; padding-bottom: 56px; }
  .hero-art { display: none; }
  .strip-inner { grid-template-columns: 1fr; }
  .strip-item, .strip-item:first-child, .strip-item:last-child { padding: 18px 0; border-left: none; border-top: 1px solid var(--border); }
  .strip-item:first-child { border-top: none; }
}
@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .header-inner { flex-direction: column; align-items: stretch; gap: 4px; min-height: 0; padding-top: 12px; padding-bottom: 6px; }
  .brand img { height: 30px; }
  .nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .nav a { text-align: center; padding: 10px 6px; font-size: 14px; }
  .nav-full { display: none; }
  .actions .btn { width: 100%; }
  .page-hero { padding: 40px 0 36px; }
  .page-body { padding: 36px 0 48px; }
  .empty-state { flex-direction: column; padding: 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  .btn { transition: none; }
}

.inline-link { color: var(--teal); font-weight: 650; text-decoration: underline; text-decoration-color: var(--peach); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- Calculadora de muestra ---------- */
.calc { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--ice); }
.calc-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 17px; font-weight: 700; color: var(--teal); }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 10px 14px;
  font: inherit; font-size: 17px; color: var(--text);
  background: var(--white); border: 1.5px solid #7a9298; border-radius: 10px;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--teal) 50%), linear-gradient(135deg, var(--teal) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
.field input:focus, .field select:focus { border-color: var(--teal); outline: 3px solid rgba(15, 61, 71, 0.18); outline-offset: 0; }
.field input[aria-invalid="true"] { border-color: #b23d46; }
.field-help { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.field-msg { margin: 0; font-size: 14px; font-weight: 600; color: #b23d46; }
.calc-result { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border); text-align: center; }
.calc-result-label { margin: 0; font-size: 18px; font-weight: 700; color: var(--teal); }
.calc-result-value { margin: 4px 0 6px; font-size: clamp(64px, 10vw, 104px); line-height: 1; font-weight: 800; letter-spacing: -0.03em; color: var(--teal); font-variant-numeric: tabular-nums; }
.calc-result-note { margin: 0 auto; max-width: 52ch; font-size: 15px; color: var(--muted); }
.calc-how { margin-top: 28px; max-width: 70ch; }
.calc-how summary { cursor: pointer; font-weight: 650; color: var(--teal); font-size: 17px; padding: 8px 0; }
.calc-how .prose { padding-top: 8px; }
.formula { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 16px !important; background: var(--ice); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; display: inline-block; }
@media (max-width: 900px) {
  .calc-fields { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 720px) {
  .calc { padding: 20px; }
}

/* ---------- Cálculo de muestra: portada y potencia ---------- */
[hidden] { display: none !important; }
.back { margin: 0 0 14px; }
.back a { color: var(--teal); font-weight: 600; font-size: 15px; text-decoration: none; }
.back a:hover { text-decoration: underline; text-decoration-color: var(--peach); text-underline-offset: 4px; }
.options-title { margin: 44px 0 18px; font-size: 24px; color: var(--teal); letter-spacing: -0.01em; }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 900px; }
.option { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--ice); }
.option h3 { margin: 4px 0 0; font-size: 20px; color: var(--teal); }
.option p { margin: 0 0 8px; color: var(--muted); flex: 1; }
.calc-top { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg legend { padding: 0; margin-bottom: 8px; font-size: 17px; font-weight: 700; color: var(--teal); }
.seg-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid #7a9298; border-radius: 10px; overflow: hidden; background: var(--white); }
.seg-options label { position: relative; cursor: pointer; }
.seg-options input { position: absolute; opacity: 0; inset: 0; }
.seg-options span { display: flex; flex-direction: column; justify-content: center; min-height: 50px; padding: 6px 12px; text-align: center; font-weight: 600; color: var(--teal); line-height: 1.25; }
.seg-options small { font-weight: 500; color: var(--muted); }
.seg-options label + label span { border-left: 1px solid var(--border); }
.seg-options input:checked + span { background: var(--teal); color: #fff; }
.seg-options input:checked + span small { color: rgba(255,255,255,.8); }
.seg-options input:focus-visible + span { outline: 3px solid var(--peach); outline-offset: -3px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { font: inherit; font-size: 13px; font-weight: 600; color: var(--teal); background: var(--peach-soft); border: 1px solid transparent; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.chip-btn:hover { border-color: var(--peach); }
.res-details { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 20px auto 0; padding: 0; max-width: 760px; }
.res-details div { text-align: center; }
.res-details dt { font-size: 13px; color: var(--muted); }
.res-details dd { margin: 0; font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .options, .calc-top { grid-template-columns: 1fr; }
}

/* ---------- Potencia: calculadora a la izquierda, explicación a la derecha ---------- */
.pot-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 28px; align-items: start; }
.pot-layout .calc-top { grid-template-columns: 1fr; gap: 22px; }
.pot-layout .calc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.pot-info {
  position: sticky; top: 96px;
  padding: 28px; border-radius: var(--radius); background: var(--white);
  border: 1px solid var(--border); border-top: 4px solid var(--peach);
}
.pot-info .info-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a84d33; }
.pot-info h2 { margin: 0 0 14px; font-size: 22px; line-height: 1.25; color: var(--teal); }
.pot-info h3 { margin: 18px 0 4px; font-size: 15px; color: var(--teal); }
.pot-info p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text); }
.pot-info .info-sub { margin-top: 12px; color: var(--muted); }
.info-fill { margin: 10px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--ice); border: 1px solid var(--border); display: grid; gap: 6px; }
.info-fill div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.info-fill dt { color: var(--muted); }
.info-fill dd { margin: 0; font-weight: 700; color: var(--teal); text-align: right; }
.pot-info .info-result { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--peach-soft); color: var(--teal); }
.info-btn { margin-top: 14px; min-height: 42px; padding: 8px 16px; font-size: 15px; }
.pot-info .info-tip { margin-top: 14px; font-size: 14px; color: var(--muted); }
@media (max-width: 1080px) {
  .pot-layout .calc-fields { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .pot-layout { grid-template-columns: 1fr; }
  .pot-info { position: static; }
}
@media (max-width: 720px) {
  .pot-info { padding: 20px; }
}

/* ---------- Texto para el artículo ---------- */
.report { margin-top: 26px; padding: 20px 22px; border-radius: 12px; background: var(--white); border: 1px solid var(--border); border-left: 4px solid var(--teal); }
.report-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.report-label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); }
.report-copy { min-height: 40px; padding: 6px 16px; font-size: 15px; }
.report-text { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 16.5px; line-height: 1.7; color: var(--text); }
.report-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
