/* ==========================================================================
   ShiftF11 stylesheet
   tokens → fonts → reset → base → layout → components → utilities → motion
   ========================================================================== */


/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color: black, gray and light gray, white text, yellow accent.
     Sections pick a tone: default black, .tone-gray or .tone-light. */
  --bg:              #0A0A0A;   /* black: page, header, websites, about */
  --gray:            #515151;   /* hero, automation, contact */
  --light:           #E6E6E6;   /* problem, work, how it goes, faq */
  --surface:         #0A0A0A;   /* device frames, browser bars, placeholders */
  --text:            #FFFFFF;
  --text-muted:      #A3A3A3;
  --text-on-light:   #0A0A0A;
  --muted-on-gray:   #DEDEDE;
  --border:          #2A2A2A;
  --border-on-gray:  #707070;
  --border-on-light: #BDBDBD;
  --accent:          #FFD43B;   /* yellow: CTAs, focus, the circle motif */
  --accent-dim:      #E0B400;   /* hover/pressed */
  --accent-ink:      var(--accent); /* accent as text or lines */
  --ink-on-light:    #7A5C00;   /* accent ink on light gray (yellow is unreadable there) */
  --on-accent:       #0A0A0A;   /* text on yellow buttons, always dark */

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1:  clamp(1.33rem, 1.2rem + 0.65vw, 1.75rem);
  --step-2:  clamp(1.77rem, 1.5rem + 1.35vw, 2.75rem);
  --step-3:  clamp(2.37rem, 1.9rem + 2.35vw, 4.25rem);
  --step-4:  clamp(3.16rem, 2.3rem + 4.3vw, 6.5rem);

  --measure:  68ch;
  --tracking-tight: -0.02em;

  /* Spacing: 8px base */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  8rem;
  --space-2xl: 12rem;
  --gutter:    clamp(1.25rem, 4vw, 3rem);

  /* Geometry */
  --radius:   2px;
  --maxw:     1280px;
  --hairline: 1px;
  --ring:     2px;
  --logo:     2.75rem;
  --header-h: 4.5rem;
  --marker:   2.75rem;
  --toggle:   2rem;
  --rings-size:   min(130vw, 58rem);
  --browser-bar:  1.5rem;
  --bezel:        clamp(0.125rem, 0.35vw, 0.3125rem);
  --bezel-gap:    clamp(0.125rem, 0.2vw, 0.1875rem);
  --radius-device: clamp(0.625rem, 1.8vw, 1.375rem);

  /* Motion */
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --dur-hover: 150ms;
  --dur-in:    400ms;
  --stagger:   60ms;
  --rise:      1rem;
  --orbit-slow:   60s;   /* ambient loop, not a transition */
  --orbit-slower: 90s;
}

/* --------------------------------------------------------------------------
   Fonts (self-hosted, latin subset, variable weight)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-latin-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img, picture, svg { display: block; max-width: 100%; height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

ul[class], ol[class] { list-style: none; padding: 0; }


/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

p { max-width: var(--measure); text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: var(--ring) solid var(--accent-ink);
  outline-offset: var(--ring);
  border-radius: var(--radius);
}

::selection { background: var(--accent); color: var(--on-accent); }


/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}


/* Major sections: tall, one idea per screen */
.section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 85vh;
  padding-block: clamp(var(--space-lg), 12vw, var(--space-2xl));
}

/* Section tones. Default is the page black. */
.tone-gray {
  --text-muted: var(--muted-on-gray);
  --border:     var(--border-on-gray);
  background: var(--gray);
}

.tone-light {
  --bg:         var(--light);
  --text:       var(--text-on-light);
  --text-muted: var(--gray);
  --border:     var(--border-on-light);
  --accent-ink: var(--ink-on-light);
  background: var(--bg);
  color: var(--text);
}

/* Yellow on light gray needs an edge to hold its shape */
.tone-light .btn { box-shadow: inset 0 0 0 var(--hairline) var(--accent-ink); }

.section__title {
  font-size: var(--step-3);
  max-width: 18ch;
}


/* --------------------------------------------------------------------------
   Components
   -------------------------------------------------------------------------- */

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: var(--space-xs);
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-hover) ease;
}
.btn:hover { background: var(--accent-dim); }

.btn--small {
  min-height: 2.5rem;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--step--1);
}

/* Text link with an accent underline that fills on hover */
.text-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent-ink);
  text-decoration-thickness: var(--hairline);
  text-underline-offset: 0.3em;
  transition: text-decoration-thickness var(--dur-hover) ease, color var(--dur-hover) ease;
}
.text-link:hover {
  color: var(--accent-ink);
  text-decoration-thickness: var(--ring);
}

