/* ───────────────────────────────────────────────────
   PLAYNICE — Shared design system
   ─────────────────────────────────────────────────── */

:root {
  --yellow:  #E2A93B;
  --ink:     #111111;
  --ink-soft:#1a1a1a;
  --paper:   #F4EADA;
  --paper-2: #F8F1E3;
  --cream:   #E5D8BD;
  --sand:    #C8B89A;
  --rule:    rgba(17, 17, 17, 0.18);
  --navy:    #1e2f5d;
  --bone:    #E8E2D5;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
  background: var(--yellow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ─── Type scales ─── */
.display {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.86;
  text-transform: uppercase;
  margin: 0;
}
.serif {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  margin: 0;
}
.caps {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}
.bracket {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 1.4vw, 18px);
}
.bracket::before { content: "("; }
.bracket::after  { content: ")"; }

/* ─── HERO (home) ─── */
.frame {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(24px, 3.5vw, 44px);
}
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(36px, 5vw, 64px);
  padding: clamp(40px, 8vw, 80px) 0;
}
.lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.2vw, 28px);
}
.lockup .smiley {
  width: clamp(44px, 6vw, 78px);
  height: auto;
  mix-blend-mode: multiply;
}
.lockup .wordmark {
  width: clamp(180px, 28vw, 360px);
  height: auto;
  mix-blend-mode: multiply;
}

/* Cycling disciplines */
.rotator {
  position: relative;
  height: 1.3em;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(18px, 2.2vw, 28px);
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-align: center;
  width: 100%;
}
.rotator li {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  animation: rotate-words 15s cubic-bezier(.5,.05,.2,1) infinite;
  will-change: opacity, transform;
}
.rotator li:nth-child(1) { animation-delay: 0s; }
.rotator li:nth-child(2) { animation-delay: 2.5s; }
.rotator li:nth-child(3) { animation-delay: 5s; }
.rotator li:nth-child(4) { animation-delay: 7.5s; }
.rotator li:nth-child(5) { animation-delay: 10s; }
.rotator li:nth-child(6) { animation-delay: 12.5s; }
@keyframes rotate-words {
  0%      { opacity: 0; transform: translateY(8px); }
  2%      { opacity: 1; transform: translateY(0); }
  14.66%  { opacity: 1; transform: translateY(0); }
  16.66%  { opacity: 0; transform: translateY(-8px); }
  100%    { opacity: 0; transform: translateY(-8px); }
}

.corners { display: flex; justify-content: center; }
.cta {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 6px;
  transition: opacity 0.2s ease, letter-spacing 0.4s ease;
}
.cta:hover { opacity: 0.7; letter-spacing: 0.32em; }

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}
.lockup:hover .smiley { animation: wiggle 0.6s ease-in-out; }

/* ─── Generic section structure ─── */
section {
  padding: clamp(80px, 12vw, 160px) clamp(24px, 4vw, 64px);
}
.container {
  max-width: 1440px;
  margin: 0 auto;
}
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: clamp(20px, 4vw, 60px);
  margin-bottom: clamp(64px, 10vw, 120px);
  border-bottom: 1px solid var(--ink);
  padding-bottom: clamp(20px, 3vw, 32px);
}
.section-title {
  font-size: clamp(64px, 12vw, 200px);
}
.section-counter {
  align-self: end;
  font-feature-settings: 'tnum';
}

/* ─── INDEX (recent featured) ─── */
.index {
  background: var(--paper);
  color: var(--ink);
}
.featured {
  margin-bottom: clamp(80px, 14vw, 160px);
}
.featured:last-of-type { margin-bottom: 0; }
.featured-meta {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--ink);
  padding-top: 14px;
  margin-bottom: clamp(28px, 4vw, 48px);
  flex-wrap: wrap;
  gap: 8px;
}
.featured-body {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: end;
}
.featured:nth-of-type(even) .featured-body {
  grid-template-columns: 1fr 1.45fr;
}
.featured:nth-of-type(even) .featured-media { order: 2; }
.featured:nth-of-type(even) .featured-text  { order: 1; }

.featured-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--ink);
  overflow: hidden;
  text-decoration: none;
}
.featured-media .media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(.2,.8,.2,1), filter 0.4s ease;
}
.featured-media:hover .media { transform: scale(1.04); filter: brightness(1.08); }
.featured-media .play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(48px, 5vw, 68px);
  height: clamp(48px, 5vw, 68px);
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.3s ease, background 0.3s ease;
  pointer-events: none;
}
.featured-media:hover .play {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--yellow);
}
.featured-media .play svg { width: 38%; height: 38%; margin-left: 8%; }
.featured-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 50%);
  z-index: 1;
  pointer-events: none;
}

