/* ==========================================================================
   Marcos Darman — pages.css (componentes de páginas internas)
   Usa los tokens de site.css. Se carga en todas las páginas después de site.css.
   ========================================================================== */
.page-hero { padding-top: calc(var(--header-h) + clamp(48px, 7vw, 110px)); padding-bottom: clamp(40px, 6vw, 90px); }
.page-hero .crumb { display: flex; gap: 10px; align-items: center; margin-bottom: clamp(20px, 2.5vw, 36px); }
.page-hero .crumb a { color: var(--muted); }
.page-hero .crumb a:hover { color: var(--accent-ink); }
.page-hero h1 { max-width: 14ch; }
.page-hero h1.wide { max-width: none; }
.page-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 24px var(--gutter); margin-top: clamp(28px, 4vw, 56px); align-items: end; }
.page-intro .lead { grid-column: 2; max-width: 560px; }
.page-intro .actions { grid-column: 2; display: flex; gap: 10px; flex-wrap: wrap; }
.page-media { margin-top: clamp(36px, 5vw, 72px); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 21 / 9; background: var(--bg-2); }
.page-media img, .page-media video { width: 100%; height: 100%; object-fit: cover; }
.js .page-media { clip-path: inset(8% 6% 8% 6% round 22px); opacity: 1; transform: none; transition: clip-path 1.4s var(--ease); }
.js .page-media.in { clip-path: inset(0 0 0 0 round 22px); }

.section { padding-block: clamp(64px, 8vw, 130px); }
.section.tight { padding-top: 0; }
.section.tint { background: var(--surface); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 20px var(--gutter); align-items: end; margin-bottom: clamp(36px, 5vw, 70px); }
.section-head .lead { max-width: 520px; justify-self: end; }
.display.lg { font-size: clamp(44px, 6vw, 96px); }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 90px); align-items: start; }
.split-sticky { position: sticky; top: calc(var(--header-h) + 24px); }
.split figure { border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-2); }
.split figure img { width: 100%; height: 100%; object-fit: cover; }

.prose { max-width: 680px; display: grid; gap: 18px; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.prose h2, .prose h3 { color: var(--ink); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 14px; }
.prose h2 { font-size: clamp(26px, 2.4vw, 34px); }
.prose h3 { font-size: 22px; }
.prose a { color: var(--accent-ink); border-bottom: 1px solid currentColor; }
.prose strong { color: var(--ink); }
.prose ul { display: grid; gap: 8px; }
.prose ul li { padding-left: 22px; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .78em; width: 10px; height: 1.5px; background: var(--accent-ink); }

.callout { border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; padding: clamp(22px, 3vw, 36px); display: grid; gap: 14px; justify-items: start; }
.callout h3 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.callout p { color: var(--ink-2); }
.callout.blue { background: var(--accent-soft); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--gutter); }
.card { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(22px, 2.6vw, 34px); display: grid; gap: 14px; align-content: start; border: 1px solid transparent; transition: border-color .3s, transform .5s var(--ease); }
.card:hover { border-color: var(--line); transform: translateY(-4px); }
.card h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
.card p { color: var(--ink-2); }
.card figure { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; }
.card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover figure img { transform: scale(1.05); }

