/* =====================================================================
   Business Register — stylesheet
   Design system reverse-engineered from Fiken (see DESIGN.md),
   accent re-tuned to the product's green sprout logo (#53713d).
   ===================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "basis-grotesque-pro";
  src: url("../fonts/basis-grotesque-pro-Regular.woff2") format("woff2"),
       url("../fonts/basis-grotesque-pro-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "basis-grotesque-pro";
  src: url("../fonts/basis-grotesque-pro-500.woff2") format("woff2"),
       url("../fonts/basis-grotesque-pro-500.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "basis-grotesque-pro";
  src: url("../fonts/basis-grotesque-pro-700.woff2") format("woff2"),
       url("../fonts/basis-grotesque-pro-700.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "basis-grotesque-mono-pro";
  src: url("../fonts/basis-grotesque-mono-pro-Regular.woff2") format("woff2"),
       url("../fonts/basis-grotesque-mono-pro-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "william-bold";
  src: url("../fonts/william-bold-700.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand — green sprout */
  --green-900: #2f4022;
  --green-800: #3f5630;
  --green-700: #53713d;   /* primary (logo) */
  --green-600: #63864a;
  --green-500: #7a9b60;
  --green-200: #e7efe0;
  --green-100: #f2f7ee;

  --accent: var(--green-700);
  --accent-hover: var(--green-800);

  /* Neutrals (from Fiken tokens) */
  --white: #ffffff;
  --grey-100: #fafafa;
  --grey-200: #f5f5f5;
  --grey-300: #ededed;
  --grey-500: #e0e0e0;
  --grey-700: #bdbdbd;
  --ink: #272727;
  --muted: #676767;

  --background: var(--white);
  --surface: var(--grey-200);
  --header-bg: rgba(255,255,255,.9);
  --border: 1px solid var(--grey-500);
  --border-color: var(--grey-500);

  /* Radius scale */
  --radius-sm: .5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 1.875rem;
  --radius-pill: 100px;

  /* Elevation */
  --shadow-raised: 0 0 0 .03125rem #7278924d, 0 .4375rem .5rem -.25rem #7278921a,
                   0 .75rem 1.0625rem .125rem #72789212, 0 .3125rem 1.375rem .25rem #7278920f;
  --shadow-floating: rgba(0,0,0,.04) 0 12px 16px 0, rgba(0,0,0,.03) 0 4px 6px -2px;

  --maxw: 1200px;
  --transition: 180ms ease-out;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "basis-grotesque-pro", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--background);
  line-height: 1.5;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* the logo/brand link never shows an underline */
.brand, .brand:hover, .brand:focus,
.brand .brand-name, .brand:hover .brand-name { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: "william-bold", Georgia, "Times New Roman", serif; font-weight: 700; line-height: 1.08; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.75rem, 7.5vw, 5.5rem); }
h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
p  { margin: 0 0 1rem; }

.mono { font-family: "basis-grotesque-mono-pro", ui-monospace, SFMono-Regular, Menlo, monospace; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: 1.0625rem;
  padding: 14px 28px; border-radius: var(--radius-pill);
  border: 1px solid transparent; text-decoration: none; line-height: 1;
  transition: background var(--transition), color var(--transition), opacity var(--transition), transform var(--transition);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 18px 36px; font-size: 1.125rem; }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--header-bg);
  border-bottom: 1px solid var(--grey-300);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand svg, .brand img { height: 34px; width: auto; }
.brand-name { font-family: "william-bold", serif; font-size: 1.5rem; color: var(--green-800); letter-spacing: -.02em; }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Language switcher */
.langswitch { position: relative; }
.langswitch summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
  border: var(--border); border-radius: var(--radius-pill);
  padding: 9px 14px; font-size: .95rem; font-weight: 500; color: var(--ink);
}
.langswitch summary::-webkit-details-marker { display: none; }
.langswitch summary:hover { border-color: var(--accent); }
.langswitch .chev { font-size: .7rem; opacity: .6; }
.langswitch .menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--white); border: var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-floating); padding: 6px; min-width: 190px; z-index: 1001;
}
.langswitch .menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--ink); font-size: .95rem;
}
.langswitch .menu a:hover { background: var(--grey-200); text-decoration: none; }
.langswitch .menu a.is-active { color: var(--accent); font-weight: 700; }
.langswitch .flag { font-size: 1.1rem; line-height: 1; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 9vw, 120px) 0 clamp(32px, 5vw, 64px); text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "basis-grotesque-mono-pro", monospace; text-transform: uppercase;
  letter-spacing: .12em; font-size: .8rem; color: var(--green-800);
  background: var(--green-100); border: 1px solid var(--green-200);
  padding: 8px 14px; border-radius: var(--radius-pill); margin-bottom: 28px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin: 0 auto .35em; max-width: 15ch; }
