:root {
  --bg: #ffffff;
  --ink: #000000;
  --chrome: #000000;
  --mute: #8a8a8a;
  --body: #555555;
  --line: #e7e7e7;
  --soft: #f4f4f2;
  --gutter: 20px;
  --fs: 13px;
  color-scheme: light;
}

@media (min-width: 768px) {
  :root { --gutter: clamp(20px, 2.2vw, 32px); --fs: clamp(13px, 1vw, 14px); }
}

/* Case-study pages sit on warm paper, with quieter chrome. */
.is-case { --bg: #f1f0ec; --chrome: #6b6b6b; --soft: #e9e8e3; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--fs);
  font-weight: 400;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
img { display: block; max-width: 100%; height: auto; }

:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Chrome: corners, wordmark, edge fades ---------- */

/* Work scrolls up into soft fades at the top and bottom edges. */
body::before, body::after {
  content: "";
  position: fixed;
  z-index: 25;
  left: 0;
  right: 0;
  height: calc(var(--gutter) * 2 + 4.2em);
  pointer-events: none;
}
body::before { top: 0; background: linear-gradient(var(--bg) 35%, transparent); }
body::after { bottom: 0; background: linear-gradient(transparent, var(--bg) 65%); }

.corner {
  position: fixed;
  z-index: 30;
  display: flex;
  gap: 1.75em;
  align-items: center;
  padding: var(--gutter);
  color: var(--chrome);
}
p.corner { display: block; }
.corner.tl { top: 0; left: 0; }
.corner.tr { top: 0; right: 0; }
.corner.bl { bottom: 0; left: 0; }
.corner.br { bottom: 0; right: 0; }

.wordmark {
  position: fixed;
  z-index: 30;
  top: var(--gutter);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1.12;
  white-space: nowrap;
  color: var(--ink);
}
.is-case .wordmark { color: var(--chrome); }

.nav-link { position: relative; transition: opacity .2s; }
.corner:hover .nav-link:not(:hover) { opacity: .45; }
.nav-link.is-current::before,
.nav-link[aria-expanded="true"]::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -7px -10px;
  border: 1px solid #e4e4e4;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.panel-open .nav-link.is-current:not([aria-expanded="true"])::before { display: none; }

.menu-btn { display: none; width: 26px; height: 18px; position: relative; }
.menu-btn::before, .menu-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transition: transform .3s;
}
.menu-btn::before { top: 5px; }
.menu-btn::after { bottom: 5px; }
.menu-btn[aria-expanded="true"]::before { transform: translateY(3.5px) rotate(20deg); }
.menu-btn[aria-expanded="true"]::after { transform: translateY(-3.5px) rotate(-20deg); }

@media (max-width: 767px) {
  .corner.tl .nav-link, .corner.tr .nav-link { display: none; }
  .menu-btn { display: block; }
  .corner .wide { display: none; }
}

.blink {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.14em;
  background: currentColor;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Home: floating project plates ---------- */

.plates { padding: 14vh var(--gutter) 24vh; }

.plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 66vh;
  gap: 18px;
}

.plate a, .plate button { display: block; }