/* niveles largos (canopy coaching) */
.tiers { border-top: 1px solid var(--line); }
.tier { display: grid; grid-template-columns: 3fr 3fr 4fr; gap: var(--gutter); padding-block: clamp(28px, 3.5vw, 52px); border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 20px); }
.tier h3 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: clamp(44px, 5vw, 80px); line-height: .9; }
.tier .num { display: block; margin-bottom: 10px; }
.tier .hook { font-size: clamp(20px, 1.8vw, 26px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.tier > div:nth-child(2) { display: grid; gap: 16px; align-content: start; }
.tier figure { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.tier figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.tier:hover figure img { transform: scale(1.04); }
.tier-body { display: grid; gap: 14px; color: var(--ink-2); align-content: start; justify-items: start; }
.tier-body .criteria { font-size: 14px; background: var(--surface); border-radius: 10px; padding: 12px 14px; }
.tier-body .aep { font-size: 14px; }
.tier-body .aep b { color: var(--accent-ink); }

/* tablas */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); background: var(--surface); }
.data-table, .results-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .results-table th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 16px 20px; border-bottom: 1px solid var(--line); }
.data-table td, .results-table td { padding: 18px 20px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.data-table tr:last-child td, .results-table tr:last-child td { border-bottom: 0; }
.data-table b, .results-table b { color: var(--ink); font-weight: 600; }
.data-table .price { font-size: 22px; font-weight: 600; color: var(--ink); white-space: nowrap; letter-spacing: -.02em; }
.data-table tr.featured td { background: var(--accent-soft); }
.badge { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--accent); color: var(--ink); border-radius: 999px; padding: 3px 9px; margin-left: 6px; vertical-align: middle; }
.results-table tbody tr { transition: background-color .2s; }
.results-table tbody tr:hover { background: var(--accent-soft); }
.results-table td:first-child { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.results-table a:hover { color: var(--accent-ink); }
.medal { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.medal.gold { background: #e2b33c; }
.medal.silver { background: #b9bdc4; }
.medal.bronze { background: #c98a52; }
.pend { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-ink); color: #fff; font-size: 11px; }
.notes { margin-top: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }

/* planes */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gutter); }
.plan { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(26px, 3vw, 42px); display: grid; gap: 18px; align-content: start; border: 1px solid var(--line); }
.plan.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan.dark p, .plan.dark li { color: rgba(255, 255, 255, .75); }
.plan h3 { font-size: 28px; font-weight: 600; letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; }
.plan .price { font-size: clamp(52px, 6vw, 84px); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.plan .price small { font-size: 16px; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: 6px; }
.plan.dark .price small { color: rgba(255, 255, 255, .6); }
.plan ul { display: grid; gap: 10px; }
.plan li { padding-left: 24px; position: relative; color: var(--ink-2); }
.plan li::before { content: "+"; position: absolute; left: 0; color: var(--accent-ink); font-weight: 600; }
.plan.dark li::before { color: var(--accent); }
.plan .btn { justify-self: start; }
.plan.dark .btn-accent:hover { background: #fff; color: var(--ink); }

/* resultados */
.scoreboard { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.scoreboard li { padding: 28px 24px 28px 0; display: grid; gap: 12px; align-content: start; }
.scoreboard li + li { border-left: 1px solid var(--line); padding-left: 24px; }
.scoreboard b { font-family: var(--f-display); font-weight: 400; font-size: clamp(72px, 9vw, 140px); line-height: .85; }
.scoreboard li > span { font-size: 14px; color: var(--ink-2); max-width: 240px; }
.bests { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bests li { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 22px 22px 24px; display: grid; gap: 14px; min-height: 220px; align-content: space-between; }
.bests .label { color: var(--accent); }
.bests b { font-weight: 500; font-size: clamp(44px, 4.6vw, 70px); letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.bests b i { font-style: normal; font-size: .4em; color: var(--accent); margin-left: 4px; letter-spacing: 0; }
.bests li > span { font-size: 13px; color: rgba(255, 255, 255, .65); }
.bests em { font-style: normal; color: #fff; }
.source-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* about */
.ratings { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.ratings h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ratings li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ratings li span { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ratings li.prev { color: var(--faint); }
.ratings li.prev span { color: var(--faint); }
.highlights { border-top: 1px solid var(--line); }
.highlights li { display: grid; grid-template-columns: 70px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.3; }
.highlights li span { font-family: var(--f-display); font-size: 30px; line-height: 1; color: var(--accent-ink); }
.highlights b { font-weight: 600; }
.timeline-photos { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.timeline-photos figure { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; }
.timeline-photos figure:first-child { aspect-ratio: auto; }
.timeline-photos img { width: 100%; height: 100%; object-fit: cover; }

/* pasos verticales */
.step-list { border-top: 1px solid var(--line); counter-reset: step; }
.step-list > li { counter-increment: step; display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: var(--gutter); padding-block: clamp(26px, 3.4vw, 48px); border-bottom: 1px solid var(--line); align-items: start; }
.step-list > li::before { content: counter(step, decimal-leading-zero) "."; font-family: var(--f-display); font-size: clamp(56px, 7vw, 110px); line-height: .85; color: var(--faint); transition: color .6s; }
.step-list > li.in::before { color: var(--accent-ink); }
.step-list h3 { font-size: clamp(24px, 2.4vw, 36px); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; }
.step-list p { color: var(--ink-2); }
.step-list .txt { display: grid; gap: 12px; }
.step-list figure { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.step-list figure img { width: 100%; height: 100%; object-fit: cover; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); transition: border-color .3s; }
.faq details[open] { border-color: var(--accent); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; font-size: clamp(18px, 1.7vw, 22px); font-weight: 500; letter-spacing: -.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; font-weight: 300; color: var(--accent-ink); transition: transform .4s var(--ease); flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 24px 24px; color: var(--ink-2); max-width: 760px; }
.faq .answer a { color: var(--accent-ink); border-bottom: 1px solid currentColor; }

/* formularios */
.form { display: grid; gap: clamp(36px, 4vw, 56px); }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px var(--gutter); min-width: 0; }
.form legend { font-family: var(--f-display); font-size: clamp(30px, 3vw, 44px); text-transform: uppercase; line-height: 1; padding: 0; margin-bottom: 18px; }
.form legend small { font-family: var(--f-body); font-size: 13px; color: var(--muted); text-transform: none; margin-left: 10px; }
.field { display: grid; gap: 6px; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field label, .field .q { font-size: 14px; font-weight: 500; }
.field label i, .field .q i { font-style: normal; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: #d64545; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.choices span { display: inline-block; padding: 10px 16px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font-size: 14px; transition: background-color .2s, color .2s, border-color .2s; }
.choices input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.choices input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.consent { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex-shrink: 0; }
[data-show-if]:not(.show) { display: none !important; }
.form-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-status { font-size: 15px; }
.form-status.err { color: #c03030; }
.form-done { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 56px); display: grid; gap: 14px; justify-items: start; }
.form-done h2 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: clamp(40px, 5vw, 72px); line-height: .9; }
.hp { position: absolute; left: -9999px; }
.notice { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 40px); display: grid; gap: 10px; }
.notice p { color: rgba(255, 255, 255, .78); font-size: 17px; }
.notice b { color: #fff; }
.contact-side { display: grid; gap: 28px; align-content: start; }

/* noticias */
.news-grid--all { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.news-grid--all .news-card.is-feature { grid-column: span 2; }
.news-grid--all .news-card.is-feature figure { aspect-ratio: 16 / 9; }
.post-hero { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 90px)); }
.post-meta { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; font-size: 13px; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.post-meta .tag { background: var(--surface); padding: 5px 12px; border-radius: 999px; color: var(--ink); font-weight: 600; }
.post-hero h1 { font-size: clamp(40px, 6vw, 92px); max-width: 18ch; }
.post-figure { margin-top: clamp(30px, 4vw, 60px); }
.post-figure > div { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; }
.post-figure img { width: 100%; height: 100%; object-fit: cover; }
.post-figure figcaption { font-size: 12px; color: var(--muted); padding-top: 8px; }
.post-body { padding-block: clamp(40px, 6vw, 90px); display: grid; grid-template-columns: 1fr 2fr; gap: var(--gutter); }
.post-body .prose { font-size: 20px; }
.related { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gutter); }

/* páginas sin CTA final (apply, contact) */
.no-cta .cta-final { display: none; }

@media (max-width: 1100px) {
  .tier { grid-template-columns: 1fr 1fr; }
  .tier-body { grid-column: 1 / -1; }
  .bests { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .page-intro, .section-head, .split, .plans, .ratings, .post-body, .related, .timeline-photos { grid-template-columns: 1fr; }
  .page-intro .lead, .page-intro .actions { grid-column: 1; }
  .section-head .lead { justify-self: start; }
  .split-sticky { position: static; }
  .page-media { aspect-ratio: 4 / 3; }
  .tier { grid-template-columns: 1fr; }
  .scoreboard { grid-template-columns: 1fr 1fr; }
  .scoreboard li:nth-child(3) { border-left: 0; padding-left: 0; }
  .scoreboard li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bests { grid-template-columns: 1fr; }
  .bests li { min-height: 0; }
  .step-list > li { grid-template-columns: 1fr; }
  .form fieldset { grid-template-columns: 1fr; }
  .news-grid--all { grid-template-columns: 1fr; }
  .news-grid--all .news-card.is-feature { grid-column: auto; }
  .results-table thead, .data-table.stack thead { display: none; }
  .results-table tr, .data-table.stack tr { display: grid; gap: 4px; padding: 18px; border-bottom: 1px solid var(--line); }
  .results-table td, .data-table.stack td { padding: 0; border: 0; }
  .results-table td::before, .data-table.stack td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 6px; }
  .results-table td:first-child::before, .data-table.stack td:first-child::before { display: none; }
  .data-table.stack tr.featured { background: var(--accent-soft); }
  .data-table.stack tr.featured td { background: none; }
  .source-links .btn { width: 100%; font-size: 12px; padding: 0 14px; }
  .results-table tr { grid-template-columns: 46px 1fr; column-gap: 10px; row-gap: 2px; }
  .results-table td { grid-column: 2; }
  .results-table td:first-child { grid-column: 1; grid-row: 1 / span 4; font-size: 15px; }
  .results-table td:nth-child(2)::before, .results-table td:nth-child(3)::before { display: none; }
  .results-table td:nth-child(3) { font-size: 13px; color: var(--muted); }
  .results-table td:nth-child(4)::before, .results-table td:nth-child(5)::before { margin-top: 8px; }
}