.hero-lead { font-size: clamp(1.125rem, 2.2vw, 1.4rem); color: var(--muted); max-width: 46ch; margin: 0 auto 8px; }
/* CTAs that drop into the hero on narrow screens (see breakpoint below) */
.hero-ctas { display: none; }

/* ---------- Signup card ---------- */
.section { padding: clamp(32px, 6vw, 72px) 0; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1.05fr .95fr; gap: 40px; } }

.card {
  background: var(--white); border: var(--border); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.3vw, 2.5rem); box-shadow: var(--shadow-raised);
}
.card.surface { background: var(--surface); box-shadow: none; }

/* Product select block */
.product-pick { margin-bottom: 22px; }
.field-label {
  display: block; font-family: "basis-grotesque-mono-pro", monospace;
  text-transform: uppercase; letter-spacing: .08em; font-size: .72rem;
  color: var(--muted); margin-bottom: 8px;
}
.product-option {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  border: var(--border); border-radius: var(--radius-md);
  padding: 16px 18px; background: var(--white); cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.product-option + .product-option { margin-top: 10px; }
.product-option:hover { border-color: var(--green-500); }
.product-option input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; }
.product-option.is-selected { border-color: var(--accent); background: var(--green-100); }
.product-option .po-title { font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product-option .po-desc { color: var(--muted); font-size: .95rem; margin-top: 3px; }
.product-option.disabled { opacity: .6; cursor: not-allowed; }

.badge {
  font-family: "basis-grotesque-mono-pro", monospace; font-size: .68rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 9px; border-radius: var(--radius-pill); white-space: nowrap;
}
.badge-soon { background: var(--green-200); color: var(--green-900); }
.badge-planned { background: var(--grey-200); color: var(--muted); }

/* Price */
.price {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 4px 0 22px; padding: 18px 20px;
  background: var(--surface); border-radius: var(--radius-md);
}
.price .amount { font-family: "william-bold", serif; font-size: clamp(2rem, 5vw, 2.75rem); color: var(--ink); }
.price .per { color: var(--muted); font-size: 1rem; }
.price .note { flex-basis: 100%; color: var(--muted); font-size: .85rem; margin-top: 2px; }

/* Form fields */
.form-row { margin-bottom: 16px; }
.input, .select {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: var(--border); border-radius: var(--radius-md);
  padding: 14px 16px; transition: border-color var(--transition), box-shadow var(--transition);
}
.input::placeholder { color: var(--grey-700); }
.input:focus, .select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--green-200);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23676767' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px;
}
.check {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .9rem; color: var(--muted); margin: 4px 0 18px;
}
.check input { margin-top: 3px; accent-color: var(--accent); }
.check a { text-decoration: underline; }

