/* Tokens mirror dexburgess.com (css/style.css) */
:root {
  --bg:        #0d0d0f;
  --surface:   #141419;
  --border:    #23232b;
  --accent:    #f0e6c8;
  --accent-2:  #7c3aed;
  --text:      #e2e2ea;
  --muted:     #6a6a80;
  --desc:      #8a8a96;

  --font-display: 'Syne', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-body:    'Inter', sans-serif;

  --pad-x: clamp(16px, 4vw, 58px);
  --max-w: 1440px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px var(--pad-x);
}

.home-link, .contact-link {
  color: var(--muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}
.home-link:hover, .contact-link:hover,
.home-link:focus-visible, .contact-link:focus-visible { color: var(--accent); }

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Section heads — echo the home-page menu rows */
.section-head {
  display: flex;
  align-items: center;
  gap: clamp(20px, 5vw, 92px);
  padding: clamp(40px, 6vw, 80px) 0;
  border-top: 1px solid var(--border);
}

.section-num { color: var(--muted); min-width: 28px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 11vw, 8.5rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* About */
.about { margin-top: clamp(40px, 10vw, 120px); }

.about-copy {
  max-width: 40ch;
  margin: 0 0 clamp(64px, 10vw, 140px) auto;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.9rem);
  line-height: 1.4;
  color: var(--text);
}

/* Projects */
.project-list {
  display: grid;
  gap: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(80px, 12vw, 160px);
}

.project-link { display: block; }
.project-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }

.project-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}

.project-title {
  margin-top: clamp(20px, 2.5vw, 32px);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3.4rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.project-desc {
  margin-top: 8px;
  max-width: 36ch;
  font-size: clamp(1.15rem, 0.9rem + 1.3vw, 2.2rem);
  line-height: 1.2;
  color: var(--desc);
}

/* Campaign stage — 9:16 hero flanked by 1:1 pieces inside the 16:9 frame */
.campaign-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3%;
  padding: 4% 5%;
  background:
    radial-gradient(70% 90% at 50% 40%, #ece6f7, transparent 75%),
    linear-gradient(160deg, #ddd6ee, #c9c2e0);
}

.campaign-stage video {
  display: block;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 18px 50px -20px rgba(20, 12, 50, 0.45);
  transition: transform 0.9s var(--ease-out);
}

.stage-vertical { height: 100%; aspect-ratio: 9 / 16; }
.stage-square   { width: 27%; aspect-ratio: 1; }

.project-link:hover .stage-vertical,
.project-link:focus-visible .stage-vertical { transform: scale(1.03); }
.project-link:hover .stage-square,
.project-link:focus-visible .stage-square { transform: scale(0.98); }

/* Case study page */
.case-hero { margin-top: clamp(40px, 10vw, 120px); }

.case-lede { margin: 0 0 clamp(40px, 6vw, 72px); }

.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  padding: clamp(32px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--border);
}
.case-meta dt { color: var(--muted); margin-bottom: 6px; }
.case-meta dd { color: var(--text); }

.case-section {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 3fr;
  gap: 24px;
  padding: clamp(40px, 6vw, 80px) 0;
  border-bottom: 1px solid var(--border);
}
.case-section:last-child { border-bottom: 0; margin-bottom: clamp(48px, 8vw, 120px); }

.case-label { color: var(--muted); font-weight: 400; }

.case-copy {
  max-width: 42ch;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.6rem);
  line-height: 1.45;
}

.case-copy p + p { margin-top: 1em; }

/* Work blocks — numbered sub-sections on the case page */
.work-block {
  padding: clamp(48px, 7vw, 100px) 0;
  border-bottom: 1px solid var(--border);
}
.work-block:last-child { border-bottom: 0; }

.work-head {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 40px);
  margin-bottom: clamp(28px, 4vw, 56px);
}

.work-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 1rem + 3.5vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1;
  flex: 1;
}

.work-link {
  color: var(--muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: color 0.2s;
}
.work-link:hover, .work-link:focus-visible { color: var(--accent); }

/* Device frames for the product page */
.device-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}

.browser, .phone { display: flex; flex-direction: column; }
.browser figcaption, .phone figcaption { margin-top: 14px; color: var(--muted); }

.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  background: #1b1b22;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.browser-bar > span:not(.browser-url) { width: 10px; height: 10px; border-radius: 50%; background: #34343f; }
.browser-url {
  margin-left: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  background: #101015;
  color: var(--muted);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-scroll, .phone-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  scrollbar-width: thin;
}
.browser-scroll {
  height: min(72vh, 760px);
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
}
.phone-scroll {
  width: 280px;
  height: min(72vh, 600px);
  border: 8px solid #1b1b22;
  border-radius: 36px;
}
.browser-scroll img, .phone-scroll img { display: block; width: 100%; height: auto; }
.browser-scroll:focus-visible, .phone-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.film { margin-top: clamp(40px, 6vw, 80px); }
.clip-frame--wide { aspect-ratio: 16 / 9; }

/* Brochures — horizontal page strip */
.brochure + .brochure { margin-top: clamp(48px, 6vw, 80px); }

.brochure-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
}
.brochure-head .mono { color: var(--muted); margin-left: 10px; }

.brochure-pages {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(220px, 26vw, 360px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  padding-bottom: 14px;
  scrollbar-width: thin;
}
.brochure-pages img {
  width: 100%;
  height: auto;
  display: block;
  scroll-snap-align: start;
  box-shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.8);
}
.brochure-pages:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.campaign-row {
  display: grid;
  gap: clamp(16px, 3vw, 40px);
}
.campaign-row--vertical { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; margin: 0 auto; }
.campaign-row--square   { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 80px); }

.clip-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface);
}
.clip-frame--vertical { aspect-ratio: 9 / 16; }
.clip-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

.clip figcaption {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-top: 14px;
  color: var(--desc);
}
.clip figcaption .mono { color: var(--muted); }

.sound-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(13, 13, 15, 0.7);
  color: var(--text);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sound-toggle:hover { background: rgba(13, 13, 15, 0.9); }
.sound-toggle[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.sound-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 640px) {
  .case-section { grid-template-columns: 1fr; gap: 12px; }
  .campaign-row--square { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
  .work-head { flex-wrap: wrap; }
  .brochure-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .brochure-pages { grid-auto-columns: 72%; }
  .browser { display: none; }
}

@media (max-width: 860px) {
  .device-pair { grid-template-columns: 1fr; }
  .browser-scroll { height: 60vh; }
  .phone { align-items: center; }
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px var(--pad-x) 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.site-footer a:hover { color: var(--accent); }

@media (max-width: 540px) {
  .about-copy { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .campaign-stage video { transition: none; }
  .project-link:hover .campaign-stage video { transform: none; }
}
