/* Home page. Every section has one instrument; layouts differ on purpose (full-bleed chart, split with rose,
   tide rows, scatter plot, form panel, statement, card row). */

/* ---------- hero: the chart is the picture ---------- */
.hero { position: relative; min-height: calc(100dvh - var(--header)); display: grid; overflow: hidden; background: var(--shoal-3); }
.hero .lat-stage { position: absolute; inset: 0; }
.hero .lat-svg { width: 100%; height: 100%; }
.hero-layer { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-block: 32px; pointer-events: none; }
.hero-card, .hero-result { pointer-events: auto; }
.hero-card {
  max-width: 560px; padding: 28px 28px 22px; border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--rule); box-shadow: var(--shadow);
  display: grid; gap: 16px;
}
.hero-card h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.9rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-result { max-width: 560px; padding: 24px; display: grid; gap: 18px; background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero.has-result .hero-card { display: none; }
.hero.has-result .hero-result { animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero .lat-rows { max-height: 236px; overflow-y: auto; }

@media (max-width: 767px) {
  .hero { min-height: 0; grid-template-rows: auto auto; background: var(--paper); }
  .hero .lat-stage { position: relative; height: 54vh; min-height: 300px; }
  .hero-layer { padding-block: 0 24px; margin-top: -48px; }
  .hero-card, .hero-result { padding: 22px 18px 18px; }
}

/* ---------- finder teaser with compass rose ---------- */
.finder-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .finder-grid { grid-template-columns: minmax(280px, 5fr) 7fr; gap: 72px; } }
.rose-wrap { max-width: 420px; width: 100%; margin-inline: auto; }
.rose { width: 100%; height: auto; }
.rose-ring { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.rose-ticks line { stroke: var(--ink); stroke-width: 1; }
.rose-letters text { font-family: var(--label); font-style: italic; font-size: 19px; fill: var(--ink); text-anchor: middle; }
.rose-pt { fill: var(--shoal-1); stroke: var(--ink); stroke-width: .8; stroke-linejoin: round; }
.rose-pt-dark { fill: var(--shoal-3); }
.rose-pt-minor { opacity: .8; }
.rose-needle { transform-origin: 150px 150px; transform: rotate(var(--a, 0deg)); transition: transform 1.1s cubic-bezier(.34, 1.56, .64, 1); }
.needle-n { fill: var(--magenta); }
.needle-s { fill: var(--ink); }
.needle-hub { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.finder-q { font-size: 1.3rem; color: var(--ink-2); }

/* ---------- tide: intro price vs renewal ---------- */
.tide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tide-row {
  display: grid; align-items: center; gap: 8px 20px; padding: 16px 0; border-bottom: 1px solid var(--rule-strong);
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) auto auto;
}
.tide-name { display: flex; align-items: center; gap: 12px; font-weight: 620; text-decoration: none; }
.tide-bars { display: grid; gap: 5px; }
.tide-bar { display: block; height: 12px; width: var(--w); border-radius: 0 var(--pill) var(--pill) 0; transform-origin: left; }
.tide-intro { background: var(--paper); border: 1px solid var(--contour); }
.tide-renew { background: var(--ink); }
.reveal .tide-renew { transform: scaleX(.12); transition: transform 1.2s var(--ease) .2s; }
.reveal.in .tide-renew { transform: none; }
.tide-figs { white-space: nowrap; font-size: 1.02rem; }
.tide-figs strong { font-weight: 700; }
.tide-jump { color: var(--magenta); font-weight: 720; font-size: 1.5rem; font-stretch: 84%; min-width: 4.2ch; text-align: right; }
.tide-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.tide-foot p { max-width: 60ch; }
@media (max-width: 767px) {
  .tide-row { grid-template-columns: 1fr auto; }
  .tide-bars { grid-column: 1 / -1; }
  .tide-figs { grid-column: 1; }
  .tide-jump { grid-column: 2; grid-row: 1; }
}

/* ---------- host chart (scatter of logos) ---------- */
.hc-scroll { overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: thin; }
.hc-plot {
  position: relative; min-width: 760px; height: clamp(420px, 44vw, 560px); margin: 8px 0 28px 36px;
  border-left: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong);
  background:
    linear-gradient(to right, transparent calc(50% - .5px), var(--rule) calc(50% - .5px), var(--rule) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(to top, transparent calc(50% - .5px), var(--rule) calc(50% - .5px), var(--rule) calc(50% + .5px), transparent calc(50% + .5px));
}
.hc-dot {
  position: absolute; left: var(--x); bottom: var(--y); transform: translate(-50%, 50%);
  display: grid; justify-items: center; gap: 2px; text-decoration: none; z-index: 1;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.hc-dot .logo-tile { box-shadow: 0 2px 8px -3px rgba(12, 37, 54, .35); border-radius: 50%; }
.hc-dot-name { font-size: .74rem; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateY(-2px); transition: opacity .2s; background: var(--paper); padding: 0 6px; border-radius: var(--pill); }
.hc-dot:hover, .hc-dot:focus-visible { z-index: 3; transform: translate(-50%, 50%) scale(1.15); }
.hc-dot:hover .hc-dot-name, .hc-dot:focus-visible .hc-dot-name { opacity: 1; }
.hc-dot.is-dim { opacity: .14; pointer-events: none; }
.hc-plot[data-filter]:not([data-filter="all"]) .hc-dot:not(.is-dim) .hc-dot-name { opacity: 1; }
.hc-axis { position: absolute; display: flex; justify-content: space-between; color: var(--ink-2); font-size: .98rem; }
.hc-axis-x { left: 0; right: 0; bottom: -30px; }
.hc-axis-y { left: -40px; top: 0; bottom: 0; flex-direction: column; font-size: .85rem; width: 34px; text-align: right; }

/* ---------- compare teaser ---------- */
.cmp-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .cmp-grid { grid-template-columns: 5fr 6fr; gap: 64px; } }
.cmp-form { padding: 28px; display: grid; gap: 22px; }
.cmp-face { display: flex; align-items: center; justify-content: center; gap: 22px; }
.cmp-face .logo-tile { border-radius: 16px; }
.cmp-face .logo-tile img { width: 64%; height: 64%; }
.cmp-vs { font-size: 2rem; color: var(--magenta); }
.cmp-fields { display: grid; gap: 14px; }
@media (min-width: 560px) { .cmp-fields { grid-template-columns: 1fr 1fr; } }

/* ---------- honesty statement ---------- */
.honesty-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .honesty-grid { grid-template-columns: 4fr 7fr; gap: 64px; align-items: start; } }
.honesty-big { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); line-height: 1.3; font-weight: 520; font-stretch: 92%; letter-spacing: -.01em; max-width: 30ch; }
.honesty { border-top: 1px solid var(--rule); }

