:root {
  color-scheme: light dark;
  --bg: #f2f3f1;
  --surface: #e7e9e7;
  --card: #ffffff;
  --ink: #101317;
  --muted: #555c63;
  --line: #c9cdca;
  --accent: #f05d3d;
  --nav-bg: rgb(242 243 241 / 0.88);
  --button-text: #f7f7f3;
  --shadow: rgb(16 19 23 / 0.12);
  --shell: min(1280px, calc(100% - 56px));
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --surface: #171b20;
    --card: #1d2228;
    --ink: #f1f2ee;
    --muted: #b3bac1;
    --line: #353a40;
    --accent: #ff7355;
    --nav-bg: rgb(16 19 23 / 0.88);
    --button-text: #101317;
    --shadow: rgb(0 0 0 / 0.4);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 50; top: 10px; left: 10px; transform: translateY(-160%); background: var(--ink); color: var(--bg); padding: 10px 14px; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
.shell { width: var(--shell); margin-inline: auto; }
.section { padding-block: clamp(96px, 11vw, 168px); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
p { color: var(--muted); text-wrap: pretty; }
.eyebrow { margin-bottom: 24px; color: var(--ink); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--accent); vertical-align: 1px; }

/* Header */
.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nav { display: grid; min-height: 72px; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { display: inline-flex; width: max-content; align-items: center; gap: 10px; font-size: 1.08rem; font-weight: 700; letter-spacing: -0.035em; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }
.nav > .button { justify-self: end; }

/* Buttons and links */
.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--button-text);
  padding: 13px 24px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.button:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--accent); color: #101317; }
.button:active { transform: translateY(1px) scale(0.98); }
.button-small { min-height: 40px; padding: 10px 17px; font-size: 0.8rem; }
.text-link { font-size: 0.92rem; font-weight: 700; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--accent); }

/* Hero */
.hero {
  display: grid;
  min-height: calc(100dvh - 72px);
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(56px, 7vw, 96px);
}
.hero h1 { margin-bottom: 30px; font-size: clamp(3.8rem, 6.2vw, 6.6rem); font-weight: 600; letter-spacing: -0.065em; line-height: 0.86; }
.hero-subhead { max-width: 500px; margin-bottom: 36px; font-size: clamp(1.05rem, 1.4vw, 1.22rem); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }


/* Hero work columns */
.hero-work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: min(680px, calc(100dvh - 140px));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}
.hero-col { overflow: hidden; }
.hero-track { display: grid; gap: 16px; animation: drift-up 48s linear infinite; }
.hero-col-2 .hero-track { animation-name: drift-down; animation-duration: 56s; animation-delay: -9s; }
.hero-work:hover .hero-track { animation-play-state: paused; }
.hero-track .browser-tall img { aspect-ratio: 3 / 4; }
.launched { margin: 34px 0 0; font-size: 0.86rem; }
.launched a { color: var(--ink); font-weight: 600; text-underline-offset: 4px; }
.launched a:hover { color: var(--accent); }
@keyframes drift-up { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 8px)); } }
@keyframes drift-down { from { transform: translateY(calc(-50% - 8px)); } to { transform: translateY(0); } }

/* Section headings */
.section-heading { max-width: 840px; margin-bottom: clamp(64px, 8vw, 112px); }
.section-heading h2, .quote-copy h2, .cta-copy h2, .work-teaser-head h2 {
  margin-bottom: 0;
  font-size: clamp(3.2rem, 6.4vw, 6.6rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.92;
}
.section-heading p { max-width: 540px; margin: 28px 0 0; font-size: 1.06rem; }

/* Services */
.service-list { border-top: 1px solid var(--ink); }
.service { display: grid; grid-template-columns: 80px 0.7fr 1.3fr; align-items: baseline; gap: 40px; border-bottom: 1px solid var(--line); padding-block: 34px; }
.service-num { color: var(--accent); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; }
.service h3 { margin: 0; font-size: clamp(1.8rem, 2.7vw, 2.8rem); font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.service p { max-width: 520px; margin: 0; font-size: 1.02rem; }

/* Process */
.process { background: var(--surface); }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; }
.process-step { min-height: 300px; border-top: 1px solid var(--ink); border-right: 1px solid var(--line); padding: 26px 28px 20px 0; }
.process-step:not(:first-child) { padding-left: 28px; }
.process-step:last-child { border-right: 0; }
.process-step > span { display: block; margin-bottom: 72px; color: var(--accent); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.process-step h3 { max-width: 240px; margin-bottom: 16px; font-size: clamp(1.5rem, 2vw, 2.1rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1.04; }
.process-step p { max-width: 250px; margin-bottom: 0; font-size: 0.95rem; }

/* Browser frame (homepage strip and Work page) */
.browser { display: block; overflow: hidden; border: 1px solid var(--line); background: var(--card); text-decoration: none; transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease; }
.browser:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: 0 24px 40px var(--shadow); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.browser-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser-bar span:first-child { background: var(--accent); }
.browser-bar em { flex: 1; margin-left: 10px; color: var(--muted); font-size: 0.74rem; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Show only the top of each screenshot. */
.browser img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }

/* Homepage work strip */
.work-teaser { border-top: 1px solid var(--line); }
.work-teaser-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(48px, 6vw, 80px); }
.work-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; }
.work-card-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 16px; }
.work-card-meta h3 { margin: 0; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.03em; }
.work-card-meta span { color: var(--muted); font-size: 0.8rem; text-align: right; }

