/* ---------------------------------------------------
   mug — hero
   Tokens
--------------------------------------------------- */
:root {
  --bg: #0a0a0a;
  --text-primary: #f6f4ef;
  --text-secondary: #98978f;
  --white: #ffffff;
  --black: #0a0a0a;

  --glass-bg: rgba(10, 10, 10, 0.5);
  --card-bg: #141414;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h: 84px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; }

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

/* ---------------------------------------------------
   Nav — fixed, glass
--------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: transform 0.5s var(--ease-out);
}

.nav.is-hidden {
  transform: translateY(-100%);
}

.nav-inner {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(24px, 4.2vw, 80px);
  height: var(--nav-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) forwards;
  animation-delay: 0.05s;
}

.logo img {
  height: 21px;
  width: auto;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.nav-lang {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  opacity: 0;
  transition: color 0.25s var(--ease-out);
  animation: fadeUp 0.7s var(--ease-out) forwards;
  animation-delay: 0.09s;
}

.nav-lang:hover {
  color: var(--white);
}

.cta-nav {
  display: inline-flex;
  align-items: center;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  padding: 12px 22px;
  border-radius: 0;
  white-space: nowrap;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) forwards;
  animation-delay: 0.12s;
}

.cta-nav:hover {
  transform: translateY(-2px);
  opacity: 0.9 !important;
}

/* ---------------------------------------------------
   Hero + Showcase — one video, pinned then scrubbed
   to fullscreen as the section scrolls
--------------------------------------------------- */
.hero-showcase {
  position: relative;
  height: 300vh;
  height: 300dvh;
}

.hero-showcase-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.hero-inner {
  position: relative;
  z-index: 10;
  width: fit-content;
  max-width: 700px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 48px) 24px 64px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 36px;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line span {
  display: inline-block;
  transform: translateY(115%);
  animation: lineUp 0.9s var(--ease-out) forwards;
}

.hero-title .line:nth-child(1) span { animation-delay: 0.22s; }
.hero-title .line:nth-child(2) span { animation-delay: 0.34s; }
.hero-title .line:nth-child(3) span { animation-delay: 0.46s; }

.hero-title-lines--desktop { display: contents; }
.hero-title-lines--mobile { display: none; }

.hero-media {
  position: relative;
  width: 527px;
  height: 231px;
  max-width: 100%;
  overflow: hidden;
  background: #111;
  clip-path: inset(0 0 0 100%);
  animation: wipeReveal 1s var(--ease-out) forwards;
  animation-delay: 0.55s;
  z-index: 30;
  flex-shrink: 0;
}

.hero-media.is-fixed {
  position: fixed;
  max-width: none;
  z-index: 40;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(0.95);
  transform: scale(1.08);
  animation: mediaSettle 1.6s var(--ease-out) forwards;
  animation-delay: 0.55s;
}

.hero-sub {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 300;
  color: var(--text-secondary);
  margin: 28px 0 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-out) 1.05s, transform 0.8s var(--ease-out) 1.05s;
}

/* ---------------------------------------------------
   Showcase overlay + caption — pinned above the video
--------------------------------------------------- */
.showcase-overlay {
  position: absolute;
  inset: 0;
  z-index: 31;
  opacity: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.35) 0%, rgba(10, 10, 10, 0.05) 30%, rgba(10, 10, 10, 0.65) 100%);
}

.showcase-content {
  position: absolute;
  inset: 0;
  z-index: 32;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 24px clamp(24px, 4.2vw, 80px) clamp(48px, 8vw, 96px);
  pointer-events: none;
}

.showcase-caption {
  margin: 0;
  max-width: 920px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 40px;
  line-height: 1.16;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.showcase-caption.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------
   Processo — stacked cards, replaced on scroll
--------------------------------------------------- */
.process {
  position: relative;
  height: 100vh;
  height: 100dvh;
}

.process-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  gap: clamp(40px, 6vw, 100px);
  padding: calc(var(--nav-h) + 56px) clamp(24px, 4.2vw, 80px) 64px;
  background: var(--bg);
}

