/* Bookkyn — brand palette and site direction */

:root {
  --font-sans: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  /* Side padding that also centres content at 1124px wide. */
  --gutter: max(20px, calc((100% - 1124px) / 2));
}

/* Theme tokens. An inline script sets data-theme on <html> from the saved
   choice or the system setting; theme.js flips it. The media query covers
   visitors without JavaScript. */
:root {
  color-scheme: light;
  --bg: #F5F2EA;
  --surface: #FBF8F0;
  --ink: #16190F;
  --muted: #6E7063;
  --line: #DEDACB;
  --primary: #47702A;
  --primary-ink: #FBF8F0;
  --primary-soft: #E7EEDA;
  --accent: #B4CB2E;
  --accent-ink: #1A2C12;
  --positive: #47702A;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14170F;
  --surface: #1C2016;
  --ink: #ECEADF;
  --muted: #8E9182;
  --line: #2C3124;
  --primary: #B4CB2E;
  --primary-ink: #1A2C12;
  --primary-soft: #27401A;
  --accent: #C9E75A;
  --accent-ink: #EDF2E3;
  --positive: #C9E75A;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #14170F;
    --surface: #1C2016;
    --ink: #ECEADF;
    --muted: #8E9182;
    --line: #2C3124;
    --primary: #B4CB2E;
    --primary-ink: #1A2C12;
    --primary-soft: #27401A;
    --accent: #C9E75A;
    --accent-ink: #EDF2E3;
    --positive: #C9E75A;
  }
}

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

html { scroll-padding-top: 124px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  background: var(--primary);
  color: var(--primary-ink);
  padding: 8px 14px;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  flex: none;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Show the icon for the mode you would switch to. */
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }

/* ---------- Brand page ---------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 96px;
}
.page__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  font-size: 14px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.eyebrow--sm { font-size: 11px; }

/* ---------- Brand sheet ---------- */

.brand { display: flex; flex-direction: column; gap: 44px; }

