/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --paper: #f6f4ef;
  --paper-2: #edeae2;
  --card: #fbfaf7;
  --ink: #15171a;
  --ink-2: #33373d;
  --muted: #5e636b;
  --line: #d9d4c8;
  --field-border: #8a8478;

  --accent: #b8431e;
  --accent-dark: #93331a;
  --accent-light: #e8774f;

  --dark-text: #e9e6df;
  --dark-muted: #a9a59c;
  --dark-line: rgba(246, 244, 239, 0.16);

  --success-bg: #e6f1e8;
  --success-text: #1d5b32;
  --error-bg: #f9e6e1;
  --error-text: #8c2414;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Consolas, Menlo, monospace;

  --container: 1180px;
  --gutter: 16px;
  --header-h: 64px;

  color-scheme: light;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 40px; --header-h: 72px; }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  height: auto;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
}

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

.section-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--accent-light);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.button svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.button-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

.button-small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9375rem;
}

.button-block {
  width: 100%;
}

.button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Header and navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul a {
  display: block;
  padding-block: 6px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav ul a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.nav-toggle {
  display: none;
}

/* Mobile menu (only when JavaScript is available; otherwise the links stay visible) */
@media (max-width: 899.98px) {
  html:not(.js) .header-inner {
    flex-wrap: wrap;
    padding-block: 12px;
  }

  html:not(.js) .site-nav {
    flex-wrap: wrap;
    gap: 12px 24px;
  }

  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 14px;
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 4px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .js .nav-open .site-nav {
    display: flex;
  }

  .js .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .js .site-nav ul a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.0625rem;
  }

  .js .site-nav .button {
    min-height: 48px;
  }
}

.nav-toggle-icon {
  position: relative;
  width: 18px;
  height: 12px;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease;
}

.nav-toggle-icon::before { top: 1px; }
.nav-toggle-icon::after { bottom: 1px; }

