@import url('fonts.css');

/* ============================================================================
   finman.money — CHART DATUM
   The hydrographic chart: datum is the floor, magenta is advisory-only,
   upright type happened, italic type is predicted.
   Law lives in /DESIGN.md. Nothing here uses a raw colour outside :root.
   ========================================================================= */

:root {
  /* ---- water ------------------------------------------------------------ */
  --shallows:     #C6E4E6;   /* printed chart-water cyan — primary ground   */
  --deeps:        #EDF7F6;   /* "deep water" — the lighter, safer band      */
  --shoal:        #B2D8DB;   /* one step shallower, for insets              */
  --on-advisory:  #FDF4F9;   /* the only near-white: text on magenta         */

  /* ---- ink -------------------------------------------------------------- */
  --ink:          #0B2A2E;
  --ink-soft:     #37585B;
  --contour:      #527E80;

  /* ---- advisory (FORECAST ONLY — max 3 per viewport) --------------------- */
  --advisory:     #BE0079;
  --advisory-ink: #8E0059;

  /* ---- drying height (below datum) -------------------------------------- */
  --drying:       #3F6B38;
  --drying-tint:  rgba(63,107,56,0.16);

  /* ---- type ------------------------------------------------------------- */
  --display: 'Familjen Grotesk', 'Helvetica Neue', sans-serif;
  --body:    'Newsreader', 'Times New Roman', serif;
  --mono:    'Azeret Mono', ui-monospace, monospace;

  /* ---- geometry --------------------------------------------------------- */
  --radius: 0;
  --rule: 1px solid var(--contour);
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 66ch;

  /* ---- motion ----------------------------------------------------------- */
  --pen:   1400ms linear;                          /* constant-rate recorder */
  --draw:  520ms cubic-bezier(.16,1,.3,1);
  --micro: 140ms cubic-bezier(.32,.72,0,1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--shallows);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.62;
  font-synthesis-weight: none;
}

/* Every figure on the site is mono and tabular. Upright = surveyed fact. */
.num, .price, .article-meta time, .blog-card-meta { font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* Italic = predicted. The one typographic law. */
.predicted { font-family: var(--mono); font-style: italic; color: var(--advisory-ink); font-variant-numeric: tabular-nums; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--advisory-ink); }
img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

.container { width: min(1200px, 100% - (var(--gutter) * 2)); margin-inline: auto; }

/* ---------------------------------------------------------------------------
   Depth banding. Sections alternate; the LIGHTER band is the deep, safe one.
   Boundaries are contour lines, never headers or gradients.
   ------------------------------------------------------------------------ */
section { padding: clamp(3.5rem, 8vw, 7rem) 0; position: relative; border-top: var(--rule); }
section:nth-of-type(even) { background: var(--deeps); }

/* the contour breaks to admit its own value, as a depth contour does */
section::before {
  content: attr(data-sounding);
  position: absolute; top: 0; left: var(--gutter);
  transform: translateY(-50%);
  background: inherit;
  padding-inline: .75rem;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
section:nth-of-type(odd)::before { background: var(--shallows); }
section:nth-of-type(even)::before { background: var(--deeps); }

/* ---------------------------------------------------------------------------
   Navigation — a chart's margin strip
   ------------------------------------------------------------------------ */
.nav { border-bottom: var(--rule); background: var(--shallows); position: sticky; top: 0; z-index: 20; }
.nav-inner { display: flex; align-items: center; gap: 2rem; padding-block: 1rem;
  width: min(1200px, 100% - (var(--gutter) * 2)); margin-inline: auto; }
.nav-logo { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.03em; }
.nav-links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-links a { font-family: var(--display); font-size: .95rem; font-weight: 500; padding-bottom: 2px;
  border-bottom: 1px solid transparent; transition: border-color var(--micro), color var(--micro); }
.nav-links a:hover { border-bottom-color: var(--advisory); color: var(--ink); }
.nav-cta { display: flex; gap: .75rem; }

/* ---------------------------------------------------------------------------
   Buttons. One pill on the site: the primary CTA. Everything else is square.
   ------------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--display); font-weight: 600; font-size: .95rem;
  padding: .7rem 1.35rem; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  border-radius: var(--radius); cursor: pointer;
  transition: transform var(--micro), background var(--micro), color var(--micro), border-color var(--micro);
}
.btn:hover { transform: translateX(6px); }        /* rows shift right, never lift */
.btn-primary { background: var(--ink); color: var(--deeps); border-color: var(--ink); border-radius: 999px; }
.btn-primary:hover { background: var(--advisory); border-color: var(--advisory); color: var(--on-advisory); }
.btn-outline:hover, .btn-ghost:hover { border-color: var(--advisory); color: var(--advisory-ink); }
.btn-ghost { border-color: var(--contour); }
.btn-white { background: var(--deeps); border-color: var(--deeps); color: var(--ink); border-radius: 999px; }
.btn-white:hover { background: var(--advisory); border-color: var(--advisory); color: var(--on-advisory); }
.btn-lg { padding: .95rem 1.9rem; font-size: 1.05rem; }

/* ---------------------------------------------------------------------------
   Hero — 5/7 split, mono eyebrow alone in the left gutter
   ------------------------------------------------------------------------ */
.hero {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem); border-top: 0;
  width: min(1200px, 100% - (var(--gutter) * 2)); margin-inline: auto;
  display: grid; grid-template-columns: 7fr 5fr;
  column-gap: clamp(1.5rem, 4vw, 4rem); align-items: start;
}
.hero > .section-label { grid-column: 1 / -1; }
.hero h1 {
  grid-column: 1 / -1;
  font-size: clamp(2.5rem, 1.2rem + 5.4vw, 5.25rem);
  letter-spacing: -0.028em; line-height: 1.0; font-weight: 500;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.hero h1 span { font-style: italic; }  /* emphasis only — magenta is reserved for forecast */
.hero > p { grid-column: 1; font-size: 1.2rem; max-width: 52ch; margin: 0 0 1.75rem; color: var(--ink-soft); }
.hero-cta { grid-column: 1; display: flex; flex-wrap: wrap; gap: .85rem; align-self: start; }
.badge-row { grid-column: 1; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin-top: 1.75rem; }
.hero .tide-plate { grid-column: 2; grid-row: 3 / span 3; align-self: start; }
.badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); padding-left: 1rem; border-left: 2px solid var(--contour);
}

