/* ============================================
   Motion Designer Portfolio — styles.css
   ============================================ */

:root {
  --bg: #0c0c0e;
  --bg-soft: #141417;
  --surface: #1a1a1f;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f2f0ec;
  --text-dim: #9b9a94;
  --accent: #ff5e5b;
  --accent-2: #ffbf5e;
  --radius: 18px;
  --font-display: "Syne", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

/* ===== Reveal on scroll ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].revealed { opacity: 1; transform: none; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(12, 12, 14, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.accent { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
}
.nav__links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  transition: color 0.3s;
}
.nav__links a:hover { color: var(--text); }

.nav__cta {
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: 999px;
  transition: background 0.3s, color 0.3s, border-color 0.3s !important;
}
.nav__cta:hover {
  background: var(--text);
  color: var(--bg) !important;
  border-color: var(--text);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__burger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.nav__burger.open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__burger.open span:last-child  { transform: translateY(-4px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px clamp(20px, 6vw, 80px) 60px;
  overflow: hidden;
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero__blob--1 {
  width: 480px; height: 480px;
  background: var(--accent);
  top: -120px; right: -80px;
}
.hero__blob--2 {
  width: 420px; height: 420px;
  background: #5b8cff;
  bottom: -140px; left: -100px;
  animation-delay: -7s;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-40px, 30px) scale(1.12); }
}

.hero__eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.hero__eyebrow::first-letter { color: var(--accent); }

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 14ch;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span {
  display: block;
  transform: translateY(110%);
  animation: lineUp 1s var(--ease) forwards;
}
.hero__title .line:nth-child(2) > span { animation-delay: 0.15s; }
@keyframes lineUp { to { transform: translateY(0); } }

.hero__italic {
  font-style: italic;
  font-weight: 600;
  color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 48px;
}
.hero__tagline {
  max-width: 42ch;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.hero__tagline strong { color: var(--text); font-weight: 500; }

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  cursor: pointer;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--text);
  color: var(--bg);
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary .btn__arrow { transition: transform 0.35s var(--ease); }
.btn--primary:hover .btn__arrow { transform: translateX(5px); }

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--text); }

.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: clamp(20px, 6vw, 80px);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hero__scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--text-dim), transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.55); opacity: 0.4; }
}

/* ===== MARQUEE ===== */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  background: var(--bg-soft);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: scrollX 26s linear infinite;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.marquee__track span { padding-right: 40px; flex-shrink: 0; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes scrollX {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== SECTIONS ===== */
.section {
  padding: clamp(80px, 12vw, 150px) clamp(20px, 6vw, 80px);
}

.section__head { margin-bottom: clamp(40px, 6vw, 70px); }
.section__index {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.section__sub {
  margin-top: 14px;
  color: var(--text-dim);
  max-width: 50ch;
}

/* ===== WORK ===== */
.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.22); }
.card--wide { grid-column: span 2; }

.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.card--wide .card__media { aspect-ratio: 21 / 9; }

/* Placeholder media — replace with <img> or <video> */
.card__thumb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 120% at 20% 20%, var(--tint1, #5b8cff) 0%, transparent 55%),
    radial-gradient(120% 120% at 80% 80%, var(--tint2, #5be0c7) 0%, transparent 55%),
    var(--bg-soft);
  transition: transform 0.7s var(--ease), filter 0.5s;
}
.card:hover .card__thumb { transform: scale(1.06); filter: saturate(1.2); }
.placeholder-emoji { font-size: 4rem; opacity: 0.9; }

/* Poster image / video thumbnail (dynamic cards) */
.card__thumb--img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s;
}
.card:hover .card__thumb--img { transform: scale(1.06); filter: saturate(1.2); }

.card[data-video-card] { cursor: pointer; }

.card__badge {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
}

.card__play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s, transform 0.4s var(--ease);
  background: rgba(0,0,0,0.25);
}
.card:hover .card__play { opacity: 1; transform: scale(1); }

.card__body { padding: 22px 24px 26px; }
.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.card__desc { color: var(--text-dim); font-size: 0.95rem; max-width: 60ch; }
.card__tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ===== SERVICES ===== */
.services { background: var(--bg-soft); }

.services__list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.service {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr;
  gap: clamp(16px, 3vw, 40px);
  align-items: baseline;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.service:hover { padding-left: 12px; }
.service__num {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.service__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  letter-spacing: -0.01em;
}
.service__text { color: var(--text-dim); max-width: 52ch; }

/* ===== ABOUT ===== */
.about__grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.about__photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}
.about__photo-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    radial-gradient(100% 100% at 50% 0%, rgba(255,94,91,0.25), transparent 60%),
    var(--surface);
  color: var(--text-dim);
  font-size: 0.85rem;
}
.about__photo-inner span { font-size: 3.5rem; }

.about__lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.about__body { color: var(--text-dim); max-width: 60ch; margin-bottom: 32px; }

.about__stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 56px);
  margin-bottom: 32px;
}
.about__stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}
.about__stats span {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.about__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.about__tools span {
  font-size: 0.8rem;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  transition: color 0.3s, border-color 0.3s;
}
.about__tools span:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }

/* ===== CLIENTS ===== */
.clients {
  padding-top: 0;
  text-align: center;
}
.clients__label {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.clients__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 22px 30px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}
.clients__row > span:nth-child(even) { font-size: 0.8em; color: rgba(255,255,255,0.15); }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.footer__inner {
  padding: clamp(90px, 14vw, 170px) clamp(20px, 6vw, 80px) 60px;
  text-align: center;
}

.footer__eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.footer__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.footer__italic {
  font-style: italic;
  font-weight: 600;
  color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
}

.footer__mail {
  display: inline-block;
  margin-top: 36px;
  font-size: clamp(1.1rem, 3vw, 1.7rem);
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  transition: color 0.3s, border-color 0.3s;
}
.footer__mail:hover { color: var(--accent); border-color: var(--accent); }

.footer__socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 40px;
}
.footer__socials a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  transition: color 0.3s;
}
.footer__socials a:hover { color: var(--text); }

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(20px, 6vw, 80px);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer__bar a { color: var(--text-dim); text-decoration: none; transition: color 0.3s; }
.footer__bar a:hover { color: var(--text); }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; z-index: 200; }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
}
.modal__box {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(88vw, 1000px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
}
.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.5);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}
.modal__close:hover { background: rgba(255,255,255,0.15); }
.modal__video { aspect-ratio: 16 / 9; }
.modal__video video { width: 100%; height: 100%; object-fit: contain; display: block; }
.modal__placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-dim);
  background: radial-gradient(90% 90% at 50% 30%, rgba(255,94,91,0.15), transparent 70%);
}
.modal__placeholder span { font-size: 3rem; }
.modal__placeholder code {
  font-size: 0.85em;
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .work__grid { grid-template-columns: 1fr; }
  .card--wide { grid-column: span 1; }
  .card--wide .card__media { aspect-ratio: 16 / 9; }

  .service { grid-template-columns: 1fr; gap: 8px; padding: 26px 0; }
  .service:hover { padding-left: 0; }

  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 320px; }
}

@media (max-width: 720px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    background: rgba(12,12,14,0.97);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
  }
  .nav__links.open { opacity: 1; pointer-events: auto; }
  .nav__links a { font-size: 1.5rem; font-family: var(--font-display); font-weight: 600; }
  .hero__meta { flex-direction: column; align-items: flex-start; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
