/* ============================================================
   TIDE Landing — production styles (static recreation of the
   hifi design prototype). Tokens come from styles.css/tokens/.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; }
a { color: inherit; }

/* ---------- icon helper ---------- */
.ic { display: inline-flex; flex-shrink: 0; vertical-align: middle; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; white-space: nowrap;
  border-radius: var(--radius-pill); cursor: pointer; text-decoration: none;
  border: 1px solid transparent; line-height: 1;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s, box-shadow .15s;
}
.btn-sm { font-size: 13px; height: 34px; padding: 8px 14px; }
.btn-md { font-size: 14px; height: 44px; padding: 11px 20px; }
.btn-lg { font-size: 16px; height: 52px; padding: 15px 28px; }
.btn-primary { background: var(--cta); color: #fff; box-shadow: 0 2px 16px rgba(232,99,10,0.35); }
.btn-primary:hover { background: var(--cta-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); transform: translateY(-1px); }
.btn-link { background: transparent; color: var(--text-secondary); opacity: .85; padding: 8px 6px; height: 34px; font-size: 13px; display: inline-flex; align-items: center; }
.btn-link:hover { opacity: 1; color: var(--text-primary); }

/* ---------- atoms ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--tide-blue-300);
}
.eyebrow-cta { color: var(--cta); }
.h2 { font-size: 38px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0; color: var(--text-primary); text-wrap: balance; }
.lead { font-size: 17px; line-height: 1.65; color: var(--text-secondary); margin-top: 16px; }
.lead strong { color: var(--text-primary); }

/* ---------- section shell ---------- */
.section { }
.section.alt { background: var(--bg-secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-inner { max-width: 1180px; margin: 0 auto; padding: 104px 32px; }

.wordmark { font-weight: 700; letter-spacing: -0.5px; line-height: 1; }
.wordmark .accent { color: var(--accent); }
.brandglyph { width: auto; display: block; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--rd,0s), transform .6s ease var(--rd,0s); }
.reveal.on { opacity: 1; transform: none; }

/* ============================================================
   HEADER
   ============================================================ */
.lp-header { position: sticky; top: 0; z-index: 100; background: rgba(19,19,22,0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.lp-header-inner { max-width: 1180px; margin: 0 auto; padding: 0 32px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lp-brand { display: flex; align-items: center; gap: 10px; }
.lp-brand .wordmark { font-size: 21px; }
.lp-nav { display: flex; gap: 26px; align-items: center; }
.lp-nav a { color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s; }
.lp-nav a:hover { color: var(--text-primary); }
.lp-header-cta { display: flex; gap: 10px; align-items: center; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(120% 90% at 75% 0%, #0D2540 0%, #131316 60%); pointer-events: none; }
.hero-grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(168,199,250,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(168,199,250,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 80% at 75% 5%, #000 25%, transparent 70%);
  mask-image: radial-gradient(120% 80% at 75% 5%, #000 25%, transparent 70%); }
.hero-particle { position: absolute; border-radius: 2px; background: var(--tide-blue-100); }
.hero-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 84px 32px 64px; }
.hero-copy { max-width: 860px; }
.hero h1 { font-size: 58px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.06; margin: 20px 0 0; color: #fff; text-wrap: balance; }
.hero h1 .accent { color: var(--accent); }
.hero-sub { font-size: 18.5px; line-height: 1.6; color: var(--text-secondary); margin: 24px 0 0; max-width: 720px; }
.hero-cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

/* ============================================================
   ROAD LAYLINE (signature)
   ============================================================ */
.layline { position: relative; overflow: hidden; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px 28px 20px; }
.layline-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 60%, #0D2540 0%, #131316 65%); opacity: 0.85; pointer-events: none; }
.layline-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(168,199,250,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(168,199,250,0.025) 1px, transparent 1px); background-size: 48px 48px; }
.layline-head { position: relative; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.layline-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.8px; }
.layline-meta { font-size: 11px; color: var(--text-muted); }
.layline-svg-wrap { position: relative; z-index: 1; }
.layline-svg-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.layline-legend { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; position: relative; z-index: 1; }
.layline-legend .lbl { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.layline-legend .items { display: flex; gap: 12px; flex-wrap: wrap; }
.layline-legend .item { display: flex; align-items: center; gap: 5px; }
.layline-legend .swatch { width: 10px; height: 10px; border-radius: 3px; }
.layline-legend .name { font-size: 11px; color: var(--text-secondary); }
.layline-legend .name b { font-weight: 700; }
@keyframes pin-pulse { 0%,100% { filter: drop-shadow(0 0 4px rgba(220,38,38,.5)); } 50% { filter: drop-shadow(0 0 14px rgba(220,38,38,.95)) drop-shadow(0 0 28px rgba(220,38,38,.4)); } }
.pin-critico { animation: pin-pulse 1.8s ease-in-out infinite; }

/* ============================================================
   CREDIBILITY STRIP
   ============================================================ */
.credibility { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
.credibility-inner { max-width: 1180px; margin: 0 auto; padding: 24px 32px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.credibility-intro { font-size: 12.5px; color: var(--text-muted); }
.credibility-chip { font-size: 14px; font-weight: 600; color: var(--text-secondary); }

/* ============================================================
   GRID UTILITIES + CARDS
   ============================================================ */
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }

.card { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-card); }

/* regulatory stat cards */
.stat { padding: 22px 20px; height: 100%; }
.stat .num { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.stat .num.cta { color: var(--cta); }
.stat .desc { font-size: 13.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.45; }
.callout-cta { font-size: 16px; color: var(--text-secondary); margin-top: 28px; padding: 16px 20px; border-left: 3px solid var(--cta); background: rgba(232,99,10,0.06); border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* ============================================================
   KPI TILES + DASHBOARD WIDGETS
   ============================================================ */
.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 12px; }
.kpi { background: var(--surface-card); border: 1px solid var(--border); border-top: 2px solid var(--border); border-radius: var(--radius-card); padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.kpi.tint-blue { border-top-color: var(--accent); }
.kpi.tint-green { border-top-color: var(--ns-b); }
.kpi.tint-red { border-top-color: var(--ns-f); }
.kpi .v { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -1px; color: var(--text-primary); }
.kpi.tint-green .v { color: var(--ns-value-green); }
.kpi.tint-red .v { color: var(--ns-value-red); }
.kpi .l { font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.2px; }
.kpi .s { font-size: 11px; color: var(--text-muted); opacity: 0.7; }

.dash-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.dash-panel { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 22px; }
.dash-panel-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 16px; }

/* NsDonut */
.donut { display: flex; align-items: center; gap: 20px; }
.donut-svg { position: relative; flex-shrink: 0; width: 130px; height: 130px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-total { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.donut-sub { font-size: 9px; color: var(--text-muted); margin-top: 2px; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.donut-legend .row { display: flex; align-items: center; gap: 7px; }
.donut-legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend .lab { font-size: 11px; color: var(--text-secondary); flex: 1; }
.donut-legend .pct { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-primary); }

/* Monitor50h */
.mon-row { margin-bottom: 14px; }
.mon-row:last-of-type { margin-bottom: 0; }
.mon-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.mon-km { font-size: 11px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.mon-ns { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.mon-ns.alert { background: rgba(234,88,12,0.15); color: var(--ns-value-amber); }
.mon-ns.crit { background: rgba(220,38,38,0.15); color: var(--ns-value-red); }
.mon-hours { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mon-hours.alert { color: var(--ns-value-amber); }
.mon-hours.crit { color: var(--ns-value-red); }
.mon-bar { width: 100%; height: 14px; background: var(--bg-active); border-radius: 7px; position: relative; }
.mon-fill { height: 100%; border-radius: 7px; position: absolute; left: 0; top: 0; }
.mon-fill.alert { background: linear-gradient(90deg,#b35200,#EA580C); box-shadow: 0 0 8px rgba(234,88,12,0.4); }
.mon-fill.crit { background: linear-gradient(90deg,#991b1b,#DC2626); box-shadow: 0 0 12px rgba(220,38,38,0.5); }
.mon-th { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; z-index: 5; }
.mon-th .tlab { position: absolute; top: -16px; transform: translateX(-50%); font-size: 8px; font-weight: 700; white-space: nowrap; }
.mon-axis { display: flex; justify-content: space-between; margin-top: 6px; }
.mon-axis span { font-size: 9px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mon-note { font-size: 10px; color: var(--text-muted); margin-top: 8px; font-style: italic; }

/* flow cards (SaaS) */
.flow { display: flex; align-items: stretch; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.flow-card { flex: 1; min-width: 180px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px; }
.flow-arrow { display: flex; align-items: center; color: var(--text-muted); }
.icon-badge { width: 38px; height: 38px; border-radius: var(--radius-md); background: rgba(43,124,211,0.14); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.flow-card .t { font-size: 14.5px; font-weight: 600; margin-top: 12px; }
.flow-card .d { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.45; }

/* ============================================================
   TIERS TABLE
   ============================================================ */
.tiers-wrap { margin-top: 36px; overflow-x: auto; }
.tiers { width: 100%; border-collapse: collapse; min-width: 720px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.tiers th { border-bottom: 1px solid var(--border); }
.tiers thead th.feat { text-align: left; padding: 20px 18px; vertical-align: bottom; width: 40%; }
.tiers thead th.feat span { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.tiers thead th.plan { padding: 20px 16px; text-align: center; }
.tiers .hl { background: rgba(43,124,211,0.06); }
.tiers .plan-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.tiers .plan-name.accent { color: var(--accent); }
.tiers .plan-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; font-weight: 400; line-height: 1.4; }
.tiers td.feat-cell { padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text-secondary); }
.tiers td.cell { text-align: center; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.tiers td.cell .yes { display: inline-flex; color: var(--success); }
.tiers td.cell .yes.accent { color: var(--cta); }
.tiers td.cell .no { color: var(--text-muted); opacity: 0.5; }
.tiers td.cta-cell { padding: 18px 16px; text-align: center; }

/* ============================================================
   STEPS
   ============================================================ */
.step { position: relative; height: 100%; }
.step .num { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent); }
.step .icon-badge { width: 44px; height: 44px; border-radius: var(--radius-lg); margin-top: 12px; }
.step .t { font-size: 17px; font-weight: 600; margin-top: 16px; }
.step .d { font-size: 14px; color: var(--text-muted); margin-top: 6px; line-height: 1.55; }

/* ============================================================
   ROI
   ============================================================ */
.roi-card { padding: 28px; height: 100%; }
.roi-card.now { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-card); }
.roi-card.tide { background: linear-gradient(135deg, rgba(27,74,142,0.18), rgba(43,124,211,0.06)); border: 1px solid var(--tide-blue-700); border-radius: var(--radius-card); }
.roi-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }
.roi-card.now .roi-label { color: var(--text-muted); }
.roi-card.tide .roi-label { color: var(--accent); }
.roi-item { display: flex; gap: 10px; margin-top: 16px; align-items: flex-start; }
.roi-item .mk { margin-top: 2px; flex-shrink: 0; }
.roi-card.now .roi-item .mk { color: var(--text-muted); }
.roi-card.tide .roi-item .mk { color: var(--success); }
.roi-card.now .roi-item .tx { font-size: 14.5px; color: var(--text-secondary); line-height: 1.5; }
.roi-card.tide .roi-item .tx { font-size: 14.5px; color: var(--text-primary); line-height: 1.5; }
.roi-risk { font-size: 12.5px; color: var(--text-muted); margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.roi-risk .ic { margin-right: 6px; vertical-align: -2px; }

/* ============================================================
   PLATFORM CARDS
   ============================================================ */
.plat-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; height: 100%; box-shadow: var(--shadow-sm); transition: all .18s ease; }
.plat-card:hover { border-color: var(--tide-blue-700); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.plat-card .icon-badge { width: 44px; height: 44px; border-radius: var(--radius-lg); }
.plat-card .t { font-size: 17px; font-weight: 600; margin-top: 18px; }
.plat-card .d { font-size: 14px; color: var(--text-muted); margin-top: 8px; line-height: 1.55; }

/* ============================================================
   DIFFERENTIATORS
   ============================================================ */
.diff-item { display: flex; gap: 16px; padding: 20px 4px; }
.diff-item .icon-badge { width: 44px; height: 44px; border-radius: var(--radius-lg); }
.diff-item .t { font-size: 16.5px; font-weight: 600; }
.diff-item .d { font-size: 14px; color: var(--text-muted); margin-top: 5px; line-height: 1.55; }

/* ============================================================
   FINAL CTA
   ============================================================ */
.final { position: relative; overflow: hidden; border-top: 1px solid var(--border); }
.final-bg { position: absolute; inset: 0; background: radial-gradient(110% 130% at 50% 0%, #0D2540 0%, #131316 65%); pointer-events: none; }
.final-inner { position: relative; max-width: 820px; margin: 0 auto; padding: 112px 32px; text-align: center; }
.final-inner .h2 { font-size: 42px; font-weight: 700; letter-spacing: -0.02em; }
.final-sub { font-size: 18px; color: var(--text-secondary); margin: 20px auto 0; max-width: 560px; }
.final-cta { display: flex; gap: 14px; margin-top: 34px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); background: var(--bg-secondary); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 48px 32px; display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand { max-width: 320px; }
.footer-brand .row { display: flex; align-items: center; gap: 10px; }
.footer-brand .wordmark { font-size: 19px; }
.footer-tag { font-size: 13px; color: var(--text-muted); margin-top: 12px; line-height: 1.5; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col .title { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 14px; }
.footer-col .links { display: flex; flex-direction: column; gap: 9px; }
.footer-col .links a, .footer-col .links span { font-size: 13.5px; color: var(--text-muted); text-decoration: none; transition: color .15s; }
.footer-col .links a:hover { color: var(--text-primary); }
.footer-copy { border-top: 1px solid var(--border); }
.footer-copy-inner { max-width: 1180px; margin: 0 auto; padding: 20px 32px; font-size: 12.5px; color: var(--text-muted); }

/* ============================================================
   MODAL
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 400; background: rgba(5,8,12,0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.open { display: flex; }
.modal-card { width: 100%; max-width: 460px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg); padding: 28px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; }
.modal-head h3 { font-size: 20px; font-weight: 600; margin: 0; }
.modal-head p { font-size: 14px; color: var(--text-muted); margin: 8px 0 0; line-height: 1.5; }
.modal-close { background: transparent; border: none; cursor: pointer; color: var(--text-muted); display: flex; }
.modal-body { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.field label .req { color: var(--cta); margin-left: 3px; }
.field input, .field select {
  font-family: var(--font-sans); font-size: 14px; color: var(--text-primary);
  background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 10px 12px; height: 42px; width: 100%; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--tide-blue-300); }
.field .select-wrap { position: relative; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.field .select-wrap .chev { position: absolute; right: 12px; top: 13px; pointer-events: none; color: var(--text-muted); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; align-items: center; }
.modal-status { font-size: 13px; margin-right: auto; }
.modal-status.err { color: var(--ns-value-red); }
.modal-status.ok { color: var(--ns-value-green); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .lp-nav { display: none; }
  .hero h1 { font-size: 40px; }
  .grid-4, .kpi-row { grid-template-columns: repeat(2,1fr); }
  .section-inner { padding: 72px 24px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .kpi-row, .dash-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero-sub { font-size: 16px; }
  .h2 { font-size: 30px; }
  .final-inner .h2 { font-size: 32px; }
  .hero-inner { padding: 56px 22px 48px; }
  .footer-inner { flex-direction: column; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* scrollbar */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--bg-active); border-radius: 8px; border: 3px solid var(--bg-primary); }
