/* ==============================================
   PARTIAL DEDUCTION — BASE
   Shared tokens, reset, navigation, footer.
   ============================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Colour system */
  --bg:           #080808;
  --bg-2:         #0a0a0a;
  --bg-3:         #0f0f0f;
  --surface:      #111111;
  --surface-2:    #161616;
  --red:          #C41E1E;
  --red-hot:      #D63F2E;
  --red-dim:      #8B0000;
  --red-dark:     #4B0000;
  --red-deep:     #2B0000;
  --red-glow:     rgba(196,30,30,0.15);
  --cream:        #F0EBE1;

  --border:       rgba(255,255,255,0.06);
  --border-2:     rgba(255,255,255,0.10);
  --border-red:   rgba(196,30,30,0.30);

  --text:         rgba(255,255,255,0.88);
  --text-muted:   rgba(255,255,255,0.55);
  --text-dim:     rgba(255,255,255,0.35);
  --text-faint:   rgba(255,255,255,0.15);

  /* Type */
  --f-display:    'Bebas Neue', 'Impact', sans-serif;
  --f-serif:      'Playfair Display', Georgia, serif;
  --f-serif-dm:   'DM Serif Display', Georgia, serif;
  --f-body:       'Inter', system-ui, -apple-system, sans-serif;
  --f-mono:       'Space Mono', 'Menlo', monospace;

  /* Rhythm */
  --nav-h:        68px;
  --max-w:        1240px;
  --gutter:       clamp(20px, 4vw, 56px);

  /* Motion */
  --ease:         cubic-bezier(.22,.68,0,1);
  --ease-pop:     cubic-bezier(.22,.68,0,1.2);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img, svg { display: block; max-width: 100%; }
button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea { font: inherit; color: inherit; }

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

/* ---------- 3. UTILITIES ---------- */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--f-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--red);
  text-transform: uppercase;
}
.eyebrow-dim {
  font-family: var(--f-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.divider-red {
  width: 48px;
  height: 2px;
  background: var(--red);
  margin: 18px 0 28px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"].is-in { transition-delay: .08s; }
.reveal[data-delay="2"].is-in { transition-delay: .16s; }
.reveal[data-delay="3"].is-in { transition-delay: .24s; }
.reveal[data-delay="4"].is-in { transition-delay: .32s; }
.reveal[data-delay="5"].is-in { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 4. BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: all .25s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn .arrow {
  display: inline-block;
  transition: transform .25s var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-red {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-red:hover {
  background: var(--red-hot);
  border-color: var(--red-hot);
  box-shadow: 0 0 0 1px var(--red-hot), 0 12px 40px -10px rgba(196,30,30,0.6);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border-2);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--text);
  background: rgba(255,255,255,0.03);
}

/* ---------- 5. NAVIGATION ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: stretch;
  background: rgba(8,8,8,0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav.is-scrolled {
  background: rgba(8,8,8,0.92);
  border-bottom-color: var(--border);
}

.nav-stripe {
  width: 5px;
  background: var(--red);
  flex-shrink: 0;
}

.nav-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-shrink: 0;
}
.nav-brand-title {
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: 3px;
  color: #fff;
  line-height: 1;
}
.nav-brand-sub {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--red);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--red);
  transition: width .25s var(--ease);
}
.nav-links a:hover,
.nav-links a.is-active { color: #fff; }
.nav-links a:hover::after,
.nav-links a.is-active::after { width: 100%; }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-burger {
  display: none;
  width: 28px;
  height: 28px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  /* Nav buffer: URL bar on Android Chrome sometimes occludes a fixed nav's top.
     Giving the nav extra height + env() for iPhone notches keeps content visible. */
  :root { --nav-h: 84px; }
  .nav { padding-top: env(safe-area-inset-top, 0); }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(8,8,8,0.98);
    backdrop-filter: blur(24px);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-200%);
    transition: transform .4s var(--ease);
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px var(--gutter);
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a::after { display: none; }
  .nav-burger { display: flex; }
  .nav-cta .btn { padding: 10px 14px; font-size: 10px; letter-spacing: 1.5px; }
  .nav-brand-sub { display: none; }
  .nav-brand-title { font-size: 16px; letter-spacing: 2px; }
  .nav-inner { gap: 12px; padding: 0 16px; }
}

@media (max-width: 480px) {
  .nav-brand-title { font-size: 14px; letter-spacing: 1.5px; }
  .nav-cta .btn { padding: 9px 12px; font-size: 9px; }
}

/* ---------- 6. FOOTER ---------- */
.footer {
  background: #050505;
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px; height: 100%;
  background: var(--red);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
@media (max-width: 800px) {
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
}

.footer-brand-title {
  font-family: var(--f-display);
  font-size: 40px;
  letter-spacing: 4px;
  color: #fff;
  line-height: 1;
  margin-bottom: 16px;
}
.footer-brand-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 360px;
}

.footer-col h4 {
  font-family: var(--f-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color .2s var(--ease);
}
.footer-col a:hover { color: var(--red); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 1px;
}
.footer-bottom .imprint {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0;
}

/* ---------- 7. PUZZLE PIECE MOTIF ---------- */
.puzzle-motif {
  pointer-events: none;
  user-select: none;
}