/* ---------- guides ---------- */
.guide-cards { display: grid; gap: 20px; }
@media (min-width: 768px) { .guide-cards { grid-template-columns: 1.3fr 1fr 1fr; } }
.guide-card { display: grid; grid-template-rows: auto 1fr; text-decoration: none; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); background: var(--paper); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.guide-art { display: block; aspect-ratio: 16 / 9; background: var(--shoal-2); }
.guide-art svg { width: 100%; height: 100%; }
.guide-body { display: grid; gap: 8px; padding: 18px 20px 22px; align-content: start; }
.guide-body h3 { font-size: 1.25rem; }

/* ---------- this month's deals: one price board, the first row leads ---------- */
.deals-head { display: grid; gap: 14px; max-width: 760px; }
.db { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.db-row {
  display: grid; align-items: center; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--rule-strong);
  grid-template-columns: 150px minmax(200px, 1.2fr) minmax(190px, 1fr) minmax(0, 1.1fr) 210px;
}
.db-kind { color: var(--ink-2); font-size: 1rem; }
.db-host { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.db-host > span { display: grid; line-height: 1.25; min-width: 0; }
.db-host strong { font-size: 1.12rem; font-weight: 650; }
.db-host .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-host:hover strong { color: var(--magenta); }
.db-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; line-height: 1.1; }
.db-price > strong { font-size: 2rem; font-weight: 720; font-stretch: 82%; letter-spacing: -.02em; }
.db-price small { color: var(--ink-2); }
.db-then { flex-basis: 100%; font-size: .92rem; color: var(--ink-2); margin-top: 2px; }
.db-then strong { font-size: inherit; font-weight: 680; color: var(--ink); letter-spacing: 0; font-stretch: 100%; }
.db-perk { display: grid; gap: 6px; justify-items: start; }
.db-perk p { display: flex; gap: 6px; align-items: baseline; color: var(--good); font-weight: 600; }
.db-perk .i { position: relative; top: .15em; }
.db-row.is-lead { background: var(--magenta-wash); margin-inline: calc(var(--gutter) * -.5); padding-inline: calc(var(--gutter) * .5); border-radius: var(--radius); border-bottom-color: transparent; }
.db-row.is-lead .db-price > strong { font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); color: var(--magenta); }
.reveal .db-row { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.in .db-row { opacity: 1; transform: none; }
.reveal.in .db-row:nth-child(2) { transition-delay: .08s; } .reveal.in .db-row:nth-child(3) { transition-delay: .16s; }
.reveal.in .db-row:nth-child(4) { transition-delay: .24s; } .reveal.in .db-row:nth-child(5) { transition-delay: .32s; }
.deals-fine { max-width: 80ch; }
@media (min-width: 1000px) { .db-row > .btn { justify-self: end; } }
@media (max-width: 999px) {
  .db-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
  .db-kind { grid-column: 1 / -1; }
  .db-host { grid-column: 1; }
  .db-price { grid-column: 2; grid-row: 2; justify-content: flex-end; text-align: right; }
  .db-then { text-align: right; }
  .db-perk { grid-column: 1 / -1; }
  .db-row .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .reveal .db-row { opacity: 1; transform: none; transition: none; } }