/* Eyebrow: small label with the circle motif */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::before {
  content: '';
  flex: none;
  width: 0.7em;
  height: 0.7em;
  border: var(--ring) solid var(--accent-ink);
  border-radius: 50%;
}

/* Image placeholder: correct aspect ratio, visible label, never stock */
.placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  width: 100%;
  padding: var(--space-md);
  background: var(--surface);
  border: var(--hairline) solid var(--border);
  color: var(--text-muted);
  font-size: var(--step--1);
  text-align: center;
}

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  min-height: var(--header-h);
}

.site-header__brand {
  display: block;
  border-radius: 50%;
}
.site-header__brand img {
  width: var(--logo);
  height: var(--logo);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}

.site-nav__list a {
  font-size: var(--step--1);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-hover) ease;
}
.site-nav__list a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  min-height: 2.75rem;
  padding: var(--space-xs) var(--space-sm);
  background: none;
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  font-size: var(--step--1);
  cursor: pointer;
}

/* Small screens with JS: collapse nav behind a Menu button.
   Without JS the links simply wrap below the logo. */
@media (max-width: 47.99rem) {
  .js .nav-toggle { display: inline-flex; align-items: center; }

  .js .site-nav {
    display: none;
    position: absolute;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) var(--gutter) var(--space-lg);
    background: var(--bg);
    border-bottom: var(--hairline) solid var(--border);
  }
  .js .site-nav.is-open { display: flex; }

  .js .site-nav__list {
    flex-direction: column;
    gap: var(--space-sm);
  }
  .js .site-nav__list a {
    font-family: var(--font-display);
    font-size: var(--step-2);
    color: var(--text);
  }
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-height: calc(100svh - var(--header-h));
  padding-block: var(--space-md) var(--space-xl);
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.hero__title {
  font-size: var(--step-4);
  font-weight: 600;
  max-width: 16ch;
}

.hero__lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 40ch;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-xs);
}

/* Rings sit behind the text, anchored top-right and partly off-canvas */
.hero__rings {
  position: absolute;
  z-index: -1;
  top: var(--space-lg);
  right: calc(var(--rings-size) * -0.35);
  width: var(--rings-size);
  height: auto;
  pointer-events: none;
}

.hero__ring {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
}

.hero__arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 7 93;
  stroke-dashoffset: -62; /* start upper-left, in view */
  stroke-linecap: round;
}

.hero__mark { opacity: 0.07; }

.hero__dot { fill: var(--text-muted); }

.hero__orbit {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: orbit var(--orbit-slow) linear infinite;
}
.hero__orbit--reverse {
  animation-duration: var(--orbit-slower);
  animation-direction: reverse;
}

@keyframes orbit {
  to { transform: rotate(1turn); }
}

@media (min-width: 64rem) {
  .hero { padding-top: var(--space-lg); }
  .hero__rings {
    top: calc(var(--space-md) * -1);
    right: calc(var(--rings-size) * -0.18);
  }
}

/* Showcase: desktop browser with the phone overlapping bottom-right */
.showcase__stage {
  position: relative;
  padding-bottom: 8%;
}

.showcase__desktop {
  width: 88%;
  overflow: hidden;
  background: var(--surface);
  border: var(--hairline) solid var(--border);
  border-top: var(--browser-bar) solid var(--surface);
  border-radius: var(--radius);
}

.showcase__phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 24%;
  overflow: hidden;
  background: var(--surface);
  border: var(--bezel) solid var(--surface);
  border-radius: var(--radius-device);
  outline: var(--bezel-gap) solid var(--bg);
}

.showcase img { width: 100%; }

.showcase__caption {
  margin-top: var(--space-sm);
  font-size: var(--step--1);
  color: var(--text-muted);
}

@media (min-width: 48rem) {
  .showcase__phone { width: 20%; }
}


/* Marker: numbered circle, the logo's shape as a step marker */
.marker {
  display: grid;
  place-items: center;
  width: var(--marker);
  height: var(--marker);
  border: var(--hairline) solid var(--accent-ink);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text);
  flex: none;
}
.marker--filled {
  background: var(--accent);
  color: var(--on-accent);
}

/* Problem: heading holds on the left, list scrolls past on the right */
.problem__grid {
  display: grid;
  gap: var(--space-lg);
}

.problem__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.problem__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-top: var(--hairline) solid var(--border);
}
.problem__item:last-child { border-bottom: var(--hairline) solid var(--border); }


.problem__heading {
  font-size: var(--step-1);
  line-height: 1.2;
}

.problem__item p {
  margin-top: var(--space-xs);
  color: var(--text-muted);
}

.problem__close {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.3;
}

@media (min-width: 64rem) {
  .problem__grid {
    grid-template-columns: 5fr 7fr;
    column-gap: var(--space-xl);
    row-gap: var(--space-lg);
  }
  .problem__intro {
    position: sticky;
    top: calc(var(--header-h) + var(--space-lg));
    align-self: start;
    grid-row: span 2;
  }
  .problem__close { grid-column: 2; }
}


