/* ============================================================
   MotionBrew Studio — style.css
   Espresso & amber system. Space Grotesk + Instrument Serif.
   ============================================================ */

:root {
  --espresso: #0b0805;
  --surface: #171009;
  --surface-2: #211710;
  --cream: #f4ecdd;
  --cream-dim: #cbbfa8;
  --amber: #f0b352;
  --amber-deep: #c96f1f;
  --muted: #9a8a74;
  --line: rgba(244, 236, 221, 0.1);
  --grad: linear-gradient(105deg, #c96f1f 0%, #f0b352 55%, #ffd9a0 100%);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--espresso);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--amber); color: var(--espresso); }

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--espresso);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader__mark { font-size: clamp(28px, 5vw, 48px); font-weight: 700; letter-spacing: -0.02em; }
.preloader__letter {
  display: inline-block; opacity: 0; transform: translateY(0.6em);
  animation: letter-up 0.6s var(--ease-out) forwards;
}
.preloader__letter--accent {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.preloader__letter:nth-child(1) { animation-delay: 0.05s; }
.preloader__letter:nth-child(2) { animation-delay: 0.1s; }
.preloader__letter:nth-child(3) { animation-delay: 0.15s; }
.preloader__letter:nth-child(4) { animation-delay: 0.2s; }
.preloader__letter:nth-child(5) { animation-delay: 0.25s; }
.preloader__letter:nth-child(6) { animation-delay: 0.3s; }
.preloader__letter:nth-child(7) { animation-delay: 0.38s; }
.preloader__letter:nth-child(8) { animation-delay: 0.43s; }
.preloader__letter:nth-child(9) { animation-delay: 0.48s; }
.preloader__letter:nth-child(10) { animation-delay: 0.53s; }
@keyframes letter-up { to { opacity: 1; transform: translateY(0); } }
.preloader__bar { width: min(240px, 50vw); height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0; background: var(--grad); animation: bar-fill 1.1s 0.3s var(--ease-out) forwards; }
@keyframes bar-fill { to { width: 100%; } }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 150;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--amber);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), opacity 0.25s;
  mix-blend-mode: difference;
}
.cursor.is-hover { width: 52px; height: 52px; }
.cursor.is-hidden { opacity: 0; }
.cursor-label {
  position: fixed; top: 0; left: 0; z-index: 151;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--espresso);
  background: var(--amber);
  padding: 8px 14px; border-radius: 99px;
  opacity: 0; scale: 0.6;
  transition: opacity 0.25s var(--ease-out), scale 0.25s var(--ease-out);
  white-space: nowrap;
}
.cursor-label.is-on { opacity: 1; scale: 1; }
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-label { display: none; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.nav.is-scrolled {
  background: rgba(11, 8, 5, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.nav__logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--cream); text-decoration: none;
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
}
.nav__logo sup { font-size: 10px; opacity: 0.6; margin-left: 1px; }
.nav__logo-mark { width: 30px; height: 30px; color: var(--cream); }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); }
.nav__links a {
  color: var(--cream); text-decoration: none; font-size: 15px; font-weight: 500;
  opacity: 0.75; transition: opacity 0.25s;
  position: relative;
}
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px;
  background: var(--amber); transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  opacity: 1 !important;
  background: var(--grad);
  color: var(--espresso) !important;
  font-weight: 700 !important;
  padding: 10px 22px; border-radius: 99px;
  transition: box-shadow 0.3s;
}
.nav__cta:hover { box-shadow: 0 0 32px rgba(240, 179, 82, 0.45); }
.nav__burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__burger span { display: block; width: 26px; height: 2px; background: var(--cream); margin: 6px 0; transition: transform 0.3s var(--ease-out), opacity 0.3s; }

