/* ─────────────────────────────────────────────────────────────
   rorymason.xyz site styles
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --ink: #0F0F10;
  --body: #3D3D42;
  --muted: #5B5B60;
  --muted-light: #8A8A90;
  --line: #E2E2DF;
  --surface: #F3F3F1;
  --surface-2: #F1F1EE;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --space-xl: clamp(96px, 10vw, 140px);
  --space-l: clamp(72px, 8vw, 112px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted-light); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 99px; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ── header ─────────────────────────────────────────────────── */

.site-header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px; padding-top: 24px;
}
.brand { display: flex; gap: 10px; align-items: baseline; text-decoration: none; min-height: 44px; align-items: center; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.brand-role { font-size: 15px; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.nav-link {
  text-decoration: none; padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 99px; transition: background .2s;
}
.nav-link:hover { background: var(--surface); }
.nav-link[aria-current="page"] { background: var(--surface); }
.nav-link--solid { background: var(--ink); color: #fff; padding: 0 18px; margin-left: 6px; }
.nav-link--solid:hover { background: #2A2A2D; }

/* ── homepage intro ─────────────────────────────────────────── */

.intro { padding-block: clamp(72px, 10vw, 136px) clamp(48px, 6vw, 80px); }
.intro h1 {
  max-width: 1080px;
  font-size: clamp(34px, 4.8vw, 66px); line-height: 1.08; font-weight: 500; letter-spacing: -0.035em;
}
.intro a { text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* ── tags ───────────────────────────────────────────────────── */

.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 99px; background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 500; line-height: 1.2; white-space: nowrap;
}
.case .tag { border: 1px solid var(--line); }
.format { font-family: var(--mono); font-size: 13px; color: #55555B; margin-left: 4px; }
.icon { flex-shrink: 0; }

/* ── filter ─────────────────────────────────────────────────── */

.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 20px 0 28px; border-top: 1px solid var(--line);
}
.filters-label { font-size: 14px; color: var(--muted); margin-right: 8px; }
.filter {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 99px; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 500; transition: background .2s, border-color .2s, color .2s;
}
.filter:hover { border-color: #C9C9C5; }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.count { font-family: var(--mono); font-size: 12px; opacity: .6; }
.filter-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.is-hidden { display: none !important; }

/* ── project cards ──────────────────────────────────────────── */

.work { display: flex; flex-direction: column; gap: 20px; }

.card {
  display: flex; flex-wrap: wrap; align-items: stretch;
  border-radius: 24px; overflow: hidden; background: var(--card); color: var(--ink);
  text-decoration: none; min-height: 360px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
a.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(15, 15, 16, .35); }
.card-text {
  flex: 1 1 380px; padding: clamp(24px, 3.2vw, 44px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
.card-title { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.08; font-weight: 500; letter-spacing: -0.035em; }
.card-summary { margin-top: 10px; max-width: 440px; font-size: 17px; line-height: 1.5; color: var(--body); }
.cta {
  display: inline-block; margin-top: 18px; font-size: 15px; font-weight: 500;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.cta--muted { color: var(--muted); border-color: transparent; }

/* band cards (no visual) */
.card[data-band] {
  min-height: 0; align-items: center; gap: 20px 48px;
  padding: clamp(24px, 3.2vw, 40px) clamp(24px, 3.2vw, 44px);
}
.card-band-left { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.card-band-right { flex: 1 1 380px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.card-band-right .card-summary { margin-top: 0; max-width: 460px; }
.card-band-right .cta { margin-top: 0; }
.card-quote { max-width: 480px; font-size: 21px; line-height: 1.35; letter-spacing: -0.01em; }

/* card visuals */
.card-visual { flex: 1 1 420px; min-width: 0; }
.card-visual img { transition: transform .6s var(--ease); }
a.card:hover .card-visual img { transform: translateY(-6px); }

.card-visual.visual--phones {
  display: flex; align-items: flex-start; justify-content: center; gap: 20px;
  padding-top: 36px; max-height: 360px; overflow: hidden;
}
.visual--phones .phone {
  width: 150px; border: 7px solid var(--ink); border-bottom: 0; border-radius: 26px 26px 0 0;
  background: #fff;
}
.card-visual .phone--2 { margin-top: 40px; }
.card-visual .phone--3 { margin-top: 16px; }
.card-visual .phone:only-child { width: 220px; border-width: 9px; border-radius: 36px 36px 0 0; }

.card-visual.visual--photo { padding: 14px; display: flex; min-height: 280px; }
.card-visual.visual--photo img { flex: 1; width: 100%; min-height: 252px; object-fit: cover; border-radius: 14px; }
a.card:hover .visual--photo img { transform: scale(1.015); }

.card-visual.visual--framed { display: flex; align-items: center; justify-content: center; padding: 32px; }
.visual--framed img {
  width: 100%; max-width: 460px; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 12px; box-shadow: 0 16px 32px rgba(0, 0, 0, .10);
}

/* other work */
.other { margin-top: var(--space-l); }
.section-label { font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 20px; }
.other-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.mini {
  display: flex; flex-direction: column; gap: 18px; padding: 14px 14px 24px;
  border-radius: 24px; background: var(--surface-2); color: var(--ink); text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
a.mini:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(15, 15, 16, .35); }
.mini img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 14px; }
.mini-text { display: flex; flex-direction: column; gap: 10px; padding: 0 12px; }
.mini .tag { font-size: 12px; padding: 5px 11px; }
.mini-title { font-size: 24px; font-weight: 500; letter-spacing: -0.025em; }

/* ── contact footer ─────────────────────────────────────────── */

.contact {
  margin-top: var(--space-xl); border-radius: 24px; background: var(--surface);
  padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; gap: 32px;
}
.contact h2 { font-size: clamp(28px, 3.6vw, 48px); line-height: 1.1; font-weight: 500; letter-spacing: -0.035em; }
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 28px; border-top: 1px solid var(--line); padding-top: 28px;
}
.contact-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.contact-label { font-size: 14px; color: var(--muted); }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.contact-value {
  font-size: clamp(18px, 1.6vw, 20px); font-weight: 500; letter-spacing: -0.01em;
  min-height: 44px; display: inline-flex; align-items: center; overflow-wrap: anywhere;
  text-underline-offset: 4px;
}
.copy {
  min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1px solid #D4D4D0;
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 500;
}
.copy:hover { border-color: #B5B5B0; }
.copyright { margin: 24px 0 48px; font-size: 13px; color: var(--muted); }

/* ── case study ─────────────────────────────────────────────── */

.back {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 40px; min-height: 44px;
  font-size: 15px; color: var(--muted); text-decoration: none;
}
.back:hover { color: var(--ink); }
.case-header { padding: 16px 0 40px; display: flex; flex-direction: column; gap: 22px; }
.case-header h1 { font-size: clamp(40px, 5.4vw, 76px); line-height: 1.02; font-weight: 500; letter-spacing: -0.045em; }
.case-intro { max-width: 820px; font-size: clamp(19px, 1.9vw, 26px); line-height: 1.4; letter-spacing: -0.015em; color: var(--body); }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 20px 32px; padding: 24px 0 40px; border-top: 1px solid var(--line);
}
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin-top: 6px; font-size: 16px; line-height: 1.45; }

.hero-visual { border-radius: 28px; overflow: hidden; background: var(--project); }
.hero-visual.visual--phones {
  display: flex; align-items: flex-start; justify-content: center; gap: clamp(10px, 3vw, 40px);
  padding: clamp(32px, 5vw, 72px) 16px 0; height: clamp(320px, 46vw, 600px);
}
.hero-visual .phone {
  width: clamp(90px, 18vw, 240px); border-width: clamp(5px, .7vw, 8px);
  border-radius: clamp(18px, 2.6vw, 34px) clamp(18px, 2.6vw, 34px) 0 0;
}
.hero-visual .phone--1 { margin-top: clamp(16px, 3vw, 40px); }
.hero-visual .phone--3 { margin-top: clamp(32px, 6vw, 80px); }
.hero-visual .phone:only-child { margin-top: 0; width: clamp(160px, 22vw, 280px); }
.hero-visual.visual--photo img { width: 100%; max-height: 680px; object-fit: cover; }
.hero-visual.visual--framed { padding: clamp(24px, 5vw, 72px); }
.hero-visual.visual--framed img { margin-inline: auto; max-width: 960px; width: 100%; border-radius: 14px; box-shadow: 0 20px 40px rgba(0, 0, 0, .10); }

/* building blocks used inside page.html */
.cs-section { margin-top: var(--space-xl); display: flex; flex-direction: column; gap: 32px; }
.cs-head { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.cs-eyebrow { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.cs-head h2 { font-size: clamp(27px, 3vw, 40px); line-height: 1.12; font-weight: 500; letter-spacing: -0.03em; }
.cs-head p, .cs-prose p { font-size: 18px; line-height: 1.6; color: var(--body); }
.cs-prose { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.cs-prose ul { padding-left: 1.2em; font-size: 18px; line-height: 1.6; color: var(--body); }

.cs-two {
  margin-top: var(--space-l);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 32px 64px;
}
.cs-two > div { display: flex; flex-direction: column; gap: 14px; }
.cs-two h2 { font-size: 15px; font-weight: 500; color: var(--muted); }
.cs-two p { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.5; letter-spacing: -0.01em; }

.cs-steps {
  margin-top: clamp(64px, 7vw, 96px); padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px;
  counter-reset: step;
}
.cs-steps li {
  counter-increment: step; border-radius: 18px; background: var(--surface); padding: 18px;
  display: flex; flex-direction: column; gap: 10px; font-size: 16px; font-weight: 500; line-height: 1.3;
}
.cs-steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); }
.cs-steps li:last-child { background: var(--project); }

.cs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.cs-card { border-radius: 20px; background: var(--surface); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.cs-card h3 { font-size: 17px; font-weight: 500; }
.cs-card p, .cs-card blockquote { font-size: 19px; line-height: 1.45; letter-spacing: -0.01em; }

.cs-figure { display: flex; flex-direction: column; gap: 12px; }
.cs-figure img { width: 100%; border-radius: 20px; }
.cs-figure--bordered img { border: 1px solid var(--line); }
/* small images and diagrams: shown at natural size on the project colour */
.cs-figure--panel { background: var(--project); border-radius: 20px; padding: clamp(16px, 4vw, 48px); }
.cs-figure--panel img { width: auto; max-width: 100%; max-height: 420px; object-fit: contain; margin-inline: auto; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .08); }
.cs-figure--panel figcaption { text-align: center; color: #55555B; }
.cs-figure figcaption { font-size: 14px; line-height: 1.5; color: var(--muted); }

.cs-split { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: center; }
.cs-split > figure { flex: 1 1 420px; }
.cs-split > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; }
.cs-split h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.cs-split p { font-size: 18px; line-height: 1.6; color: var(--body); }

.cs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; align-items: start; }
.cs-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.cs-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.cs-grid--2 img { aspect-ratio: 16 / 10; object-fit: cover; }
.cs-grid--2 .cs-figure--panel img { aspect-ratio: auto; object-fit: contain; box-shadow: none; border-radius: 0; }

.cs-screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 20px; }
.cs-screen { display: flex; flex-direction: column; gap: 16px; }
.cs-screen-frame {
  border-radius: 20px; background: var(--project); padding: 28px 28px 0; height: 380px;
  display: flex; justify-content: center; overflow: hidden;
}
.cs-screen-frame img {
  width: 100%; max-width: 200px; align-self: flex-start; background: #fff;
  border: 7px solid var(--ink); border-bottom: 0; border-radius: 28px 28px 0 0;
}
.cs-screen figcaption { display: flex; flex-direction: column; gap: 6px; }
.cs-screen figcaption strong { font-size: 17px; font-weight: 500; }
.cs-screen figcaption span { font-size: 15px; line-height: 1.5; color: var(--muted); }

.cs-reflect { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 24px 64px; }
.cs-reflect > .cs-head { flex: 1 1 280px; }
.cs-reflect ol { flex: 2 1 480px; list-style: none; padding: 0; counter-reset: point; }
.cs-reflect li {
  counter-increment: point; display: flex; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line);
  font-size: 18px; line-height: 1.55; color: var(--body);
}
.cs-reflect li:last-child { border-bottom: 1px solid var(--line); }
.cs-reflect li::before { content: counter(point, decimal-leading-zero); font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 4px; }
.cs-reflect strong { font-weight: 500; color: var(--ink); }

.cs-video { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; }
.cs-video iframe, .cs-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cs-credits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; padding: 0; list-style: none; }
.cs-credits li { border-radius: 16px; background: var(--surface); padding: 16px 18px; font-size: 16px; line-height: 1.4; }
.cs-note { font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 760px; }
.cs-note a { color: inherit; }

.cs-gallery { columns: 3 300px; column-gap: 16px; }
.cs-gallery img { width: 100%; margin-bottom: 16px; border-radius: 6px; break-inside: avoid; }

.cs-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.cs-pages a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.cs-pages a:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(15, 15, 16, .4); }
.cs-pages img { width: 100%; display: block; }

.cs-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 99px; background: var(--ink); color: #fff; text-decoration: none; font-size: 15px; font-weight: 500;
  align-self: flex-start;
}

.cs-incoming {
  border-radius: 24px; background: var(--project); padding: clamp(48px, 9vw, 120px) clamp(24px, 5vw, 64px);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.cs-incoming h2 { font-size: clamp(28px, 3.6vw, 48px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
.cs-incoming p { font-size: 18px; line-height: 1.55; color: var(--body); max-width: 460px; }

.next {
  margin-top: var(--space-xl); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px; border-radius: 24px; background: var(--card); padding: clamp(24px, 4vw, 48px); text-decoration: none;
  transition: transform .35s var(--ease);
}
.next:hover { transform: translateY(-3px); }
.next-label { display: block; font-size: 14px; color: #55555B; margin-bottom: 6px; }
.next-title { display: block; font-size: clamp(28px, 3.2vw, 44px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
.next-arrow { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; }

/* ── about ──────────────────────────────────────────────────── */

.about-intro { padding-top: clamp(64px, 8vw, 112px); max-width: 880px; display: flex; flex-direction: column; gap: 24px; }
.about-intro h1 { font-size: clamp(40px, 5vw, 68px); line-height: 1.04; font-weight: 500; letter-spacing: -0.04em; }
.about-intro p { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; letter-spacing: -0.01em; color: var(--body); }
.about-intro p:first-of-type { color: var(--ink); }
.panels { margin-top: var(--space-l); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.panel { border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 16px; background: var(--surface); }
.panel h2 { font-size: 15px; font-weight: 500; }
.panel ul { list-style: none; padding: 0; font-size: 18px; line-height: 1.75; }
.panel--sky { background: #DDEBF6; }
.panel--butter { background: #F7EECB; }
.panel--lavender { background: #E8E2F6; }
.cv { margin-top: var(--space-l); display: flex; flex-wrap: wrap; gap: 24px 64px; }
.cv > h2 { flex: 1 1 240px; font-size: clamp(26px, 2.6vw, 34px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.cv-list { flex: 3 1 560px; list-style: none; padding: 0; }
.cv-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.cv-list li:last-child { border-bottom: 1px solid var(--line); }
.cv-list strong { display: block; font-size: 18px; font-weight: 500; }
.cv-list span { display: block; font-size: 16px; color: var(--muted); }
.cv-list time { font-family: var(--mono); font-size: 14px; color: var(--muted); }

/* ── small screens ──────────────────────────────────────────── */

@media (max-width: 600px) {
  .brand-role { display: none; }
  .nav-link { padding: 0 10px; }
  .nav-link--solid { padding: 0 14px; margin-left: 2px; }
  .card { min-height: 0; }
  .card-visual.visual--phones { max-height: 300px; padding-top: 28px; gap: 12px; }
  .visual--phones .phone { width: 120px; border-width: 6px; border-radius: 22px 22px 0 0; }
  .card-visual .phone:only-child { width: 180px; }
  .card-visual.visual--framed { padding: 0 20px 24px; }
  .cs-screen-frame { height: 340px; }
}

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