:root {
  /* ground: warm black, not blue-black */
  --ground:       #12100f;
  --surface:      #1a1817;
  --surface-sunk: #0d0c0b;

  /* ink */
  --ink:          #f5f2ee;
  --ink-body:     #c4bfb8;
  --ink-muted:    #8a847c;

  /* structure */
  --rule:         #2a2725;
  --rule-strong:  #3d3936;

  /* accent: ONE color, three jobs. Sampled from the Family Quest app icon. */
  --accent:       #de5020;  /* wordmark glyph, hover/underline (4.77:1 on --ground) */
  --accent-ink:   #ef8a55;  /* lighter variant, accent-as-text (7.6:1 on --ground) */
  --focus:        #6aa8f5;  /* focus rings only, never decorative */

  /* type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.25rem;
  --step-2:  1.375rem;
  --step-3:  clamp(1.75rem, 1.4rem + 1.5vw, 2rem);
  --step-4:  clamp(2.75rem, 1.6rem + 5vw, 4.5rem);
  --eyebrow: 0.75rem;

  /* space: one base unit, everything a multiple */
  --s-1: 0.25rem;  --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;     --s-10: 8rem;   --s-11: 10rem;

  --container: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius-sm: 6px; --radius: 12px; --radius-lg: 20px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word; /* long tokens (emails, urls) never force overflow on narrow screens */
  -webkit-tap-highlight-color: rgba(222, 80, 32, 0.18);
}

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

/* nicer wrapping: headings stay balanced, body avoids orphans */
h1, h2, h3, .display { text-wrap: balance; }
p { text-wrap: pretty; }

/* ------------------------------------------------------------------ *\
   Type roles
\* ------------------------------------------------------------------ */
.display {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* h3 is 22px, below the 24px Fraunces floor, so it stays in Inter. */
h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.30;
  color: var(--ink);
}

.lead {
  font-size: var(--step-1);
  font-weight: 400;
  line-height: 1.50;
  color: var(--ink-body);
}

.caption {
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--ink-muted);
}

.eyebrow {
  margin: 0;
  font-size: var(--eyebrow);
  font-weight: 600;
  line-height: 1.20;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ------------------------------------------------------------------ *\
   Links, accent, focus
\* ------------------------------------------------------------------ */
a { color: var(--accent-ink); }

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -4rem;
  z-index: 20;
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule-strong);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--s-4); }

/* ------------------------------------------------------------------ *\
   Layout primitives
\* ------------------------------------------------------------------ */
.container {
  width: min(100% - (2 * var(--gutter)), var(--container));
  margin-inline: auto;
}

main > section { padding-block: var(--s-10); }

@media (max-width: 768px) {
  main > section { padding-block: var(--s-8); }
}

/* ------------------------------------------------------------------ *\
   Header
\* ------------------------------------------------------------------ */
.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding-block: var(--s-4);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark__glyph {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* accent job #1: the wordmark glyph */
.wordmark__glyph svg { width: 20px; height: 20px; fill: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-6);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-muted);
  font-size: var(--step-0);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ *\
   1. Hero
\* ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--s-11) var(--s-10);
}

@media (max-width: 768px) {
  .hero { padding-block: var(--s-9) var(--s-8); }
}

/* signature element: the slow ambient starfield */
.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  /* a faint warmth low in the frame, no hard gradient band */
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 55%, transparent 100%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 55%, transparent 100%);
}

.hero__inner { position: relative; z-index: 1; }

.hero .display { max-width: 20ch; }

.hero__lead {
  margin: var(--s-6) 0 0;
  max-width: 60ch;
}

.hero__cta { margin: var(--s-7) 0 0; }

/* accent job #2: the primary link */
.link-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.link-primary__arrow {
  transition: transform 0.2s ease;
}
.link-primary:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-primary:hover .link-primary__arrow { transform: translateX(3px); }

/* ------------------------------------------------------------------ *\
   2. The promise (full-width band)
\* ------------------------------------------------------------------ */
.promise {
  background: var(--surface-sunk);
  border-block: 1px solid var(--rule);
}

.promise__title {
  max-width: 22ch;
  margin-bottom: var(--s-8);
}

.promise__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-7);
}

.commitment__head {
  margin-bottom: var(--s-3);
}

