/* Keel Digital. Tokens follow CLAUDE.md: amber is for the river line only. */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/poppins-700.woff2") format("woff2"); }

:root {
  --navy: #16324F;
  --navy-deep: #0F2438;
  --off-white: #F4F5F2;
  --slate: #5B6B78;
  --rule: #D5DAD6;
  --amber: #F2A93B;

  /* Fluid between 390px and 1280px */
  --t-h1: clamp(2.5rem, 1.733rem + 3.146vw, 4.25rem);
  --t-h2: clamp(1.75rem, 1.421rem + 1.348vw, 2.5rem);
  --t-h3: clamp(1.375rem, 1.211rem + 0.674vw, 1.75rem);
  --t-body: clamp(1.125rem, 1.0975rem + 0.112vw, 1.1875rem);
  --t-small: clamp(0.9375rem, 0.91rem + 0.112vw, 1rem);

  --s1: 0.5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem;
  --s5: 3rem; --s6: 4rem; --s7: 6rem; --s8: 8rem;

  --gutter: 1.25rem;
  --river: 6px;
  --radius: 6px;
}

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

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

body {
  margin: 0;
  background: var(--off-white);
  color: var(--navy);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--t-body);
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; }
h1 { font-size: var(--t-h1); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: var(--t-h2); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: var(--s3); }
h3 { font-size: var(--t-h3); font-weight: 600; line-height: 1.25; margin-bottom: var(--s1); }
p, ul, ol, dl { margin: 0 0 var(--s2); }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.hero :focus-visible,
.price-founding :focus-visible,
.site-footer :focus-visible,
.call-bar :focus-visible { outline-color: var(--off-white); }

.wrap { width: 100%; max-width: 70rem; margin-inline: auto; padding-inline: var(--gutter); }
.measure:not(.wrap), .wrap.measure > * { max-width: 65ch; }

.skip { position: absolute; left: var(--s2); top: -4rem; background: var(--navy); color: var(--off-white); padding: var(--s1) var(--s2); z-index: 10; }
.skip:focus { top: var(--s2); }

/* Buttons */
.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--off-white);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.button-light { background: var(--off-white); border-color: var(--off-white); color: var(--navy); }
.button-light:hover { background: #fff; border-color: #fff; }
.button-outline-light { background: transparent; border-color: var(--off-white); color: var(--off-white); }
.button-outline-light:hover { background: var(--navy); border-color: var(--off-white); }

/* Header */
.site-header { background: var(--off-white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding-block: var(--s2); }
.brand img { width: clamp(9.5rem, 7rem + 10vw, 15.75rem); }
.header-actions { display: flex; align-items: center; gap: var(--s3); font-size: var(--t-small); }
.header-actions .button { padding: 0.6rem 1rem; }
.header-email { display: none; }
@media (min-width: 48rem) { .header-email { display: inline; } }

/* Hero: the bridge on the river */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--off-white);
}
.hero-copy { position: relative; z-index: 1; padding-top: var(--s6); }
.hero h1 { max-width: 16ch; margin-bottom: var(--s3); text-wrap: balance; }
.lede { max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s4); }
.hero-email { font-size: var(--t-small); }
.hero-note { font-size: var(--t-small); opacity: 0.85; }

.hero-scene { margin-top: var(--s4); margin-left: 18%; margin-right: -22%; }
.bridge { width: 100%; }

.river {
  height: var(--river);
  background: var(--amber);
  transform-origin: left center;
}
.hero .river { animation: river-draw 700ms cubic-bezier(.2, .7, .2, 1) 150ms both; }
@keyframes river-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .river { animation: none; }
}

@media (min-width: 60rem) {
  .hero-copy { padding-top: var(--s7); padding-bottom: var(--s8); }
  .hero-scene {
    position: absolute;
    right: -6vw;
    bottom: var(--river);
    width: 58vw;
    max-width: 62rem;
    margin: 0;
  }
}

/* Sections */
.section { padding-block: var(--s6); }
.section-tight { padding-top: 0; }
@media (min-width: 60rem) { .section { padding-block: var(--s7); } .section-tight { padding-top: 0; } }

.columns { display: grid; gap: var(--s4); margin-top: var(--s4); }
.columns ul { padding-left: 1.1em; }
.columns li { margin-bottom: 0.25rem; }
@media (min-width: 60rem) { .columns { grid-template-columns: repeat(3, 1fr); gap: var(--s5); } }

