/* BergByte — shared styles
   Palette: frost (page), ice (panels), meltwater (lines), fjord (action), abyss (depth), lichen (highlight) */
:root {
  --frost: #F1F5F6;
  --ice: #DFEBEE;
  --meltwater: #8FBFCC;
  --fjord: #1D5C73;
  --fjord-deep: #154558;
  --abyss: #0C2533;
  --abyss-2: #123447;
  --lichen: #E9C46A;
  --ink: #0C2533;
  --ink-soft: #3E5866;
  --on-dark: #E6F0F3;
  --on-dark-soft: #A9C3CC;

  --font: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Type scale (1.25 ratio, 18px base) */
  --t-sm: 0.889rem;
  --t-base: 1.125rem;
  --t-md: 1.406rem;
  --t-lg: 1.758rem;
  --t-xl: 2.197rem;
  --t-2xl: clamp(2.4rem, 4.6vw, 3.6rem);
  --t-3xl: clamp(2.8rem, 6.2vw, 4.9rem);

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --r-sm: 6px;
  --r-md: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--frost);
  font-optical-sizing: auto;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--fjord); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--fjord-deep); }
:focus-visible { outline: 3px solid var(--lichen); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { line-height: 1.08; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.035em; font-stretch: 85%; }
h2 { font-size: var(--t-2xl); letter-spacing: -0.03em; font-stretch: 88%; }
h3 { font-size: var(--t-md); letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 64ch; }
.lede { font-size: var(--t-md); line-height: 1.45; color: var(--ink-soft); max-width: 40ch; }
.small { font-size: var(--t-sm); }
.muted { color: var(--ink-soft); }
.skip { position: absolute; left: -999px; top: 0; background: var(--abyss); color: var(--on-dark); padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .95rem 1.35rem; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--fjord); color: #fff; }
.btn-primary:hover { background: var(--fjord-deep); color: #fff; }
.btn-ghost { border-color: var(--fjord); color: var(--fjord); background: transparent; }
.btn-ghost:hover { background: var(--fjord); color: #fff; }
.on-dark .btn-ghost, .btn-ghost.on-dark { border-color: var(--meltwater); color: var(--on-dark); }
.on-dark .btn-ghost:hover { background: var(--meltwater); color: var(--abyss); }
.on-dark .btn-primary { background: var(--lichen); color: var(--abyss); }
.on-dark .btn-primary:hover { background: #f3d68c; color: var(--abyss); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Header */
.site-header { background: var(--frost); position: relative; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; }
.brand svg { width: 28px; height: 28px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fjord); text-decoration: underline; }
.nav .btn { padding: .7rem 1.1rem; font-size: .95rem; }
.nav .btn-primary { color: #fff; text-decoration: none; }
.nav .btn-ghost { text-decoration: none; }
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: 999px; font: inherit; font-weight: 600; font-size: .95rem; padding: .45rem .9rem; color: var(--ink); cursor: pointer; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 4.5rem; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--frost); padding: .5rem var(--gutter) 1.5rem; border-bottom: 1px solid var(--meltwater); }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--ice); }
  .nav .btn { margin-top: .8rem; border-bottom: 2px solid transparent; }
  .nav .btn-ghost { border-color: var(--fjord); }
}

