/* Moatwatch marketing site.
   Palette: cool stone paper and moat-water blues (the app's brand blue, deepened). Verdict colours appear only
   where a verdict is meant. Type: Zilla Slab for display (sturdy, ledger-like), Schibsted Grotesk for text. */

@font-face { font-family: 'Zilla Slab'; font-weight: 600; font-display: swap; src: url(fonts/zilla-slab-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Zilla Slab'; font-weight: 700; font-display: swap; src: url(fonts/zilla-slab-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 400 900; font-display: swap; src: url(fonts/schibsted-grotesk-latin-wght-normal.woff2) format('woff2-variations'); }

:root {
  --paper: #f2f4f5;
  --paper-2: #e6ebee;
  --surface: #ffffff;
  --ink: #0f1e2b;
  --ink-2: #435260;
  --muted: #6a7783;
  --rule: #cfd7dc;
  --moat: #1d5a96;
  --moat-mid: #12406b;
  --moat-deep: #0a2843;
  --foam: #d6e5f4;
  --buy: #17672a;
  --watch: #7d5300;
  --avoid: #a02c2c;
  --focus: #2a78d6;
  --display: 'Zilla Slab', 'Roboto Slab', Rockwell, Georgia, serif;
  --text: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--text); font-feature-settings: 'tnum' 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moat); text-underline-offset: 3px; }
