:root {
  --paper: oklch(98.2% 0.006 40);
  --paper-2: oklch(95.5% 0.01 35);
  --ink: oklch(27% 0.018 250);
  --ink-soft: oklch(45% 0.015 250);
  --line: oklch(88% 0.012 35);
  --crimson: oklch(50% 0.165 24);
  --crimson-deep: oklch(42% 0.15 24);
  --night: oklch(22% 0.02 250);
  --night-ink: oklch(95% 0.008 40);
  --night-soft: oklch(76% 0.015 250);

  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, sans-serif;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
}
.brand img { display: block; width: clamp(7.5rem, 16vw, 9.5rem); height: auto; }
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.site-header nav a {
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.site-header nav a:hover { color: var(--crimson); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: end;
  padding-block: clamp(3rem, 10vw, 7.5rem) clamp(3.5rem, 9vw, 6.5rem);
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--crimson);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before { content: ""; width: 2rem; height: 2px; background: currentColor; }

.hero h1 { font-size: clamp(2.75rem, 7.2vw, 5.5rem); max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--crimson); }

.lede {
  margin: 1.75rem 0 2.25rem;
  max-width: 36rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--ink-soft);
}

.actions, .stores { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

/* App index: the hero's right column, doubles as in-page navigation */
.index { border-top: 2px solid var(--ink); }
.index-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.875rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.index-title span { color: var(--crimson); }
.index ol { list-style: none; margin: 0; padding: 0; }
.index li { border-top: 1px solid var(--line); }
.index a {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.9rem 0;
  text-decoration: none;
  transition: color 0.2s var(--ease), padding 0.3s var(--ease);
}
.index .n { font-size: 0.8125rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.index .t { font-family: var(--display); font-weight: 500; font-size: 1.125rem; letter-spacing: -0.01em; }
.index .d { font-size: 0.875rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.index a:hover { color: var(--crimson); padding-left: 0.375rem; }
.index a:hover .d { color: var(--crimson); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0 1.35rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn svg { width: 1.05rem; height: 1.05rem; fill: currentColor; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--crimson); border-color: var(--crimson); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--crimson); color: var(--crimson); }

.link {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1.5px;
  margin-left: 0.25rem;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
.link:hover { color: var(--crimson); text-decoration-color: currentColor; }

/* ---------- Apps ---------- */

.apps { padding-block: clamp(2rem, 6vw, 4rem) clamp(4rem, 10vw, 8rem); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.section-head p { margin: 0; color: var(--ink-soft); }

.app {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.75rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
}
.app:last-child { border-bottom: 0; padding-bottom: 0; }
.app:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.app:nth-of-type(even) .app-copy { order: 2; }

.app-num {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--crimson);
  font-variant-numeric: tabular-nums;
}
.app h3 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }

.downloads {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.downloads strong {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--crimson);
}
.downloads span {
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
}

.desc { margin: 1rem 0 1.75rem; max-width: 32rem; }

.app-shot { margin: 0; }
.app-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  outline: 1px solid oklch(27% 0.018 250 / 0.08);
  outline-offset: -1px;
  transition: transform 0.6s var(--ease);
}
.app:hover .app-shot img { transform: translateY(-4px); }

/* ---------- Contact ---------- */

.contact {
  background: var(--night);
  color: var(--night-ink);
  padding-block: clamp(4rem, 10vw, 7.5rem);
}
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}
.contact h2 { font-size: clamp(2.25rem, 5.5vw, 4rem); max-width: 14ch; }
.contact p { margin: 1.5rem 0 0; max-width: 34rem; color: var(--night-soft); }

.contact-links { display: grid; gap: 1.5rem; }
.mail {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  text-decoration: none;
  padding-bottom: 0.9rem;
  border-bottom: 1.5px solid oklch(95% 0.008 40 / 0.25);
  overflow-wrap: anywhere;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.mail svg { width: 1.4rem; height: 1.4rem; fill: currentColor; flex: none; }
.mail:hover { color: oklch(72% 0.13 24); border-color: currentColor; }

.social { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin: 0; padding: 0; }
.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--night-soft);
  transition: color 0.2s var(--ease);
}
.social a:hover { color: var(--night-ink); }
.social svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem 2.25rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--crimson); }

/* ---------- Load-in ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .index {
    animation: rise 0.9s var(--ease) both;
  }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
  .index { animation-delay: 0.28s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

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

/* ---------- Responsive ---------- */

@media (max-width: 56rem) {
  .hero, .contact-inner { grid-template-columns: 1fr; align-items: start; }
  .app, .app:nth-of-type(even) { grid-template-columns: 1fr; }
  .app:nth-of-type(even) .app-copy { order: 0; }
}

@media (max-width: 30rem) {
  .site-header nav a:first-child { display: none; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
}