/* Waterline hero (the one bold element) */
.berg { --line: 0; }
.berg-above { background: var(--frost); padding: clamp(2.5rem, 6vw, 5rem) 0 0; }
.berg-below { background: var(--abyss); color: var(--on-dark); padding: 0 0 clamp(3rem, 7vw, 5.5rem); }
.berg-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 4.5rem); }
.berg-above .berg-grid { align-items: end; }
.berg-copy { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.berg-copy h1 { max-width: 11ch; }
.waterline { display: block; width: 100%; height: 28px; background: var(--abyss); }
.waterline svg { width: 100%; height: 28px; }
.berg-caption { padding-top: 2.25rem; }
.berg-caption p { color: var(--on-dark-soft); font-size: var(--t-md); line-height: 1.4; max-width: 26ch; }
.berg-caption strong { color: var(--on-dark); font-weight: 600; }

.tip {
  margin: 0;
  background: #fff; border: 1px solid var(--meltwater); border-bottom: 0;
  border-radius: var(--r-md) var(--r-md) 0 0; padding: 1.5rem 1.6rem 1.6rem;
  box-shadow: 0 -18px 40px -28px rgba(12, 37, 51, .35);
}
.tip .ask { font-size: 1rem; color: var(--ink-soft); margin: 0 0 .9rem; padding-left: .9rem; border-left: 3px solid var(--meltwater); }
.tip .answer { font-size: var(--t-lg); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 .9rem; max-width: 22ch; }
.tip .answer mark { background: linear-gradient(transparent 58%, var(--lichen) 58%); color: inherit; padding: 0 .05em; }
.bars { display: grid; gap: .45rem; margin: 1.1rem 0 0; }
.bar { display: grid; grid-template-columns: 6.5rem 1fr 3.2rem; gap: .6rem; align-items: center; font-size: .9rem; }
.bar span:nth-child(2) { height: 10px; border-radius: 99px; background: var(--ice); position: relative; overflow: hidden; }
.bar span:nth-child(2)::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--fjord); border-radius: 99px; }
.bar.lead span:nth-child(2)::after { background: var(--abyss); }
.bar span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.sample-note { font-size: .8rem; color: var(--ink-soft); margin: 1rem 0 0; }

.receipt {
  border: 1px solid #2c5568; border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md);
  background: var(--abyss-2); padding: 1.4rem 1.6rem 1.6rem; font-size: .95rem;
}
.receipt h2 { font-size: 1rem; letter-spacing: 0; font-stretch: 100%; color: var(--on-dark-soft); font-weight: 600; margin: 0 0 1rem; }
.receipt dl { margin: 0; display: grid; gap: 1.1rem; }
.receipt dt { font-weight: 600; color: var(--meltwater); margin-bottom: .3rem; font-size: .92rem; }
.receipt dd { margin: 0; color: var(--on-dark); }
.receipt ul, .receipt ol { margin: 0; padding-left: 1.2rem; }
.receipt li { margin: .15rem 0; }
.receipt code { font-family: var(--mono); font-size: .84rem; color: var(--on-dark); }
.receipt .check { display: flex; gap: .55rem; align-items: center; color: var(--lichen); font-weight: 600; }
.receipt .check svg { width: 18px; height: 18px; flex: none; }

@media (max-width: 880px) {
  .berg-grid { grid-template-columns: 1fr; }
  .berg-copy { padding-bottom: 2rem; }
  .berg-caption { padding-top: 1.75rem; order: 2; }
  .berg-below .receipt { order: 1; }
}

/* Sections */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-tight { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.section-ice { background: var(--ice); }
.section-dark { background: var(--abyss); color: var(--on-dark); }
.section-dark a { color: var(--lichen); }
.section-dark .muted, .section-dark .lede { color: var(--on-dark-soft); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { color: var(--ink-soft); font-size: var(--t-md); line-height: 1.45; }
.section-dark .section-head p { color: var(--on-dark-soft); }

/* Question lists */
.questions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 2.25rem; }
.questions h3 { font-size: 1.1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--abyss); margin-bottom: .9rem; }
.questions ul { list-style: none; margin: 0; padding: 0; }
.questions li { padding: .55rem 0; border-bottom: 1px solid var(--meltwater); line-height: 1.35; }
@media (max-width: 980px) { .questions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .questions { grid-template-columns: 1fr; } }

