/* Kestrel Tax & Accounting (a made-up firm). Its own look: ledger paper, ledger green,
   one red double rule under the hero card's title. Schibsted Grotesk throughout.
   The page is built around the quote form: hero card (the form's first question),
   who we work for, what happens after the form, the form. */

:root {
  --paper: #f4f6f2;
  --sheet: #fbfcfa;
  --ink: #17231d;
  --muted: #56645c;
  --green: #1f5a43;
  --green-deep: #174634;
  --green-night: #12291f;
  --sage: #dbe6dd;
  --sage-soft: #e9f0ea;
  --sand: #ece5d6;
  --mist: #dde6ee;
  --line: #d3dcd5;
  --rule: #b8322a;
  --focus: #2f7dd1;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
  --max: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--green); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section h2 { font-size: clamp(30px, 5.6vw, 46px); }
.section-lead { margin-top: 14px; max-width: 56ch; color: var(--muted); font-size: clamp(17px, 2vw, 19px); }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 12px var(--gutter);
}
.brand-wrap { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--green); text-decoration: none; }
.mark { width: 32px; height: 32px; fill: currentColor; flex-shrink: 0; }
.brand-name { display: flex; flex-direction: column; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.brand-sub { font-weight: 500; font-size: 12px; letter-spacing: 0; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.chip {
  font-size: 11.5px; font-weight: 600; line-height: 1; letter-spacing: .01em;
  padding: 5px 8px; border-radius: 999px;
  color: var(--rule); background: color-mix(in srgb, var(--rule) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--rule) 30%, transparent);
}
.nav { display: none; gap: 26px; font-size: 15.5px; font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--green); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sage-soft); border: 1px solid var(--line); }
.lang button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 600; padding: 6px 9px; border-radius: 999px; color: var(--muted);
}
.lang button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(23, 35, 29, .12); }
.top-actions .top-cta { display: none; }

/* buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px;
  background: var(--green); color: #fff;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--green-deep); }
.btn:active { transform: scale(.98); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn-large { min-height: 58px; padding: 0 36px; font-size: 17px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.text-link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--green); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }

/* hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  display: grid; gap: 44px;
  padding: clamp(28px, 7vw, 84px) var(--gutter) clamp(56px, 9vw, 112px);
}
.hero h1 { font-size: clamp(38px, 8.8vw, 68px); max-width: 15ch; }
.lead { margin-top: 18px; font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 46ch; }
.hero-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.facts { margin-top: 32px; display: grid; gap: 12px; }
.facts li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.facts svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--green); }

.hero-visual { position: relative; align-self: end; }
.hero-bird {
  display: none;
  position: absolute; z-index: 0; pointer-events: none;
  width: 70%; right: -6%; top: -46%;
  fill: none; stroke: var(--green); stroke-width: .18; opacity: .22;
}
.hero-card {
  position: relative; z-index: 1;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 20px 20px;
  box-shadow: 0 1px 0 rgba(23, 35, 29, .04), 0 22px 48px -26px rgba(23, 35, 29, .3);
}
.hero-card-title { font-size: 20px; letter-spacing: -0.01em; }
.hero-card-title::after { content: ""; display: block; height: 5px; margin-top: 12px; border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule); }
.hero-card-q { margin-top: 16px; font-weight: 600; font-size: 17px; }
.hero-opts { margin-top: 12px; display: grid; gap: 8px; }
.hero-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  font-size: 16px; font-weight: 500; text-align: left; cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease, transform .12s ease;
}
.hero-opt svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); transition: transform .15s ease, color .15s ease; }
.hero-opt:hover { border-color: var(--green); background: var(--sage-soft); }
.hero-opt:hover svg { color: var(--green); transform: translateX(2px); }
.hero-opt:active { transform: scale(.99); }
.hero-card-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* who we work for: three columns divided by rules, no cards */
.services { padding: clamp(56px, 9vw, 112px) 0; background: var(--sheet); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.groups { margin-top: 40px; display: grid; }
.group { padding: 28px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.group:first-child { border-top: 0; padding-top: 0; }
.group-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--sage); color: var(--green-deep); display: grid; place-items: center; }
.group-icon svg { width: 24px; height: 24px; }
.group h3 { font-size: 22px; margin-top: 4px; }
.group .who { color: var(--muted); }
.group .price { margin-top: 8px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.group .price .amount { font-size: clamp(30px, 6vw, 36px); font-weight: 600; letter-spacing: -0.03em; color: var(--green); font-variant-numeric: tabular-nums; }
.group .price .from { font-size: 14.5px; font-weight: 500; color: var(--muted); }
.groups-foot { margin-top: 36px; color: var(--muted); font-size: 15px; max-width: 70ch; }
.checks { display: grid; gap: 9px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .38em; width: 14px; height: 8px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg);
}