/* Quote */
.quote-section { display: grid; grid-template-columns: 0.3fr 1.7fr; gap: clamp(40px, 8vw, 120px); border-top: 1px solid var(--line); }
.quote-rule { position: relative; min-height: 380px; border-left: 1px solid var(--line); }
.quote-rule::before { position: absolute; top: 0; left: -1px; width: 1px; height: 28%; background: var(--accent); content: ""; }
.quote-copy { max-width: 920px; }
.quote-copy h2 { margin-bottom: 30px; }
.quote-copy p { max-width: 600px; margin-bottom: 34px; font-size: 1.08rem; }

/* Final CTA */
.final-cta { position: relative; display: grid; min-height: 520px; grid-template-columns: 1fr; align-items: center; overflow: hidden; border-top: 1px solid var(--line); }
.cta-copy { position: relative; z-index: 2; }
.cta-copy h2 { margin-bottom: 26px; font-size: clamp(4.2rem, 8.4vw, 8.8rem); }
.cta-copy > p:not(.eyebrow) { max-width: 500px; margin-bottom: 32px; font-size: 1.08rem; }
.contact-email { display: block; width: max-content; margin-top: 20px; color: var(--muted); font-size: 0.9rem; font-weight: 600; text-underline-offset: 4px; }
.contact-email:hover { color: var(--accent); }
/* Work page */
.page-hero { padding-block: clamp(72px, 10vw, 140px) clamp(56px, 7vw, 96px); }
.page-hero h1 { margin-bottom: 26px; font-size: clamp(3.8rem, 8vw, 8rem); font-weight: 600; letter-spacing: -0.065em; line-height: 0.88; }
.projects { display: grid; gap: clamp(72px, 9vw, 128px); margin: 0 0 clamp(72px, 9vw, 128px); padding: 0; list-style: none; }
.project { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: clamp(28px, 5vw, 72px); border-top: 1px solid var(--ink); padding-top: clamp(28px, 4vw, 48px); }
.project:nth-child(even) .browser { order: 2; }
.project-num { display: block; margin-bottom: 20px; color: var(--accent); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; }
.project-info .eyebrow { margin-bottom: 12px; }
.project-info .eyebrow::before { display: none; }
.project-info h2 { margin-bottom: 0; font-size: clamp(2.4rem, 4.4vw, 4rem); font-weight: 500; letter-spacing: -0.055em; line-height: 0.95; }
.project-desc { max-width: 28em; margin: 18px 0 26px; font-size: 1.05rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 32px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.footer-inner p { margin: 0; font-size: 0.82rem; }
.footer-inner p:last-child { justify-self: end; }

/* Motion */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms cubic-bezier(.16, 1, .3, 1), transform 600ms cubic-bezier(.16, 1, .3, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-work { height: 420px; }
  .hero h1 { font-size: clamp(4rem, 9.5vw, 6.2rem); }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .process-step:nth-child(2) { border-right: 0; }
  .process-step:nth-child(3) { padding-left: 0; }
  .work-strip { grid-template-columns: 1fr 1fr; }
  .final-cta { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) .browser { order: 0; }
}

@media (max-width: 700px) {
  :root { --shell: calc(100% - 32px); }
  .section { padding-block: 84px; }
  .nav { min-height: 64px; grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-block: 40px 64px; }
    .hero h1 { font-size: clamp(2.8rem, 12.5vw, 3.6rem); line-height: 0.9; }
  .section-heading h2, .quote-copy h2, .work-teaser-head h2 { font-size: clamp(2.8rem, 12vw, 4rem); }
  .service { grid-template-columns: 1fr; gap: 10px; padding-block: 28px; }
  .process-grid { grid-template-columns: 1fr; }
  .process-step, .process-step:not(:first-child) { min-height: 0; border-right: 0; padding: 22px 0 40px; }
  .process-step > span { margin-bottom: 28px; }
  .process-step h3, .process-step p { max-width: 420px; }
  .work-strip { grid-template-columns: 1fr; }
  .quote-section { grid-template-columns: 20px 1fr; gap: 20px; }
  .quote-rule { min-height: 340px; }
  .final-cta { min-height: 0; }
  .cta-copy h2 { font-size: clamp(3.4rem, 16vw, 5rem); }
  .footer-inner { grid-template-columns: 1fr; gap: 8px; }
  .footer-inner p:last-child { justify-self: start; }
}

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