/* ============================================================
   Kelvo — styles
   Clean, modern, Apple-like. Satoshi for type, Racing Sans One for logo.
   ============================================================ */

:root {
  /* palette */
  --bg:        #ffffff;
  --bg-soft:   #fbfbfd;       /* Apple off-white */
  --bg-dark:   #1d1d1f;
  --ink:       #1d1d1f;       /* near-black text */
  --ink-2:     #424245;
  --muted:     #6e6e73;
  --hair:      #d2d2d7;       /* hairline borders */
  --hair-soft: #ececf0;
  --accent:    #06402B;       /* Kelvo green */
  --accent-2:  #0a5236;       /* slightly lighter green for hovers */
  --good:      #1d1d1f;
  --weak:      #86868b;

  /* type */
  --font-body: "Satoshi", -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-logo: "Racing Sans One", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* layout */
  --maxw: 1080px;
  --gutter: 24px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* lock scroll while loader is active */
body.is-loading { overflow: hidden; height: 100vh; }

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  transition: transform 0.9s var(--ease);
}
.loader__word {
  font-family: var(--font-logo);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #ffffff;
  animation: loaderIn 0.7s var(--ease) both;
}
@keyframes loaderIn {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.loader.is-done {
  transform: translateY(-100%);
  pointer-events: none;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--accent);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: border-color 0.4s var(--ease);
}
.nav.is-scrolled { border-bottom-color: rgba(255,255,255,0.18); }
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.nav__logo {
  font-family: var(--font-logo);
  font-size: 28px;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.nav__links {
  display: flex; align-items: center; gap: 8px;
}
.nav__link {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.82);
  padding: 8px 14px; border-radius: 980px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__link:hover { color: #fff; background: rgba(255,255,255,0.12); }
.nav__cta {
  font-size: 14px; font-weight: 600;
  padding: 9px 18px; margin-left: 6px;
  border-radius: 980px;
  background: #ffffff; color: var(--accent);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__cta:hover { background: #f0f4f1; transform: translateY(-1px); }

.nav__toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 8px;
}
.nav__toggle span {
  width: 22px; height: 2px; background: #ffffff;
  border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
main { padding-top: 0; }
section { scroll-margin-top: 72px; }

.section-head {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--gutter);
}
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(30px, 4.5vw, 48px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-lede {
  margin-top: 18px;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--muted);
}

/* on green sections, flip shared headings to white */
.stats .section-title,
.stats .section-lede,
.manifesto .section-title,
.manifesto .section-lede,
.inquire .section-title,
.inquire .section-lede { color: #ffffff; }
.manifesto .section-lede,
.inquire .section-lede { color: rgba(255,255,255,0.75); }
.manifesto .eyebrow,
.inquire .eyebrow { color: rgba(255,255,255,0.6); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 140px var(--gutter) 96px;
  overflow: hidden;
  background:
    radial-gradient(55% 45% at 50% 6%, rgba(6,64,43,0.07), transparent 70%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}
/* subtle dotted texture, fading toward the edges */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(6,64,43,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(75% 55% at 50% 26%, #000 0%, transparent 78%);
  mask-image: radial-gradient(75% 55% at 50% 26%, #000 0%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; max-width: 920px; width: 100%; }
.hero__title {
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
  max-width: 880px;
  margin-left: auto; margin-right: auto;
}
.hero__sub {
  margin: 24px auto 0;
  max-width: 640px;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.hero__actions {
  margin-top: 36px;
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}
.hero__ticker { margin-top: 72px; }
.hero__ticker .ticker__label { margin-bottom: 24px; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
  padding: 14px 28px; border-radius: 980px;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
              color 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-2); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn--ghost:hover { background: var(--bg-soft); border-color: var(--ink-2); }
.btn--block { width: 100%; }

/* ============================================================
   TICKER
   ============================================================ */
.ticker {
  padding: 40px 0 56px;
  border-top: 1px solid var(--hair-soft);
  border-bottom: 1px solid var(--hair-soft);
  background: var(--bg);
}
.ticker__label {
  text-align: center;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}
.ticker__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker__track {
  display: flex; align-items: center;
  width: max-content;
  animation: tickerScroll 32s linear infinite;
}
.ticker__track:hover { animation-play-state: paused; }
.ticker__logo {
  height: 36px; width: auto;
  margin-right: 64px;
  filter: grayscale(1) opacity(0.6);
  transition: filter 0.3s var(--ease);
}
.ticker__logo:hover { filter: grayscale(0) opacity(1); }
.ticker__name {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink-2); white-space: nowrap;
  margin-right: 64px;
}
@keyframes tickerScroll {
  to { transform: translateX(-50%); }
}

/* ============================================================
   STATS
   ============================================================ */
.stats {
  padding: 100px var(--gutter);
  background: var(--accent);
}
.stats__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat {
  text-align: center;
  padding: 32px 16px;
}
.stat:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,0.14);
}
.stat__number {
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,0.72);
}

/* ============================================================
   TRUST / WHERE TRUST BEGINS
   ============================================================ */
.trust { padding: 120px var(--gutter); background: var(--bg); }
.trust__table {
  max-width: var(--maxw);
  margin: 56px auto 0;
  border: 1px solid var(--hair-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.trust__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.trust__row + .trust__row { border-top: 1px solid var(--hair-soft); }
.trust__cell {
  padding: 22px 28px;
  font-size: 17px;
  font-weight: 500;
}
.trust__row--head .trust__cell {
  background: var(--accent);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  font-weight: 600;
}
.trust__cell--good {
  color: var(--ink);
  border-right: 1px solid var(--hair-soft);
}
.trust__cell--good::before {
  content: "✓";
  display: inline-block;
  margin-right: 12px;
  color: var(--accent);
  font-weight: 700;
}
.trust__cell--weak {
  color: var(--weak);
}
.trust__cell--weak::before {
  content: "—";
  display: inline-block;
  margin-right: 14px;
  color: var(--weak);
}

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto { padding: 120px var(--gutter); background: var(--accent); }
.manifesto__list {
  list-style: none; padding: 0;
  max-width: var(--maxw);
  margin: 56px auto 0;
}
.principle {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 44px 0;
  border-top: 1px solid rgba(255,255,255,0.14);
  align-items: start;
}
.principle:last-child { border-bottom: 1px solid rgba(255,255,255,0.14); }
.principle__index {
  font-size: 16px; font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}
.principle__body h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #ffffff;
}
.principle__body p {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  max-width: 640px;
}

/* ============================================================
   WORK
   ============================================================ */
.work { padding: 120px var(--gutter); background: var(--bg); }
.work__list {
  max-width: var(--maxw);
  margin: 56px auto 0;
  border-top: 1px solid var(--hair-soft);
}
.work__item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 32px 8px;
  border-bottom: 1px solid var(--hair-soft);
  transition: padding 0.35s var(--ease), background 0.35s var(--ease);
}
.work__item:hover { padding-left: 20px; background: var(--bg-soft); }
.work__name {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}
.work__item:hover .work__name { color: var(--accent); }
.work__link {
  font-size: 15px; font-weight: 500;
  color: var(--muted);
}

/* ============================================================
   INQUIRE / FORM
   ============================================================ */
.inquire { padding: 120px var(--gutter); background: var(--accent); }
.inquire__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: start;
}
.inquire__intro { text-align: left; }
.inquire__intro .eyebrow { margin-bottom: 16px; }
.inquire__formwrap {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.form {
  display: grid;
  gap: 28px;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field legend {
  font-size: 14px; font-weight: 600;
  color: var(--ink-2);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field textarea {
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--weak); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(6,64,43,0.14);
}
.field textarea { resize: vertical; }

/* styled dropdown */
.select { position: relative; }
.select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: inherit;
  font-size: 16px;
  padding: 14px 44px 14px 16px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  width: 100%;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.select select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(6,64,43,0.14);
}
/* dim the placeholder option while nothing is chosen */
.select select:invalid { color: var(--weak); }
.select select option { color: var(--ink); }
.select__chevron {
  position: absolute;
  right: 16px; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* conditional "Other" input that appears below a dropdown */
.field__other {
  margin-top: 10px;
  animation: otherIn 0.25s var(--ease) both;
}
.field__other[hidden] { display: none; }
@keyframes otherIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fieldset { border: 0; padding: 0; margin: 0; }

.field__label-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

/* toggle switch */
.toggle {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  cursor: pointer; user-select: none;
}
.toggle input { position: absolute; opacity: 0; }
.toggle__track {
  width: 38px; height: 22px; border-radius: 980px;
  background: var(--hair);
  position: relative;
  transition: background 0.25s var(--ease);
}
.toggle__thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.25s var(--ease);
}
.toggle input:checked + .toggle__track { background: var(--accent); }
.toggle input:checked + .toggle__track .toggle__thumb { transform: translateX(16px); }
.toggle input:focus-visible + .toggle__track { box-shadow: 0 0 0 4px rgba(6,64,43,0.2); }

/* choice chips */
.field--choice { border: 0; padding: 0; margin: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--hair);
  border-radius: 980px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
  background: #ffffff;
  transition: all 0.2s var(--ease);
  cursor: pointer;
}
.choice:hover span { border-color: var(--ink-2); }
.choice input:checked + span {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(6,64,43,0.18); }

.form__footer { margin-top: 8px; text-align: center; }
.form__note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  min-height: 20px;
}
.form__note.is-error { color: #c2390b; }

/* confirmation (sits inside the white form card) */
.confirmation {
  max-width: 480px;
  margin: 8px auto 0;
  text-align: center;
  padding: 24px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.confirmation__mark {
  width: 64px; height: 64px; margin: 0 auto 24px;
}
.confirmation__mark svg { width: 100%; height: 100%; }
.confirmation__mark circle {
  stroke: var(--accent); stroke-width: 2;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: drawCircle 0.6s var(--ease) 0.1s forwards;
}
.confirmation__mark path {
  stroke: var(--accent); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 34; stroke-dashoffset: 34;
  animation: drawCheck 0.4s var(--ease) 0.6s forwards;
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.confirmation h3 {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink);
}
.confirmation p { margin: 12px 0 28px; color: var(--muted); font-size: 16px; }

/* ============================================================
   FINAL CTA
   ============================================================ */
.cta {
  padding: 140px var(--gutter);
  text-align: center;
  background: #ffffff;
  color: var(--ink);
  border-top: 1px solid var(--hair-soft);
}
.cta__inner { max-width: 760px; margin: 0 auto; }
.cta__title {
  font-size: clamp(34px, 5.5vw, 60px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.cta__sub {
  margin: 22px auto 0;
  max-width: 560px;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.5;
  color: var(--muted);
}
.cta .btn--primary {
  margin-top: 36px;
}
.cta .btn--primary:hover { transform: translateY(-2px); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 80px var(--gutter) 48px;
  text-align: center;
  background: var(--accent);
  border-top: 1px solid rgba(255,255,255,0.12);
}
.footer__logo {
  font-family: var(--font-logo);
  font-size: clamp(56px, 9vw, 96px);
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.01em;
}
.footer__note {
  margin-top: 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat:nth-child(2) { border-right: 1px solid rgba(255,255,255,0.14); }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,0.14); }
  .stat:nth-child(2), .stat:nth-child(4) { border-right: 0; }
  .inquire__inner { grid-template-columns: 1fr; gap: 40px; }
  .inquire__formwrap { padding: 24px; }
}
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .nav__links {
    position: fixed; inset: 60px 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: var(--accent);
    padding: 16px var(--gutter) 24px;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    transform: translateY(-120%);
    transition: transform 0.4s var(--ease);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__link { padding: 14px 16px; font-size: 18px; color: rgba(255,255,255,0.88); }
  .nav__link:hover { background: rgba(255,255,255,0.1); color: #fff; }
  .nav__cta { margin: 8px 0 0; text-align: center; }
  .nav__toggle { display: flex; }

  .form__row { grid-template-columns: 1fr; gap: 28px; }
  .principle { grid-template-columns: 1fr; gap: 12px; }
  /* Trust table → stacked, self-labeling comparison cards */
  .trust__table { border: 0; background: transparent; }
  .trust__row {
    grid-template-columns: 1fr;
    border: 1px solid var(--hair-soft);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
  }
  .trust__row:last-child { margin-bottom: 0; }
  .trust__row + .trust__row { border-top: 0; }
  .trust__row--head { display: none; }
  .trust__cell { padding: 14px 18px; font-size: 15.5px; line-height: 1.45; }
  .trust__cell--good {
    border-right: 0;
    border-bottom: 1px solid var(--hair-soft);
  }
  .trust__cell--good::before { content: "✓ Good"; margin-right: 10px; }
  .trust__cell--weak::before { content: "— Weak"; margin-right: 10px; }
}

@media (max-width: 480px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat { border: 0 !important; border-bottom: 1px solid rgba(255,255,255,0.14) !important; }
  .stat:last-child { border-bottom: 0 !important; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
}
