/* ---------- Tokens ---------- */
:root {
  --bg: #FBFBFD;
  --card: #F2F2F5;
  --text: #1D1D1F;
  --muted: #6E6E73;
  --accent: #0E7490;
  --on-accent: #FFFFFF;
  --hairline: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(251, 251, 253, 0.72);
  --frame-bar: #E8E8ED;
  --dot: #C7C7CC;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-hero: clamp(2.5rem, 1.6rem + 3.2vw, 4rem);
  --fs-h2: clamp(2rem, 1.55rem + 2.1vw, 3rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --fs-principle: clamp(1.25rem, 1.05rem + 0.95vw, 1.75rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.8125rem;

  --radius: 22px;
  --wrap: 1080px;
  --wrap-text: 680px;
  --gutter: 20px;
  --space-section: 56px; /* one gap between every section; 96px from 760px up */
  color-scheme: light;
}

@media (min-width: 760px) {
  :root { --space-section: 96px; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0B0C;
    --card: #1A1A1C;
    --text: #F5F5F7;
    --muted: #A1A1A6;
    --accent: #3BB4C9;
    --on-accent: #0B0B0C;
    --hairline: rgba(255, 255, 255, 0.10);
    --nav-bg: rgba(11, 11, 12, 0.72);
    --frame-bar: #232326;
    --dot: #48484C;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0B0B0C;
  --card: #1A1A1C;
  --text: #F5F5F7;
  --muted: #A1A1A6;
  --accent: #3BB4C9;
  --on-accent: #0B0B0C;
  --hairline: rgba(255, 255, 255, 0.10);
  --nav-bg: rgba(11, 11, 12, 0.72);
  --frame-bar: #232326;
  --dot: #48484C;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }

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

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

.skip {
  position: absolute; left: 16px; top: -48px;
  padding: 10px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg);
  z-index: 100; transition: top 0.2s;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav__inner {
  height: 56px; display: flex; align-items: center; gap: 24px;
}
.nav__brand { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.nav__links { display: none; gap: 28px; margin: 0 auto; font-size: var(--fs-small); color: var(--muted); }
.nav__links a { transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  cursor: pointer; transition: color 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--text); background: var(--card); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

@media (min-width: 760px) {
  .nav__links { display: flex; }
  .nav__actions { margin-left: 0; }
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 500; letter-spacing: -0.005em;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { opacity: 0.88; }
.btn--ghost { border-color: var(--hairline); color: var(--text); background: var(--card); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--sm { min-height: 36px; padding: 0 16px; font-size: var(--fs-small); }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 1.0625rem; }

.link { color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(32px, 2px + 5.5vw, 80px) 0 0; }
.hero__wrap > * { max-width: var(--wrap-text); }
.hero__wrap > .hero__title { max-width: 900px; }
.avatar {
  position: relative; width: 72px; height: 72px; margin-bottom: 20px;
  border-radius: 50%; overflow: hidden; background: var(--card);
  box-shadow: 0 0 0 1px var(--hairline);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar__fallback {
  position: absolute; inset: 0; display: none; place-items: center;
  font-size: 2.25rem; font-weight: 600; color: var(--muted);
}
.avatar.is-missing .avatar__fallback { display: grid; }
@media (min-width: 760px) {
  .avatar { width: 96px; height: 96px; margin-bottom: 24px; }
}

.eyebrow {
  font-size: var(--fs-eyebrow); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); margin-bottom: 14px;
}
.hero__title {
  font-size: var(--fs-hero); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.035em;
  text-wrap: pretty; /* balance on 4 mobile lines strands "systems" alone */
}
@media (min-width: 760px) { .hero__title { text-wrap: balance; } }
.hero__sub {
  margin-top: 24px; font-size: var(--fs-lead); line-height: 1.5;
  color: var(--muted); text-wrap: pretty;
}
.hero__loc { margin-top: 14px; font-size: var(--fs-small); color: var(--muted); }
.hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: var(--space-section) 0 0; }
.section__eyebrow { margin-bottom: 20px; }
.section__head { max-width: var(--wrap-text); margin-bottom: clamp(32px, 5vw, 56px); }
.section__title {
  font-size: var(--fs-h2); font-weight: 700;
  line-height: 1.08; letter-spacing: -0.028em;
  text-wrap: balance;
}
.section__sub { margin-top: 16px; font-size: var(--fs-lead); color: var(--muted); line-height: 1.5; }

/* ---------- Cards ---------- */
.cards-3 { display: grid; gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 28px;
}
.card__title { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 10px; }
.card p { color: var(--muted); }
@media (min-width: 860px) { .cards-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* ---------- Builds ---------- */
.build {
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 12px;
  display: flex; flex-direction: column;
}
.build__text { padding: 20px 12px 16px; display: flex; flex-direction: column; flex: 1; }
.build__text p:not(.tag) { color: var(--muted); }
.build__text .link { margin-top: auto; padding-top: 16px; align-self: flex-start; }
.build__title { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.022em; line-height: 1.2; margin-bottom: 10px; }
.tag { font-size: var(--fs-small); color: var(--muted); margin-bottom: 6px; font-weight: 500; }

.build--featured { margin-bottom: 16px; }
@media (min-width: 860px) {
  .build--featured { padding: 16px; }
  .build--featured .build__text { padding: 28px 16px 16px; max-width: var(--wrap-text); }
}

.grid-2 { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

/* Browser frame */
.frame {
  display: block; border-radius: 14px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
}
.frame__bar {
  display: flex; align-items: center; gap: 12px;
  height: 32px; padding: 0 12px;
  background: var(--frame-bar); border-bottom: 1px solid var(--hairline);
}
.dots { display: flex; gap: 6px; flex: none; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.frame__url {
  flex: 1; max-width: 280px; margin: 0 auto; transform: translateX(-20px);
  height: 20px; line-height: 20px; border-radius: 6px;
  background: var(--bg); color: var(--muted);
  font-size: 0.6875rem; text-align: center;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 8px;
}
.frame__body { position: relative; aspect-ratio: 2.13 / 1; background: var(--bg); }
.frame__body img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
a.frame { transition: transform 0.35s cubic-bezier(.2,.7,.2,1); }
a.frame:hover { transform: translateY(-2px); }

.frame__placeholder {
  position: absolute; inset: 0; display: none; place-items: center;
  font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; color: var(--muted);
}
.frame__body.is-missing .frame__placeholder { display: grid; }

.frame--type { box-shadow: none; }
.frame--type .frame__body { display: grid; place-items: center; background: var(--bg); }
.type-panel {
  font-size: clamp(2.5rem, 2rem + 3vw, 4rem); font-weight: 700;
  letter-spacing: -0.04em; color: var(--text);
}
.type-panel span { color: var(--accent); }

/* Lab */
.lab {
  margin-top: 28px; padding: 18px 0 0;
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-small); color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 4px 16px;
}
.lab__label { font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; padding-top: 2px; }
.lab p:last-child { flex: 1; min-width: 240px; }
.lab strong { color: var(--text); font-weight: 500; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 16px; counter-reset: none; }
.step {
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 28px;
}
.step__num {
  display: block; font-size: var(--fs-small); font-weight: 600;
  color: var(--accent); letter-spacing: 0.04em; margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}
.step__title { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.step p { color: var(--muted); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.after { margin-top: 28px; font-size: 1rem; }

/* ---------- Tools ---------- */
.tools { display: grid; gap: 28px; }
@media (min-width: 760px) { .tools { grid-template-columns: repeat(2, 1fr); gap: 36px 48px; } }
.tools__label {
  font-size: var(--fs-small); font-weight: 600; color: var(--muted);
  margin-bottom: 12px;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills li {
  padding: 7px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--hairline);
  font-size: 0.9375rem; font-weight: 500; line-height: 1.3;
}
.footnote { margin-top: 32px; font-size: var(--fs-small); color: var(--muted); }

/* ---------- Background strip ---------- */
.strip {
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  padding: 28px 0; display: grid; gap: 8px;
}
.strip__label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted);
}
.strip p { color: var(--muted); max-width: 820px; }
@media (min-width: 760px) {
  .strip { grid-template-columns: 180px 1fr; gap: 24px; align-items: baseline; }
}

/* ---------- Principles ---------- */
.principles li {
  padding: clamp(18px, 2.4vw, 26px) 0;
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-principle); line-height: 1.35; letter-spacing: -0.02em;
}
.principles li:last-child { border-bottom: 1px solid var(--hairline); }
.principles strong { font-weight: 600; }
.principles span { color: var(--muted); }

/* ---------- Contact ---------- */
.contact { text-align: center; padding-bottom: var(--space-section); }
.contact__wrap > * { max-width: var(--wrap-text); margin-left: auto; margin-right: auto; }
.contact__line { margin: 18px auto 32px; font-size: var(--fs-lead); color: var(--muted); }
.contact__links {
  margin-top: 32px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px;
}
.contact__links a { display: inline-block; padding: 10px 0; }
.contact .btn--lg { max-width: 100%; }

/* ---------- Websites ---------- */
.included { list-style: none; padding: 0; }
.offer { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.offer__note { color: var(--muted); font-size: var(--fs-small); }

.quote { margin-top: 32px; scroll-margin-top: 80px; padding: clamp(20px, 4vw, 32px); background: var(--card); border-radius: var(--radius); }
.quote__grid { display: grid; gap: 16px; margin-bottom: 24px; }
@media (min-width: 760px) { .quote__grid { grid-template-columns: repeat(2, 1fr); gap: 18px 20px; } .field--wide { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-small); font-weight: 500; }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--text); background: var(--bg);
  border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%;
}
.field select { height: 50px; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.quote__status { margin-top: 16px; font-weight: 500; }
.quote__status.is-error { color: #B42318; }
.addr { font-size: var(--fs-small); color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.addr__text { color: var(--text); }
.hero__addr { margin-top: 16px; }
.quote__addr { margin-top: 20px; }
.copy {
  font: inherit; font-size: 0.8125rem; font-weight: 500; color: var(--accent); background: transparent; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 12px; min-height: 32px;
}
.copy:hover { border-color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 40px; font-size: var(--fs-small); color: var(--muted); text-align: center;
}

/* ---------- Motion ---------- */
.js .reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
.nowrap { white-space: nowrap; }
