/* ==========================================================================
   Solet: solet.ai
   Design tokens first. Never hardcode a colour in a rule below :root.
   Light palette lives on bare :root; dark is redefined in BOTH the media
   query and [data-theme="dark"] so the manual toggle wins in both directions.
   ========================================================================== */

:root {
  /* Brand, sampled from the logo. --brand is ~1.9:1 on white:
     use it for shapes and fills ONLY, never for text. */
  --brand: #ffb84d;
  --brand-light: #ffc874;
  --brand-strong: #8a5300; /* accessible amber for text/links on light */

  /* Surfaces & ink */
  --bg: #fffdfa;
  --bg-tint: #fdf6ec;
  --surface: #ffffff;
  --ink: #1f1b16;
  --ink-muted: #5c5348;
  --border: #e8ddcc;

  /* Focus */
  --focus: #1f1b16;

  /* Type scale */
  --font-sans:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --step--1: clamp(0.88rem, 0.85rem + 0.15vw, 0.95rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(1.9rem, 1.5rem + 2vw, 3rem);
  --step-4: clamp(2.3rem, 1.7rem + 3.2vw, 4rem);

  /* Space & shape */
  --space-xs: 0.5rem;
  --space-sm: 0.85rem;
  --space-md: 1.4rem;
  --space-lg: 2.4rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --radius: 14px;
  --radius-sm: 999px;
  --wrap: 68rem;
  --shadow: 0 1px 2px rgb(31 27 22 / 6%), 0 8px 24px rgb(31 27 22 / 6%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120f;
    --bg-tint: #1c1813;
    --surface: #1e1a15;
    --ink: #f6efe4;
    --ink-muted: #b6aa99;
    --border: #332c23;
    --brand-strong: #ffc874; /* on dark, the light amber is the accessible one */
    --focus: #ffc874;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
  }
}

:root[data-theme="dark"] {
  --bg: #14120f;
  --bg-tint: #1c1813;
  --surface: #1e1a15;
  --ink: #f6efe4;
  --ink-muted: #b6aa99;
  --border: #332c23;
  --brand-strong: #ffc874;
  --focus: #ffc874;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
}

/* --------------------------------------------------------------- base --- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-strong);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--ink);
  padding: var(--space-sm) var(--space-md);
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand__mark {
  width: 84px;
  height: 84px;
  margin: -18px 0;
  object-fit: contain;
}

.site-nav {
  margin-inline-start: auto;
}

.site-nav__list {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--ink);
}

.theme-toggle {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}

.theme-toggle__icon {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: inset -4px -3px 0 0 var(--surface);
}

:root[data-theme="dark"] .theme-toggle__icon,
:root:not([data-theme="light"]) .theme-toggle__icon {
  box-shadow: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle__icon {
    box-shadow: inset -4px -3px 0 0 var(--surface);
  }
}

/* --------------------------------------------------------------- hero --- */

.hero {
  padding-block: var(--space-2xl) var(--space-xl);
  background:
    radial-gradient(
      60rem 26rem at 78% -12%,
      color-mix(in srgb, var(--brand) 26%, transparent),
      transparent 70%
    ),
    var(--bg);
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-size: var(--step-4);
  max-width: 20ch;
}

.hero__title em {
  font-style: normal;
  position: relative;
  white-space: nowrap;
  /* Creates a stacking context so the z-index:-1 swipe below paints behind the
     WORD. Without it the swipe drops behind .hero's own background and is
     invisible; .hero is opaque, so nothing of it ever showed. */
  isolation: isolate;
}

.hero__title em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.34em;
  background: var(--brand);
  opacity: 0.55;
  z-index: -1;
  border-radius: 3px;
}

.hero__lede {
  margin-top: var(--space-md);
  font-size: var(--step-1);
  color: var(--ink-muted);
  max-width: 56ch;
}

.hero__beta {
  margin-top: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  color: var(--ink);
}

.badge {
  display: inline-block;
  background: var(--brand);
  color: #1f1b16; /* fixed dark ink: --brand is a light fill in BOTH themes */
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.7rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__actions {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ------------------------------------------------------------ buttons --- */

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--brand);
  color: #1f1b16; /* fixed dark ink: --brand is a light fill in BOTH themes */
  border-color: var(--brand);
}

.btn--primary:hover {
  background: var(--brand-light);
}

.btn--ghost {
  border-color: var(--border);
  color: var(--ink);
  background: var(--surface);
}

.btn--ghost:hover {
  border-color: var(--ink-muted);
}

/* ----------------------------------------------------------- sections --- */

.section {
  padding-block: var(--space-2xl);
}

.section--tint {
  background: var(--bg-tint);
  border-block: 1px solid var(--border);
}

.section__title {
  font-size: var(--step-3);
  max-width: 24ch;
}

.section__lede {
  margin-top: var(--space-md);
  font-size: var(--step-1);
  color: var(--ink-muted);
  max-width: 58ch;
}

.prose {
  margin-top: var(--space-md);
  display: grid;
  gap: var(--space-md);
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: var(--step-1);
}

.prose--narrow {
  margin-top: var(--space-lg);
  font-size: var(--step-0);
}

/* -------------------------------------------------------------- cards --- */

.cards {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
}

.card__title {
  font-size: var(--step-1);
  margin-bottom: var(--space-xs);
}

.card p {
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.card::before {
  content: "";
  display: block;
  width: 2rem;
  height: 3px;
  border-radius: 3px;
  background: var(--brand);
  margin-bottom: var(--space-sm);
}

/* -------------------------------------------------------------- steps --- */

.steps {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-md);
  counter-reset: step;
}

.step {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.step__num {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #1f1b16;
  font-weight: 700;
}

.step__title {
  font-size: var(--step-1);
  margin-bottom: var(--space-xs);
}

.step__body p {
  color: var(--ink-muted);
  max-width: 62ch;
}

/* -------------------------------------------------------------- chips --- */

.chips {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  font-size: var(--step--1);
}

/* ------------------------------------------------------------ contact --- */

.section--contact {
  background:
    radial-gradient(
      50rem 22rem at 50% 120%,
      color-mix(in srgb, var(--brand) 30%, transparent),
      transparent 70%
    ),
    var(--bg);
}

.contact {
  text-align: center;
  display: grid;
  justify-items: center;
}

.contact .section__title {
  max-width: none;
}

.contact__badge {
  margin-bottom: var(--space-sm);
}

.contact__lede {
  margin-top: var(--space-md);
  font-size: var(--step-1);
  color: var(--ink-muted);
  max-width: 52ch;
}

.contact__action {
  margin-top: var(--space-lg);
}

/* ------------------------------------------------------------- footer --- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-lg);
  background: var(--bg-tint);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-xs);
  justify-items: center;
  text-align: center;
}

/* Inline inside the year line, so it needs the ink colour back: the line it
   sits in is muted. */
.site-footer__brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.site-footer__note {
  color: var(--ink-muted);
  font-size: var(--step--1);
}

/* ------------------------------------------------------------ mobile --- */

@media (max-width: 44rem) {
  .site-nav {
    display: none;
  }

  .theme-toggle {
    margin-inline-start: auto;
  }

  .section,
  .hero {
    padding-block: var(--space-xl);
  }

  .step {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
