/* Self-hosted fonts (SIL Open Font License, see assets/fonts/LICENSE-OFL.txt) */
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --orange: #E8590C;
  --orange-alt: #F0712E;
  --ink: #161514;
  --ink-soft: #3d1904;
  --ink-muted: #5a2607;
  --paper: #F7F5F0;
  --line: rgba(22, 21, 20, 0.22);
  --live: #14532d;
  --max: 1600px;
  --gutter: clamp(24px, 6vw, 72px);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--orange);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.num, .eyebrow, .index-head, .count, .stack, .status, .meta { font-family: var(--mono); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; padding-bottom: 28px; gap: 16px;
}
.brand { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.nav { display: flex; gap: 36px; font-size: 14px; color: var(--ink-soft); }

/* Hero */
.hero { padding-top: 112px; padding-bottom: 96px; display: flex; flex-direction: column; }
.hero .eyebrow { margin-bottom: 44px; }
.hero-row {
  margin-top: 72px;
  display: grid; grid-template-columns: 1fr; gap: 56px; align-items: start;
}
@media (min-width: 1000px) {
  .hero-row { grid-template-columns: 1fr 1fr; gap: 72px; }
  /* First line of the lead sits level with the index heading on the right */
  .hero-row .hero-main { padding-top: 11px; }
}
.hero-main { display: flex; flex-direction: column; gap: 36px; }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.hero h1 {
  margin: 0; max-width: 11.5em;
  font-size: clamp(38px, 6.5vw, 104px); line-height: 0.95;
  letter-spacing: -0.045em; font-weight: 600; text-wrap: balance;
}
.lead { margin: 0; font-size: 19px; line-height: 1.6; color: var(--ink-soft); max-width: 560px; text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block; padding: 16px 26px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px; line-height: 1.2;
}
.btn:hover { color: var(--paper); opacity: 0.88; }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); font-weight: 500; }
.btn-outline:hover { color: #fff; border-color: #fff; opacity: 1; }
.btn-accent { background: var(--orange); color: var(--ink); padding: 18px 30px; font-size: 16px; }
.btn-accent:hover { color: var(--ink); }

/* Project index */
.index { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.index-head { font-size: 12px; color: var(--ink-muted); letter-spacing: 0.1em; text-transform: uppercase; padding: 16px 0; }
.index-row {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--line); font-size: 16px;
}
.index-row .num { font-size: 13px; color: var(--ink-muted); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; display: inline-block; }
.dot.live { background: var(--live); }

/* Services */
.services {
  padding-bottom: 112px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.services::before { content: ""; grid-column: 1 / -1; border-top: 1px solid var(--line); }
.service { padding: 32px 28px 0 0; display: flex; flex-direction: column; gap: 14px; }
.service .num { font-size: 12px; }
.service h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.service p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }

/* Projects */
.projects-head { padding-bottom: 48px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.projects-head h2 { margin: 0; font-size: clamp(40px, 5vw, 56px); letter-spacing: -0.04em; font-weight: 600; line-height: 1.05; }
.count { font-size: 13px; color: var(--ink-muted); }

.project { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 40px; scroll-margin-top: 0; }
.project:first-of-type { padding-top: 24px; }
/* Every second project sits on a slightly lighter full-width band, so each
   screenshot clearly belongs to the text below it */
.project:nth-of-type(even) {
  background: var(--orange-alt);
  box-shadow: 0 0 0 100vmax var(--orange-alt);
  clip-path: inset(0 -100vmax);
}
.project-shots { display: flex; flex-direction: column; gap: 28px; }
.project-info {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: clamp(24px, 5vw, 72px);
}
.project-text { display: flex; flex-direction: column; gap: 18px; }
.meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink-soft); align-items: center; }
.meta .num { color: var(--ink); }
.project h3 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; }
.project-text p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }
.project-features { display: flex; flex-direction: column; gap: 24px; padding-top: 36px; }
.project-features ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 24px; }
.project-features li {
  display: grid; grid-template-columns: 20px 1fr; font-size: 15px; line-height: 1.5;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.project-features li::before { content: "—"; }
.stack { margin: 0; font-size: 13px; color: var(--ink-muted); line-height: 1.7; }
.demo-link { align-self: flex-start; }

/* Screenshot slider: horizontal slides, each slide scrolls vertically */
.shots {
  border-radius: 8px; overflow: hidden; background: var(--paper);
  box-shadow: 0 24px 60px rgba(90, 25, 0, 0.35);
}
.shots .track {
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.shots .track::-webkit-scrollbar { display: none; }
.shots .frame {
  position: relative; margin: 0;
  flex: 0 0 100%; scroll-snap-align: start;
  aspect-ratio: 16 / 10; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(22, 21, 20, 0.3) transparent;
}
.shots .frame img { display: block; width: 100%; height: auto; }
.scroll-hint {
  position: sticky; bottom: 14px; display: block; width: max-content;
  margin: -38px 14px 14px auto;
  padding: 6px 12px; border-radius: 999px;
  font: 500 12px/1.4 var(--mono); color: var(--paper); background: rgba(22, 21, 20, 0.8);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.frame.is-tall:not(.was-scrolled) .scroll-hint { opacity: 1; }

.shots-nav { display: flex; align-items: center; gap: 12px; font: 13px/1 var(--mono); color: var(--ink-soft); }
.shots-nav button { cursor: pointer; font: inherit; color: var(--ink); }
.shots-nav .prev, .shots-nav .next {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--ink); background: transparent;
  font: 20px/1 var(--font); padding: 0 0 3px;
}
.shots-nav .prev:hover, .shots-nav .next:hover { background: var(--ink); color: var(--paper); }
.shots-nav .dots { display: flex; gap: 6px; }
.shots-nav .dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(22, 21, 20, 0.3); }
.shots-nav .dots button.active { background: var(--ink); }

/* Contact */
.contact { background: var(--ink); color: var(--paper); }
.contact-inner { padding-top: 96px; padding-bottom: 96px; }
.contact h2 { margin: 0 0 56px; font-size: clamp(44px, 6vw, 72px); line-height: 1; letter-spacing: -0.045em; font-weight: 600; max-width: 760px; }
.contact a:not(.btn):hover { color: var(--orange); }
.contact-grid {
  display: grid; grid-template-columns: 1fr; gap: 56px;
  padding-top: 40px; border-top: 1px solid rgba(247, 245, 240, 0.18);
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); gap: 96px; }
}
.contact-details { margin: 0; display: grid; gap: 28px; align-content: start; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 22px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font: 12px/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(247, 245, 240, 0.55); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 8px;
  border: 1px solid rgba(247, 245, 240, 0.22); background: rgba(247, 245, 240, 0.05);
  color: var(--paper); font: 16px/1.5 var(--font);
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); background: rgba(247, 245, 240, 0.08); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.5; color: rgba(247, 245, 240, 0.75); }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--orange); }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form-actions .btn { border: 0; cursor: pointer; font-family: var(--font); }
.form-actions .btn:disabled { opacity: 0.6; cursor: wait; }
.form-status { margin: 0; font-size: 15px; }
.form-status.is-ok { color: var(--paper); }
.form-status.is-error { color: #ff9a62; }
.contact-details dt { font: 12px/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(247, 245, 240, 0.55); margin-bottom: 6px; }
.contact-details dd { margin: 0; font-size: 16px; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(247, 245, 240, 0.6); font-size: 14px; border-top: 1px solid rgba(247, 245, 240, 0.12); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.site-footer a:hover { color: var(--orange); }

/* Legal pages and 404 */
.legal { padding: 72px 0 112px; }
.legal .wrap { max-width: 860px; }
.legal h1 { margin: 0 0 40px; font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: -0.04em; font-weight: 600; }
.legal h2 { margin: 40px 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.hero.not-found { display: block; }
.hero.not-found .lead { margin: 24px 0 36px; }

@media (max-width: 640px) {
  .nav { gap: 20px; }
  .nav a.hide-sm { display: none; }
  .hero { padding-top: 64px; padding-bottom: 64px; gap: 48px; }
  .services { padding-bottom: 72px; }
  .project { padding-top: 64px; padding-bottom: 64px; }
  .index-row { grid-template-columns: 28px 1fr; }
  .index-row .status { grid-column: 2; }
  .shots .frame { aspect-ratio: 4 / 5; }
}
