/* ============================================================
   VoxelQuill — Design System
   ============================================================ */

:root {
  /* Palette */
  --ink-950: #07101E;
  --ink-900: #0B1426;
  --ink-800: #131E37;
  --ink-700: #1D2B4A;
  --paper-50: #F7F4EC;
  --paper-100: #ECE7D8;
  --gold-500: #C9A86A;
  --gold-400: #D9BD83;
  --gold-300: #E6CE9A;
  --azure-500: #4FA8FF;
  --azure-400: #7BC0FF;
  --text-muted: #93A1BC;

  /* Type */
  --font-serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Fluid type scale (clamp(min, fluid, max)) */
  --fs-eyebrow: 0.78rem;
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-lede: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --fs-h3: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  --fs-h2: clamp(1.875rem, 1.4rem + 2vw, 3rem);
  --fs-h1: clamp(2.5rem, 1.5rem + 5vw, 5.5rem);
  --fs-numeral: clamp(4rem, 3rem + 6vw, 8rem);

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;

  /* Layout */
  --container-max: 78rem;
  --container-narrow: 42rem;
  --measure: 60ch;

  /* Misc */
  --rule: 1px solid rgba(201, 168, 106, 0.28);
  --rule-strong: 1px solid rgba(201, 168, 106, 0.55);
  --ease: cubic-bezier(.2,.6,.2,1);
  --reveal-distance: 24px;
}

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

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--paper-50);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--gold-500); color: var(--ink-950); }

:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   Utilities
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.narrow { max-width: var(--container-narrow); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 0 0 var(--space-3);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--paper-50);
  margin: 0 0 var(--space-4);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold-500);
  color: var(--ink-950);
  padding: 0.5rem 1rem;
  font-weight: 600;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ============================================================
   Scroll progress
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 100;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  transform-origin: 0 50%;
  transition: width 80ms linear;
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: var(--space-3) 0;
  background: transparent;
  transition: background-color 320ms var(--ease),
              padding 320ms var(--ease),
              backdrop-filter 320ms var(--ease),
              border-color 320ms var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-condensed {
  padding: 0.875rem 0;
  background: rgba(7, 16, 30, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: rgba(201, 168, 106, 0.18);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.brand { display: inline-flex; }
.brand-logo {
  width: clamp(140px, 18vw, 200px);
  height: auto;
}
.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}
.site-nav a {
  position: relative;
  color: var(--paper-50);
  opacity: 0.82;
  transition: opacity 200ms;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 300ms var(--ease);
}
.site-nav a:hover { opacity: 1; }
.site-nav a:hover::after { transform: scaleX(1); }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: var(--space-6) 0 var(--space-5);
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-img {
  position: absolute; inset: -8% 0 -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  opacity: 0.42;
  will-change: transform;
  transition: transform 80ms linear;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(79, 168, 255, 0.10), transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(201, 168, 106, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(7,16,30,0.6) 0%, rgba(7,16,30,0.78) 60%, rgba(7,16,30,1) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 60rem;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h1);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-4);
  color: var(--paper-50);
}
.hero-title .punct {
  color: var(--gold-500);
  font-weight: 400;
  padding: 0 0.15em;
}
.hero-sub {
  font-size: var(--fs-lede);
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 0 var(--space-4);
  font-weight: 300;
}
.hero-rule {
  width: 64px;
  height: 1px;
  background: var(--gold-500);
  margin-top: var(--space-3);
}
.hero-scroll {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 1px solid rgba(247, 244, 236, 0.35);
  border-radius: 12px;
  z-index: 2;
  transition: border-color 200ms;
}
.hero-scroll span {
  position: absolute;
  top: 6px; left: 50%;
  width: 2px; height: 8px;
  background: var(--gold-500);
  transform: translateX(-50%);
  border-radius: 1px;
  animation: scrollHint 2.2s ease-in-out infinite;
}
.hero-scroll:hover { border-color: var(--gold-400); }

@keyframes scrollHint {
  0%, 100% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translate(-50%, 14px); }
}

/* ============================================================
   Sections (common)
   ============================================================ */

section {
  padding: var(--space-7) 0;
  position: relative;
}
section + section { border-top: var(--rule); }

.lede {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--paper-100);
  max-width: var(--measure);
  margin: 0;
  font-style: italic;
}

/* ============================================================
   About
   ============================================================ */

.about .narrow { text-align: left; }

/* ============================================================
   Ventures
   ============================================================ */

.ventures-head {
  text-align: center;
  margin-bottom: var(--space-7);
}
.ventures-head .eyebrow,
.ventures-head .section-title { margin-left: auto; margin-right: auto; }

.venture {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5) 0;
  position: relative;
}
.venture + .venture { border-top: var(--rule); }

@media (min-width: 880px) {
  .venture {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    padding: var(--space-6) 0;
  }
  .venture.reverse .venture-media { order: 2; }
  .venture.reverse .venture-body  { order: 1; }
}

.venture-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-800);
  border: 1px solid rgba(201, 168, 106, 0.15);
}
.venture-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), opacity 600ms;
  opacity: 0.92;
}
.venture:hover .venture-media img { transform: scale(1.03); opacity: 1; }

.venture-body { max-width: 36rem; }
.numeral {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-numeral);
  line-height: 0.85;
  color: var(--gold-500);
  letter-spacing: -0.04em;
  margin-bottom: var(--space-3);
  opacity: 0.95;
}
.venture-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--paper-50);
  margin: 0 0 var(--space-2);
}
.venture-body p {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0;
}

/* ============================================================
   Philosophy
   ============================================================ */

.philosophy { background: var(--ink-900); }
.philosophy .manifesto {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--paper-100);
  max-width: var(--measure);
  margin: 0 0 var(--space-3);
}
.philosophy .manifesto.signature {
  color: var(--gold-400);
  font-style: italic;
  margin-top: var(--space-4);
  border-left: 1px solid var(--gold-500);
  padding-left: var(--space-3);
}

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

.site-footer {
  padding: var(--space-5) 0 var(--space-4);
  border-top: var(--rule);
  background: var(--ink-950);
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.footer-mark { width: 48px; height: 48px; flex-shrink: 0; }
.footer-text { line-height: 1.5; }
.footer-name {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0;
  color: var(--paper-50);
}
.footer-meta, .footer-legal {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ============================================================
   Reveal animations
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-img { transform: none !important; }
}

/* ============================================================
   Small screens
   ============================================================ */

@media (max-width: 540px) {
  .site-nav { gap: 1rem; font-size: 0.78rem; }
  .hero-title .punct { padding: 0 0.08em; }
  .hero { min-height: 88svh; }
  section { padding: var(--space-6) 0; }
}