/* Steps (a real sequence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 3.25rem; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 2px solid var(--fjord);
  display: grid; place-items: center; font-weight: 700; color: var(--fjord);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.15rem; left: 3rem; right: -1.5rem; height: 2px; background: var(--meltwater); }
.steps h3 { font-size: 1.25rem; }
.steps p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .steps li { padding: 0 0 0 3.5rem; }
  .steps li:not(:last-child)::after { top: 2.6rem; bottom: -1.3rem; left: 1.1rem; right: auto; width: 2px; height: auto; }
}

/* Comparison table */
.compare { width: 100%; border-collapse: collapse; font-size: 1rem; }
.compare caption { text-align: left; }
.compare th, .compare td { text-align: left; padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--meltwater); vertical-align: top; }
.compare thead th { font-size: .95rem; color: var(--ink-soft); font-weight: 600; border-bottom: 2px solid var(--abyss); }
.compare tbody th { font-weight: 600; width: 30%; }
.compare td.us { color: var(--ink); }
.compare td.them { color: var(--ink-soft); }
.table-scroll { overflow-x: auto; }
@media (max-width: 640px) {
  .compare thead { display: none; }
  .compare tr { display: block; padding: 1rem 0; border-bottom: 1px solid var(--meltwater); }
  .compare th, .compare td { display: block; border: 0; padding: .2rem 0; width: auto; }
  .compare td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink); }
}

