/* ═══════════════════════════════════════════════════
   ANYTHING STUDIOS - Site Stylesheet
   Built on tokens.css from the brand system.
   ═══════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--as-font-body);
  background: var(--as-paper);
  color: var(--as-ink);
  -webkit-font-smoothing: antialiased;
  line-height: var(--as-lh-body);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ── Container ──────────────────────────────────── */
.container {
  max-width: var(--as-container-max, 1280px);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

/* ── Nav ────────────────────────────────────────── */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--as-paper);
  border-bottom: 1px solid var(--as-line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--as-font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--as-ink);
  text-decoration: none;
}
.nav-brand svg { width: 22px; height: 22px; color: var(--as-persimmon); }
.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--as-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--as-ink);
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 200ms ease, color 200ms ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  opacity: 1;
  color: var(--as-persimmon);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--as-ink);
  color: var(--as-paper);
  font-family: var(--as-font-display);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 200ms ease, color 200ms ease;
  border-radius: 2px;
}
.nav-cta:hover { background: var(--as-persimmon); color: var(--as-ink); }

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--as-font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: 2px;
  transition: background 250ms ease, color 250ms ease, transform 150ms ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--as-ink); color: var(--as-paper); }
.btn-primary:hover { background: var(--as-persimmon); color: var(--as-ink); }
.btn-secondary {
  background: transparent;
  color: var(--as-ink);
  border: 1px solid var(--as-ink);
}
.btn-secondary:hover { background: var(--as-ink); color: var(--as-paper); }
.btn-accent { background: var(--as-persimmon); color: var(--as-ink); }
.btn-accent:hover { background: var(--as-ink); color: var(--as-persimmon); }

/* ── Section primitives ─────────────────────────── */
section { padding: 96px 0; border-top: 1px solid var(--as-line); }
.section-label {
  font-family: var(--as-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--as-quiet);
  margin-bottom: 32px;
}
.section-h {
  font-family: var(--as-font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
  max-width: 14ch;
}
.section-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--as-quiet);
  max-width: 640px;
}