/* Websites: intro, two screenshots side by side, one short chapter */
.websites { gap: var(--space-lg); }

.websites__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.websites__lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 44ch;
  color: var(--text-muted);
}

.site-pair {
  display: grid;
  gap: var(--space-md);
}

.site-pair__caption {
  margin-top: var(--space-sm);
  font-size: var(--step--1);
  color: var(--text-muted);
}

@media (min-width: 48rem) {
  .site-pair { grid-template-columns: 1fr 1fr; }
}

.chapter__body {
  display: grid;
  gap: var(--space-md);
}

.chapter__title { font-size: var(--step-2); }

.chapter__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}


@media (min-width: 64rem) {
  .chapter__body {
    grid-template-columns: 5fr 7fr;
    column-gap: var(--space-xl);
  }
}


/* Rows: label on the left, heading + text on the right, hairline between */
.rows__item {
  display: grid;
  gap: var(--space-xs);
  padding-block: var(--space-md);
  border-top: var(--hairline) solid var(--border);
}
.rows__item:last-child { border-bottom: var(--hairline) solid var(--border); }

.rows__label {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.rows__heading {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
}

.rows__item p:not(.rows__label) {
  margin-top: var(--space-xs);
  color: var(--text-muted);
}

@media (min-width: 64rem) {
  .rows__item {
    grid-template-columns: 3fr 9fr;
    column-gap: var(--space-lg);
  }
  .rows__label { padding-top: 0.3em; }
}

/* Work: three live projects in alternating rows, then the unnamed ones */
.placeholder--wide { aspect-ratio: 16 / 10; }

.work__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.work__projects {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.project {
  display: grid;
  gap: var(--space-md);
  align-items: center;
}

.project__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

.project__label {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project__title {
  font-size: var(--step-2);
  overflow-wrap: break-word;
}

@media (min-width: 64rem) {
  .project {
    grid-template-columns: 7fr 5fr;
    column-gap: var(--space-lg);
  }
  .project:nth-child(even) { grid-template-columns: 5fr 7fr; }
  .project:nth-child(even) .showcase { order: 2; }
}

.behind {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: var(--hairline) solid var(--border);
}

.behind__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.behind__title { font-size: var(--step-2); }

.behind__intro p { color: var(--text-muted); }

.behind__note {
  margin-top: var(--space-md);
  font-size: var(--step--1);
  color: var(--text-muted);
}



/* Automation: before/after, three offerings, a large dashboard */
.automation__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.automation__lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 44ch;
  color: var(--text-muted);
}

/* Shot: a linked screenshot that opens full size */
.shot {
  display: block;
  overflow: hidden;
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--dur-hover) ease;
}
.shot:hover { border-color: var(--accent-ink); }
.shot img { width: 100%; }

/* Power Automate feature: screenshot beside a short description */
.flow {
  display: grid;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-xl);
}

.flow__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

.flow__title { font-size: var(--step-2); }

.flow__text p:not(.rows__label) { color: var(--text-muted); }

@media (min-width: 64rem) {
  .flow {
    grid-template-columns: 7fr 5fr;
    column-gap: var(--space-lg);
  }
}

.automation__cta {
  margin-top: var(--space-lg);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.3;
}



/* How it goes: vertical steps on small screens, a horizontal line on wide */
.how__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.how__lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 40ch;
  color: var(--text-muted);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: var(--marker) 1fr;
  column-gap: var(--space-md);
  padding-bottom: var(--space-lg);
}

/* Connector between markers */
.step::before {
  content: '';
  position: absolute;
  top: calc(var(--marker) + var(--space-xs));
  bottom: var(--space-xs);
  left: calc(var(--marker) / 2);
  width: var(--hairline);
  background: var(--border);
}
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }

.step__title {
  font-size: var(--step-1);
  line-height: 1.2;
  padding-top: 0.35em;
}

.step p {
  margin-top: var(--space-xs);
  color: var(--text-muted);
}

.how__close {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.how__timing {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
}

@media (min-width: 64rem) {
  .steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: var(--space-md);
  }
  .step {
    grid-template-columns: 1fr;
    align-content: start;
    row-gap: var(--space-sm);
    padding-bottom: 0;
  }
  .step::before {
    top: calc(var(--marker) / 2);
    bottom: auto;
    left: calc(var(--marker) + var(--space-xs));
    right: calc(var(--space-xs) - var(--space-md));
    width: auto;
    height: var(--hairline);
  }
  .step__title { padding-top: 0; }
  .how__close { justify-content: space-between; }
}