/* Sample designs: one card per sample site, the whole card is the link */
.samples { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s4); }
@media (min-width: 48rem) { .samples { grid-template-columns: repeat(3, 1fr); gap: var(--s3); } }
.sample a { display: block; text-decoration: none; }
.sample img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 2px solid var(--navy); border-radius: var(--radius); margin-bottom: var(--s2); }
.sample-trade { display: block; color: var(--slate); font-size: var(--t-small); }
.sample-name { display: block; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.sample a:hover .sample-name { text-decoration-thickness: 2px; }
.sample p { margin: var(--s1) 0 0; font-size: var(--t-small); }

/* Prices: deliberately two different blocks */
.prices { display: grid; gap: var(--s3); margin-block: var(--s4) var(--s3); }
@media (min-width: 48rem) { .prices { grid-template-columns: 1fr 1fr; } }
.price { padding: var(--s4); border: 2px solid var(--navy); }
.price p:last-child { margin-bottom: 0; }
.price-founding { background: var(--navy); color: var(--off-white); }
.price-figures { font-size: var(--t-body); }
.price-big { font-size: var(--t-h2); font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
.terms { color: var(--slate); font-size: var(--t-small); }

/* How it works: a real sequence, so it is numbered */
.steps { list-style: none; padding: 0; margin-top: var(--s4); counter-reset: step; display: grid; gap: var(--s4); }
.steps li { counter-increment: step; position: relative; padding-left: 3.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.1em;
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  border: 2px solid var(--navy); border-radius: 50%;
  font-weight: 700; font-size: 1rem;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: calc(1.125rem - 1px); top: 2.4rem; bottom: calc(-1 * var(--s4) + 0.25rem);
  border-left: 2px solid var(--rule);
}
.steps h3 { font-size: var(--t-body); font-weight: 600; margin-bottom: 0.25rem; }
.steps p { margin: 0; }
@media (min-width: 60rem) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: var(--s3); }
  .steps li { padding-left: 0; padding-top: 3.5rem; }
  .steps li:not(:last-child)::after { left: 2.5rem; right: calc(-1 * var(--s3)); top: 1.125rem; bottom: auto; border-left: 0; border-top: 2px solid var(--rule); }
}

/* About and why Keel */
.about { display: grid; gap: var(--s6); }
.about > div { max-width: 65ch; }
@media (min-width: 60rem) { .about { grid-template-columns: 1fr 1fr; gap: var(--s6); } }
.principles { margin-top: var(--s3); }
.principles dt { font-weight: 600; }
.principles dd { margin: 0 0 var(--s2); }

/* FAQ */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: var(--s2) 2rem var(--s2) 0;
  position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 0.25rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: var(--s2); margin: 0; }

/* Contact: the river returns as the far bank */
.contact { padding-top: 0; }
.river-far { margin-bottom: var(--s6); }
@media (min-width: 60rem) { .river-far { margin-bottom: var(--s7); } }
.contact-inner { display: grid; gap: var(--s5); }
@media (min-width: 60rem) { .contact-inner { grid-template-columns: 5fr 6fr; gap: var(--s6); } }
.contact-intro { max-width: 32rem; }
.contact-email { font-size: var(--t-h3); font-weight: 600; line-height: 1.35; margin-top: var(--s4); }
.contact-email a { overflow-wrap: anywhere; }

.contact-form { max-width: 36rem; }
.field { margin-bottom: var(--s3); }
.field label { display: block; font-weight: 600; margin-bottom: 0.375rem; }
.optional { font-weight: 400; color: var(--slate); }
.field input, .field textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 2px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  font: inherit;
}
.field input::placeholder { color: var(--slate); opacity: 1; }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--navy); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #A3282C; }
.field-error { color: #A3282C; font-size: var(--t-small); margin: 0.375rem 0 0; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-bottom: var(--s2); }
.form-status { margin-top: var(--s2); font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-error { color: #A3282C; }
.form-note { color: var(--slate); font-size: var(--t-small); }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--off-white); padding-block: var(--s5); font-size: var(--t-small); }
.footer-inner > p { margin-bottom: var(--s2); }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.proof { opacity: 0.8; margin: 0; }

/* Sticky bar on phones, shown by main.js once the hero has scrolled away */
.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: 2fr 1fr; gap: var(--s1);
  padding: var(--s1) var(--gutter) calc(var(--s1) + env(safe-area-inset-bottom));
  background: var(--navy-deep);
}
.call-bar[hidden] { display: none; }
.call-bar .button { text-align: center; }
@media (min-width: 48rem) { .call-bar { display: none !important; } }
@media (max-width: 47.99rem) { body.has-call-bar { padding-bottom: 4.5rem; } }

/* Privacy notice and other text pages */
.prose h1 { font-size: var(--t-h2); margin-bottom: var(--s2); }
.prose h2 { font-size: var(--t-h3); margin: var(--s5) 0 var(--s2); }
.prose ul { padding-left: 1.1em; }