/* ── Hero ───────────────────────────────────────── */
.hero { padding: 96px 0 128px; position: relative; overflow: hidden; }
.hero h1 {
  font-family: var(--as-font-display);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  max-width: 11ch;
}
.hero h1 em { font-style: normal; color: var(--as-persimmon); }
.hero .lede {
  margin-top: 32px;
  font-family: var(--as-font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 660px;
  color: var(--as-ink-70);
}
.hero .lede strong { color: var(--as-ink); font-weight: 500; }
.hero-actions {
  margin-top: 48px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--as-line);
}
.hero-meta-item {
  font-family: var(--as-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--as-quiet);
}
.hero-meta-item span {
  display: block;
  font-family: var(--as-font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--as-ink);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ── Work grid ──────────────────────────────────── */
.work {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.work-card {
  padding: 32px;
  background: var(--as-paper);
  border: 1px solid var(--as-line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border 250ms ease, transform 250ms ease;
  text-decoration: none;
  color: inherit;
}
.work-card:hover { border-color: var(--as-persimmon); transform: translateY(-2px); }
.work-card.dark { background: var(--as-ink); color: var(--as-paper); border-color: var(--as-line-dark); }
.work-card.persimmon { background: var(--as-persimmon); color: var(--as-ink); border-color: transparent; }
.work-tag {
  font-family: var(--as-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--as-persimmon);
}
.work-card.dark .work-tag { color: var(--as-persimmon); }
.work-card.persimmon .work-tag { color: var(--as-ink); }
.work-card h3 {
  font-family: var(--as-font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.work-card p { font-size: 14px; line-height: 1.55; color: var(--as-quiet); }
.work-card.dark p { color: rgba(242, 239, 232, 0.65); }
.work-card.persimmon p { color: rgba(14, 14, 14, 0.7); }
.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--as-font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed currentColor;
  opacity: 0.5;
}

/* ── Disciplines / Practice ─────────────────────── */
.disciplines {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 48px;
}
.discipline {
  padding: 32px 0;
  border-bottom: 1px solid var(--as-line);
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  align-items: baseline;
  gap: 24px;
}
.discipline:nth-child(odd) { padding-right: 32px; border-right: 1px solid var(--as-line); }
.discipline:nth-child(even) { padding-left: 32px; }
.discipline .num {
  font-family: var(--as-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--as-persimmon);
  text-transform: uppercase;
}
.discipline h4 {
  font-family: var(--as-font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.discipline p { font-size: 13px; line-height: 1.55; color: var(--as-quiet); }

/* ── Voice strip ────────────────────────────────── */
.voice { background: var(--as-ink); color: var(--as-paper); padding: 96px 0; border-top: none; }
.voice-h {
  font-family: var(--as-font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1;
  max-width: 18ch;
}
.voice-h em { font-style: normal; color: var(--as-persimmon); }
.voice-foot {
  margin-top: 32px;
  font-family: var(--as-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 239, 232, 0.5);
}

/* ── Contact ────────────────────────────────────── */
.contact { background: var(--as-paper-warm); padding: 96px 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--as-paper);
  border: 1px solid var(--as-line);
}
.input-label { display: flex; flex-direction: column; gap: 6px; }
.input-label .lbl {
  font-family: var(--as-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--as-quiet);
}
.input,
.textarea {
  font-family: var(--as-font-body);
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--as-line-strong);
  background: var(--as-paper);
  color: var(--as-ink);
  border-radius: 2px;
  transition: border 150ms ease;
  width: 100%;
}
.input:focus,
.textarea:focus { outline: none; border-color: var(--as-persimmon); }
.textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.contact-side h3 {
  font-family: var(--as-font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.contact-side p { color: var(--as-quiet); margin-bottom: 24px; }
.contact-meta {
  font-family: var(--as-font-mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--as-ink-70);
}
.contact-meta .key {
  color: var(--as-quiet);
  display: inline-block;
  min-width: 64px;
}

/* ── Footer ─────────────────────────────────────── */
footer { background: var(--as-ink); color: var(--as-paper); padding: 64px 0 48px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
}
.footer-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--as-font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -0.03em;
}
.footer-mark svg { width: 32px; height: 32px; color: var(--as-persimmon); }
.footer-meta {
  font-family: var(--as-font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.5;
  text-align: right;
}
.footer-links {
  margin-top: 32px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--as-line-dark);
  font-family: var(--as-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-links a {
  color: var(--as-paper);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 200ms ease, color 200ms ease;
}
.footer-links a:hover { opacity: 1; color: var(--as-persimmon); }

/* ── Case study primitives ──────────────────────── */
.case-hero { padding: 96px 0 64px; }
.case-kicker {
  font-family: var(--as-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--as-persimmon);
  margin-bottom: 20px;
}
.case-title {
  font-family: var(--as-font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.case-lede {
  font-family: var(--as-font-display);
  font-weight: 500;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 720px;
  color: var(--as-ink-70);
}
.case-meta {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--as-line);
}
.case-meta-item {
  font-family: var(--as-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--as-quiet);
}
.case-meta-item span {
  display: block;
  font-family: var(--as-font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--as-ink);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.case-body { padding: 64px 0; max-width: 800px; margin: 0 auto; }
.case-body h2 {
  font-family: var(--as-font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
}
.case-body p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--as-ink);
}
.case-body p strong { font-weight: 600; color: var(--as-ink); }
.case-body .status {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 32px;
  background: var(--as-persimmon-tint);
  color: var(--as-persimmon-dark);
  font-family: var(--as-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
}

/* ── About page primitives ──────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 48px;
}
.about-grid h3 {
  font-family: var(--as-font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.about-grid p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--as-ink);
  margin-bottom: 16px;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  section { padding: 64px 0; }
  .hero { padding: 64px 0 80px; }
  .work { grid-template-columns: 1fr; }
  .disciplines { grid-template-columns: 1fr; }
  .discipline:nth-child(odd),
  .discipline:nth-child(even) {
    padding: 24px 0;
    border-right: none;
    padding-left: 0;
    padding-right: 0;
  }
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .case-meta { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; align-items: start; }
  .footer-meta { text-align: left; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .nav-cta { padding: 8px 14px; font-size: 12px; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: clamp(42px, 12vw, 72px); }
  .case-title { font-size: clamp(32px, 9vw, 48px); }
}

/* ── Asterisk mark inline SVG sizing helper ────── */
.mark-asterisk {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  color: var(--as-persimmon);
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS / SIGNATURE INTERACTIONS
   ═══════════════════════════════════════════════════ */

/* - Rotating hero word - */
.rotator {
  display: inline-block;
  position: relative;
  font-style: normal;
  color: var(--as-persimmon);
}
.rotator-word {
  display: inline-block;
  transition: opacity 240ms ease, transform 240ms ease;
}
.rotator-word.is-leaving {
  opacity: 0;
  transform: translateY(-0.08em);
}
.rotator-word.is-entering {
  opacity: 0;
  transform: translateY(0.08em);
}
@media (prefers-reduced-motion: reduce) {
  .rotator-word { transition: none; }
}

/* - Scroll reveal - */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-1 { transition-delay: 80ms; }
.reveal-2 { transition-delay: 160ms; }
.reveal-3 { transition-delay: 240ms; }
.reveal-4 { transition-delay: 320ms; }

/* - Asterisk cursor - */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, .work-card { cursor: none; }
}
.cursor-asterisk {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 9999;
  color: var(--as-persimmon);
  margin-left: -9px;
  margin-top: -9px;
  transition: width 200ms ease, height 200ms ease, margin 200ms ease, color 200ms ease;
  mix-blend-mode: multiply;
}
.cursor-asterisk svg { width: 100%; height: 100%; animation: cursorSpin 6s linear infinite; }
.cursor-asterisk.is-link {
  width: 36px;
  height: 36px;
  margin-left: -18px;
  margin-top: -18px;
}
@keyframes cursorSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (hover: none), (pointer: coarse) {
  .cursor-asterisk { display: none; }
  body, a, button { cursor: auto; }
}

/* - Magnetic CTA - */
.btn-primary, .nav-cta {
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), background 200ms ease, color 200ms ease;
}

/* - Asterisk spin (scroll driven) - */
.mark-spin {
  display: inline-block;
  will-change: transform;
}

/* - Page transition swipe overlay - */
.page-swipe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--as-persimmon);
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 10000;
  pointer-events: none;
  transition: transform 420ms cubic-bezier(0.7, 0, 0.3, 1);
}
.page-swipe.is-swiping { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  .page-swipe { display: none; }
}

/* - Hero asterisk burst on load - */
.mark-burst {
  display: inline-block;
  transform: scale(0) rotate(-180deg);
  opacity: 0;
  transition: transform 1100ms cubic-bezier(0.22, 1, 0.36, 1) 200ms, opacity 700ms ease 200ms;
}
.mark-burst.is-burst {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

/* - Marquee ticker - */
.marquee {
  background: var(--as-ink);
  color: var(--as-paper);
  overflow: hidden;
  border-top: 1px solid var(--as-line-dark);
  border-bottom: 1px solid var(--as-line-dark);
}
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 32s linear infinite;
  padding: 22px 0;
}
.marquee-item {
  font-family: var(--as-font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  padding: 0 36px;
  display: inline-flex;
  align-items: center;
  gap: 36px;
}
.marquee-item::after {
  content: '✱';
  color: var(--as-persimmon);
  font-size: 22px;
  font-weight: 400;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}
@media (max-width: 480px) {
  .marquee-item { font-size: 20px; padding: 0 22px; gap: 22px; }
  .marquee-item::after { font-size: 16px; }
}

/* - Persimmon underline animation for in-content links - */
a.link {
  position: relative;
  text-decoration: none;
  color: inherit;
  padding-bottom: 2px;
}
a.link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--as-persimmon);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}
a.link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* - Section number badges for visual punctuation - */
.tag-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--as-persimmon-tint);
  color: var(--as-persimmon-dark);
  font-family: var(--as-font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
}
.tag-bar::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--as-persimmon);
}

/* ═══════════════════════════════════════════════════
   MOBILE NAV - toggle + fullscreen overlay
   ═══════════════════════════════════════════════════ */

.nav-toggle {
  display: none;
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}
.nav-toggle .line {
  position: absolute;
  left: 6px;
  width: 24px;
  height: 2px;
  background: var(--as-ink);
  border-radius: 1px;
  transition: transform 280ms cubic-bezier(0.7, 0, 0.3, 1), opacity 200ms ease, background 200ms ease;
}
.nav-toggle .line:nth-child(1) { top: 12px; }
.nav-toggle .line:nth-child(2) { top: 18px; }
.nav-toggle .line:nth-child(3) { top: 24px; }
.nav-toggle:hover .line { background: var(--as-persimmon); }
.nav-toggle.is-open .line { background: var(--as-paper); }
.nav-toggle.is-open .line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open .line:nth-child(2) { opacity: 0; transform: scaleX(0.3); }
.nav-toggle.is-open .line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
}

/* Fullscreen overlay menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--as-ink);
  color: var(--as-paper);
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 92px 32px 40px;
  transform: translateY(-100%);
  transition: transform 480ms cubic-bezier(0.7, 0, 0.3, 1);
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu.is-open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}
@media (max-width: 480px) {
  .mobile-menu { padding: 84px 22px 32px; }
}

/* Asterisk decoration drifts behind the menu items */
.mobile-menu::before {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="%23FF4F2C"><rect x="44.5" y="8" width="11" height="84" rx="5.5"/><rect x="44.5" y="8" width="11" height="84" rx="5.5" transform="rotate(60 50 50)"/><rect x="44.5" y="8" width="11" height="84" rx="5.5" transform="rotate(120 50 50)"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.18;
  transform: rotate(0deg);
  transition: transform 1200ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.mobile-menu.is-open::before {
  transform: rotate(120deg);
}

.mobile-menu-label {
  font-family: var(--as-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 239, 232, 0.4);
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 400ms ease 150ms, transform 400ms ease 150ms;
}
.mobile-menu.is-open .mobile-menu-label {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-items {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.mobile-menu-item {
  font-family: var(--as-font-display);
  font-weight: 700;
  font-size: clamp(48px, 13vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--as-paper);
  text-decoration: none;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 500ms cubic-bezier(0.22, 1, 0.36, 1),
              color 220ms ease;
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
}
.mobile-menu.is-open .mobile-menu-item {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu.is-open .mobile-menu-item:nth-child(1) { transition-delay: 240ms; }
.mobile-menu.is-open .mobile-menu-item:nth-child(2) { transition-delay: 320ms; }
.mobile-menu.is-open .mobile-menu-item:nth-child(3) { transition-delay: 400ms; }
.mobile-menu.is-open .mobile-menu-item:nth-child(4) { transition-delay: 480ms; }

.mobile-menu-item .num {
  font-family: var(--as-font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--as-persimmon);
  align-self: flex-start;
  margin-top: 4px;
}
.mobile-menu-item:hover,
.mobile-menu-item:active,
.mobile-menu-item.is-current {
  color: var(--as-persimmon);
}

.mobile-menu-foot {
  margin-top: auto;
  padding-top: 32px;
  font-family: var(--as-font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 239, 232, 0.5);
  opacity: 0;
  transition: opacity 500ms ease 620ms;
  position: relative;
  z-index: 1;
}
.mobile-menu.is-open .mobile-menu-foot { opacity: 1; }
.mobile-menu-foot a {
  color: var(--as-persimmon);
  text-decoration: none;
}

/* Lock body scroll when menu open */
body.menu-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .mobile-menu, .mobile-menu-item, .mobile-menu-label, .mobile-menu-foot, .mobile-menu::before {
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════
   MOBILE NAV FIX - drop inline CTA, float toggle above overlay
   ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Hide the inline CTA on mobile - Brief is in the overlay menu */
  .nav-cta { display: none; }
  /* Nav becomes brand left, breathing room right */
  .nav { justify-content: space-between; }
  /* Position-fix the toggle so it floats above the overlay, always tappable */
  .nav-toggle {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 200;
    width: 44px;
    height: 44px;
  }
  .nav-toggle .line {
    left: 10px;
    width: 24px;
    height: 2.5px;
  }
  .nav-toggle .line:nth-child(1) { top: 16px; }
  .nav-toggle .line:nth-child(2) { top: 22px; }
  .nav-toggle .line:nth-child(3) { top: 28px; }
  .nav-toggle.is-open .line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle.is-open .line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
@media (max-width: 480px) {
  .nav-toggle { top: 16px; right: 14px; }
}

/* ═══════════════════════════════════════════════════
   NAV TOGGLE - vertical centering against nav baseline
   Overrides earlier sizing. Button = nav height, lines centered.
   ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-toggle {
    position: fixed;
    top: 0;
    right: 14px;
    z-index: 200;
    width: 56px;
    height: 60px;
  }
  .nav-toggle .line {
    left: 50%;
    margin-left: -12px;
    width: 24px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--as-ink);
    transition: transform 280ms cubic-bezier(0.7, 0, 0.3, 1), opacity 200ms ease, background 220ms ease;
  }
  .nav-toggle .line:nth-child(1) { top: calc(50% - 8px); }
  .nav-toggle .line:nth-child(2) { top: calc(50% - 1.25px); }
  .nav-toggle .line:nth-child(3) { top: calc(50% + 5.5px); }

  .nav-toggle.is-open .line { background: var(--as-paper); }
  .nav-toggle.is-open .line:nth-child(1) {
    top: 50%; transform: translateY(-50%) rotate(45deg);
  }
  .nav-toggle.is-open .line:nth-child(2) { opacity: 0; transform: scaleX(0.3); }
  .nav-toggle.is-open .line:nth-child(3) {
    top: 50%; transform: translateY(-50%) rotate(-45deg);
  }
}

/* ═══════════════════════════════════════════════════
   FINAL MOBILE NAV - toggle sits naturally in flex,
   dedicated close button lives inside the overlay
   ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Reset: toggle is back inside the flex nav, normal positioning */
  .nav-toggle {
    position: relative;
    top: auto;
    right: auto;
    width: 44px;
    height: 44px;
    align-self: center;
    z-index: auto;
  }
  .nav-toggle .line {
    left: 50%;
    margin-left: -12px;
    width: 24px;
    height: 2.5px;
  }
  .nav-toggle .line:nth-child(1) { top: calc(50% - 8px); }
  .nav-toggle .line:nth-child(2) { top: calc(50% - 1.25px); }
  .nav-toggle .line:nth-child(3) { top: calc(50% + 5.5px); }
  /* The open-state X is now handled inside the overlay; nav toggle does not need to morph */
  .nav-toggle.is-open .line:nth-child(1),
  .nav-toggle.is-open .line:nth-child(2),
  .nav-toggle.is-open .line:nth-child(3) {
    transform: none;
    opacity: 1;
  }
}

/* - Mobile menu close (X) button inside the overlay - */
.mobile-menu-close {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 56px;
  height: 56px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  padding: 0;
}
.mobile-menu-close .line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 2.5px;
  margin-left: -13px;
  margin-top: -1.25px;
  background: var(--as-paper);
  border-radius: 2px;
  transition: background 200ms ease;
}
.mobile-menu-close .line:nth-child(1) { transform: rotate(45deg); }
.mobile-menu-close .line:nth-child(2) { transform: rotate(-45deg); }
.mobile-menu-close:hover .line,
.mobile-menu-close:active .line { background: var(--as-persimmon); }

/* Push the menu label down a touch so it does not crash into the X */
.mobile-menu { padding-top: 96px; }
@media (max-width: 480px) {
  .mobile-menu { padding-top: 88px; }
  .mobile-menu-close { top: 14px; right: 10px; width: 52px; height: 52px; }
}

/* Back-to-work link inside case studies */
.case-back { display:inline-flex; align-items:center; gap:6px; font-family: var(--as-font-mono); font-size:12px; letter-spacing:0.08em; text-transform:uppercase; color: var(--as-quiet); text-decoration:none; margin-bottom:24px; transition: color 200ms ease; }
.case-back:hover { color: var(--as-persimmon); }

/* Easter egg: "Asterisk Run" plays inside the footer itself */
.footer-mark { cursor: pointer; }
footer .container { position: relative; }
.footer-grid, .footer-links { transition: opacity 300ms ease; }
footer.is-playing .footer-grid, footer.is-playing .footer-links { opacity: 0; pointer-events: none; }
.footer-game { position: absolute; inset: 0; display: none; z-index: 2; }
footer.is-playing .footer-game { display: block; }
.footer-game canvas { width: 100%; height: 100%; display: block; cursor: pointer; touch-action: manipulation; }
.footer-game-exit { position: absolute; top: 0; right: 0; font-family: var(--as-font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--as-paper); opacity: 0.55; background: none; border: none; cursor: pointer; padding: 4px 6px; transition: opacity 200ms ease, color 200ms ease; }
.footer-game-exit:hover { opacity: 1; color: var(--as-persimmon); }