/* About: photo beside one short paragraph */
.about__grid {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

.about__photo {
  order: 2;
  width: 100%;
  max-width: 18rem;
  border-radius: var(--radius);
}

.about__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.about__body {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 40ch;
}

.about__email {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
}

@media (min-width: 64rem) {
  .about__grid {
    grid-template-columns: 5fr 7fr;
    column-gap: var(--space-xl);
  }
  .about__photo {
    order: 0;
    max-width: 26rem;
  }
}


/* FAQ: plain <details>, circle toggle drawn in CSS */
.faq__grid {
  display: grid;
  gap: var(--space-lg);
}

.faq__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.faq__more { color: var(--text-muted); }

.faq__item {
  border-top: var(--hairline) solid var(--border);
}
.faq__item:last-child { border-bottom: var(--hairline) solid var(--border); }

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-md);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: var(--tracking-tight);
  list-style: none;
  cursor: pointer;
  transition: color var(--dur-hover) ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent-ink); }

/* Circle with a plus; the vertical bar collapses to a minus when open */
.faq__item summary::after {
  content: '';
  flex: none;
  width: var(--toggle);
  height: var(--toggle);
  border: var(--hairline) solid var(--border);
  border-radius: 50%;
  background:
    linear-gradient(var(--accent-ink), var(--accent-ink)) center / 40% var(--ring) no-repeat,
    linear-gradient(var(--accent-ink), var(--accent-ink)) center / var(--ring) 40% no-repeat;
  transition: background-size var(--dur-hover) ease, border-color var(--dur-hover) ease;
}
.faq__item summary:hover::after { border-color: var(--accent-ink); }
.faq__item[open] summary::after {
  background-size: 40% var(--ring), var(--ring) 0;
}

.faq__item p {
  padding-bottom: var(--space-md);
  color: var(--text-muted);
}

@media (min-width: 64rem) {
  .faq__grid {
    grid-template-columns: 5fr 7fr;
    column-gap: var(--space-xl);
  }
  .faq__intro {
    position: sticky;
    top: calc(var(--header-h) + var(--space-lg));
    align-self: start;
  }
}


/* Contact: intro beside the form */
.contact__grid {
  display: grid;
  gap: var(--space-lg);
}

.contact__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.contact__lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 36ch;
  color: var(--text-muted);
}

.contact__email { color: var(--text-muted); }

@media (min-width: 64rem) {
  .contact__grid {
    grid-template-columns: 5fr 7fr;
    column-gap: var(--space-xl);
    align-items: start;
  }
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form__row {
  display: grid;
  gap: var(--space-md);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.field label,
.field legend {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.field__optional {
  font-weight: 400;
  color: var(--text-muted);
}

.field input:not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--step-0);
  transition: border-color var(--dur-hover) ease;
}

.field textarea {
  resize: vertical;
  line-height: 1.5;
}

.field select {
  appearance: none;
  padding-right: var(--space-lg);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1.3rem) 50%,
    calc(100% - 0.95rem) 50%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
}

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--text-muted); }

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent-ink); }

/* Matches the specificity of the input rule above so it wins */
.field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--accent-ink); }

.field__error {
  font-size: var(--step--1);
  color: var(--accent-ink);
}

/* Radio choices: the circle motif, filled when picked */
.field--choices {
  border: 0;
  padding: 0;
  margin: 0;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  margin-top: var(--space-xs);
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 2.75rem;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  letter-spacing: 0;
  cursor: pointer;
}

.choice input {
  appearance: none;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border: var(--hairline) solid var(--text-muted);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--dur-hover) ease;
}
.choice input:checked {
  border-color: var(--accent-ink);
  background: radial-gradient(circle, var(--accent-ink) 0 40%, var(--bg) 45%);
}

/* Honeypot: off-screen for people, still in the DOM for bots */
.hp {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__submit { align-self: flex-start; min-width: 10rem; }
.form__submit:disabled { opacity: 0.6; cursor: progress; }

/* Inline result message */
.form-status {
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-left: var(--ring) solid var(--accent-ink);
  background: var(--bg);
  font-size: var(--step-0);
}
.form-status--sent {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.35;
}
.form-status a { color: var(--accent-ink); }

@media (min-width: 48rem) {
  .form__row { grid-template-columns: 1fr 1fr; }
}


/* Site footer: same black as the header */
.site-footer {
  background: var(--bg);
  border-top: var(--hairline) solid var(--border);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  padding-block: var(--space-md);
  font-size: var(--step--1);
  color: var(--text-muted);
}


/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


/* --------------------------------------------------------------------------
   Motion: fade-and-rise once on entry (JS adds .is-visible)
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(var(--rise));
  transition:
    opacity var(--dur-in) var(--ease),
    transform var(--dur-in) var(--ease);
  transition-delay: calc(var(--d, 0) * var(--stagger));
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