.commitment__body {
  margin: 0;
  max-width: 34ch;
  color: var(--ink-body);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .promise__grid {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }
  .promise__title { margin-bottom: var(--s-6); }
}

/* ------------------------------------------------------------------ *\
   3. The line-up (a quiet index)
\* ------------------------------------------------------------------ */
.lineup__list {
  margin: var(--s-6) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.lineup__row { border-bottom: 1px solid var(--rule); }

.lineup__link {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr auto;
  align-items: baseline;
  gap: var(--s-5);
  padding-block: var(--s-5);
  color: inherit;
  text-decoration: none;
}
.lineup__link:hover .lineup__name { color: var(--accent-ink); }
.lineup__link:hover .lineup__desc { color: var(--ink); }

.lineup__name {
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--ink);
  transition: color 0.15s ease;
}

.lineup__desc {
  color: var(--ink-body);
  transition: color 0.15s ease;
}

.lineup__status {
  font-size: var(--step--1);
  color: var(--ink-muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .lineup__link {
    grid-template-columns: 1fr;
    gap: var(--s-2);
    padding-block: var(--s-5);
  }
  .lineup__status { margin-top: var(--s-1); }
}

/* ------------------------------------------------------------------ *\
   4. Who built this
\* ------------------------------------------------------------------ */
.builder__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  max-width: 68ch;
}

/* photo-ready: when the portrait figure is uncommented, this two-column
   layout takes over. Text-only ships until a real photo exists. */
.builder__inner:has(.builder__portrait) {
  grid-template-columns: 240px 1fr;
  align-items: start;
  max-width: none;
}

.builder__portrait {
  margin: 0;
  width: 240px;
}
.builder__portrait img {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule-strong);
}

.builder__lead { margin: var(--s-4) 0 0; }

.builder__body {
  margin: var(--s-5) 0 0;
  max-width: 68ch;
  color: var(--ink-body);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .builder__inner:has(.builder__portrait) {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------ *\
   5. Footer
\* ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--s-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--s-7);
}

.footer-brand__line {
  margin: var(--s-4) 0 0;
  max-width: 34ch;
  color: var(--ink-muted);
  font-size: var(--step--1);
  line-height: 1.6;
}

.footer-col h2 {
  margin: 0 0 var(--s-4);
  font-family: var(--font-body);
  font-size: var(--eyebrow);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li + li { margin-top: var(--s-3); }

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ink-body);
  font-size: var(--step--1);
  text-decoration: none;
}
.footer-col a:hover { color: var(--accent-ink); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: var(--step--1);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-6);
  }
  .footer-brand { grid-column: 1 / -1; }
}

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

/* ------------------------------------------------------------------ *\
   Apps tab: index + per-product pages
\* ------------------------------------------------------------------ */
.page-lead {
  max-width: 60ch;
  margin: var(--s-5) 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  color: var(--ink-muted);
  font-size: var(--step--1);
  text-decoration: none;
}
.back-link:hover { color: var(--ink); }

.status {
  display: inline-block;
  margin: 0 0 var(--s-4);
  font-size: var(--eyebrow);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.status--live { color: var(--ink); }

.app-detail__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
  align-items: start;
}
.app-detail__inner--shot {
  grid-template-columns: 1.1fr 0.9fr;
}

.app-detail__body {
  margin: var(--s-5) 0 0;
  max-width: 60ch;
  color: var(--ink-body);
}

.app-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-5);
  margin: var(--s-7) 0 0;
}

.app-detail__note {
  margin: var(--s-3) 0 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
  max-width: 52ch;
}

.app-shot {
  margin: 0;
  justify-self: center;
  width: min(300px, 100%);
}
.app-shot img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule-strong);
  background: var(--surface);
}

@media (max-width: 768px) {
  .app-detail__inner--shot { grid-template-columns: 1fr; }
  /* copy first, screenshot after: readers learn what it is before scrolling a tall image */
  .app-shot { width: min(240px, 72%); justify-self: start; }
}

/* ------------------------------------------------------------------ *\
   Touch: guarantee 44px targets on coarse pointers
\* ------------------------------------------------------------------ */
@media (pointer: coarse) {
  .footer-col a { min-height: 44px; }
  .footer-col li + li { margin-top: var(--s-1); }
}

/* ------------------------------------------------------------------ *\
   Reduced motion: kill the starfield and every transition
\* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .starfield { display: none; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