/* ---------------------------------------------------------------------------
   Section headings — the label IS the contour numeral, so it stays small
   ------------------------------------------------------------------------ */
.section-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--advisory-ink); display: block; margin-bottom: .9rem;
}
h2.section-title { font-size: clamp(1.9rem, 1rem + 2.6vw, 3rem); margin-bottom: .75rem; }
p.section-sub { color: var(--ink-soft); max-width: var(--measure); margin: 0 0 clamp(2rem, 4vw, 3.25rem); }

/* ---------------------------------------------------------------------------
   Feature rows — ruled rows, not cards. No shadow, no radius, no icon circles.
   ------------------------------------------------------------------------ */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 0; }
.feature-card {
  padding: 1.9rem 1.6rem 1.9rem 0; border-top: var(--rule); background: transparent;
  transition: transform var(--micro);
}
.feature-card:hover { transform: translateX(6px); }
.feature-icon {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--advisory-ink);
  margin-bottom: .8rem; display: block;
}
.feature-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.feature-card p { color: var(--ink-soft); font-size: 1rem; margin: 0; }

/* ---------------------------------------------------------------------------
   Pricing — depth-banded plates
   ------------------------------------------------------------------------ */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 0; border-left: var(--rule); }
.pricing-card { padding: 2rem 1.75rem; border: var(--rule); border-left: 0; background: transparent; }
.pricing-card.popular { background: var(--deeps); border-top-width: 2px; border-top-color: var(--advisory); }
.popular-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--advisory-ink); display: block; margin-bottom: .6rem;
}
.price { font-family: var(--mono); font-size: 2.4rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.price span { font-size: .95rem; color: var(--ink-soft); font-weight: 400; }
.pricing-features { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.pricing-features li { position: relative; padding-left: 1.5rem; margin-bottom: .6rem; font-size: 1rem; color: var(--ink-soft); }
.pricing-features li::before {
  content: '·'; position: absolute; left: .35rem; color: var(--advisory);
  font-family: var(--mono); font-weight: 600;
}

/* ---------------------------------------------------------------------------
   FAQ
   ------------------------------------------------------------------------ */
.faq-list { max-width: var(--measure); }
details { border-top: var(--rule); }
details:last-of-type { border-bottom: var(--rule); }
summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2rem 1.15rem 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+'; position: absolute; right: .25rem; top: 1.05rem;
  font-family: var(--mono); color: var(--advisory-ink); transition: transform var(--micro);
}
details[open] summary::after { content: '−'; }
.faq-body { padding: 0 0 1.35rem; color: var(--ink-soft); max-width: var(--measure); }

/* ---------------------------------------------------------------------------
   CTA — a datum line, not a gradient banner
   ------------------------------------------------------------------------ */
.cta-banner { background: var(--deeps); border-top: 2px solid var(--ink); border-bottom: var(--rule); text-align: left; }
.cta-banner h2 { font-size: clamp(1.8rem, 1rem + 2.4vw, 2.9rem); margin-bottom: .6rem; }
.cta-banner p { color: var(--ink-soft); max-width: var(--measure); margin: 0 0 1.6rem; }

/* ---------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------ */
footer { border-top: var(--rule); padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; background: var(--shallows); }
.footer-inner { display: grid; grid-template-columns: 2fr repeat(auto-fit, minmax(9rem, 1fr)); gap: 2rem;
  width: min(1200px, 100% - (var(--gutter) * 2)); margin-inline: auto; }
.footer-brand p { color: var(--ink-soft); font-size: .95rem; max-width: 34ch; }
.footer-col h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500; margin-bottom: .9rem; }
.footer-col a { display: block; font-size: .95rem; padding: .22rem 0; color: var(--ink-soft); transition: transform var(--micro), color var(--micro); }
.footer-col a:hover { transform: translateX(6px); color: var(--ink); }
.footer-bottom {
  border-top: var(--rule); margin-top: 2.5rem; padding-top: 1.25rem;
  width: min(1200px, 100% - (var(--gutter) * 2)); margin-inline: auto;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-soft);
}