/* Proof */
.proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 4rem; }
.proof .figure { font-size: clamp(3rem, 7vw, 5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-stretch: 80%; margin-bottom: .6rem; color: var(--lichen); }
.proof p { color: var(--on-dark); font-size: 1.1rem; max-width: 34ch; }
.footnote { font-size: .85rem; color: var(--on-dark-soft); max-width: 70ch; margin-top: 2.5rem; }
@media (max-width: 720px) { .proof { grid-template-columns: 1fr; } }

/* Two-column feature rows */
.rows { display: grid; gap: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem 4rem; padding: 2.5rem 0; border-top: 1px solid var(--meltwater); }
.row:last-child { border-bottom: 1px solid var(--meltwater); }
.row h3 { font-size: var(--t-lg); letter-spacing: -0.02em; }
.row ul { margin: 0; padding-left: 1.2rem; }
.row li { margin: .35rem 0; }
@media (max-width: 800px) { .row { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: .9rem 0; border-bottom: 1px solid var(--meltwater); }
.section-dark .plain-list li { border-color: #2c5568; }
.plain-list strong { display: block; margin-bottom: .15rem; }

.tools { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.tools li { border: 1px solid var(--meltwater); border-radius: 999px; padding: .35rem .85rem; font-size: .95rem; background: #fff; }

/* Page hero (interior pages) */
.page-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--meltwater); }
.page-hero h1 { font-size: var(--t-2xl); max-width: 18ch; }

/* Pricing */
.billing { display: inline-flex; border: 2px solid var(--abyss); border-radius: 999px; padding: 3px; margin: 0 0 2.5rem; }
.billing button { font: inherit; font-weight: 600; font-size: .95rem; border: 0; background: transparent; color: var(--ink); padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer; }
.billing button[aria-pressed="true"] { background: var(--abyss); color: var(--on-dark); }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.plan { background: #fff; border: 1px solid var(--meltwater); border-radius: var(--r-md); padding: 1.6rem 1.4rem; display: flex; flex-direction: column; }
.plan.featured { background: var(--abyss); color: var(--on-dark); border-color: var(--abyss); }
.plan h2 { font-size: 1.4rem; letter-spacing: -0.01em; font-stretch: 100%; margin-bottom: .3rem; }
.plan .for { font-size: .95rem; color: var(--ink-soft); min-height: 3em; }
.plan.featured .for { color: var(--on-dark-soft); }
.price { font-size: clamp(2rem, 2.6vw, 2.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 1rem 0 .3rem; font-variant-numeric: tabular-nums; }
.price { white-space: nowrap; }
.price small { font-size: .85rem; font-weight: 500; letter-spacing: 0; }
.price-note { font-size: .88rem; color: var(--ink-soft); min-height: 2.6em; margin: 0; }
.plan.featured .price-note { color: var(--on-dark-soft); }
.allowance { list-style: none; padding: 1rem 0; margin: 1rem 0; border-top: 1px solid var(--meltwater); border-bottom: 1px solid var(--meltwater); }
.plan.featured .allowance { border-color: #2c5568; }
.allowance li { display: flex; justify-content: space-between; gap: .5rem; padding: .25rem 0; font-size: .97rem; }
.allowance li span:last-child { font-weight: 700; text-align: right; }
.includes { list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: .95rem; }
.includes li { padding: .3rem 0 .3rem 1.5rem; position: relative; }
.includes li::before { content: ""; position: absolute; left: 0; top: .8em; width: .7rem; height: 2px; background: var(--fjord); }
.plan.featured .includes li::before { background: var(--lichen); }
.plan .btn { margin-top: auto; width: 100%; white-space: nowrap; }
.plan.featured .btn-primary { background: var(--lichen); color: var(--abyss); }
.plan.featured .btn-primary:hover { background: #f3d68c; }
@media (max-width: 1040px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { border-top: 1px solid var(--meltwater); padding: 1.1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--meltwater); }
.faq summary { font-weight: 600; font-size: 1.15rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--fjord); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: .8rem 0 0; color: var(--ink-soft); }

/* Depth (What's next) */
.depth { position: relative; }
.depth-band { padding: clamp(3rem, 7vw, 5rem) 0; }
.depth-band.surface { background: var(--frost); }
.depth-band.d1 { background: #1A4457; color: var(--on-dark); }
.depth-band.d2 { background: #133647; color: var(--on-dark); }
.depth-band.d3 { background: var(--abyss); color: var(--on-dark); }
.depth-band .status { display: inline-block; font-size: .9rem; font-weight: 600; padding: .25rem .75rem; border-radius: 999px; margin-bottom: 1rem; }
.status.live { background: var(--fjord); color: #fff; }
.status.planned { border: 1px solid var(--meltwater); color: var(--on-dark); }
.status.exploring { border: 1px dashed var(--meltwater); color: var(--on-dark-soft); }
.depth-band h2 { font-size: var(--t-xl); max-width: 22ch; }
.depth-band p, .depth-band li { color: inherit; }
.depth-band .muted { color: var(--on-dark-soft); }
.surface .muted { color: var(--ink-soft); }
.depth-band ul { padding-left: 1.2rem; margin: 0; }
.depth-band li { margin: .35rem 0; }

/* Forms */
.form { display: grid; gap: 1.2rem; max-width: 40rem; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 600px) { .form .two { grid-template-columns: 1fr; } }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: .4rem; font-size: 1rem; }
.field .hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: .9rem; margin-top: .1rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--meltwater); border-radius: var(--r-sm); padding: .8rem .9rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--lichen); outline-offset: 1px; border-color: var(--fjord); }
.section-dark .field label, .section-dark .field legend { color: var(--on-dark); }
.section-dark .field .hint { color: var(--on-dark-soft); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.checks { display: grid; gap: .5rem; }
.checks label { display: flex; gap: .6rem; align-items: center; font-weight: 400; margin: 0; }
.checks input { width: 1.1rem; height: 1.1rem; accent-color: var(--fjord); }
.hidden { position: absolute !important; left: -9999px; }

/* CTA band */
.cta-band { background: var(--abyss); color: var(--on-dark); padding: clamp(3.5rem, 8vw, 6rem) 0; }
.cta-band h2 { max-width: 18ch; }
.cta-band p { color: var(--on-dark-soft); font-size: var(--t-md); line-height: 1.45; max-width: 44ch; }

/* Footer */
.site-footer { background: var(--abyss); color: var(--on-dark-soft); padding: 3rem 0 2.5rem; border-top: 1px solid #2c5568; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 2rem; }
.site-footer .brand { color: var(--on-dark); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35rem 0; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer .legal { max-width: none; grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid #2c5568; font-size: .85rem; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* One orchestrated moment: the answer surfaces on load */
@media (prefers-reduced-motion: no-preference) {
  .tip { animation: surface .9s cubic-bezier(.2, .7, .2, 1) .15s both; }
  .bar span:nth-child(2)::after { animation: grow 1s cubic-bezier(.2, .7, .2, 1) .7s both; }
}
@keyframes surface { from { transform: translateY(36px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes grow { from { width: 0; } }