.form-note { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 12px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 18px; font-size: .95rem; }
.alert-error { background: #fdecec; color: #8a1f1f; border: 1px solid #f5c6c6; }
.alert-ok { background: var(--green-100); color: var(--green-900); border: 1px solid var(--green-200); }

/* ---------- Feature bullets ---------- */
.features { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 8px; }
@media (min-width: 620px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { display: flex; gap: 12px; }
.feature .ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--radius-md);
  background: var(--green-100); color: var(--green-800);
  display: grid; place-items: center; font-size: 1.2rem;
}
.feature h4 { margin: 2px 0 4px; font-family: "basis-grotesque-pro", sans-serif; font-size: 1.05rem; font-weight: 700; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Thanks page ---------- */
.thanks { min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.thanks .mark {
  width: 84px; height: 84px; border-radius: 50%; background: var(--green-100);
  display: grid; place-items: center; margin: 0 auto 24px; border: 2px solid var(--green-200);
}
.thanks h1 { max-width: 16ch; margin-inline: auto; }
.thanks p { max-width: 48ch; margin-inline: auto; color: var(--muted); font-size: 1.15rem; }

/* ---------- Quiz ---------- */
.quiz-shell { max-width: 720px; margin: 0 auto; }
.progress { height: 8px; background: var(--grey-200); border-radius: var(--radius-pill); overflow: hidden; margin-bottom: 28px; }
.progress > span { display: block; height: 100%; background: var(--accent); width: 0; transition: width 300ms ease-out; }
.quiz-step { display: none; }
.quiz-step.active { display: block; animation: fade .3s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.quiz-q { font-family: "william-bold", serif; font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: 6px; }
.quiz-hint { color: var(--muted); margin-bottom: 22px; }
.options { display: grid; gap: 12px; }
.option {
  text-align: left; border: var(--border); background: var(--white);
  border-radius: var(--radius-md); padding: 18px 20px; font-size: 1.05rem;
  display: flex; align-items: center; gap: 14px; transition: border-color var(--transition), background var(--transition);
}
.option:hover { border-color: var(--green-500); }
.option.selected { border-color: var(--accent); background: var(--green-100); }
.option .k {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: var(--grey-200); display: grid; place-items: center; font-weight: 700; font-size: .95rem;
}
.option.selected .k { background: var(--accent); color: #fff; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 26px; }
.quiz-result { display: none; text-align: center; }
.quiz-result.active { display: block; }
.result-card { background: var(--surface); border-radius: var(--radius-lg); padding: 36px; margin: 8px 0 24px; }
.result-card .pill {
  display: inline-block; font-family: "basis-grotesque-mono-pro", monospace;
  text-transform: uppercase; letter-spacing: .1em; font-size: .72rem;
  background: var(--green-200); color: var(--green-900); padding: 6px 12px; border-radius: var(--radius-pill); margin-bottom: 14px;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--grey-300); margin-top: 64px; padding: 48px 0; color: var(--muted); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); font-size: .95rem; }
.footer-links a:hover { color: var(--accent); }
.footer small { font-size: .85rem; }

/* ---------- Utilities ---------- */
.stack-sm > * + * { margin-top: 10px; }
.hide { display: none !important; }
/* Below 900px: the two header CTAs move down into the hero on the landing
   page, leaving a clean header of just the logo + language menu. The language
   switcher stays in the header at every width. */
@media (max-width: 899px) {
  .tmpl-home .nav-cta { display: none; }
  .tmpl-home .hero-ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
  }
  .hero-ctas .btn { padding-inline: 22px; }
}

@media (max-width: 560px) {
  .nav-links-inline { display: none; }
  .brand-name { font-size: 1.25rem; }
  .tmpl-home .hero-ctas .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------
   Prose — legal pages and other kirbytext content
   --------------------------------------------------------------- */
.prose { color: var(--ink); line-height: 1.7; }
.prose h1 { margin-bottom: .5rem; }
.prose h2 { font-size: 1.35rem; margin: 1.8rem 0 .6rem; color: var(--green-800); }
.prose h3 { font-size: 1.1rem; margin: 1.4rem 0 .4rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose em { color: var(--muted); }
.prose hr { border: 0; border-top: var(--border); margin: 2rem 0; }

/* ===============================================================
   Dark theme
   - OS preference by default; a manual toggle (data-theme) overrides
   - the same variable set is applied for both
   =============================================================== */
:root[data-theme="dark"] {
  --green-900: #cfe0bb;
  --green-800: #a9c489;   /* headings */
  --green-700: #82a267;   /* primary / accent (matches dark favicon) */
  --green-600: #93b378;
  --green-500: #6f8c58;
  --green-200: rgba(130,162,103,.30);
  --green-100: rgba(130,162,103,.12);

  --accent: #82a267;
  --accent-hover: #93b378;

  --white: #1c1f24;       /* card / raised element background */
  --grey-100: #1b1e22;
  --grey-200: #262a30;
  --grey-300: #2c3138;
  --grey-500: #363c44;
  --grey-700: #4a5058;
  --ink: #e9eae4;
  --muted: #9aa39a;

  --background: #131519;
  --surface: #22262d;
  --header-bg: rgba(19,21,25,.85);
  --border: 1px solid #363c44;
  --border-color: #363c44;

  --shadow-raised: 0 0 0 .03125rem #0006, 0 .4375rem .5rem -.25rem #0004;
  --shadow-floating: rgba(0,0,0,.45) 0 12px 16px 0, rgba(0,0,0,.35) 0 4px 6px -2px;

  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green-900: #cfe0bb;
    --green-800: #a9c489;
    --green-700: #82a267;
    --green-600: #93b378;
    --green-500: #6f8c58;
    --green-200: rgba(130,162,103,.30);
    --green-100: rgba(130,162,103,.12);
    --accent: #82a267;
    --accent-hover: #93b378;
    --white: #1c1f24;
    --grey-100: #1b1e22;
    --grey-200: #262a30;
    --grey-300: #2c3138;
    --grey-500: #363c44;
    --grey-700: #4a5058;
    --ink: #e9eae4;
    --muted: #9aa39a;
    --background: #131519;
    --surface: #22262d;
    --header-bg: rgba(19,21,25,.85);
    --border: 1px solid #363c44;
    --border-color: #363c44;
    --shadow-raised: 0 0 0 .03125rem #0006, 0 .4375rem .5rem -.25rem #0004;
    --shadow-floating: rgba(0,0,0,.45) 0 12px 16px 0, rgba(0,0,0,.35) 0 4px 6px -2px;
    color-scheme: dark;
  }
}
/* Error alert needs a dark-friendly palette (its colours are literal) */
:root[data-theme="dark"] .alert-error { background: #3a1e1e; color: #ffb4b4; border-color: #5c2a2a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .alert-error { background: #3a1e1e; color: #ffb4b4; border-color: #5c2a2a; }
}

/* ===============================================================
   Theme toggle button
   =============================================================== */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: var(--border); border-radius: var(--radius-pill);
  background: transparent; color: var(--ink);
  transition: border-color var(--transition), color var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: block; }
/* show the moon (i.e. "switch to light") whenever dark is active */
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ===============================================================
   Language switcher — full name + country
   =============================================================== */
.langswitch .lang-label { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.langswitch summary .lang-label { font-weight: 500; }
.lang-country { color: var(--muted); font-size: .82em; }
.langswitch .menu { min-width: 230px; }
.langswitch .menu a.is-active .lang-country { color: var(--accent); }
@media (max-width: 560px) {
  /* keep the top bar compact: show the flag + code sizing, hide the long country in the summary only */
  .langswitch summary .lang-country { display: none; }
}

/* ===============================================================
   Why register
   =============================================================== */
.why { background: var(--surface); }
.why-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 20px;
}
@media (min-width: 720px)  { .why-list { grid-template-columns: 1fr 1fr; gap: 24px 40px; } }
@media (min-width: 1040px) { .why-list { grid-template-columns: 1fr 1fr; } }
.why-item { display: flex; gap: 16px; align-items: flex-start; }
.why-num {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: var(--radius-pill);
  display: grid; place-items: center; font-family: "basis-grotesque-mono-pro", monospace;
  font-weight: 700; font-size: .95rem; color: var(--accent);
  background: var(--green-100); border: 1px solid var(--green-200);
}
.why-item h4 { margin: 4px 0 4px; font-family: "basis-grotesque-pro", sans-serif; font-size: 1.08rem; font-weight: 700; }
.why-item p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.55; }

/* ===============================================================
   Cookie consent banner
   =============================================================== */
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
  background: var(--white); border-top: var(--border);
  box-shadow: var(--shadow-floating);
}
.cookie-banner[hidden] { display: none; }
.cookie-inner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-top: 16px; padding-bottom: 16px;
}
.cookie-text { margin: 0; flex: 1 1 320px; font-size: .92rem; color: var(--ink); }
.cookie-text a { text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 560px) {
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1 1 auto; }
}