/* ---------------------------------------------------------------------------
   Blog index — a sounding field of ruled rows. NO chart per row: there is no
   per-post cash-flow to plot and drawing one would be inventing data.
   ------------------------------------------------------------------------ */
.blog-grid { display: block; border-top: var(--rule); }
.blog-card, .post-card {
  display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 2.5rem; align-items: baseline;
  padding: 1.15rem 0; border-bottom: var(--rule); background: transparent;
  transition: transform var(--micro);
}
.blog-card:hover, .post-card:hover { transform: translateX(6px); }
.blog-card-body { grid-column: 1; }
.blog-tag, .article-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--advisory-ink);
}
.blog-card h3, .post-card h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -.015em; margin-top: .3rem; }
.blog-card p, .post-card p { color: var(--ink-soft); font-size: 1rem; margin: .3rem 0 0; max-width: 68ch; }
.blog-card > .blog-card-meta, .post-card > .blog-card-meta { grid-column: 2; grid-row: 1; white-space: nowrap; }
.blog-card-meta, .post-card .blog-card-meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  font-variant-numeric: tabular-nums; text-align: right; font-style: italic;   /* read time is predicted */
}

/* ---------------------------------------------------------------------------
   Article
   ------------------------------------------------------------------------ */
.article-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); border-bottom: var(--rule); }
.article-hero h1 { font-size: clamp(2.1rem, 1.1rem + 3.6vw, 3.9rem); font-weight: 500; letter-spacing: -.028em; max-width: 22ch; margin-block: .8rem; }
.article-meta { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.article-body { max-width: var(--measure); margin: clamp(2rem, 4vw, 3rem) auto 0; padding-inline: var(--gutter); }
.article-body h2 { font-size: clamp(1.5rem, 1rem + 1.5vw, 2rem); margin: 2.5rem 0 .75rem; }
.article-body h3 { font-size: 1.2rem; margin: 1.9rem 0 .5rem; }
.article-body p { margin: 0 0 1.15rem; }
.article-body ul, .article-body ol { margin: 0 0 1.35rem; padding-left: 1.15rem; }
.article-body li { margin-bottom: .45rem; }
.article-body strong { font-weight: 600; }
.article-body a { border-bottom: 1px solid var(--advisory); }
.article-cta {
  border-top: 2px solid var(--ink); border-bottom: var(--rule);
  padding: 1.75rem 0; margin: 2.5rem 0; background: transparent;
}
.article-cta h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.article-cta p { color: var(--ink-soft); margin: 0 0 1.1rem; }

/* ---------------------------------------------------------------------------
   Comparison tables
   ------------------------------------------------------------------------ */
.compare-table { width: 100%; border-collapse: collapse; font-size: .98rem; margin: 1.5rem 0; }
.compare-table th {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500; text-align: left; padding: .75rem .9rem; border-bottom: 2px solid var(--ink);
}
.compare-table th:first-child { width: 40%; }
.compare-table td { padding: .8rem .9rem; border-bottom: var(--rule); vertical-align: top; }
.compare-table tr:last-child td { border-bottom: 2px solid var(--ink); }
/* Marks are set here, not in markup: mono glyphs in the chart's own language.
   surveyed (+) · absent (−) · partial (~) */
.compare-table .check, .compare-table .cross, .compare-table .partial { font-weight: 500; }
.compare-table .check::before,
.compare-table .cross::before,
.compare-table .partial::before {
  font-family: var(--mono); font-weight: 600; margin-right: .5rem; display: inline-block; width: .9em;
}
.compare-table .check::before   { content: '+'; color: var(--drying); }
.compare-table .cross::before   { content: '\2212'; color: var(--advisory-ink); }
.compare-table .partial::before { content: '~'; color: var(--ink-soft); }
.compare-table tr:hover td { background: var(--deeps); }

/* ---------------------------------------------------------------------------
   THE TIDE STAFF — the signature. Only rendered where real data exists.
   ------------------------------------------------------------------------ */
.tide-plate { margin: 0; }
.tide { display: block; width: 100%; height: auto; }
.tide-caption {
  font-family: var(--mono); font-size: 10px; line-height: 1.5; letter-spacing: .06em;
  color: var(--ink-soft); margin-top: .6rem; max-width: 38ch;
}
.tide .datum { stroke: var(--ink); stroke-width: 2; }
.tide .datum-label { font-family: var(--mono); font-size: 10px; fill: var(--ink); letter-spacing: .08em; }
.tide .envelope { fill: url(#hatch-adv); opacity: .5; }
#hatch-adv line { stroke: var(--advisory); }
#hatch-dry line { stroke: var(--drying); }
.tide .trace { fill: none; stroke: var(--advisory); stroke-width: 2; }
.tide .sounding { font-family: var(--mono); font-size: 10px; fill: var(--ink-soft); }
.tide .sounding--pred { font-style: italic; fill: var(--advisory-ink); }
.tide .drying { fill: url(#hatch-dry); opacity: .85; }
.tide .drying-edge { stroke: var(--drying); stroke-width: 1.5; stroke-dasharray: 4 3; fill: none; }
.tide .axis { stroke: var(--contour); stroke-width: 1; }
.tide .axis-label { font-family: var(--mono); font-size: 9px; fill: var(--ink-soft); letter-spacing: .1em; }

/* constant-rate pen: a chart recorder does not ease */
.tide .trace { stroke-dasharray: var(--trace-len, 1200); stroke-dashoffset: var(--trace-len, 1200); }
.tide.is-drawn .trace { animation: pen-trace var(--pen) forwards; }
.tide .envelope, .tide .drying { clip-path: inset(0 100% 0 0); }
.tide.is-drawn .envelope, .tide.is-drawn .drying { animation: pen-open var(--pen) forwards; }
@keyframes pen-trace { to { stroke-dashoffset: 0; } }
@keyframes pen-open  { to { clip-path: inset(0 0 0 0); } }

/* contour dividers draw in */
.reveal { opacity: 0; }
.reveal.is-in { opacity: 1; transition: opacity var(--draw); }
.rule-draw { transform: scaleX(0); transform-origin: left; }
.rule-draw.is-in { transform: scaleX(1); transition: transform var(--draw); }

/* ---------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------ */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero p, .hero-cta, .badge-row { grid-column: 1; }
  .badge-row { flex-direction: row; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero .tide-plate { grid-column: 1; grid-row: auto; margin-top: 2rem; }
  .blog-card, .post-card { grid-template-columns: 1fr; }
  .blog-card > .blog-card-meta, .post-card > .blog-card-meta { grid-column: 1; grid-row: auto; }
  .blog-card-meta { text-align: left; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .compare-table { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .tide .trace { stroke-dashoffset: 0; }
  .tide .envelope, .tide .drying { clip-path: inset(0 0 0 0); }
  .reveal { opacity: 1; }
  .rule-draw { transform: scaleX(1); }
}

/* ---------------------------------------------------------------------------
   Draft-status surfaces (legal pages awaiting owner approval)
   ------------------------------------------------------------------------ */
.draft-notice {
  border-top: 2px solid var(--advisory);
  border-bottom: var(--rule);
  padding: 1.1rem 0 1.25rem;
  margin-bottom: 2rem;
  font-size: 1rem;
  color: var(--ink);
}
.draft-notice strong { display: block; font-family: var(--display); margin-bottom: .35rem; }
mark.needs-input {
  display: block;
  background: transparent;
  border-left: 2px solid var(--advisory);
  padding: .5rem 0 .5rem .9rem;
  margin: .9rem 0;
  color: var(--advisory-ink);
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.55;
}
mark.needs-input strong { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; font-size: .74rem; display: block; margin-bottom: .2rem; }
.article-body code {
  font-family: var(--mono); font-size: .84em; background: var(--deeps);
  padding: .1em .35em; border: 1px solid var(--contour);
}
.article-body blockquote {
  margin: 1.25rem 0; padding-left: 1.1rem; border-left: 2px solid var(--contour);
  color: var(--ink-soft);
}

.article-body .lede { font-size: 1.15rem; color: var(--ink); border-left: 2px solid var(--advisory); padding-left: 1.1rem; margin-bottom: 2rem; }
