/* ===========================================================
   CENTRIFUGE CREATIVE — base styles
   =========================================================== */

:root {
  /* Dark mode (default) */
  --bg: #0B0B0A;
  --bg-2: #131311;
  --bg-3: #1B1B18;
  --ink: #EFEBE3;
  --ink-2: #BDB8AE;
  --ink-3: #76746C;
  --line: rgba(239, 235, 227, 0.12);
  --line-strong: rgba(239, 235, 227, 0.24);
  --accent: #FF6322;         /* centrifuge orange */
  --accent-2: #FF8B55;
  --warn: #FF5B1F;
  --hair: 1px;

  /* Spatial system */
  --pad-x: clamp(20px, 4vw, 64px);
  --grid-gap: clamp(16px, 2vw, 32px);
  --row-tight: clamp(48px, 6vw, 96px);
  --row: clamp(96px, 12vw, 192px);
  --row-loose: clamp(160px, 20vw, 320px);

  /* Type */
  --font-display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-body: "Inter Tight", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Light mode */
[data-theme="light"] {
  --bg: #EFEBE3;
  --bg-2: #E5E1D8;
  --bg-3: #D8D3C8;
  --ink: #0F0F0E;
  --ink-2: #3C3A33;
  --ink-3: #7A7668;
  --line: rgba(15, 15, 14, 0.12);
  --line-strong: rgba(15, 15, 14, 0.24);
}

/* Accent variants */
[data-accent="lime"]    { --accent: #FF6322; --accent-2: #FF8B55; }
[data-accent="orange"]  { --accent: #FF5B1F; --accent-2: #FF8855; }
[data-accent="electric"]{ --accent: #3EE0C3; --accent-2: #7BF0DC; }
[data-accent="cobalt"]  { --accent: #5B6BFF; --accent-2: #8FA0FF; }
[data-accent="bone"]    { --accent: #EFEBE3; --accent-2: #FFFFFF; }

/* "Stage" tokens — always-dark surface for video/film/canvas content
   that should read as footage regardless of page theme. In light mode we
   add a mat, border and shadow so these frames feel like intentional
   film stills rather than raw black blocks. */
:root {
  --stage: #0F0F0E;
  --stage-2: #1B1B18;
  --stage-ink: #EFEBE3;
  --stage-ink-2: #BDB8AE;
  --stage-mat: 0px;
  --stage-shadow: none;
  --stage-radius: 0px;
}
[data-theme="light"] {
  --stage: #141413;
  --stage-2: #24231F;
  --stage-mat: 10px;
  --stage-shadow: 0 30px 60px -20px rgba(15, 15, 14, 0.35), 0 8px 20px -12px rgba(15, 15, 14, 0.25);
  --stage-radius: 2px;
}
[data-theme="light"] .stage-mat {
  padding: var(--stage-mat);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--stage-shadow);
  border-radius: var(--stage-radius);
}

/* Density */
[data-density="airy"]    { --row: clamp(140px, 16vw, 260px); --row-tight: clamp(64px, 8vw, 128px); }
[data-density="dense"]   { --row: clamp(64px, 8vw, 128px); --row-tight: clamp(32px, 4vw, 64px); }

/* ===========================================================
   Reset
   =========================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
  transition: background 300ms var(--ease-out), color 300ms var(--ease-out);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

/* ===========================================================
   Type scale
   =========================================================== */

.t-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-2);
}

.t-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.t-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0;
}

.t-display-xl {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 11vw, 180px);
  letter-spacing: -0.045em;
  line-height: 0.86;
  margin: 0;
}

.t-display-lg {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 8vw, 128px);
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin: 0;
}

.t-display-md {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 72px);
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0;
}

.t-body-lg {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink-2);
}

.t-body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}

.italic-serif {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ===========================================================
   Layout primitives
   =========================================================== */

.wrap {
  padding-inline: var(--pad-x);
  position: relative;
}

.rule {
  height: var(--hair);
  background: var(--line);
  width: 100%;
}

.rule-strong { background: var(--line-strong); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}

/* Grain + vignette texture */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ===========================================================
   Nav
   =========================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
  color: #EFEBE3;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 17px;
}

.nav-logo svg { width: 22px; height: 22px; }

.nav-links {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }

.nav-links a.is-active::before {
  content: "●";
  position: absolute;
  left: -12px; top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  color: var(--accent);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid currentColor;
  border-radius: 99px;
  transition: background 200ms var(--ease-out), color 200ms var(--ease-out);
}

.nav-cta:hover { background: currentColor; color: var(--bg); }

.nav-clock { display: flex; gap: 14px; align-items: center; }
.nav-clock .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s var(--ease-in-out) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ===========================================================
   Buttons
   =========================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 300ms var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn--accent {
  background: var(--accent);
  color: #0B0B0A;
  border-color: var(--accent);
}

.btn--accent:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #0B0B0A;
}

.btn-arrow {
  width: 14px; height: 14px;
  transition: transform 300ms var(--ease-out);
}
.btn:hover .btn-arrow { transform: translate(3px, -3px); }

/* ===========================================================
   Footer
   =========================================================== */

.footer {
  padding: var(--row-tight) var(--pad-x) 32px;
  position: relative;
  border-top: 1px solid var(--line);
}

.footer-cta {
  padding-bottom: var(--row-tight);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 20px 0;
  font-weight: 500;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  position: relative;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ===========================================================
   Reveal on scroll
   =========================================================== */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
/* If the user has already scrolled past an element (or if scripts haven't
   marked it in yet), never leave it permanently invisible. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal-mask > span { transform: none; transition: none; }
}

.reveal-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.reveal-mask > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 900ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal-mask.in > span { transform: none; }

/* ===========================================================
   Marquee
   =========================================================== */

.marquee {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.marquee-track {
  display: inline-flex;
  gap: 64px;
  animation: scroll-x 40s linear infinite;
  padding-left: 64px;
  flex-shrink: 0;
}

.marquee-track > * { flex-shrink: 0; }

@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ===========================================================
   Scrollbar
   =========================================================== */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 99px; }

/* ===========================================================
   Custom cursor
   =========================================================== */

@media (hover: hover) {
  html.has-cursor { cursor: none; }
  html.has-cursor a, html.has-cursor button { cursor: none; }

  .cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    z-index: 1000;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 300ms var(--ease-out), height 300ms var(--ease-out);
  }

  .cursor.is-big {
    width: 80px; height: 80px;
    background: var(--accent);
    mix-blend-mode: normal;
    opacity: 0.9;
  }

  .cursor-label {
    position: fixed;
    pointer-events: none;
    z-index: 1001;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0B0B0A;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 200ms;
  }
  .cursor-label.is-visible { opacity: 1; }
}

/* ===========================================================
   Responsive
   =========================================================== */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .grid-12 { grid-template-columns: repeat(6, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
