/* Layer8 - stealth marketing site
   Refined dark minimalism. Instrument Serif (display) + Hanken Grotesk (body)
   + JetBrains Mono (technical labels). One brass accent, used sparingly. */

:root {
  --bg:        #07080b;
  --bg-soft:   #0d0f14;
  --ink:       #ecebe4;
  --muted:     #8c8f99;
  --faint:     #4a4d57;
  --line:      rgba(236, 235, 228, 0.08);
  --brass:     #c9a24a;
  --brass-dim: rgba(201, 162, 74, 0.16);

  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans:  "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 350;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Atmosphere: cool depth + a single warm brass glow, plus a whisper-faint grid. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 90% at 82% -10%, rgba(201, 162, 74, 0.10), transparent 55%),
    radial-gradient(90% 80% at 8% 110%, rgba(72, 96, 140, 0.12), transparent 60%),
    linear-gradient(180deg, #07080b 0%, #06070a 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 30%, transparent 90%);
          mask-image: radial-gradient(120% 100% at 50% 0%, #000 30%, transparent 90%);
  opacity: 0.5;
}

/* Film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- shell ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* ---- nav ---- */
nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0 0;
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.brand b { font-weight: 400; }
.brand .eight { color: var(--brass); font-style: italic; }
.nav-right {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-right a { color: var(--muted); text-decoration: none; transition: color 0.3s ease; }
.nav-right a:hover { color: var(--brass); }

/* ---- hero ---- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  min-height: calc(100vh - 120px);
  padding: 40px 0 80px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 0 rgba(201,162,74,0.7);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(201,162,74,0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(201,162,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,162,74,0); }
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 6.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 .em { font-style: italic; color: var(--brass); }

.lede {
  margin-top: 30px;
  max-width: 46ch;
  font-size: 1.075rem;
  color: var(--muted);
  line-height: 1.7;
}

.cta-row {
  margin-top: 44px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.link-arrow {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 5px;
  transition: color 0.3s ease, border-color 0.3s ease, gap 0.3s ease;
  display: inline-flex;
  gap: 8px;
}
.link-arrow:hover { color: var(--brass); border-color: var(--brass); gap: 14px; }
.muted-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  letter-spacing: 0.04em;
}

/* ---- hero visual: stacked OSI layers, the 8th lit ---- */
.stage {
  position: relative;
  height: 460px;
  perspective: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stack {
  position: relative;
  width: 280px;
  height: 280px;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-42deg);
  animation: drift 16s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: rotateX(58deg) rotateZ(-42deg) translateZ(0); }
  50%      { transform: rotateX(54deg) rotateZ(-38deg) translateZ(10px); }
}
.layer {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(236,235,228,0.14);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(236,235,228,0.05), rgba(236,235,228,0.01));
  backdrop-filter: blur(1px);
  transform: translateZ(calc(var(--i) * 30px));
  opacity: calc(0.28 + var(--i) * 0.07);
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.layer.is-eighth {
  border-color: rgba(201,162,74,0.85);
  background: linear-gradient(135deg, rgba(201,162,74,0.22), rgba(201,162,74,0.04));
  box-shadow: 0 0 40px rgba(201,162,74,0.35), 0 0 0 1px rgba(201,162,74,0.4);
  opacity: 1;
}
.layer.is-eighth::after {
  content: "08";
  position: absolute;
  top: 12px; left: 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--brass);
}
.stage-caption {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

/* ---- beliefs strip ---- */
.beliefs {
  border-top: 1px solid var(--line);
  padding: 80px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.belief .n {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--brass);
  display: block;
  margin-bottom: 18px;
}
.belief h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.15;
  margin-bottom: 12px;
}
.belief p { color: var(--muted); font-size: 0.95rem; }

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--faint);
  text-transform: uppercase;
}
.foot-links { display: flex; gap: 26px; }
.foot-links a { color: var(--muted); text-decoration: none; transition: color 0.3s ease; }
.foot-links a:hover { color: var(--brass); }

/* ---- entrance choreography ---- */
.reveal { opacity: 0; transform: translateY(18px); animation: rise 1s cubic-bezier(0.2,0.7,0.2,1) forwards; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.18s; }
.d3 { animation-delay: 0.31s; }
.d4 { animation-delay: 0.44s; }
.d5 { animation-delay: 0.6s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.stage.reveal { animation: fadein 1.4s ease 0.3s forwards; }
@keyframes fadein { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .stage.reveal { animation: none; opacity: 1; transform: none; }
  .stack, .pulse { animation: none; }
}

/* ---- legal pages ---- */
.legal { max-width: 760px; margin: 0 auto; padding: 60px 0 100px; }
.legal .kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
}
.legal h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin: 18px 0 10px;
}
.legal .updated {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--faint);
  letter-spacing: 0.04em;
  margin-bottom: 48px;
}
.legal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.55rem;
  margin: 44px 0 14px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.legal h2 .s {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--brass);
}
.legal p, .legal li { color: var(--muted); font-size: 0.98rem; line-height: 1.75; }
.legal p { margin-bottom: 14px; }
.legal ul { margin: 0 0 14px 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.legal a:hover { text-decoration-color: var(--brass); color: var(--brass); }
.legal strong { color: var(--ink); font-weight: 500; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 20px; }
  .stage { height: 380px; order: -1; margin-bottom: 10px; }
  .beliefs { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 22px; }
  .footer-flex, footer { flex-direction: column; align-items: flex-start; }
}