@media (max-width: 760px) {
  .nav__burger { display: block; }
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center;
    background: rgba(11, 8, 5, 0.96);
    backdrop-filter: blur(20px);
    font-size: 22px; gap: 32px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.35s;
  }
  .nav__links.is-open { opacity: 1; pointer-events: auto; }
  .nav__links a { font-size: 24px; }
  .nav.menu-open .nav__burger span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.menu-open .nav__burger span:last-child { transform: translateY(-4px) rotate(-45deg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 34px; border-radius: 99px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s, color 0.3s;
  will-change: transform;
}
.btn--lg { padding: 20px 44px; font-size: 18px; }
.btn--solid { background: var(--grad); color: var(--espresso); }
.btn--solid:hover { box-shadow: 0 8px 40px rgba(240, 179, 82, 0.4); }
.btn--ghost {
  color: var(--cream); border: 1px solid rgba(244, 236, 221, 0.28);
  background: rgba(244, 236, 221, 0.04);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__scrim {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 60%, transparent 20%, rgba(11, 8, 5, 0.55) 75%, rgba(11, 8, 5, 0.92) 100%);
}
.hero__content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 120px clamp(20px, 5vw, 56px) 80px;
  max-width: 1080px;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(11, 8, 5, 0.4);
  backdrop-filter: blur(8px);
  padding: 10px 20px; border-radius: 99px;
  margin-bottom: 36px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 179, 82, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(240, 179, 82, 0); }
}
.hero__title {
  font-size: clamp(46px, 9.2vw, 118px);
  font-weight: 700; line-height: 1.02; letter-spacing: -0.035em;
  margin-bottom: 32px;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .word {
  display: inline-block;
  transform: translateY(115%) rotate(4deg);
}
body.is-loaded .hero__title .word {
  animation: word-up 0.9s var(--ease-out) forwards;
}
@keyframes word-up { to { transform: translateY(0) rotate(0); } }
.hero__sub {
  max-width: 640px; margin: 0 auto 44px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--cream-dim, #cbbfa8); color: rgba(244, 236, 221, 0.72);
}
.hero__actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(244, 236, 221, 0.3); border-radius: 14px;
  z-index: 2;
}
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; margin-left: -2px;
  width: 4px; height: 8px; border-radius: 3px; background: var(--amber);
  animation: scroll-hint 1.8s var(--ease-out) infinite;
}
@keyframes scroll-hint {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden; white-space: nowrap;
  padding: 22px 0;
  position: relative; z-index: 3;
}
.marquee__track { display: inline-flex; align-items: center; gap: 34px; animation: marquee 26s linear infinite; }
.marquee__track span {
  font-size: clamp(18px, 2.6vw, 26px); font-weight: 700; letter-spacing: -0.01em;
  text-transform: uppercase;
}
.marquee__track span:nth-child(4n+3) {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; text-transform: none;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.marquee__track i { color: var(--amber); font-style: normal; font-size: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(90px, 12vw, 160px) clamp(20px, 5vw, 56px); position: relative; }
.section__head { max-width: 820px; margin-bottom: clamp(48px, 6vw, 80px); }
.section__eyebrow {
  font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--amber); font-weight: 700; margin-bottom: 18px;
}
.section__title {
  font-size: clamp(38px, 6.4vw, 76px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.05;
}
.section__sub { margin-top: 22px; color: rgba(244, 236, 221, 0.65); font-size: 17px; max-width: 560px; }

/* ---------- Work ---------- */
.work { background: var(--espresso); }
.work__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 3.4vw, 44px);
  max-width: 1280px; margin: 0 auto;
}
.work-card { display: flex; flex-direction: column; gap: 20px; text-decoration: none; color: inherit; }
.work-card__frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 26px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform-style: preserve-3d;
  transition: border-color 0.4s;
}
.work-card:hover .work-card__frame { border-color: rgba(240, 179, 82, 0.45); }
.work-card__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-card__sound {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(244, 236, 221, 0.25);
  background: rgba(11, 8, 5, 0.55); backdrop-filter: blur(8px);
  color: var(--cream); font-size: 16px; cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.work-card__sound:hover { background: rgba(240, 179, 82, 0.85); transform: scale(1.08); }
.work-card__meta h3 { font-size: 22px; letter-spacing: -0.01em; margin-bottom: 8px; }
.work-card__meta p { color: rgba(244, 236, 221, 0.62); font-size: 15px; }
.tags { display: flex; gap: 8px; list-style: none; margin-top: 14px; flex-wrap: wrap; }
.tags li {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(240, 179, 82, 0.35);
  padding: 5px 12px; border-radius: 99px;
}
.work-card--cta {
  border-radius: 26px;
  border: 1.5px dashed rgba(240, 179, 82, 0.4);
  display: flex; align-items: center; justify-content: center;
  min-height: 420px;
  background: radial-gradient(ellipse at 50% 100%, rgba(201, 111, 31, 0.14), transparent 65%);
  transition: background 0.4s, border-color 0.4s;
}
.work-card--cta:hover { border-color: var(--amber); background: radial-gradient(ellipse at 50% 100%, rgba(201, 111, 31, 0.28), transparent 70%); }
.work-card__cta-inner { text-align: center; padding: 40px; }
.work-card__plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  border: 1.5px solid var(--amber); color: var(--amber);
  font-size: 30px; margin-bottom: 24px;
  transition: transform 0.4s var(--ease-out), background 0.3s, color 0.3s;
}
.work-card--cta:hover .work-card__plus { transform: rotate(90deg); background: var(--amber); color: var(--espresso); }
.work-card__cta-inner h3 { font-size: 28px; line-height: 1.15; margin-bottom: 12px; }
.work-card__cta-inner p { color: rgba(244, 236, 221, 0.6); font-size: 15px; }