.featured-text {
  padding-bottom: clamp(8px, 1vw, 16px);
}
.featured-client {
  font-size: clamp(48px, 8vw, 132px);
  margin-bottom: clamp(8px, 1vw, 16px);
}
.featured-title {
  font-size: clamp(22px, 2.4vw, 36px);
  margin-bottom: clamp(20px, 3vw, 32px);
  line-height: 1.15;
}
.featured-brief {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.55;
  max-width: 44ch;
  margin: 0 0 clamp(24px, 3vw, 36px);
}
.featured-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  transition: opacity 0.2s ease, letter-spacing 0.4s ease;
}
.featured-link:hover { opacity: 0.65; letter-spacing: 0.26em; }

.view-all {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: clamp(20px, 3vw, 28px) 0;
  width: 100%;
  text-align: center;
  margin-top: clamp(40px, 6vw, 60px);
  transition: background 0.25s ease, color 0.25s ease;
}
.view-all:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 800px) {
  .featured-body,
  .featured:nth-of-type(even) .featured-body {
    grid-template-columns: 1fr;
    gap: clamp(20px, 4vw, 32px);
  }
  .featured:nth-of-type(even) .featured-media { order: 1; }
  .featured:nth-of-type(even) .featured-text  { order: 2; }
}

/* ─── STUDIO ─── */
.studio {
  background: var(--ink);
  color: var(--paper);
}
.studio .section-head {
  border-bottom-color: var(--paper);
}
.studio .section-head .bracket { color: var(--yellow); }
.studio-statement {
  font-size: clamp(28px, 4.5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 22ch;
  margin: 0 0 clamp(48px, 8vw, 80px);
}
.studio-statement em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--yellow);
}
.studio-caps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
  gap: clamp(0, 4vw, 24px);
  border-top: 1px solid rgba(244,234,218,0.25);
}
.studio-caps li {
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: clamp(16px, 2vw, 24px) 0;
  border-bottom: 1px solid rgba(244,234,218,0.25);
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 18px);
}
.studio-caps li::before {
  content: "→";
  font-weight: 400;
  opacity: 0.5;
}
@media (max-width: 800px) {
  .studio-caps { grid-template-columns: 1fr; }
}

/* ─── CLIENTS ─── */
.clients-section {
  background: var(--paper-2);
}
.clients-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 clamp(24px, 4vw, 48px);
  border-top: 1px solid var(--ink);
}
.clients-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: clamp(18px, 2.2vw, 28px) 0;
  border-bottom: 1px solid var(--ink);
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.clients-list li .num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(14px, 1.4vw, 18px);
  opacity: 0.55;
}
@media (max-width: 800px) {
  .clients-list { grid-template-columns: 1fr; }
}

/* ─── CONTACT ─── */
.contact {
  background: var(--yellow);
  text-align: left;
  padding-bottom: clamp(40px, 6vw, 60px);
}
.contact-statement {
  font-size: clamp(28px, 4.5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 22ch;
  margin: 0 0 clamp(40px, 6vw, 60px);
}
.contact-statement em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
}
.contact-email {
  display: inline-block;
  font-size: clamp(28px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
  color: inherit;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  transition: opacity 0.2s ease;
  font-family: 'Inter Tight', 'Inter', sans-serif;
}
.contact-email:hover { opacity: 0.65; }

.copyright {
  margin-top: clamp(80px, 14vw, 140px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: clamp(20px, 3vw, 32px);
  border-top: 1px solid var(--ink);
}
.copyright a { color: inherit; text-decoration: none; }
.copyright a:hover { opacity: 0.65; }

/* ─── COMPACT HEADER (work + detail pages) ─── */
.topbar {
  position: sticky;
  top: 0;
  background: var(--yellow);
  border-bottom: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(14px, 1.8vw, 18px) clamp(24px, 3.5vw, 44px);
  z-index: 50;
}
.topbar .home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.topbar .home-link img {
  width: 22px;
  height: 22px;
  mix-blend-mode: multiply;
}
.topbar nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 32px);
}
.topbar nav a {
  text-decoration: none;
  color: inherit;
}

/* ─── WORK ARCHIVE PAGE ─── */
.archive-section { background: var(--paper); }
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: clamp(32px, 5vw, 56px);
  flex-wrap: wrap;
}
.filter {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 9px 18px;
  border: 1px solid rgba(17,17,17,0.22);
  border-radius: 100px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.filter:hover { border-color: var(--ink); }
.filter.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.filter .count {
  margin-left: 6px;
  opacity: 0.6;
  font-feature-settings: 'tnum';
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 1.8vw, 28px);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 2.4vw, 36px);
  background: var(--ink-soft);
  color: var(--paper);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.card:hover { transform: translateY(-3px); }