.nav-open .nav-toggle-icon::before { transform: translateY(4px) rotate(45deg); }
.nav-open .nav-toggle-icon::after { transform: translateY(-4px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-block: clamp(48px, 9vw, 112px) clamp(56px, 8vw, 104px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin-bottom: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero-grid {
  display: grid;
  gap: 48px;
  margin-top: clamp(28px, 4vw, 48px);
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }
}

.lede {
  max-width: 36em;
  margin-bottom: 28px;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
}

.hero-alt {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.hero-alt a {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 3px;
}

.hero-alt a:hover {
  color: var(--accent);
}

.hero-index {
  border-top: 2px solid var(--ink);
}

.index-label {
  margin: 14px 0 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-index ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-index a {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.index-num {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  padding-top: 3px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.index-title {
  grid-column: 2;
  font-size: 1.0625rem;
  font-weight: 600;
}

.index-desc {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.875rem;
}

.hero-index svg {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.hero-index a:hover .index-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-index a:hover svg {
  color: var(--accent);
  transform: translateX(3px);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding-block: clamp(64px, 10vw, 128px);
}

.section-tint {
  background: var(--paper-2);
}

.section-dark {
  background: var(--ink);
  color: var(--dark-text);
}

.section-dark h2,
.section-dark h3 {
  color: var(--paper);
}

.section-head {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-label span {
  color: var(--accent);
}

.section-dark .section-label {
  color: var(--dark-muted);
}

.section-dark .section-label span {
  color: var(--accent-light);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.section-intro {
  margin: 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.section-dark .section-intro {
  color: var(--dark-muted);
}

/* Shared: label/value grid used for project details and about facts */
.meta-grid {
  display: grid;
  margin: 0 0 8px;
  border-top: 1px solid var(--line);
}

@media (min-width: 520px) {
  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }
}

.meta-grid div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.meta-grid dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meta-grid dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 500;
}

/* Shared: short-bar bullet list */
.ticks {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 22px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.8em - 1px);
  width: 10px;
  height: 2px;
  background: var(--accent);
}

.section-dark .ticks li::before {
  background: var(--accent-light);
}

/* ==========================================================================
   Portfolio
   ========================================================================== */

.project {
  display: grid;
  gap: 32px;
}

@media (min-width: 960px) {
  .project {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
    align-items: start;
  }

  .project-media {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

.project + .project {
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}

.project-media {
  margin: 0;
}

.browser-frame {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.browser-bar .dot {
  width: 9px;
  height: 9px;
  flex: none;
  background: #c9c3b6;
  border-radius: 50%;
}

.browser-url {
  display: block;
  flex: 1;
  min-width: 0;
  max-width: 320px;
  height: 22px;
  margin-left: 10px;
  padding: 0 10px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.browser-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}

.project-label {
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-body h3 {
  margin-bottom: 20px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.project-body h4 {
  margin: 28px 0 8px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.project-body .button {
  margin-top: 32px;
}

/* ==========================================================================
   Services
   ========================================================================== */

.services-grid {
  display: grid;
  gap: 1px;
  background: var(--dark-line);
  border: 1px solid var(--dark-line);
}

@media (min-width: 760px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.service {
  padding: clamp(24px, 4vw, 40px);
  background: var(--ink);
}

.service-num {
  margin-bottom: 20px;
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.service h3 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
}

.service-fit {
  color: var(--dark-muted);
  font-size: 0.9375rem;
}

.service-fit strong {
  color: var(--dark-text);
  font-weight: 600;
}

.service-sub {
  margin: 24px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.services-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: 40px;
}

.services-cta p {
  max-width: 40em;
  margin: 0;
  color: var(--dark-text);
  font-size: 1.125rem;
}

/* ==========================================================================
   Examples (interactive concept websites in /examples)
   ========================================================================== */

/* Business type picker: 2 columns on phones, 3 on tablets, one row on wide screens */
.examples-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 700px) {
  .examples-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .examples-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.examples-tab {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.examples-tab:hover {
  border-color: var(--ink);
  background: var(--card);
}

.examples-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.examples-tab-num {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.examples-tab.is-active .examples-tab-num {
  color: var(--accent-light);
}

.examples-tab-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.examples-tab-desc {
  display: none;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.examples-tab.is-active .examples-tab-desc {
  color: var(--dark-muted);
}

@media (min-width: 640px) {
  .examples-tab-desc {
    display: block;
  }
}

/* Size switch and "open full page" link above the frame */
.examples-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 24px 0 10px;
}

.examples-devices {
  display: none;
  gap: 2px;
  padding: 3px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (min-width: 900px) {
  .js .examples-devices:not([hidden]) {
    display: inline-flex;
  }
}

.examples-devices button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 30px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.examples-devices button:hover {
  color: var(--ink);
}

.examples-devices button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.examples-devices svg {
  width: 18px;
  height: 18px;
}

.examples-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-underline-offset: 4px;
}

.examples-open svg {
  width: 16px;
  height: 16px;
}

.examples-open:hover {
  color: var(--accent);
}

/* Browser frame. On wide screens it can be narrowed to tablet or phone width. */
.examples-browser {
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 48px -32px rgba(21, 23, 26, 0.45);
  transition: max-width 0.35s ease;
}

@media (min-width: 900px) {
  .examples-browser {
    max-width: 100%;
  }

  .examples-browser[data-device="tablet"] {
    max-width: 800px;
  }

  .examples-browser[data-device="phone"] {
    max-width: 400px;
  }
}

.examples-bar {
  gap: 6px;
}

.examples-bar .browser-url {
  max-width: 360px;
}

.examples-badge {
  flex: none;
  margin-left: 4px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  line-height: 18px;
  white-space: nowrap;
}

@media (max-width: 479.98px) {
  .examples-bar .dot {
    display: none;
  }

  .examples-bar .browser-url {
    margin-left: 0;
  }
}

.examples-viewport {
  position: relative;
  height: clamp(480px, 78vh, 760px);
  background: #fff;
}

.examples-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.examples-frame.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

/* Thin progress line while a concept loads (only shown if loading takes a moment) */
.examples-viewport.is-loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 35%;
  height: 2px;
  background: var(--accent);
  animation: examples-loading 1s ease-in-out infinite;
}

@keyframes examples-loading {
  from { transform: translateX(-100%); }
  to { transform: translateX(300%); }
}

.examples-note {
  max-width: 62em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.examples-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: clamp(40px, 5vw, 56px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.examples-cta h3 {
  margin-bottom: 8px;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
}

.examples-cta p {
  max-width: 40em;
  margin: 0;
  color: var(--muted);
}

/* ==========================================================================
   About
   ========================================================================== */

/* Heading on the left, text on the right (same 5/7 split as Contact), facts in a full-width row below */
.about-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
    align-items: start;
  }

  /* Line the first paragraph up with the heading rather than the small label */
  .about-body {
    padding-top: 36px;
  }
}

.about-head h2 {
  margin-top: 16px;
}

.about-lede {
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.5;
}

.about-facts {
  margin-top: clamp(40px, 6vw, 72px);
}

@media (min-width: 1200px) {
  .about-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
    align-items: start;
  }
}

.contact-info h2 {
  margin: 16px 0 20px;
}

.contact-methods {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.contact-method:hover {
  border-color: var(--ink);
}

.contact-method svg {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--accent);
}

.method-label {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.method-value {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.next-steps {
  margin-top: 40px;
}

.next-steps h3 {
  margin-bottom: 14px;
  font-size: 1.125rem;
}

.next-steps ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.next-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  counter-increment: step;
}

.next-steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* Inquiry form */
.inquiry {
  padding: clamp(20px, 4vw, 40px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.inquiry h3 {
  margin-bottom: 6px;
  font-size: 1.5rem;
}

.inquiry-intro {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.field-grid {
  display: grid;
  gap: 18px 16px;
  margin-bottom: 24px;
}

@media (min-width: 600px) {
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-full {
    grid-column: 1 / -1;
  }
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.5;
}

.field select {
  padding-right: 40px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333373d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8a8f96;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--accent);
  outline-offset: 1px;
}

.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid {
  border-color: var(--error-text);
}

.field-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Inline validation messages (added by js/main.js) */
.field-error {
  margin: 6px 0 0;
  color: var(--error-text);
  font-size: 0.875rem;
  font-weight: 500;
}

.field [aria-invalid="true"] {
  border-color: var(--error-text);
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.form-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.form-note a {
  color: var(--ink);
  text-underline-offset: 2px;
}

.form-status {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--paper-2);
  border-left: 3px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  font-size: 0.9375rem;
}

.form-status:empty {
  display: none;
}

.form-status.is-success {
  background: var(--success-bg);
  border-left-color: var(--success-text);
  color: var(--success-text);
}

.form-status.is-error {
  background: var(--error-bg);
  border-left-color: var(--error-text);
  color: var(--error-text);
}

.form-status a {
  color: inherit;
  font-weight: 600;
  text-underline-offset: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding-block: 56px 32px;
  background: var(--ink);
  color: var(--dark-muted);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

.footer-brand {
  margin-bottom: 8px;
  color: var(--paper);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.footer-heading {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--dark-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 48px;
  padding-top: 24px;
  /* Divider limited to the content width (a border would span the container's padding) */
  background: linear-gradient(var(--dark-line), var(--dark-line)) top center / calc(100% - var(--gutter) * 2) 1px no-repeat;
}

/* Legal pages have only the bottom row */
.footer-bottom:first-child {
  margin-top: 0;
  padding-top: 0;
  background: none;
}

.footer-bottom p {
  margin: 0;
}

.site-footer .legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* ==========================================================================
   Legal pages (privacy.html, terms.html) and 404
   ========================================================================== */

.page-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.back-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 599.98px) {
  .page-nav .button {
    display: none;
  }
}

.legal {
  padding-block: clamp(48px, 8vw, 96px);
}

.legal-inner {
  max-width: 760px;
}

.legal h1 {
  margin: 12px 0;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.legal .updated {
  margin-bottom: 40px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.legal-lead {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 1.125rem;
}

.legal h2 {
  margin: 44px 0 12px;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 6px;
}

.legal li::marker {
  color: var(--accent);
}

.legal a:not(.button) {
  color: var(--accent);
  text-underline-offset: 2px;
}

.legal a:not(.button):hover {
  color: var(--accent-dark);
}

.legal strong {
  color: var(--ink);
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

  .examples-viewport.is-loading::before {
    width: 100%;
    opacity: 0.5;
    animation: none;
  }
}
