/* =========================================================
   KESTREL - landing page template
   Everything you normally need to change lives in :root below.
   ========================================================= */

:root {
  /* ---- 1. Brand colour. Change this one value to rebrand. ---- */
  --accent:        #c9502a;
  --accent-hover:  #b34523;
  --accent-ink:    #ffffff;

  /* ---- 2. Light palette ---- */
  --bg:        #fbfaf8;
  --surface:   #ffffff;
  --surface-2: #f4f2ee;
  --text:      #1b1a18;
  --muted:     #6a6760;
  --line:      #e6e3dd;

  /* ---- 3. Shape. One radius system for the whole page. ---- */
  --r-card: 14px;
  --r-btn:  10px;
  --r-pill: 999px;

  /* ---- 4. Type ---- */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* ---- 5. Rhythm ---- */
  --shell:   1200px;
  --gutter:  clamp(1.25rem, 4vw, 2rem);
  --section: clamp(4.5rem, 9vw, 8rem);

  --shadow: 0 1px 2px rgba(27, 26, 24, .04),
            0 12px 32px -12px rgba(27, 26, 24, .12);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---- Dark palette. Applied by system preference or by the toggle. ---- */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --accent:        #e86b41;
    --accent-hover:  #f07d55;
    --accent-ink:    #1a0f09;
    --bg:        #100f0e;
    --surface:   #191817;
    --surface-2: #201f1d;
    --text:      #f3f1ed;
    --muted:     #a29e97;
    --line:      #2b2a27;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4),
              0 14px 36px -14px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --accent:        #e86b41;
  --accent-hover:  #f07d55;
  --accent-ink:    #1a0f09;
  --bg:        #100f0e;
  --surface:   #191817;
  --surface-2: #201f1d;
  --text:      #f3f1ed;
  --muted:     #a29e97;
  --line:      #2b2a27;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4),
            0 14px 36px -14px rgba(0, 0, 0, .7);
}

/* =========================================================
   BASE
   ========================================================= */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -.022em; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--accent-ink);
  padding: .7rem 1.1rem; border-radius: var(--r-btn); z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

.section__title {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  max-width: 20ch;
  text-wrap: balance;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  white-space: nowrap;            /* labels never wrap */
  font: inherit; font-weight: 550;
  padding: .62rem 1.15rem;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn--solid:hover { background: var(--accent-hover); }

.btn--ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text); }

.btn--lg   { padding: .85rem 1.6rem; font-size: 1.02rem; }
.btn--full { width: 100%; }

/* =========================================================
   NAV  (single line at desktop, 68px tall)
   ========================================================= */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }

.nav__inner {
  height: 68px;
  display: flex; align-items: center; gap: 2rem;
}

.nav__brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 650; font-size: 1.06rem; letter-spacing: -.02em;
  flex-shrink: 0;
}
.nav__mark { width: 22px; height: 22px; color: var(--accent); }

.nav__links {
  display: flex; gap: 1.75rem;
  margin-right: auto;
  font-size: .93rem; color: var(--muted);
}
.nav__links a { transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--text); }

.nav__actions { display: flex; align-items: center; gap: .6rem; }

.theme-toggle {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: var(--r-btn);
  background: transparent; color: var(--muted); cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.theme-toggle:hover { color: var(--text); border-color: var(--text); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun  { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .theme-toggle__sun  { display: none; }
  :root[data-theme="auto"] .theme-toggle__moon { display: block; }
}

.nav__burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: var(--r-btn);
  background: transparent; cursor: pointer;
  padding: 0; place-items: center; gap: 5px;
}
.nav__burger span {
  display: block; width: 16px; height: 1.6px;
  background: var(--text); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.3px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.3px) rotate(-45deg); }

.nav__mobile {
  display: none;
  flex-direction: column; gap: .25rem;
  padding: .5rem var(--gutter) 1.25rem;
  border-top: 1px solid var(--line);
}
.nav__mobile a { padding: .7rem 0; color: var(--muted); }
.nav__mobile a:hover { color: var(--text); }
.nav__mobile .btn { margin-top: .6rem; color: var(--accent-ink); }

@media (max-width: 900px) {
  .nav__links, .nav__signin { display: none; }
  .nav__inner   { gap: .75rem; }
  .nav__actions { margin-left: auto; }
  .nav__burger  { display: grid; }
  .nav__mobile[hidden] { display: none; }
  .nav__mobile { display: flex; }
}

/* Below 520px the bar cannot hold brand + toggle + CTA + burger.
   The CTA is already the last item of the open menu, so it goes. */
@media (max-width: 520px) {
  .nav__actions .btn--solid { display: none; }
}

/* =========================================================
   HERO  (asymmetric split, fits the first viewport)
   ========================================================= */

.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 7vw, 5.5rem); }

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.6rem, 6.4vw, 4.4rem);
  letter-spacing: -.035em;
  line-height: 1.03;
}

.hero__sub {
  margin-top: 1.35rem;
  max-width: 44ch;
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  color: var(--muted);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.1rem; }

.hero__media {
  margin: 0;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { aspect-ratio: 16 / 10; }
}

/* =========================================================
   LOGO WALL
   ========================================================= */

.logos { padding-bottom: var(--section); }

.logos__label {
  font-size: .82rem; color: var(--muted);
  margin-bottom: 1.5rem;
}

.logos__row {
  display: flex; flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  color: var(--muted);
  opacity: .8;
}
.logos__row svg { height: 26px; width: auto; }

/* =========================================================
   FEATURES  (bento, 4 items -> 4 cells)
   ========================================================= */

.features { padding-block: var(--section); }