.process-intro {
  flex: 0 0 clamp(260px, 26vw, 380px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.process-intro.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.process-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

.process-lead {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
  color: var(--white);
  max-width: 34ch;
  margin: 0;
}

.process-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.process-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: clamp(24px, 3vw, 48px);
  row-gap: 24px;
  background: var(--card-bg);
  padding: 48px;
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  pointer-events: none;
}

.process-card.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.process-card.is-leaving {
  transform: translateY(-48px);
}

.process-card-title {
  grid-column: 1 / 2;
  grid-row: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 2.6vw, 36px);
  color: var(--white);
  margin: 0;
  align-self: start;
}

.process-card-media {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  align-self: start;
  justify-self: end;
  width: 100%;
  max-width: 470px;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 60%),
    #1d1d1d;
}

.process-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  display: block;
}

.process-card-text {
  grid-column: 1 / 2;
  grid-row: 2;
  min-width: 0;
  align-self: end;
  max-width: 46ch;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------------------------------------------------
   Cases — animated horizontal carousel
--------------------------------------------------- */
.cases {
  padding: 140px 0 160px;
  overflow: hidden;
}

.cases-title {
  padding: 0 clamp(24px, 4.2vw, 80px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 48px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.cases-title.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cases-carousel {
  width: 100%;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.cases-carousel.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cases-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 24px;
  padding: 0 clamp(24px, 4.2vw, 80px);
  animation: casesMarquee 36s linear infinite;
}

.cases-carousel:hover .cases-track {
  animation-play-state: paused;
}

.case-tile {
  position: relative;
  display: block;
  flex: 0 0 auto;
  height: clamp(300px, 32vw, 460px);
  border-radius: 0;
  overflow: hidden;
  background: var(--card-bg);
}

.case-tile img {
  height: 100%;
  width: auto;
  display: block;
  transition: transform 0.6s var(--ease-out);
}

.case-tile:hover img,
.case-tile:focus-visible img {
  transform: scale(1.05);
}

.case-tile:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

@keyframes casesMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 12px)); }
}

/* ---------------------------------------------------
   Ticker — animated divider between sections
--------------------------------------------------- */
.ticker {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg);
}

.ticker-band {
  width: 100%;
  overflow: hidden;
  background: var(--white);
  border-top: 1px solid rgba(10, 10, 10, 0.1);
  border-bottom: 1px solid rgba(10, 10, 10, 0.1);
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: clamp(24px, 3.6vw, 56px);
  padding: clamp(12px, 1.8vw, 20px) clamp(16px, 2.5vw, 36px);
  animation: tickerMarquee 16s linear infinite;
}

.ticker-band:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  flex: 0 0 auto;
}

.ticker-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  font-size: clamp(20px, 3.6vw, 44px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--black);
  white-space: nowrap;
}

.ticker-word--italic {
  font-style: italic;
}

.ticker-media {
  display: block;
  width: clamp(90px, 9vw, 150px);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #111;
}

.ticker-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  display: block;
}

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

/* ---------------------------------------------------
   Closing — footer panel with the mug wordmark
--------------------------------------------------- */
.closing {
  padding: clamp(16px, 3vw, 40px);
  background: var(--bg);
}

.closing-panel {
  border-radius: 0;
  background: var(--white);
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px) clamp(24px, 4.2vw, 80px) clamp(16px, 3vw, 32px);
}

.closing-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.closing-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.closing-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.closing-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.01em;
  color: var(--black);
  margin: 0;
}

.closing-cta {
  display: inline-flex;
  align-items: center;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  padding: 14px 24px;
  border-radius: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}