/* ---------- Services ---------- */
.services { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.services__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  max-width: 1280px; margin: 0 auto;
}
.service {
  background: var(--surface);
  padding: clamp(32px, 4vw, 52px);
  position: relative; overflow: hidden;
  transition: background 0.4s;
}
.service::before {
  content: attr(data-index);
  position: absolute; top: 22px; right: 26px;
  font-family: var(--font-serif); font-style: italic;
  font-size: 44px; color: rgba(240, 179, 82, 0.18);
  transition: color 0.4s, transform 0.4s var(--ease-out);
}
.service::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.service:hover { background: var(--surface-2); }
.service:hover::before { color: rgba(240, 179, 82, 0.55); transform: translateY(-4px); }
.service:hover::after { transform: scaleX(1); }
.service h3 { font-size: 24px; margin-bottom: 14px; letter-spacing: -0.01em; }
.service p { color: rgba(244, 236, 221, 0.62); font-size: 15.5px; }

/* ---------- Process ---------- */
.process__steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(28px, 4vw, 48px);
  max-width: 1280px; margin: 0 auto;
  counter-reset: step;
}
.step { position: relative; padding-top: 26px; border-top: 1px solid var(--line); }
.step__num {
  position: absolute; top: -17px; left: 0;
  font-family: var(--font-serif); font-style: italic; font-size: 28px;
  background: var(--espresso); padding-right: 16px;
  color: var(--amber);
}
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { color: rgba(244, 236, 221, 0.62); font-size: 15px; }

/* ---------- Promises ---------- */
.promises { background: var(--surface); border-top: 1px solid var(--line); }
.promises__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(28px, 4vw, 44px);
  max-width: 1180px; margin: 0 auto;
  text-align: center;
}
.promise__big {
  font-size: clamp(56px, 8vw, 96px); font-weight: 700; letter-spacing: -0.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.promise__unit {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(30px, 4vw, 48px); color: var(--amber); margin-left: 2px;
}
.promise p { margin-top: 8px; color: rgba(244, 236, 221, 0.6); font-size: 15px; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden;
  text-align: center;
  padding-top: clamp(110px, 14vw, 190px);
  padding-bottom: clamp(110px, 14vw, 190px);
}
.cta__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.85; }
.cta__content { position: relative; z-index: 2; }
.cta__title {
  font-size: clamp(52px, 10vw, 132px);
  font-weight: 700; line-height: 0.98; letter-spacing: -0.04em;
  margin-bottom: 30px;
}
.cta__sub { color: rgba(244, 236, 221, 0.7); max-width: 480px; margin: 0 auto 48px; font-size: 17px; }
.cta__actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 28px clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--line);
  color: rgba(244, 236, 221, 0.45); font-size: 14px;
}
.footer__links { display: flex; gap: 24px; }
.footer__links a { color: rgba(244, 236, 221, 0.6); text-decoration: none; transition: color 0.25s; }
.footer__links a:hover { color: var(--amber); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