.plate-caption {
  display: flex;
  gap: 1.4em;
  color: var(--mute);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .35s, transform .35s;
}
.plate-caption b { color: var(--ink); font-weight: 400; }
.plate > .lede { font-size: clamp(22px, 2.4vw, 34px); }
.plate:hover .plate-caption, .plate:focus-within .plate-caption { opacity: 1; transform: none; }
@media (hover: none) { .plate-caption { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(28px) scale(.985); transition: opacity 1s cubic-bezier(.2,.7,.1,1), transform 1.2s cubic-bezier(.2,.7,.1,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* Browser frame */
.frame {
  width: min(46vw, 700px);
  border-radius: 10px;
  overflow: hidden;
  background: var(--soft);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 30px 70px -30px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.06);
  transition: transform .6s cubic-bezier(.2,.7,.1,1);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  background: #f1f1ef;
  border-bottom: 1px solid var(--line);
}
.frame-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d6d6d3; }
.frame-bar span { margin: 0 auto; transform: translateX(-14px); font-size: 10px; color: var(--mute); }
.plate a:hover .frame, .plate a:hover .phone, .plate button:hover .frame { transform: translateY(-6px); }

/* Phone frame */
.phone {
  width: min(56vw, 215px);
  padding: 7px;
  border-radius: 36px;
  background: #111;
  box-shadow: 0 34px 70px -30px rgba(0,0,0,.45), inset 0 0 0 1px #333;
  transition: transform .6s cubic-bezier(.2,.7,.1,1);
}
.phone img { border-radius: 29px; }

/* "Your project" plate */
.empty-frame .frame-body {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: #fff;
  font-size: clamp(20px, 2.6vw, 38px);
  letter-spacing: -0.03em;
}

@media (max-width: 767px) {
  .plates { padding: 12vh var(--gutter) 20vh; }
  .plate { min-height: 54vh; }
  .frame { width: 86vw; border-radius: 7px; }
  .frame-bar { height: 16px; padding: 0 7px; gap: 4px; }
  .frame-bar i { width: 4px; height: 4px; }
  .frame-bar span { font-size: 7px; }
  .phone { width: 36vw; padding: 4px; border-radius: 22px; }
  .phone img { border-radius: 18px; }
}

/* ---------- Panels (About / Services / Contact / Menu) ---------- */

.panel {
  position: fixed;
  z-index: 20;
  inset: 0;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 34% 52% at 50% 46%, rgba(0,0,0,.075), transparent 72%),
    rgba(255,255,255,.97);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility 0s .35s;
}
.is-case .panel { background: radial-gradient(ellipse 34% 52% at 50% 46%, rgba(0,0,0,.06), transparent 72%), rgba(241,240,236,.97); }
.panel.is-open { opacity: 1; visibility: visible; transition: opacity .35s; }

.panel-inner {
  position: relative;
  max-width: calc(440px + var(--gutter) * 2);
  margin: 0 auto;
  padding: calc(var(--gutter) + 108px) var(--gutter) 18vh;
}
.panel-close {
  position: absolute;
  top: calc(var(--gutter) + 100px);
  right: calc(var(--gutter) * -3);
  width: 30px;
  height: 30px;
}
.panel-close::before, .panel-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 5px;
  right: 5px;
  height: 1px;
  background: var(--ink);
  transform: rotate(45deg);
}
.panel-close::after { transform: rotate(-45deg); }
@media (max-width: 767px) { .panel-close { display: none; } }
.panel-inner:focus { outline: 0; }

.lede {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 1.5em;
}
.lede + .label, .lede + .rows, .lede + .form { margin-top: 64px; }
.lede .mute { color: inherit; }

.label { font-weight: 500; margin-bottom: 14px; }

.rows { list-style: none; border-top: 1px solid var(--line); margin-bottom: 44px; }
.rows li {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.35;
}
.rows li > :last-child { color: var(--mute); }
.rows a { color: var(--ink); }
.rows a:hover { text-decoration: underline; text-underline-offset: 3px; }

.services li { grid-template-columns: 2.2em 1fr 1.6fr; }
.services .num { color: var(--mute); }
@media (max-width: 520px) {
  .services li { grid-template-columns: 2.2em 1fr; }
  .services li > :last-child { grid-column: 2; margin-top: -10px; }
}