.closing-cta:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.closing-social {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.closing-social a {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  color: var(--black);
  transition: opacity 0.3s var(--ease-out);
}

.closing-social a:hover {
  opacity: 0.6;
}

.closing-wordmark {
  margin-top: clamp(64px, 12vw, 180px);
  color: var(--black);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s var(--ease-out) 0.15s, transform 1.1s var(--ease-out) 0.15s;
}

.closing-wordmark.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.closing-wordmark svg {
  width: 100%;
  height: auto;
  display: block;
}

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

@keyframes lineUp {
  from { transform: translateY(115%); }
  to   { transform: translateY(0); }
}

@keyframes wipeReveal {
  from { clip-path: inset(0 0 0 100%); }
  to   { clip-path: inset(0 0 0 0%); }
}

@keyframes mediaSettle {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

/* ---------------------------------------------------
   Reduced motion
--------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .nav {
    transition: none !important;
  }
  .logo, .cta-nav, .nav-lang, .hero-sub {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-title .line span {
    animation: none !important;
    transform: none !important;
  }
  .hero-media {
    animation: none !important;
    clip-path: inset(0 0 0 0%) !important;
  }
  .hero-media video {
    animation: none !important;
    transform: none !important;
  }
  .hero-showcase {
    height: auto;
  }
  .hero-showcase-pin {
    position: static;
    height: auto;
    overflow: visible;
    padding-bottom: 80px;
  }
  .hero-inner {
    height: auto;
  }
  .showcase-overlay {
    display: none;
  }
  .showcase-content {
    position: static;
    padding: 40px 24px 0;
  }
  .showcase-caption {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .process {
    height: auto;
  }
  .process-pin {
    position: static;
    height: auto;
    flex-direction: column;
    gap: 32px;
  }
  .process-intro {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .process-stage {
    height: auto;
  }
  .process-card {
    position: static;
    display: flex;
    flex-direction: column;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }
  .process-card + .process-card {
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
  }
  .process-card-media {
    position: static;
    width: 100%;
    max-width: 420px;
    margin: 20px 0;
  }
  .cases-title,
  .cases-carousel {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .cases-track {
    animation: none !important;
    overflow-x: auto;
  }
  .case-tile img {
    transition: none !important;
  }
  .ticker-track {
    animation: none !important;
    overflow-x: auto;
  }
  .closing-top {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .closing-wordmark {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --nav-h: 68px; }

  .nav-inner { padding: 16px 20px; }
  .logo img { height: 17px; }
  .nav-actions { gap: 14px; }
  .nav-lang { font-size: 12px; }
  .cta-nav { padding: 10px 16px; font-size: 13px; }

  .hero-inner { padding: calc(var(--nav-h) + 32px) 20px 48px; }
  .hero-title { font-size: clamp(28px, 8vw, 36px); margin-bottom: 26px; }
  .hero-title-lines--desktop { display: none; }
  .hero-title-lines--mobile { display: contents; }
  .hero-media { width: 100%; height: auto; aspect-ratio: 527 / 231; }
  .hero-sub { font-size: 16px; margin-top: 22px; }

  .showcase-content {
    padding: 24px 20px 40px;
  }
  .showcase-caption {
    max-width: 100%;
    font-size: clamp(24px, 7vw, 32px);
  }

  .cases { padding: 96px 0 120px; }
  .cases-title { padding: 0 20px; font-size: clamp(32px, 9vw, 40px); }
  .cases-track { gap: 14px; padding: 0 20px; animation-duration: 24s; }
  .case-tile { height: clamp(220px, 60vw, 320px); border-radius: 0; }

  .ticker-track { gap: 16px; padding: 10px 12px; animation-duration: 10s; }
  .ticker-word { font-size: clamp(16px, 7vw, 24px); }
  .ticker-media { width: clamp(70px, 24vw, 110px); }

  .closing { padding: 12px; }
  .closing-panel { border-radius: 0; padding: 32px 20px 20px; }
  .closing-top { flex-direction: column; align-items: flex-start; gap: 32px; }
  .closing-social { align-items: flex-start; }
  .closing-wordmark { margin-top: 64px; }
}

@media (max-width: 768px) {
  .process { height: auto; }
  .process-pin {
    position: static;
    height: auto;
    flex-direction: column;
    padding: calc(var(--nav-h) + 32px) 20px 48px;
    gap: 32px;
  }
  .process-intro { flex: none; justify-content: flex-start; gap: 20px; }
  .process-title { font-size: clamp(32px, 9vw, 40px); }
  .process-stage { height: auto; }
  .process-card {
    position: static;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 0;
    background: none;
  }
  .process-card + .process-card {
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
  }
  .process-card-media {
    position: static;
    width: 100%;
    margin: 20px 0;
  }
  .process-card-text { max-width: 100%; }
}
