:root {
  --bg: #0c0c0f;
  --bg-alt: #121216;
  --surface: #1a1a20;
  --text: #f2f0ec;
  --muted: #9a97a0;
  --accent: #ee5a5a;
  --accent-soft: rgba(238, 90, 90, 0.14);
  --font-display: "Bebas Neue", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { 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;
}

.accent { color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 5vw;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}
.nav.scrolled {
  background: rgba(12, 12, 15, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  padding: 0.7rem 5vw;
}
/* ---------- Chromatic wordmark (main logo) ---------- */
.chromatic {
  position: relative;
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: #f6f4ff;
  letter-spacing: -0.01em;
  z-index: 0;
  isolation: isolate;
}
.chromatic::before,
.chromatic::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  mix-blend-mode: screen;
  pointer-events: none;
}
.chromatic::before {
  color: #00e9ff;
  transform: translateX(-0.045em);
  filter: blur(0.35px);
}
.chromatic::after {
  color: #ff2e6e;
  transform: translateX(0.045em);
  filter: blur(0.35px);
}

.nav__logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  text-decoration: none;
  line-height: 1;
}
.nav__logo .chromatic { font-size: 1.7rem; }
.nav__logo-sub {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  color: var(--text);
  text-indent: 0.42em;
  transform: translateY(-0.1em);
}
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--accent);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  transition: background 0.2s;
}
.nav__cta:hover { background: var(--accent-soft); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 6rem 5vw 4rem;
}
.hero__bg {
  position: absolute; inset: 0;
  background: url("assets/frequence-bg.gif") center / cover no-repeat;
  pointer-events: none;
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 75% 20%, rgba(238,90,90,0.13), transparent 65%),
    linear-gradient(to right, rgba(12,12,15,0.88) 0%, rgba(12,12,15,0.55) 55%, rgba(12,12,15,0.35) 100%),
    linear-gradient(to bottom, rgba(12,12,15,0.35), rgba(12,12,15,0.2) 60%, var(--bg) 100%);
}
/* warm light-leak, top-left — matches the original artwork */
.hero__leak {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 45% 40% at 6% 4%, rgba(255, 214, 170, 0.32), rgba(255,180,120,0.08) 35%, transparent 60%);
  pointer-events: none;
  mix-blend-mode: screen;
}

/* animated ambient glow that follows the mouse */
.hero__glow {
  position: absolute;
  left: var(--gx, 62%);
  top: var(--gy, 42%);
  width: 46vw; height: 46vw;
  max-width: 640px; max-height: 640px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center,
    rgba(150, 90, 200, 0.5) 0%,
    rgba(120, 70, 190, 0.28) 30%,
    rgba(238, 90, 90, 0.12) 55%,
    transparent 72%);
  filter: blur(30px);
  pointer-events: none;
  mix-blend-mode: screen;
  animation: glowPulse 5s ease-in-out infinite;
  transition: left 0.35s ease-out, top 0.35s ease-out;
  z-index: 0;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.75; filter: blur(30px); }
  50%      { opacity: 1;    filter: blur(42px); }
}

.hero__content { max-width: 900px; position: relative; z-index: 1; }

/* ---------- Hero logo lockup (interactive) ---------- */
.hero__logo {
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1em;
  line-height: 0.9;
  cursor: default;
}
.hero__logo-mark {
  font-size: clamp(4.5rem, 13vw, 10rem);
  font-weight: 700;
  will-change: transform;
}
.hero__logo .chromatic::before { transform: translateX(calc(var(--split, 4.5) * -1px)); }
.hero__logo .chromatic::after  { transform: translateX(calc(var(--split, 4.5) * 1px)); }
.hero__logo-sub {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 2.8rem);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: #f6f4ff;
  text-shadow: 0 0 24px rgba(150, 90, 200, 0.4);
}
.hero__kicker {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: riseUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero__title .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero__title .line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes riseUp { to { transform: translateY(0); } }

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.5vw, 3rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 1.4rem;
  display: inline-block;
  cursor: default;
  transition: text-shadow 0.12s ease-out, transform 0.12s ease-out;
  will-change: text-shadow;
}

.hero__sub {
  max-width: 520px;
  color: var(--muted);
  margin-top: 1.6rem;
  font-size: 1.05rem;
}
.hero__actions { display: flex; gap: 1rem; margin-top: 2.4rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 28px rgba(238, 90, 90, 0.35);
}
.btn--primary:hover { box-shadow: 0 12px 36px rgba(238, 90, 90, 0.5); }
.btn--ghost {
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.22);
}
.btn--ghost:hover { border-color: var(--accent); }