.brand-header {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
.wordmark { display: flex; align-items: center; gap: 10px; }
.wordmark__name { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.brand-header h1 {
  margin: 16px 0 0;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.035em;
  max-width: 16ch;
}
.brand-header p {
  margin: 0;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 14px;
  margin-top: 16px;
}
.role {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.role__chip { height: 96px; }
.role__chip--bordered { border-bottom: 1px solid var(--line); }
.role__body { padding: 12px 14px; }
.role__name { font-size: 14px; font-weight: 600; }
.role__hex { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 3px; }
.role__use { font-size: 12px; color: var(--muted); margin-top: 6px; }

.ramps { display: flex; flex-direction: column; gap: 22px; }
.ramp { display: flex; flex-direction: column; gap: 7px; }
.ramp__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ramp__name { font-size: 14px; font-weight: 600; }
.ramp__note { font-size: 12px; color: var(--muted); }
.ramp__steps { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.swatch { border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.swatch__chip { height: 52px; }
.swatch__label { padding: 6px 5px; background: var(--surface); }
.swatch__n { font-size: 10px; font-weight: 600; }
.swatch__hex { font-family: var(--font-mono); font-size: 9px; color: var(--muted); }
@media (max-width: 640px) {
  .ramp__steps { grid-template-columns: repeat(3, 1fr); }
}

/* Surface applications use fixed colours: they demonstrate each mode regardless of the toggle. */
.applications {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}
.application { border-radius: 12px; padding: 22px; }
.application--light { background: #F5F2EA; border: 1px solid #DEDACB; }
.application--dark { background: #14170F; border: 1px solid #2C3124; }
.application .eyebrow { margin-bottom: 14px; }
.application--light .eyebrow { color: #6E7063; }
.application--dark .eyebrow { color: #8E9182; }
.application__title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.application--light .application__title { color: #16190F; }
.application--dark .application__title { color: #ECEADF; }
.application p { font-size: 14px; line-height: 1.6; margin: 8px 0 16px; }
.application--light p { color: #6E7063; }
.application--dark p { color: #8E9182; }
.application__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-weight: 500; padding: 9px 16px; border-radius: 8px; }
.chip--tag { padding: 9px 12px; }

.type-specimens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 26px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.type-specimens .eyebrow { margin-bottom: 10px; }
.specimen--sans { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.specimen--mono { font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; }
.specimen__note { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* ---------- Website ---------- */

/* Links and buttons on the site keep their designed colours on hover. */
.site-nav a:hover, main a:hover, .site-footer a:hover { text-decoration: none; }

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 22px;
  border-radius: 9px;
}
.btn--primary, .btn--primary:hover { background: var(--primary); color: var(--primary-ink); }
.btn--ghost, .btn--ghost:hover { border: 1px solid var(--line); color: var(--ink); }
.btn--sm { font-size: 14px; padding: 9px 16px; border-radius: 8px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Launch banner and nav stay pinned to the top together. */
.site-top {
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-nav__brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.site-nav__brand:hover { color: var(--ink); }
.site-nav__name { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.site-nav__links { display: flex; gap: 22px; font-size: 14px; }
.site-nav__links a { color: var(--muted); }
.site-nav__links a:hover { color: var(--ink); }
.site-nav__actions { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.menu-toggle { display: none; }

/* Phones: the links fold into a menu under the bar. */
@media (max-width: 760px) {
  .site-nav { flex-wrap: wrap; row-gap: 0; }
  .menu-toggle { display: inline-grid; }
  .site-nav__links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 12px;
    font-size: 16px;
  }
  .site-nav[data-open] .site-nav__links { display: flex; }
  .site-nav__links a { padding: 12px 0; border-top: 1px solid var(--line); }
}
@media (max-width: 380px) {
  .site-nav__actions .btn { display: none; }
}

.section { padding: 72px var(--gutter); border-top: 1px solid var(--line); background: var(--surface); }
.section--alt { background: var(--bg); }
.section .eyebrow { margin-bottom: 14px; }
.section-title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.section-title--sm { font-size: clamp(26px, 3.2vw, 36px); }

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 40px;
  padding: 64px var(--gutter);
  align-items: center;
  background: var(--bg);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
}
.pill__dot { width: 6px; height: 6px; border-radius: 99px; background: var(--accent); display: inline-block; }
.hero h1 {
  margin: 0;
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
  text-wrap: balance;
}
.hero__lede { margin: 20px 0 0; font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 44ch; }
.hero .btn-row { margin-top: 30px; }
.hero__trust { margin-top: 28px; font-size: 13px; color: var(--muted); }

.ledger {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.ledger__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.ledger__title { font-size: 13px; font-weight: 600; }
.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 4px 9px;
  border-radius: 6px;
}
.ledger__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.ledger__label { font-size: 14px; font-weight: 500; }
.ledger__meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ledger__amount { font-family: var(--font-mono); font-size: 14px; color: var(--ink); }
.ledger__amount--positive { color: var(--positive); }
.ledger__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: var(--bg);
}
.ledger__total-label { font-size: 13px; color: var(--muted); }
.ledger__total-value { font-family: var(--font-mono); font-size: 20px; font-weight: 500; }

.how__intro { max-width: 52ch; margin-bottom: 40px; }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step { border-top: 2px solid var(--accent); padding-top: 16px; }
.step__n { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.step__title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin: 8px 0 0; }
.step p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 44px;
}
.features .section-title { max-width: 16ch; }
.features__lede { margin: 18px 0 0; font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 40ch; }
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}
.feature {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: var(--surface);
}
.feature h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.feature p { margin: 7px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

.pricing__head {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
}
.pricing__note { font-size: 14px; color: var(--muted); }
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 16px;
}
.plan {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan__head { display: flex; justify-content: space-between; align-items: center; }
.plan__name { margin: 0; font-size: 16px; font-weight: 600; }
.plan__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--positive);
}
.plan__price { font-family: var(--font-mono); font-size: 34px; font-weight: 500; letter-spacing: -0.03em; }
.plan__per { font-size: 14px; color: var(--muted); }
.plan__for { font-size: 13px; color: var(--muted); line-height: 1.55; }
.plan__rule { height: 1px; background: var(--line); }
.plan__items { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; }
.plan__items li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.plan__items svg { margin-top: 3px; flex: none; }
.plan__cta-wrap { margin-top: auto; padding-top: 6px; }
.plan__cta, .plan__cta:hover {
  display: block;
  text-align: center;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  padding: 11px;
  border-radius: 8px;
}

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}
.quote { margin: 0; border-left: 2px solid var(--accent); padding: 2px 0 2px 20px; }
.quote blockquote { margin: 0; font-size: 17px; line-height: 1.5; letter-spacing: -0.015em; }
.quote figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); }

.faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 40px;
}
.faq .section-title { max-width: 12ch; line-height: 1.12; }
.faq__list { display: flex; flex-direction: column; margin: 0; }
.faq__item { border-top: 1px solid var(--line); padding: 18px 0; }
.faq__item dt { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.faq__item dd { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 56ch; }

.closer {
  padding: 64px var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.closer p { margin: 10px 0 0; font-size: 15px; color: var(--muted); }

.site-footer {
  padding: 22px var(--gutter);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a, .site-footer a:hover { color: var(--muted); }

/* Launch offer bar above the nav. Citron ground in both modes. */
.offer-bar {
  padding: 10px var(--gutter);
  background: #DEEB82;
  color: #1A2C12;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
.offer-bar__short { display: none; }
@media (max-width: 760px) {
  .offer-bar { font-size: 13px; padding-block: 8px; }
  .offer-bar__long { display: none; }
  .offer-bar__short { display: inline; }
}
.offer-bar a, .offer-bar a:hover { color: #1A2C12; text-decoration: underline; font-weight: 600; white-space: nowrap; }

.deliverables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.deliverables li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.deliverables svg { margin-top: 4px; flex: none; }
.deliverables h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.deliverables p { margin: 5px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

.offer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 44px;
  align-items: start;
}
.offer__list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.offer__list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 18px 20px;
  background: var(--surface);
}
.offer__n { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.offer__list h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.offer__list p { margin: 5px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}
.service {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: 10px;
  padding: 22px;
  background: var(--surface);
}
.service h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.service p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.service__link { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 500; }
.features--why { margin-top: 72px; }

.pricing__terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 12px 24px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--primary-soft);
  font-size: 14px;
  line-height: 1.55;
}
.plan__alt { font-family: var(--font-mono); font-size: 13px; color: var(--positive); margin-top: -6px; }

/* Privacy and terms pages */
.legal article { max-width: 72ch; }
.legal h1 { margin: 0; font-size: clamp(32px, 4vw, 44px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 600; }
.legal__date { margin: 10px 0 32px; font-size: 14px; color: var(--muted); }
.legal h2 { margin: 40px 0 10px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.legal h3 { margin: 22px 0 6px; font-size: 16px; font-weight: 600; }
.legal p, .legal li { font-size: 15px; line-height: 1.7; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { text-decoration: underline; }