.menu-list { list-style: none; display: grid; gap: 6px; margin-bottom: 44px; }
.menu-list a, .menu-list button {
  font-size: 34px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Form */
.form { display: grid; gap: 22px; margin-bottom: 44px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; border: 0; min-width: 0; }
.field > span { color: var(--mute); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  appearance: none;
  transition: border-color .2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label span {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.submit-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.submit-row > a:not(.btn) { color: var(--mute); }
.submit-row > a:not(.btn):hover { color: var(--ink); }
.btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  transition: opacity .2s;
}
.btn:hover { opacity: .8; }
.btn[disabled] { opacity: .4; cursor: default; }
.form-status { color: var(--mute); }
.form-status.is-error { color: #c0392b; }

@media (max-width: 520px) { .form .two { grid-template-columns: 1fr; } }

/* ---------- Case study ---------- */

.switcher {
  position: fixed;
  z-index: 30;
  top: calc(var(--gutter) - 10px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}
.switcher-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.7);
  color: #9a9a9a;
  font-size: 14px;
  line-height: 1;
}
.switcher-close:hover { color: var(--ink); }
.switcher-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px -12px rgba(0,0,0,.18);
}
.switcher-strip a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 30px;
  border-radius: 6px;
  overflow: hidden;
  opacity: .5;
  transition: opacity .2s;
}
.switcher-strip a:hover, .switcher-strip a[aria-current] { opacity: 1; }
.switcher-strip img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.switcher-strip .add { border: 1px dashed #cfcfcf; color: var(--chrome); }

.case-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 19vh var(--gutter) 10vh;
  text-align: center;
}
.case-hero h1 {
  font-size: clamp(64px, 13vw, 190px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: .82;
  padding-right: .05em;
}
.case-hero-media {
  position: relative;
  width: min(36vw, 480px);
  margin-top: max(-6vw, -86px);
}
.case-hero-media .frame { width: 100%; }
.case-hero-media .stack { position: relative; aspect-ratio: 1440 / 900; }
.case-hero-media .stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s ease;
}
.case-hero-media .stack img.is-on { opacity: 1; }
.case-tagline {
  max-width: 13em;
  margin-top: 30px;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.case { padding: 0 var(--gutter) 18vh; }
.case-col { max-width: 520px; margin: 0 auto; }
.case p {
  font-size: clamp(15px, 1.1vw, 16px);
  line-height: 1.5;
  color: var(--body);
  margin-bottom: 1.15em;
}
.case p em { color: var(--ink); font-style: normal; }
.case h2 { font-size: var(--fs); font-weight: 400; color: var(--ink); margin: 0 0 14px; }
.case .rows { margin: 36px 0 0; border-color: #dcdbd6; }
.case .rows li { border-color: #dcdbd6; }

.case-media { margin: 14vh auto; display: grid; justify-items: center; gap: 16px; }
.case-media figcaption { color: var(--chrome); text-align: center; max-width: 420px; line-height: 1.4; }
.case-media .frame { width: min(66vw, 940px); border-radius: 16px; }
.case-media .frame-bar { height: 30px; }
.case-pair { display: flex; gap: 4vw; align-items: center; justify-content: center; }
.case-pair .frame { width: min(48vw, 680px); }
.case-pair .phone { width: min(18vw, 230px); flex: none; }

.next {
  display: block;
  max-width: 520px;
  margin: 16vh auto 0;
  padding-top: 14px;
  border-top: 1px solid #dcdbd6;
}
.next span { color: var(--chrome); }
.next strong { display: block; margin-top: 6px; font-size: clamp(26px, 3vw, 40px); font-weight: 500; letter-spacing: -0.03em; }
.next:hover strong { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

@media (max-width: 767px) {
  .switcher { display: none; }
  .case-hero { min-height: 0; padding: 16vh var(--gutter) 8vh; }
  .case-hero-media { width: 56vw; margin-top: -4vw; }
  .case-tagline { font-size: 15px; max-width: 15em; margin-top: 16px; }
  .case { padding-left: calc(var(--gutter) * 1.6); padding-right: calc(var(--gutter) * 1.6); }
  .case-media { margin: 9vh auto; }
  .case-media .frame { width: 100%; border-radius: 12px; }
  .case-media .frame-bar { height: 16px; }
  .case-pair { flex-direction: column; gap: 9vh; }
  .case-pair .frame { width: 100%; }
  .case-pair .phone { width: 48vw; padding: 5px; border-radius: 26px; }
  .case-pair .phone img { border-radius: 21px; }
}

/* ---------- Custom cursor ---------- */

.cursor {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  pointer-events: none;
  display: none;
  align-items: center;
  gap: 8px;
  transform: translate3d(-100px, -100px, 0);
}
.cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform .25s cubic-bezier(.2,.7,.1,1);
}
.cursor-label {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s, transform .2s;
}
.cursor.has-label .cursor-label { opacity: 1; transform: none; }
.cursor.has-label .cursor-dot { transform: scale(.6); }

@media (hover: hover) and (pointer: fine) {
  .has-cursor .cursor { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (min-width: 768px) {
  .is-case .wordmark { display: none; }
}

/* About: portrait floats on the page like the work does. */
.portrait { width: min(56vw, 230px); margin: 0 auto 40px; }
.portrait img {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 46%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 46%, #000 62%, transparent 100%);
  mix-blend-mode: multiply;
}
.statement {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 28px;
}
.panel .rows li > :first-child { padding-right: 8px; }