/* how it works: a real sequence, so numbered */
.how { padding: clamp(56px, 9vw, 112px) 0; }
.how h2 { max-width: 20ch; }
.how-steps { margin-top: 36px; display: grid; gap: 26px; counter-reset: step; }
.how-steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.how-steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700; font-size: 16px;
}
.how-steps p { padding-top: 7px; max-width: 42ch; }

/* the quote form */
.quote { background: var(--green); padding: clamp(48px, 9vw, 104px) var(--gutter); scroll-margin-top: 60px; }
.qf { max-width: 640px; margin: 0 auto; }
.qf-start, .qf-card, .qf-thanks { background: var(--sheet); color: var(--ink); border-radius: 24px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45); }
.qf-start { text-align: center; padding: clamp(36px, 7vw, 56px) clamp(22px, 5vw, 48px); }
.qf-mark { width: 54px; height: 54px; fill: var(--green); }
.qf-start h2 { margin-top: 14px; font-size: clamp(30px, 6vw, 42px); }
.qf-start p { margin: 12px auto 0; max-width: 38ch; color: var(--muted); }
.qf-start .btn { margin-top: 28px; }
.qf-small { font-size: 14px; }
.qf-start.leaving { animation: leave .22s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: scale(.97); } }

.qf-card { overflow: hidden; }
.qf-card.entering { animation: rise .32s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.qf-bar { height: 6px; margin: 20px clamp(18px, 4vw, 32px) 0; border-radius: 999px; background: #d3e0d6; overflow: hidden; }
.qf-bar span { display: block; height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width .45s var(--ease); }
.qf-bar-start { margin: 0 auto 26px; max-width: 220px; }
.qf-top { display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(18px, 4vw, 32px) 0; min-height: 44px; }
.qf-back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; font-weight: 500; padding: 6px 8px 6px 2px; border-radius: 8px; }
.qf-back svg { width: 16px; height: 16px; }
.qf-back:hover { color: var(--ink); }
.qf-back[hidden] { display: inline-flex; visibility: hidden; }
.qf-count { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
#qf-form { padding: 6px clamp(18px, 4vw, 32px) clamp(22px, 4vw, 32px); }

.qf-step.in-fwd { animation: in-fwd .28s var(--ease); }
.qf-step.in-back { animation: in-back .28s var(--ease); }
@keyframes in-fwd { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes in-back { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
.step-title { font-size: clamp(24px, 5vw, 30px); line-height: 1.18; outline: none; }
.step-hint { margin-top: 6px; color: var(--muted); font-size: 15px; }
.qblock { margin-top: 22px; }
.qblock + .qblock { margin-top: 26px; }
.qblock.is-new { animation: rise .26s var(--ease); }
.qlabel { display: block; font-weight: 600; margin-bottom: 10px; }
.qf-step.no-heading .qblock:first-child { margin-top: 4px; }
.qf-step.no-heading .qlabel { font-size: clamp(20px, 4.4vw, 24px); line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 14px; }
.qf-step.no-heading .qlabel .hint { display: block; margin: 6px 0 0; font-size: 15px; letter-spacing: 0; line-height: 1.4; }
.qlabel .hint { font-weight: 400; color: var(--muted); font-size: 14.5px; margin-left: 4px; }

.opts { display: grid; gap: 10px; }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt-body {
  display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 12px 16px;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  cursor: pointer; user-select: none;
  transition: border-color .12s ease, background-color .12s ease, transform .12s ease;
}
.opt-key {
  display: grid; place-items: center; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 7px;
  border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted);
}
.opt-text { flex: 1; font-size: 16.5px; line-height: 1.3; }
.opt-check { width: 20px; height: 20px; flex-shrink: 0; color: var(--green); opacity: 0; transition: opacity .12s ease; }
.opt:hover .opt-body { border-color: #a9b8ae; }
.opt input:checked + .opt-body { border-color: var(--green); background: var(--sage-soft); }
.opt input:checked + .opt-body .opt-key { background: var(--green); border-color: var(--green); color: #fff; }
.opt input:checked + .opt-body .opt-check { opacity: 1; }
.opt input:focus-visible + .opt-body { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt input:active + .opt-body { transform: scale(.99); }
/* short choices sit in one row: the Anrede, the best time to call */
.qblock[data-key="salutation"] .opts, .qblock[data-key="call_time"] .opts { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qblock[data-key="salutation"] .opt-body, .qblock[data-key="call_time"] .opt-body { justify-content: center; min-height: 50px; padding: 10px 8px; text-align: center; }
.qblock[data-key="salutation"] .opt-key, .qblock[data-key="call_time"] .opt-key,
.qblock[data-key="salutation"] .opt-check, .qblock[data-key="call_time"] .opt-check { display: none; }
.qblock[data-key="salutation"] .opt-text, .qblock[data-key="call_time"] .opt-text { flex: none; font-size: 15.5px; }

.input {
  width: 100%; min-height: 54px; padding: 13px 16px;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  font: 400 17px/1.4 var(--font); color: var(--ink);
}
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
textarea.input { resize: vertical; min-height: 130px; }
.input-short { max-width: 160px; }

.err { margin-top: 10px; color: var(--rule); font-size: 15px; font-weight: 500; }
.qblock.has-error .opt-body, .qblock.has-error .input { border-color: var(--rule); }

.nowrap { white-space: nowrap; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.qf-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.qf-skip { border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 600; padding: 8px 4px; text-decoration: underline; text-underline-offset: 4px; }
.qf-enter { display: none; font-size: 14px; color: var(--muted); }
.qf-send-error { margin-top: 14px; color: var(--rule); font-weight: 500; }

.qf-thanks { text-align: center; padding: clamp(40px, 8vw, 64px) 24px; }
.qf-thanks:focus { outline: none; }
.qf-thanks:not([hidden]) { animation: rise .34s var(--ease); }
.qf-thanks h2 { margin-top: 16px; font-size: clamp(28px, 5.4vw, 38px); }
.qf-thanks p { margin: 12px auto 0; color: var(--muted); max-width: 40ch; }
.qf-thanks .text-link { margin-top: 26px; }

/* footer */
.foot { background: var(--green-night); color: #c9d8ce; padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 15px; }
.foot-inner { display: grid; gap: 20px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 17px; }
.foot-brand .mark { width: 28px; height: 28px; fill: #fff; }
.foot-note { max-width: 62ch; }
.foot a { color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

@media (min-width: 600px) {
  .top-actions .top-cta { display: inline-flex; }
}
@media (min-width: 900px) {
  .nav { display: flex; margin-right: 8px; }
  .hero { grid-template-columns: 1.1fr 1fr; align-items: end; gap: 64px; }
  .hero h1 { font-size: clamp(42px, 4.6vw, 62px); max-width: 14ch; }
  .facts { display: flex; flex-wrap: wrap; gap: 12px 28px; }
  .facts li { white-space: nowrap; }
  .hero-card { padding: 30px 28px 26px; }
  .hero-bird { display: block; width: 78%; top: -40%; right: -10%; }
  .groups { grid-template-columns: repeat(3, 1fr); }
  .group { padding: 0 32px; border-top: 0; border-left: 1px solid var(--line); }
  .group:first-child { padding-left: 0; border-left: 0; }
  .how-steps { grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
  .how-steps::before { content: ""; position: absolute; left: 20px; right: 20%; top: 20px; height: 1.5px; background: var(--sage); z-index: 0; }
  .how-steps li { grid-template-columns: 1fr; position: relative; z-index: 1; }
  .how-steps p { padding-top: 0; }
  .qf-enter { display: inline; }
  .foot-inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
}

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