a:hover { color: var(--moat-mid); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

h1, h2, h3 { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; font-weight: 600; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 650; }
p { margin: 0; }
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.small { font-size: 14.5px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- header */
.top { padding: 20px 0; }
.top .wrap { display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand svg { flex: none; }
.top nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.top nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 15.5px; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current='page'] { color: var(--ink); }
.top nav a.btn-primary, .top nav a.btn-primary:hover { color: #fff; text-decoration: none; }
.top nav a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--moat); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 8px; font: 650 16px/1 var(--text);
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s; }
.btn-primary { background: var(--moat); color: #fff; }
.btn-primary:hover { background: var(--moat-mid); color: #fff; }
.btn-quiet { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn-quiet:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-small { padding: 9px 14px; font-size: 15px; }
.on-water .btn-primary { background: #fff; color: var(--moat-deep); }
.on-water .btn-primary:hover { background: var(--foam); color: var(--moat-deep); }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(36px, 7vw, 88px) 0 clamp(80px, 12vw, 150px); }
.hero h1 { max-width: 17ch; }
.hero .lede { margin-top: 26px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; align-items: center; }
.hero .note { margin-top: 14px; color: var(--muted); font-size: 14.5px; }

/* The moat: the product sits on the waterline. */
.moat { position: relative; background: var(--moat-deep); color: #e8f0f8; padding-bottom: clamp(56px, 8vw, 96px); }
.waterline { position: absolute; left: 0; right: 0; top: -22px; height: 24px; overflow: hidden; pointer-events: none; }
.waterline svg { width: calc(100% + 96px); height: 24px; display: block; animation: drift 14s linear infinite; }
@keyframes drift { to { transform: translateX(-96px); } }
@media (prefers-reduced-motion: reduce) { .waterline svg { animation: none; } html { scroll-behavior: auto; } }
.moat .shot { position: relative; margin-top: calc(-1 * clamp(70px, 10vw, 130px)); }
.moat figcaption { margin-top: 16px; font-size: 14.5px; color: #a9c0d6; max-width: 70ch; }

.shot img { border-radius: 10px; border: 1px solid var(--rule); background: #fff; box-shadow: 0 30px 60px -30px rgba(5, 20, 35, .55); }
.shot.fade-right { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }

/* ---------------------------------------------------------------- sections */
section { scroll-margin-top: 20px; }
.band { padding: clamp(64px, 9vw, 112px) 0; }
.band.alt { background: var(--paper-2); }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { margin-top: 16px; }

/* steps: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.steps li { padding: 22px 24px 4px 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.steps .n { font: 700 40px/1 var(--display); color: var(--moat); display: block; margin-bottom: 14px; font-variant-numeric: lining-nums; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--ink-2); font-size: 16px; }

/* feature rows: text beside a real screen */
.feature { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.feature + .feature { margin-top: clamp(64px, 9vw, 112px); }
.feature.flip { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.feature.flip .copy { order: 2; }
.feature h2 { font-size: clamp(28px, 3.2vw, 38px); }
.feature .copy p { margin-top: 16px; color: var(--ink-2); }
.feature .copy ul { margin: 18px 0 0; padding: 0; list-style: none; }
.feature .copy li { padding: 9px 0 9px 26px; border-top: 1px solid var(--rule); position: relative; font-size: 16px; }
.feature .copy li::before { content: ''; position: absolute; left: 4px; top: 18px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--moat); }
.verdict { font-weight: 700; }
.verdict.buy { color: var(--buy); } .verdict.watch { color: var(--watch); } .verdict.avoid { color: var(--avoid); }

/* methods ledger */
.ledger { width: 100%; border-collapse: collapse; }
.ledger th { text-align: left; font: 600 14px/1.3 var(--text); color: var(--muted); padding: 0 16px 12px 0; border-bottom: 2px solid var(--ink); }
.ledger td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger td:first-child { font: 600 22px/1.25 var(--display); width: 28%; }
.ledger td:nth-child(2) { width: 26%; color: var(--ink-2); }
.ledger td:last-child { color: var(--ink-2); }
.fineprint { margin-top: 18px; font-size: 14.5px; color: var(--muted); max-width: 72ch; }

/* what it isn't */
.isnt { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; margin: 0; }
.isnt div { padding: 20px 0; border-top: 1px solid var(--rule); }
.isnt dt { font-weight: 700; margin-bottom: 6px; }
.isnt dd { margin: 0; color: var(--ink-2); }

/* ---------------------------------------------------------------- plans */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 900px; }
.plan { border-radius: 12px; padding: 32px; border: 1.5px solid var(--rule); background: var(--surface); display: flex; flex-direction: column; }
.plan.pro { background: var(--moat-deep); border-color: var(--moat-deep); color: #e8f0f8; }
.plan h3 { font: 700 28px/1.1 var(--display); }
.plan .for { margin-top: 8px; color: var(--ink-2); font-size: 16px; min-height: 3.2em; }
.plan.pro .for { color: #b6cbe0; }
.price { margin-top: 22px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price .amt { font: 700 56px/1 var(--display); font-variant-numeric: lining-nums; }
.price .per { color: var(--muted); font-size: 15.5px; }
.plan.pro .price .per { color: #a9c0d6; }
.price-sub { min-height: 1.6em; margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.plan.pro .price-sub { color: #a9c0d6; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 28px; }
.plan li { padding: 8px 0 8px 28px; position: relative; font-size: 16px; border-top: 1px solid var(--rule); }
.plan.pro li { border-top-color: rgba(214, 229, 244, .18); }
.plan li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px; border-left: 2.5px solid var(--moat); border-bottom: 2.5px solid var(--moat); transform: rotate(-45deg); }
.plan.pro li::before { border-color: #8fc0f2; }
.plan .btn { margin-top: auto; width: 100%; }

.billing { display: inline-flex; padding: 4px; background: var(--paper-2); border-radius: 10px; gap: 4px; margin-bottom: 28px; }
.billing button { font: 600 15px/1 var(--text); border: 0; background: transparent; color: var(--ink-2); padding: 10px 16px; border-radius: 7px; cursor: pointer; }
.billing button[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 30, 43, .12); }
.billing .save { color: var(--buy); font-weight: 700; margin-left: 4px; }

.compare { width: 100%; border-collapse: collapse; max-width: 900px; margin-top: 12px; }
.compare caption { text-align: left; font: 600 26px/1.2 var(--display); padding-bottom: 16px; }
.compare th, .compare td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--rule); text-align: left; font-size: 16px; }
.compare thead th { font-size: 14px; color: var(--muted); border-bottom: 2px solid var(--ink); font-weight: 600; }
.compare td { width: 18%; text-align: center; }
.compare thead th:not(:first-child) { text-align: center; }
.compare th[scope='row'] { font-weight: 450; color: var(--ink); }
.yes { color: var(--moat); font-weight: 700; }
.no { color: var(--muted); }

.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--rule); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 650; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 600 24px/1 var(--display); color: var(--moat); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 0 18px; color: var(--ink-2); max-width: 64ch; }

/* ---------------------------------------------------------------- closing + footer */
.closing { background: var(--moat-deep); color: #e8f0f8; padding: clamp(64px, 9vw, 104px) 0; position: relative; }
.closing h2 { color: #fff; max-width: 18ch; }
.closing p { margin-top: 16px; color: #b6cbe0; max-width: 56ch; }
.closing .actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.closing .btn-quiet { color: #e8f0f8; border-color: rgba(214, 229, 244, .35); }
.closing .btn-quiet:hover { border-color: #e8f0f8; color: #fff; }

footer { background: #071c30; color: #9fb4c8; padding: 40px 0 48px; font-size: 14.5px; }
footer .wrap { display: grid; grid-template-columns: 1.3fr 2fr; gap: 32px; }
footer .brand { color: #fff; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; }
footer a { color: #d6e5f4; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer p + p { margin-top: 10px; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .feature, .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .copy { order: 0; }
  .ledger td:first-child { width: auto; }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .top nav .hide-sm { display: none; }
  .top .wrap { gap: 14px; }
  .top nav { gap: 14px; }
  .top nav a { font-size: 15px; }
  .brand { font-size: 17px; }
  .plans, .isnt { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--rule); }
  .ledger thead { display: none; }
  .ledger tr { display: block; border-bottom: 1px solid var(--rule); padding: 14px 0; }
  .ledger td { display: block; border: 0; padding: 2px 0; width: auto !important; }
  footer .wrap { grid-template-columns: 1fr; }
  .compare td { width: 22%; }
}
