/* ============================================================
   THINKWILD STUDIOS — Stylesheet
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: #f4f1eb;
  color: #0c0c0c;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Hero video */
.hero__video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero__video-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Cover while maintaining 16:9 */
  width: max(100%, 177.78vh);
  height: max(100%, 56.25vw);
  pointer-events: none;
  border: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.48);
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================================
   COOKIE CONSENT — Hamlet-style: thin info bar + prefs modal
   ============================================================ */

/* Thin full-width strip docked to the bottom of the viewport */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9995;
  background: #e9e6e0;          /* soft warm gray, matches the cream palette */
  color: var(--dark);
  border-top: 1px solid var(--border);
  padding: 14px 32px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  line-height: 1.5;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.is-open { transform: translateY(0); }

.cookie-banner__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.cookie-banner__text {
  flex: 1;
  margin: 0;
  color: rgba(12, 12, 12, 0.72);
  font-size: 12px;
  letter-spacing: 0.005em;
}
.cookie-banner__text a {
  color: var(--dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-banner__btn {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--dark);
  background: transparent;
  color: var(--dark);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.cookie-banner__btn:hover {
  background: var(--dark);
  color: var(--light);
}

@media (max-width: 720px) {
  .cookie-banner { padding: 14px 18px; }
  .cookie-banner__inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-banner__text { font-size: 11.5px; }
  .cookie-banner__actions { justify-content: flex-end; }
}

/* Floating "Cookie Preferences" pill — appears after the banner is
   dismissed (or any time outside the first visit). Same warm gray. */
.cookie-prefs {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9994;
  background: #fff;
  color: var(--dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.cookie-prefs.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cookie-prefs:hover {
  background: var(--dark);
  color: var(--light);
  border-color: var(--dark);
}

/* The floating pill is disabled entirely — visitors reach the Manage
   Cookies modal via the "Cookies" link in the footer instead. */
.cookie-prefs { display: none !important; }

/* Manage Cookies modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cookie-modal.is-open { display: flex; }
.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cookie-modal__panel {
  position: relative;
  background: #fff;
  color: var(--dark);
  max-width: 720px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 36px 40px 32px;
  font-family: 'Space Grotesk', sans-serif;
  animation: cookieModalIn 0.3s ease;
}
@keyframes cookieModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cookie-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.cookie-modal__title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.cookie-modal__close {
  background: none;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--dark);
  cursor: pointer;
  padding: 6px;
  transition: opacity 0.2s ease;
}
.cookie-modal__close:hover { opacity: 0.6; }

.cookie-modal__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.cookie-modal__row:last-of-type { border-bottom: none; }
.cookie-modal__row h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.005em;
}
.cookie-modal__row p {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(12, 12, 12, 0.65);
  margin: 0;
  max-width: 500px;
}
.cookie-modal__always {
  font-size: 12px;
  color: rgba(12, 12, 12, 0.55);
  white-space: nowrap;
  margin-top: 4px;
}

/* Toggle switch */
.cookie-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin-top: 2px;
}
.cookie-toggle input { display: none; }
.cookie-toggle__slider {
  position: relative;
  width: 36px;
  height: 20px;
  background: #d6d2c9;
  border-radius: 999px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.cookie-toggle__slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}
.cookie-toggle input:checked + .cookie-toggle__slider {
  background: var(--accent);
}
.cookie-toggle input:checked + .cookie-toggle__slider::before {
  transform: translateX(16px);
}
.cookie-toggle__label {
  font-size: 12px;
  color: rgba(12, 12, 12, 0.6);
  min-width: 24px;
}

.cookie-modal__save {
  margin-top: 24px;
  margin-left: auto;
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--dark);
  background: transparent;
  color: var(--dark);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.cookie-modal__save:hover {
  background: var(--dark);
  color: var(--light);
}

@media (max-width: 600px) {
  .cookie-modal__panel { padding: 28px 22px 24px; }
  .cookie-modal__row { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-modal__row > div:last-child { align-self: flex-start; }
}

/* Footer-area "manage cookies" link — small unobtrusive button */
.cookie-reopen {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Skip-to-content link — hidden until focused by Tab key */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 10000;
  background: var(--accent);
  color: var(--light);
  padding: 12px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--light);
  outline-offset: 2px;
}

/* VARIABLES */
:root {
  --dark: #0c0c0c;
  --light: #f4f1eb;
  --gray: #7a756e;
  --border: #d6d2c9;
  --accent: #00394c;
  --sans: 'Space Grotesk', sans-serif;
  --serif: 'DM Serif Display', serif;
  --nav-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Brand accent: italic emphasis + section kickers in project body copy */
.proj-overview__body em { color: var(--accent); }
.proj-overview__story h2,
.proj-credits h2 { color: var(--accent); }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.t-sans {
  font-family: var(--sans);
  font-weight: 700;
}

.t-serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: var(--nav-h);
  color: var(--light);
  background: rgba(12, 12, 12, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: color 0.4s ease, background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav.is-light {
  color: var(--dark);
  background: rgba(244, 241, 235, 0.88);
  border-bottom-color: var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav__logo svg {
  flex-shrink: 0;
  transition: color 0.4s ease;
}

.nav__logo {
  position: relative;
}

/* White logo (visible on dark nav) */
.nav__logo img {
  height: 40px;
  width: auto;
  display: block;
  flex-shrink: 0;
  transition: opacity 0.35s ease;
}

/* Blue overlay (visible on light nav) — use the PNG as a mask and fill
   with the exact --accent color. Avoids the filter-chain approximation
   that rendered as a brighter royal blue on mobile Safari. */
.nav__logo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--accent);
  -webkit-mask-image: url('TW%20logos/LOGO_TW_WHITE.png');
          mask-image: url('TW%20logos/LOGO_TW_WHITE.png');
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: left center;
          mask-position: left center;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.nav.is-light .nav__logo img { opacity: 0; }
.nav.is-light .nav__logo::before { opacity: 1; }

.contact__logo img {
  height: 36px;
  width: auto;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.nav__link:hover { opacity: 1; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav__hamburger.is-open span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}
.nav__hamburger.is-open span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 490;
  background: var(--dark);
  color: var(--light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 48px) 40px 48px;
  transform: translateX(100%);
  transition: transform 0.55s var(--ease);
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
}

.mobile-menu__link {
  font-size: clamp(36px, 9vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: block;
  opacity: 0.65;
  transition: opacity 0.2s ease, padding-left 0.2s ease;
}

.mobile-menu__link:hover {
  opacity: 1;
  padding-left: 10px;
}

.mobile-menu__foot {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  line-height: 1.8;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--dark);
  color: var(--light);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 48px 88px;
  overflow: hidden;
}

/* bottom vignette over video */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__headline {
  margin-bottom: 36px;
}

.hero__line-mask {
  overflow: hidden;
  line-height: 0.94;
  /* Extra room below the baseline so italic descenders (g, p, y…)
     aren't clipped — countered by negative margin on the next line
     so the visual stacking stays tight. */
  padding-bottom: 0.35em;
  margin-bottom: -0.35em;
}

.hero__line-mask + .hero__line-mask {
  margin-top: 0.02em;
}

.hero__line {
  display: block;
  font-size: clamp(64px, 12.5vw, 160px);
  letter-spacing: -0.04em;
  line-height: 0.94;
  transform: translateY(105%);
  animation: lineReveal 0.9s var(--ease) forwards;
}

.hero__line--sans {
  font-family: var(--sans);
  font-weight: 700;
}

.hero__line--serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

/* Inline italic emphasis inside a sans line (e.g. only "wild" in
   "something wild") */
.hero__line em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.hero__line-mask:nth-child(1) .hero__line { animation-delay: 0.15s; }
.hero__line-mask:nth-child(2) .hero__line { animation-delay: 0.32s; }
.hero__line-mask:nth-child(3) .hero__line { animation-delay: 0.49s; }

@keyframes lineReveal {
  to { transform: translateY(0); }
}

.hero__sub {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.75s forwards;
}

.hero__sub-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.hero__sub span {
  opacity: 0.45;
}

.hero__cta {
  position: absolute;
  bottom: 88px;
  right: 48px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 14px 22px;
  color: var(--light);
  cursor: pointer;
  opacity: 0;
  transition: background 0.2s ease, opacity 0.2s ease;
  animation: fadeUp 0.8s var(--ease) 0.95s forwards;
}

.hero__cta:hover {
  background: rgba(255,255,255,0.06);
  opacity: 1 !important;
}

.hero__cta svg {
  flex-shrink: 0;
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 1.1s forwards;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.6; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TICKER
   ============================================================ */
.ticker {
  background: var(--dark);
  color: var(--light);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 18px 0;
  overflow: hidden;
  user-select: none;
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: tickerMove 45s linear infinite;
}

.ticker__track:hover {
  animation-play-state: paused;
}

.ticker__inner {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  padding-right: 0;
}

.ticker__inner span {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 0 18px;
}

.ticker__inner .t-italic {
  font-family: var(--serif);
  font-style: italic;
}

.ticker__sep {
  opacity: 0.2;
  padding: 0 4px !important;
}

@keyframes tickerMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto {
  background: var(--light);
  padding: 120px 48px 160px;
}

.manifesto__inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.manifesto__label {
  margin-bottom: 36px;
}

.manifesto__body {
  font-size: clamp(26px, 3.8vw, 50px);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--dark);
  margin-bottom: 52px;
}

.manifesto__body em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.manifesto__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 88px;
}

.manifesto__stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 120px;
  border-top: 1px solid var(--border);
  padding-top: 64px;
  width: fit-content;
  margin: 0 auto;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat__num {
  font-size: clamp(68px, 9.6vw, 116px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--accent);
}

.stat__label {
  font-size: 17px;
  color: var(--gray);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.22s ease;
}

.btn--border {
  padding: 14px 26px;
  border: 1px solid var(--dark);
  color: var(--dark);
}

.btn--border:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--light);
}

.btn--border-light {
  padding: 14px 26px;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--light);
}

.btn--border-light:hover {
  background: var(--light);
  color: var(--dark);
}

.btn--ghost {
  padding: 0;
  color: var(--gray);
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
  letter-spacing: 0.04em;
  font-size: 13px;
  text-transform: none;
  font-weight: 400;
}

.btn--ghost:hover {
  color: var(--dark);
  border-color: var(--dark);
}

/* ============================================================
   WORK / PROJECTS
   ============================================================ */
.work {
  background: var(--dark);
  color: var(--light);
  padding: 88px 48px 108px;
}

.work__header {
  margin-bottom: 56px;
}

.work__title {
  font-size: clamp(72px, 13vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 auto 64px;
  max-width: 1880px;
}

/* Home page featured cards — caption overlays the image, fades in on hover */
.work__grid .proj__link {
  position: relative;
  display: block;
}

.work__grid .proj__caption {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 64px 28px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
  font-size: 18px;
}

.work__grid .proj:hover .proj__caption {
  opacity: 1;
  transform: translateY(0);
}

/* Hide the arrow overlay on home cards — caption animation is the affordance */
.work__grid .proj__overlay { display: none; }

/* Project cards */
.proj {
  overflow: hidden;
  background: #111;
}

.proj__link {
  display: block;
}

.proj__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.proj__media img {
  transition: transform 0.7s var(--ease);
}

.proj:hover .proj__media img {
  transform: scale(1.05);
}

.proj__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.35s ease;
}

.proj:hover .proj__overlay {
  background: rgba(0,0,0,0.28);
}

.proj__arrow {
  font-size: 28px;
  color: white;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.proj:hover .proj__arrow {
  opacity: 1;
  transform: translateX(0);
}

.proj__caption {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 16px 22px 20px;
  font-size: 16px;
  line-height: 1;
}

.proj__client {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.proj__slash {
  color: rgba(255,255,255,0.25);
  font-weight: 300;
}

.proj__name {
  color: rgba(255,255,255,0.45);
  font-weight: 300;
}

.work__more {
  display: flex;
  justify-content: center;
}

/* ============================================================
   VOCATIONS
   ============================================================ */
.vocations {
  background: var(--light);
  padding: 120px 48px 120px;
}

.vocations__top {
  max-width: 1200px;
  margin: 0 auto 72px;
}

.vocations__label {
  margin-bottom: 20px;
}

.vocations__heading {
  font-size: clamp(48px, 7.5vw, 100px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--accent);
}

.vocations__heading em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.vocations__list {
  max-width: 1200px;
  margin: 0 auto;
}

.voc {
  display: grid;
  grid-template-columns: 96px 1fr 40px;
  align-items: start;
  gap: 28px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  cursor: default;
  transition: padding-left 0.3s ease;
}

.voc:last-child {
  border-bottom: 1px solid var(--border);
}

.voc:hover {
  padding-left: 6px;
}

.voc__num {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1;
  padding-top: 2px;
}

.voc__name {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
  transition: color 0.25s ease;
}

.voc:hover .voc__name {
  color: var(--accent);
}

.voc__desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.65;
  max-width: 480px;
}

.voc__arrow {
  font-size: 22px;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  padding-top: 7px;
  color: var(--dark);
}

.voc:hover .voc__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact {
  background: var(--accent);
  color: var(--light);
  padding: 120px 48px 60px;
}

.contact__inner {
  max-width: 1320px;
  margin: 0 auto;
}

.contact__top {
  padding-bottom: 80px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 56px;
}

.contact__headline {
  font-size: clamp(42px, 7.5vw, 100px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 40px;
  max-width: 900px;
}

.contact__headline em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.contact__email {
  display: block;
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 4px;
  width: fit-content;
  transition: color 0.22s ease, border-color 0.22s ease;
}

.contact__email + .contact__email {
  margin-top: 20px;
}

.contact__email:hover {
  color: var(--light);
  border-color: rgba(255,255,255,0.5);
}

.contact__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.contact__logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact__socials {
  display: flex;
  gap: 22px;
  align-items: center;
}

.contact__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s ease, transform 0.2s ease;
}

.contact__socials a:hover {
  color: var(--light);
  transform: translateY(-2px);
}

.contact__socials svg {
  width: 100%;
  height: 100%;
  display: block;
}

.contact__legal {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

.contact__legal a {
  transition: color 0.2s ease;
}

.contact__legal a:hover {
  color: var(--light);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .nav {
    padding: 0 28px;
  }

  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  .hero {
    padding: 0 28px 80px;
  }

  .hero__cta {
    /* Drop out of absolute positioning so the button flows as a flex
       item under .hero__content — prevents the overlap with the
       "Audiovisual Production Studio · Madrid, Spain" subtitle. */
    position: static;
    align-self: flex-start;
    margin-top: 28px;
    padding: 13px 18px;
    font-size: 11px;
  }

  .ticker__inner span { font-size: 13px; padding: 0 14px; }

  .manifesto {
    padding: 80px 28px;
  }

  .manifesto__stats {
    grid-template-columns: repeat(2, auto);
    gap: 40px 48px;
  }

  .work {
    padding: 72px 28px 88px;
  }

  .work__grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .vocations {
    padding: 88px 28px;
  }

  .voc {
    grid-template-columns: 40px 1fr;
  }

  .voc__arrow { display: none; }

  .contact {
    padding: 88px 28px 48px;
  }

  .contact__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .mobile-menu {
    padding: calc(var(--nav-h) + 36px) 28px 36px;
  }
}

@media (max-width: 600px) {
  .work__grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .manifesto__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .manifesto__stats {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .hero__scroll {
    display: none;
  }

}


/* ============================================================
   CLIENTS / BRAND LOGOS MARQUEE
   ============================================================ */
.clients {
  background: var(--light);
  padding: 80px 0 88px;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.clients__header {
  padding: 0 48px;
  margin-bottom: 48px;
}

.logo-row {
  overflow: hidden;
  margin-bottom: 56px;
}

.logo-row:last-child {
  margin-bottom: 0;
}

.logo-row__track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.logo-row--left .logo-row__track {
  animation: logoLeft 260s linear infinite;
}

.logo-row--right .logo-row__track {
  animation: logoRight 290s linear infinite;
}

/* Pause on hover of individual row — desktop only.
   On touch devices :hover fires on tap and sticks, freezing the
   marquee until you tap elsewhere. (hover: hover) excludes touch. */
@media (hover: hover) and (pointer: fine) {
  .logo-row:hover .logo-row__track {
    animation-play-state: paused;
  }
}

.logo-row__inner {
  display: flex;
  align-items: center;
  gap: 120px;
  flex-shrink: 0;
  padding-right: 120px;
}

.logo-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 80px;
}

.logo-pill span {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(12, 12, 12, 0.15);
  white-space: nowrap;
  line-height: 1;
  transition: color 0.3s ease;
}

.logo-img {
  display: block;
  height: 80px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  opacity: 0.15;
  filter: grayscale(1);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Hover-only: brighten + recolor on devices with a real cursor.
   On touch devices the :hover state sticks after a tap, which on
   mobile Safari rendered as the un-tinted original logo (e.g. the
   royal-blue Peroni you saw). Scoping prevents the bug entirely. */
@media (hover: hover) and (pointer: fine) {
  .logo-pill:hover span {
    color: rgba(12, 12, 12, 0.65);
  }

  .logo-pill:hover .logo-img {
    opacity: 1;
    /* Tint to --accent (#00394c). brightness(0) flattens any colored
       source to black, then the chain reconstructs as deep teal-blue. */
    filter: brightness(0) saturate(100%) invert(14%) sepia(95%) saturate(2476%) hue-rotate(176deg) brightness(94%) contrast(101%);
  }
}

@keyframes logoLeft {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes logoRight {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

@media (max-width: 960px) {
  .clients {
    padding: 64px 0 72px;
  }

  .clients__header {
    padding: 0 28px;
    margin-bottom: 36px;
  }

  .logo-row__inner {
    gap: 80px;
    padding-right: 80px;
  }

  .logo-pill {
    height: 56px;
  }

  .logo-pill span {
    font-size: 16px;
  }

  .logo-img {
    height: 56px;
  }
}

/* ============================================================
   IMAGE LIGHTBOX
   ============================================================ */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.img-lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.img-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  cursor: zoom-out;
}

.img-lightbox__frame {
  position: relative;
  z-index: 1;
  max-width: min(94vw, 1400px);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.97);
  transition: transform 0.3s ease;
}

.img-lightbox.is-open .img-lightbox__frame {
  transform: scale(1);
}

.img-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
}

.img-lightbox__close {
  position: fixed;
  top: 24px;
  right: 28px;
  color: rgba(255,255,255,0.6);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease;
  z-index: 2;
}

.img-lightbox__close:hover { color: #fff; }

.img-lightbox__prev,
.img-lightbox__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px;
  font-size: 28px;
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 2;
  user-select: none;
}

.img-lightbox__prev { left: 16px; }
.img-lightbox__next { right: 16px; }
.img-lightbox__prev:hover,
.img-lightbox__next:hover { color: #fff; }

.img-lightbox__counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}

/* Make gallery images feel clickable */
.proj-gallery__item {
  cursor: zoom-in;
}

/* ============================================================
   REEL LIGHTBOX
   ============================================================ */
.reel-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.reel-modal.is-open {
  opacity: 1;
  pointer-events: all;
}

.reel-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.reel-modal__frame {
  position: relative;
  z-index: 1;
  width: min(92vw, 1200px);
  transform: scale(0.96);
  transition: transform 0.35s ease;
}

.reel-modal.is-open .reel-modal__frame {
  transform: scale(1);
}

.reel-modal__video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.reel-modal__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.reel-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  color: rgba(255, 255, 255, 0.6);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease;
}

.reel-modal__close:hover {
  color: #fff;
}
