/* ---------- Tokens ---------- */
:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --paper: #ffffff;
  --mist: #f5f5f7;
  --night: #000000;
  --night-2: #a1a1a6;
  --accent: #3b3ef0;
  --accent-hover: #2b2ed6;
  --accent-on-dark: #8f92ff;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
  --max: 1120px;
  --section-y: clamp(96px, 14vw, 180px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --radius-lg: 28px;
  --nav-h: 52px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  border-radius: 999px;
  font: inherit; font-size: 17px; font-weight: 500; letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.97); }
.btn--lg { min-height: 56px; padding: 0 34px; font-size: 19px; }

.link {
  color: var(--accent); font-weight: 500; text-decoration: none; white-space: nowrap;
  padding: 10px 0; /* comfortable tap target */
}
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease);
}
.nav.is-scrolled { border-bottom-color: rgba(0, 0, 0, .08); }
.nav.is-dark { background: rgba(0, 0, 0, .72); color: #f5f5f7; border-bottom-color: rgba(255, 255, 255, .08); }
.nav__inner {
  height: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { font-size: 17px; font-weight: 700; letter-spacing: 0.01em; text-decoration: none; }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav__links a { text-decoration: none; opacity: .85; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
.nav__cta { color: var(--accent); opacity: 1 !important; font-weight: 500; }
.nav.is-dark .nav__cta { color: var(--accent-on-dark); }
@media (max-width: 699px) { .nav__hide-sm { display: none; } }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 64px) 0 96px;
  text-align: center;
}
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__title {
  max-width: 13ch;
  font-size: clamp(44px, 9vw, 112px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero__lede {
  max-width: 34ch;
  margin-top: clamp(20px, 3vw, 32px);
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  text-wrap: balance;
}
.hero .btn { margin-top: clamp(32px, 4vw, 44px); }

/* ---------- Shared section ---------- */
.section { padding: var(--section-y) 0; }
.section__head { max-width: 640px; margin-bottom: clamp(48px, 7vw, 80px); }
.section__title {
  font-size: clamp(40px, 6.4vw, 80px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.section__lede {
  margin-top: 16px;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 36ch;
  letter-spacing: -0.01em;
}
.kicker { font-size: 17px; font-weight: 600; color: var(--accent-on-dark); margin-bottom: 8px; letter-spacing: -0.01em; }

/* ---------- Reddle (dark, sticky) ---------- */
.reddle { background: var(--night); color: #f5f5f7; }
.reddle__track { height: 220vh; }
.reddle__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  padding: calc(var(--nav-h) + clamp(24px, 5vh, 56px)) 0 clamp(36px, 6vh, 64px);
  overflow: hidden;
}
.reddle__copy { text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 2; }
.reddle__title { font-size: clamp(52px, 9vw, 112px); line-height: 1; font-weight: 700; letter-spacing: -0.05em; }
.reddle__lede {
  max-width: 36ch; margin-top: 14px;
  font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; color: var(--night-2);
  text-wrap: balance;
}
.reddle .btn { margin-top: 24px; }

/* Device stage: sized by its own height so the devices always fit the screen */
.stage {
  flex: 1 1 auto; min-height: 0;
  width: 100%;
  margin-top: clamp(24px, 4vh, 48px);
  padding: 0 var(--gutter);
  container-type: size;
  display: flex; justify-content: center; align-items: center;
}
.devices {
  --p: 1;
  position: relative;
  /* laptop + phone overhang is ~0.8x its width tall */
  width: min(100%, 900px, 118cqh);
}
.laptop {
  transform: translate3d(0, calc((1 - var(--p)) * 14vh), 0) scale(calc(.86 + var(--p) * .14));
  opacity: calc(.2 + var(--p) * .8);
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}
.laptop__lid {
  background: #1a1a1c;
  border-radius: clamp(10px, 1.8vw, 20px) clamp(10px, 1.8vw, 20px) 4px 4px;
  padding: clamp(6px, 1.2vw, 14px) clamp(6px, 1.2vw, 14px) clamp(8px, 1.4vw, 16px);
  box-shadow: 0 0 0 1px #3a3a3c inset, 0 40px 80px -20px rgba(0, 0, 0, .6);
}
.laptop__screen { border-radius: 4px; overflow: hidden; aspect-ratio: 16 / 10; background: #201a16; }
.laptop__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.laptop__base {
  position: relative;
  height: clamp(8px, 1.3vw, 16px);
  margin: 0 -7%;
  background: linear-gradient(#d9d9de, #a9a9ae 55%, #6e6e73);
  border-radius: 2px 2px 14px 14px / 2px 2px 60% 60%;
}
.laptop__base::before { /* thumb notch */
  content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 14%; height: 40%; background: #8e8e93; border-radius: 0 0 8px 8px;
}

.phone {
  position: absolute;
  right: -4%;
  bottom: -14%;
  width: clamp(88px, 24%, 220px);
  transform: translate3d(calc((1 - var(--p)) * 60%), calc((1 - var(--p)) * 22vh), 0);
  opacity: var(--p);
  will-change: transform, opacity;
  z-index: 3;
}
.phone__body {
  position: relative;
  background: #1a1a1c;
  border-radius: 18% / 8.4%;
  padding: 4.5%;
  box-shadow: 0 0 0 1px #3a3a3c inset, 0 0 0 2px #2c2c2e, -24px 40px 80px -10px rgba(0, 0, 0, .75);
}
.phone__screen { border-radius: 14% / 6.6%; overflow: hidden; aspect-ratio: 390 / 844; background: #201a16; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone__island {
  position: absolute; top: 4.2%; left: 50%; transform: translateX(-50%);
  width: 30%; height: 2.6%; border-radius: 999px; background: #000;
}

/* Phones: bigger phone, laptop nudged left so the pair reads as one group */
@media (max-width: 699px) {
  .stage { padding-bottom: 6%; }
  .devices { width: min(84%, 112cqh); margin-right: 12%; }
  .phone { width: 36%; right: -16%; bottom: -22%; }
}

/* Wide screens: copy on the left, devices on the right */
@media (min-width: 1000px) {
  .reddle__sticky {
    flex-direction: row; align-items: center;
    max-width: calc(1280px + var(--gutter) * 2); margin: 0 auto;
    padding: var(--nav-h) var(--gutter) 0;
    gap: clamp(32px, 4vw, 72px);
  }
  .reddle__copy { flex: 0 0 340px; padding: 0; text-align: left; align-items: flex-start; }
  .reddle__lede { text-wrap: pretty; }
  .stage { height: min(78vh, 720px); margin: 0; padding: 0 4% 0 0; flex: 1 1 auto; }
  .devices { width: min(100%, 118cqh); }
}

/* ---------- Concepts ---------- */
.concepts__grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.concept {
  background: var(--mist);
  border-radius: var(--radius-lg);
  padding: 14px 14px 0;
  display: flex; flex-direction: column;
}
.concept__shot {
  display: block; overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: #e8e8ed;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 12px 28px -12px rgba(0, 0, 0, .18);
}
.concept__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.concept:hover .concept__shot img { transform: scale(1.03); }
.concept__meta {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 22px 10px 22px;
}
.concept__name { font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.concept__type { margin-top: 2px; color: var(--ink-2); font-size: 15px; }

@media (min-width: 700px) { .concepts__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .concepts__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Other work ---------- */
.other { padding-top: 0; }
.other__grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .other__grid { grid-template-columns: repeat(2, 1fr); } }
.placeholder { border-radius: var(--radius-lg); background: var(--mist); padding: 14px 14px 28px; }
.placeholder__frame {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1.5px dashed #d2d2d7;
  display: grid; place-items: center;
  color: #aeaeb2;
  margin-bottom: 22px;
}
.placeholder__title { padding: 0 10px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.placeholder__text { padding: 2px 10px 0; color: var(--ink-2); font-size: 15px; }

/* ---------- How it works ---------- */
.process { background: var(--mist); }
.steps { display: grid; gap: 48px; grid-template-columns: 1fr; counter-reset: none; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.step { max-width: 34ch; }
.step__num {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 19px; font-weight: 600;
  margin-bottom: 22px;
}
.step__title { font-size: clamp(24px, 2.6vw, 28px); line-height: 1.15; font-weight: 700; letter-spacing: -0.03em; }
.step__text { margin-top: 10px; color: var(--ink-2); }

/* ---------- Contact ---------- */
.contact {
  background: var(--night); color: #f5f5f7;
  padding: clamp(120px, 18vw, 220px) 0;
  text-align: center;
}
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact__title {
  max-width: 14ch;
  font-size: clamp(44px, 8vw, 96px); line-height: 1.03; font-weight: 700; letter-spacing: -0.045em;
  text-wrap: balance;
}
.contact__lede { margin-top: 24px; max-width: 34ch; font-size: clamp(19px, 2vw, 22px); color: var(--night-2); text-wrap: balance; }
.contact__addr { color: var(--night-2); text-decoration: none; font-size: 17px; padding: 6px 0; transition: color .2s; }

/* Contact form */
.form {
  width: 100%; max-width: 600px;
  margin-top: clamp(40px, 6vw, 56px);
  display: flex; flex-direction: column; gap: 18px;
  text-align: left;
}
.form__row { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 15px; font-weight: 500; color: #f5f5f7; }
.field__opt { color: #86868b; font-weight: 400; }
.field__input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font: inherit; font-size: 17px; /* 17px keeps iOS from zooming in on focus */
  color: #f5f5f7;
  background: #1d1d1f;
  border: 1px solid #424245;
  border-radius: 14px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field__input::placeholder { color: #6e6e73; }
.field__input:hover { border-color: #6e6e73; }
.field__input:focus { outline: none; border-color: var(--accent-on-dark); background: #232326; }
.field__input:focus-visible { outline: none; }
.field__input--area { min-height: 140px; resize: vertical; line-height: 1.45; }
.field__input[aria-invalid="true"] { border-color: #ff6961; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__submit { margin-top: 10px; align-self: stretch; border: 0; cursor: pointer; }
@media (min-width: 600px) { .form__submit { align-self: flex-start; } }
.form__submit[disabled] { opacity: .6; cursor: progress; }
.form__status { min-height: 1.5em; font-size: 17px; color: var(--night-2); }
.form__status.is-ok { color: #f5f5f7; }
.form__status.is-error { color: #ff6961; }
.form.is-sent .field, .form.is-sent .form__row, .form.is-sent .form__submit { display: none; }
.form.is-sent .form__status { text-align: center; font-size: clamp(19px, 2vw, 22px); }
.contact__addr:hover { color: #fff; }
.contact :focus-visible { outline-color: var(--accent-on-dark); }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: #86868b; font-size: 13px; padding-bottom: env(safe-area-inset-bottom); }
.footer__inner { display: flex; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; border-top: 1px solid #1d1d1f; }

/* ---------- Motion ---------- */
/* Page-load: fade and rise, staggered with --d */
.js .load {
  opacity: 0; transform: translate3d(0, 28px, 0);
  animation: rise 1.1s var(--ease) forwards;
  animation-delay: calc(.15s + var(--d, 0) * .14s);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* Scroll reveal: fade, gentle rise, slight scale */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 32px, 0) scale(.98);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * .1s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Short phones or landscape: drop the sticky stage, show devices in flow */
@media (max-height: 560px) {
  .reddle__track { height: auto; }
  .reddle__sticky { position: relative; height: auto; padding-bottom: 80px; }
  .stage { container-type: normal; height: auto; margin-top: 40px; }
  .devices { width: min(86%, 720px); margin-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .load, .js .reveal { opacity: 1; transform: none; animation: none; transition: none; }
  .laptop, .phone { transform: none !important; opacity: 1 !important; }
  .reddle__track { height: auto; }
  .reddle__sticky { position: relative; height: auto; min-height: 100svh; padding-bottom: clamp(100px, 14vw, 160px); }
  .concept__shot img, .btn { transition: none; }
}