.card.hidden { display: none; }
.card.tile      { grid-column: span 4; aspect-ratio: 4 / 5; }
.card.hero-card { grid-column: span 8; aspect-ratio: 16 / 10; }
.card.tone-cream  { background: var(--cream); color: var(--ink); }
.card.tone-sand   { background: var(--sand);  color: var(--ink); }
.card.tone-yellow { background: var(--yellow); color: var(--ink); }

.card.with-media { cursor: pointer; background: var(--ink); }
.card .media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 1.4s cubic-bezier(.2,.8,.2,1), filter 0.4s ease;
}
.card.with-media:hover .media {
  transform: scale(1.04);
  filter: brightness(1.08);
}
.card.with-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0) 75%);
  z-index: 1;
  pointer-events: none;
}
.card.with-media .play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(48px, 5vw, 68px);
  height: clamp(48px, 5vw, 68px);
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.3s ease, background 0.3s ease;
  pointer-events: none;
}
.card.with-media:hover .play {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--yellow);
}
.card.with-media .play svg { width: 38%; height: 38%; margin-left: 8%; }
.card.with-media .meta,
.card.with-media .title,
.card.with-media .desc { position: relative; z-index: 2; color: var(--paper); }
.card .meta {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.75;
  margin: 0 0 10px;
}
.card .title {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
}
.card.tile .title { font-size: clamp(17px, 1.5vw, 22px); }
.card .desc {
  font-size: clamp(13px, 1vw, 15px);
  margin: 14px 0 0;
  max-width: 56ch;
  line-height: 1.55;
  opacity: 0.85;
}
@media (max-width: 800px) {
  .work-grid { grid-template-columns: 1fr; }
  .card.hero-card, .card.tile {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }
}

/* ─── PROJECT DETAIL PAGE ─── */
.detail { background: var(--paper); color: var(--ink); padding-top: clamp(60px, 8vw, 100px); }
.detail-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(20px, 4vw, 40px);
  align-items: end;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: clamp(14px, 2vw, 18px) 0;
  margin-bottom: clamp(48px, 7vw, 80px);
}
.detail-client {
  font-size: clamp(56px, 12vw, 200px);
  margin: 0;
  line-height: 0.86;
}
.detail-title {
  font-size: clamp(28px, 4vw, 48px);
  margin: clamp(24px, 3vw, 40px) 0 clamp(48px, 7vw, 80px);
}
.detail-info {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  margin-bottom: clamp(60px, 9vw, 100px);
}
.detail-brief {
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.55;
  max-width: 50ch;
}
.detail-credits {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px clamp(20px, 3vw, 32px);
  font-size: 13px;
  align-content: start;
}
.detail-credits dt { font-weight: 500; opacity: 0.55; letter-spacing: 0.15em; text-transform: uppercase; font-size: 11px; }
.detail-credits dd { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.detail-credits dd:last-of-type { border-bottom: 0; }
.detail-credits dt:last-of-type { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }

.detail-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  overflow: hidden;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-hero iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 28px);
  margin-bottom: clamp(60px, 9vw, 100px);
}
.detail-gallery .g {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}
.detail-gallery .g img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery .span-12 { grid-column: span 12; aspect-ratio: 21 / 9; }
.detail-gallery .span-8  { grid-column: span 8;  aspect-ratio: 16 / 10; }
.detail-gallery .span-6  { grid-column: span 6;  aspect-ratio: 4 / 3; }
.detail-gallery .span-4  { grid-column: span 4;  aspect-ratio: 4 / 5; }

@media (max-width: 800px) {
  .detail-info { grid-template-columns: 1fr; }
  .detail-gallery { grid-template-columns: 1fr; }
  .detail-gallery .g { grid-column: span 1 !important; aspect-ratio: 4 / 3; }
}

.detail-nav {
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(28px, 4vw, 40px) 0;
  margin-top: clamp(40px, 6vw, 64px);
  gap: clamp(20px, 4vw, 40px);
}
.detail-nav a { text-decoration: none; color: inherit; }
.detail-nav a:hover { opacity: 0.65; }
.detail-nav .next { text-align: right; }
.detail-nav .next-client {
  display: block;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 4px;
  font-family: 'Inter Tight', 'Inter', sans-serif;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  .rotator li { animation: none; opacity: 1; transform: none; }
  .rotator li:not(:first-child) { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ─── Landing page theme (navy / bone) ───
   Scoped to body.landing so social35 + work pages are unaffected.
   The bone wordmark PNG has real transparency, so no blend mode. */
body.landing {
  background: var(--navy);
  color: var(--bone);
}
body.landing .lockup .wordmark {
  mix-blend-mode: normal;
  width: clamp(200px, 32vw, 400px);
}