.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.bento__cell--wide { grid-column: span 2; }

.bento__cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex; flex-direction: column;
}

.bento__body { padding: clamp(1.5rem, 3vw, 2.1rem); }
.bento__body h3 { font-size: 1.22rem; margin-bottom: .6rem; }
.bento__body p  { color: var(--muted); font-size: .97rem; max-width: 52ch; }

/* cell with a real image */
.bento__cell--media { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.bento__cell--media img { width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
.bento__cell--media .bento__body { align-self: center; }

/* cell with a brand-tinted surface, so the grid is not six white boxes */
.bento__cell--tint {
  background:
    radial-gradient(120% 140% at 88% 8%,
      color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 58%),
    var(--surface-2);
}

@media (max-width: 780px) {
  .bento { grid-template-columns: 1fr; }
  .bento__cell--wide { grid-column: span 1; }
  .bento__cell--media { grid-template-columns: 1fr; }
  .bento__cell--media img { min-height: 200px; }
}

/* =========================================================
   HOW  (numbered rows, one hairline between them)
   ========================================================= */

.how { padding-block: var(--section); background: var(--surface-2); }

.steps__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(1.6rem, 3.5vw, 2.4rem) 0;
}
.steps__item + .steps__item { border-top: 1px solid var(--line); }

.steps__num {
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--accent);
  padding-top: .3rem;          /* sits on the headline, not the body copy */
}
.steps__code { align-self: center; }
.steps__item h3 { font-size: 1.3rem; margin-bottom: .45rem; }
.steps__item p  { color: var(--muted); max-width: 56ch; font-size: .97rem; }

.steps__code {
  font-family: var(--font-mono); font-size: .84rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  padding: .5rem .85rem;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .steps__item { grid-template-columns: auto 1fr; }
  .steps__code { grid-column: 2; justify-self: start; }
}

/* =========================================================
   QUOTE
   ========================================================= */

.quote { padding-block: var(--section); }

/* The measure is capped on the content, not on the container, so the
   quote keeps the same left edge as every other section. */
.quote blockquote, .quote__by { max-width: 46rem; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.32;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.quote__by {
  display: flex; align-items: center; gap: .85rem;
  margin-top: 2rem;
  font-size: .92rem; color: var(--muted);
}
.quote__by img { width: 48px; height: 48px; border-radius: var(--r-pill); object-fit: cover; }
.quote__by strong { color: var(--text); font-weight: 600; }

/* =========================================================
   PRICING  (two plans)
   ========================================================= */

.pricing { padding-block: var(--section); background: var(--surface-2); }

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.6rem, 3.4vw, 2.4rem);
  display: flex; flex-direction: column;
  height: 100%;
}
.plan--featured { border-color: var(--accent); box-shadow: var(--shadow); }

.plan__name  { font-size: 1.02rem; font-weight: 600; }
.plan__price { margin-top: .9rem; color: var(--muted); font-size: .95rem; }
.plan__price span {
  font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 600;
  color: var(--text); letter-spacing: -.03em; margin-right: .15rem;
}
.plan__note { margin-top: .35rem; color: var(--muted); font-size: .93rem; }

.plan__list { margin: 1.8rem 0; display: grid; gap: .7rem; font-size: .95rem; }
.plan__list li { position: relative; padding-left: 1.5rem; color: var(--muted); }
.plan__list li::before {
  content: ""; position: absolute; left: 0; top: .55rem;
  width: 7px; height: 7px; border-radius: var(--r-pill);
  background: var(--accent); opacity: .55;
}

.plan .btn { margin-top: auto; }

.pricing__foot {
  margin-top: 1.75rem; text-align: center;
  color: var(--muted); font-size: .9rem;
}

@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* =========================================================
   FAQ
   ========================================================= */

.faq { padding-block: var(--section); }
.faq__list { max-width: 48rem; }

.faq__list details {
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 0;
}
.faq__list summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  font-weight: 550; font-size: 1.04rem;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: ""; flex-shrink: 0;
  width: 10px; height: 10px;
  border-right: 1.7px solid var(--muted);
  border-bottom: 1.7px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s var(--ease);
}
.faq__list details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq__list details p {
  margin-top: .85rem; color: var(--muted);
  max-width: 62ch; font-size: .97rem;
}

/* =========================================================
   CTA
   ========================================================= */

.cta { padding-block: var(--section); }

.cta__inner {
  background:
    radial-gradient(110% 160% at 12% 0%,
      color-mix(in srgb, var(--accent) 26%, transparent) 0%, transparent 62%),
    var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(2.75rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}
.cta__inner h2 { font-size: clamp(1.8rem, 4.4vw, 2.8rem); }
.cta__inner p  { margin: .9rem 0 2rem; color: var(--muted); }

/* =========================================================
   FOOTER
   ========================================================= */

.foot { border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 4.5rem); }

.foot__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.foot__brand p {
  margin-top: 1rem; color: var(--muted);
  font-size: .93rem; max-width: 32ch;
}
.foot nav { display: flex; flex-direction: column; gap: .6rem; font-size: .93rem; }
.foot h4 { font-size: .82rem; color: var(--text); margin-bottom: .3rem; font-weight: 600; }
.foot nav a { color: var(--muted); transition: color .2s var(--ease); }
.foot nav a:hover { color: var(--text); }

.foot__bar {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: .87rem;
}

@media (max-width: 780px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: span 2; }
}

/* =========================================================
   SCROLL REVEAL
   Only active when JS is running, so the page is never blank
   for a visitor with JS disabled or a crawler.
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
  :root.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
  }
  :root.js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}