.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  width: 1px; height: 56px;
  background: rgba(255,255,255,0.15);
  overflow: hidden;
}
.hero__scroll span {
  position: absolute; top: -40%;
  width: 100%; height: 40%;
  background: var(--accent);
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint { to { top: 110%; } }

/* ---------- Sections ---------- */
.section { padding: 7rem 5vw; position: relative; overflow: hidden; }
.section--alt { background: var(--bg-alt); }

/* ---------- Binary graphic motif ---------- */
.binary-strip,
.binary-field {
  font-family: "Courier New", ui-monospace, monospace;
  color: rgba(238, 90, 90, 0.16);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  z-index: 0;
}
.binary-strip {
  position: absolute;
  top: 1.6rem; left: 0; right: 0;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-align: center;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent);
}
.binary-field {
  position: absolute;
  top: 50%; right: 4vw;
  transform: translateY(-50%);
  font-size: 0.8rem;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-align: right;
  color: rgba(238, 90, 90, 0.1);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 70% 50%, #000, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 90% at 70% 50%, #000, transparent 75%);
}
.binary-strip span.on,
.binary-field span.on {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(238, 90, 90, 0.7);
}
.section__head { max-width: 700px; margin-bottom: 3.5rem; position: relative; z-index: 1; }
.grid { position: relative; z-index: 1; }
.about { position: relative; z-index: 1; }
.section__head h2, .about h2, .footer h2 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.section__head p { color: var(--muted); margin-top: 0.9rem; }

/* ---------- Work grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}
.card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  aspect-ratio: 16 / 9;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
}
.card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s;
  filter: saturate(0.85);
}
.card:hover img { transform: scale(1.06); filter: saturate(1.1); }
.card--film {
  background: linear-gradient(135deg, #1c1c24, #23202b);
}
.card video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.card video.ready { opacity: 1; }
.card__title {
  position: absolute;
  left: 1rem; right: 1rem; bottom: 0.9rem;
  z-index: 2;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  text-align: left;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.card:hover .card__title { opacity: 1; transform: translateY(0); }

/* dark-intro films fall back to a branded card: title always shown, video reveals on hover */
.card--film.poster-fallback .card__title { opacity: 1; transform: none; font-size: 1.05rem; }
.card--film.poster-fallback::before {
  content: "";
  position: absolute; top: 14px; left: 16px;
  width: 26px; height: 2px;
  background: var(--accent);
}
.card--film:hover video { opacity: 1; }
.card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12,12,15,0.75), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover::after { opacity: 1; }
.card__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(238, 90, 90, 0.92);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 2;
}
.card:hover .card__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card__play svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.service {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 2rem 1.7rem;
  transition: transform 0.3s, border-color 0.3s;
}
.service:hover { transform: translateY(-6px); border-color: rgba(238,90,90,0.45); }
.service__num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}
.service h3 { font-weight: 600; font-size: 1.15rem; margin-bottom: 0.6rem; }
.service p { color: var(--muted); font-size: 0.93rem; }

/* ---------- About ---------- */
.about {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}
.about__mark {
  font-family: var(--font-display);
  font-size: clamp(9rem, 20vw, 17rem);
  color: var(--accent);
  line-height: 0.85;
  text-shadow: 0 0 80px rgba(238,90,90,0.35);
  flex-shrink: 0;
}
.about__text p { color: var(--muted); margin-top: 1.1rem; max-width: 480px; }
.about__meta { font-size: 0.85rem; letter-spacing: 0.06em; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-alt);
  padding: 7rem 5vw 3rem;
  text-align: center;
}
.footer__mail {
  display: inline-block;
  margin-top: 1.6rem;
  font-size: clamp(1.3rem, 3.5vw, 2.2rem);
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.2rem;
  transition: color 0.2s;
}
.footer__mail:hover { color: var(--accent); }
.footer__socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
}
.footer__socials a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.footer__socials a:hover { color: var(--accent); }
.footer__legal {
  margin-top: 4rem;
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(8, 8, 10, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vw;
}
.lightbox.open { display: flex; }
.lightbox__frame {
  width: min(1100px, 92vw);
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.lightbox__frame iframe,
.lightbox__frame video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.lightbox__close {
  position: absolute;
  top: 1.2rem; right: 1.6rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}
.lightbox__close:hover { color: var(--accent); transform: rotate(90deg); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav__links { gap: 1.1rem; }
  .nav__links a:not(.nav__cta) { display: none; }
  .about { flex-direction: column; gap: 1.5rem; text-align: center; }
  .about__text p { margin-left: auto; margin-right: auto; }
  .section { padding: 5rem 6vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__title .line > span { transform: none; }
  .reveal { opacity: 1; transform: none; }
}
