/* ==========================================================================
   VESPER — Atelier of edged things
   Styles & Concrete Wall Shading
   ========================================================================== */

:root {
  --bg-concrete: #dddcd8;
  --ink: #151312;
  --ink-muted: rgba(21, 19, 18, 0.58);
  --garnet: #9b1c26;
  --garnet-bright: #c0141f;
  --white-lift: #f3f2ef;
  --border-line: rgba(21, 19, 18, 0.12);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Satoshi", system-ui, -apple-system, sans-serif;
}

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

html, body {
  min-height: 100%;
  background-color: var(--bg-concrete);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Concrete Wall Texture using 2 SVG feTurbulence layers + radial lift */
body {
  background-color: var(--bg-concrete);
  background-image:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 72%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.045 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='2600' height='2600'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='0.0035' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.065 0'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
  background-repeat: no-repeat, repeat, repeat;
  background-position: center center, 0 0, 0 0;
  background-size: 100% 100vh, 320px 320px, 2600px 2600px;
  background-attachment: fixed, fixed, fixed;
}

/* ==========================================================================
   Custom Dot Cursor
   ========================================================================== */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 7px;
  height: 7px;
  background-color: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              height 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              background-color 0.25s ease,
              opacity 0.2s ease;
}

.cursor-dot.hovered {
  width: 28px;
  height: 28px;
  background-color: rgba(21, 19, 18, 0.12);
  border: 1px solid var(--ink);
}

@media (hover: none) {
  .cursor-dot {
    display: none !important;
  }
}

/* ==========================================================================
   Loader Screen
   ========================================================================== */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: var(--bg-concrete);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.loader-overlay.loaded {
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
}

.loader-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.loader-counter {
  font-family: var(--serif);
  font-size: clamp(64px, 10vw, 120px);
  line-height: 1;
  font-weight: 400;
  color: var(--ink);
}

.loader-bar-wrap {
  width: 240px;
  height: 2px;
  background-color: rgba(21, 19, 18, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background-color: var(--garnet);
  transition: width 0.1s linear;
}

/* ==========================================================================
   Fixed 3D Canvas
   ========================================================================== */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   Fixed Nav Bar
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 24px clamp(20px, 4vw, 56px);
  pointer-events: auto;
}

.nav-brand {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--garnet);
}

.nav-right {
  grid-column: 3;
  justify-self: end;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #FFFFFF;
  background-color: var(--ink);
  padding: 11px 22px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.btn-pill:hover {
  background-color: var(--garnet);
  transform: translateY(-1px);
}

/* ==========================================================================
   Vertical Progress Indicator
   ========================================================================== */
.progress-rail {
  position: fixed;
  right: clamp(16px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.rail-number {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  line-height: 1;
}

.rail-track {
  width: 1px;
  height: 80px;
  background-color: rgba(21, 19, 18, 0.18);
  position: relative;
  overflow: hidden;
}

.rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background-color: var(--garnet);
  transition: height 0.1s linear;
}

.rail-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ==========================================================================
   Page Content & Typography
   ========================================================================== */
.content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
}

.serif-display {
  font-family: var(--serif);
  font-weight: 400;
}

.garnet-italic {
  font-style: italic;
  color: var(--garnet);
}

.label-caps {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.body-prose {
  font-size: clamp(15px, 1.25vw, 17.5px);
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 440px;
}

/* Headline masking animation */
.reveal-line {
  display: block;
  overflow: hidden;
}

.reveal-word {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.revealed .reveal-word {
  transform: translateY(0);
}

/* ==========================================================================
   Section 1: Hero (100vh)
   ========================================================================== */
.section-hero {
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 110px clamp(20px, 4vw, 56px) 40px;
}

.hero-top-left {
  max-width: 380px;
  line-height: 1.5;
}

.hero-bottom-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  width: 100%;
}

.hero-headline {
  font-size: clamp(40px, 5.2vw, 84px);
  line-height: 0.94;
  letter-spacing: -0.015em;
  max-width: 580px;
}

.hero-scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 8px;
}

.scroll-line-track {
  width: 1px;
  height: 48px;
  background-color: rgba(21, 19, 18, 0.15);
  position: relative;
  overflow: hidden;
}

.scroll-line-pip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 16px;
  background-color: var(--garnet);
  animation: scrollDown 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollDown {
  0% { transform: translateY(-100%); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translateY(300%); opacity: 0; }
}

.hero-bottom-right {
  justify-self: end;
  text-align: right;
  line-height: 1.5;
}

/* ==========================================================================
   Section 2: The Draw (sticky 280vh)
   ========================================================================== */
.section-draw {
  height: 280vh;
  position: relative;
}

.sticky-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 64px);
}

.draw-card {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-h2 {
  font-size: clamp(38px, 4.8vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.015em;
}

/* ==========================================================================
   Section 3: The Blade (sticky 240vh)
   ========================================================================== */
.section-blade {
  height: 240vh;
  position: relative;
}

.blade-content-top {
  position: absolute;
  top: 10vh;
  left: clamp(20px, 4vw, 64px);
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 10;
}

.specs-bar {
  position: absolute;
  bottom: 6vh;
  left: clamp(20px, 4vw, 64px);
  right: clamp(20px, 4vw, 64px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--border-line);
  padding-top: 20px;
  z-index: 10;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-num {
  font-family: var(--serif);
  font-size: clamp(32px, 3.8vw, 54px);
  line-height: 1;
  color: var(--ink);
}

/* ==========================================================================
   Section 4: Marquee
   ========================================================================== */
.marquee-ribbon {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--border-line);
  border-bottom: 1px solid var(--border-line);
  background-color: rgba(221, 220, 216, 0.45);
  padding: 22px 0;
  user-select: none;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeRun 24s linear infinite;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.marquee-content span.star {
  color: var(--garnet);
  font-size: 16px;
}

@keyframes marqueeRun {
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Section 5: The Pocket (sticky 240vh)
   ========================================================================== */
.section-pocket {
  height: 240vh;
  position: relative;
}

.pocket-card-right {
  margin-left: auto;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pocket-facts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border-line);
  padding-top: 18px;
  margin-top: 6px;
  list-style: none;
}

.pocket-facts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.pocket-facts li b {
  font-weight: 500;
  color: var(--ink);
}

/* ==========================================================================
   Section 6: The Return (sticky 340vh)
   ========================================================================== */
.section-return {
  height: 340vh;
  position: relative;
}

.return-gauge-left {
  position: absolute;
  left: clamp(20px, 4vw, 64px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.seated-meter-track {
  width: 140px;
  height: 2px;
  background-color: rgba(21, 19, 18, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.seated-meter-fill {
  width: 0%;
  height: 100%;
  background-color: var(--garnet);
  transition: width 0.08s linear;
}

.seated-num {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
}

.return-caption-right {
  position: absolute;
  right: clamp(20px, 4vw, 64px);
  top: 50%;
  transform: translateY(-50%);
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}

.return-headline {
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   Section 7: Acquire (100vh)
   ========================================================================== */
.section-acquire {
  min-height: 120vh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 120px clamp(20px, 4vw, 64px);
}

.footer-sword-stage {
  width: 100%;
  height: clamp(240px, 36vh, 420px);
  position: relative;
  pointer-events: none;
}

.acquire-card {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.acquire-price-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  border-top: 1px solid var(--border-line);
  padding-top: 18px;
  margin-top: 6px;
}

.price-tag {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--ink);
  line-height: 1;
}

.acquire-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-acquire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              background-color 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease;
}

.btn-acquire.solid {
  background-color: var(--ink);
  color: #FFFFFF;
}

.btn-acquire.solid:hover {
  background-color: var(--garnet);
}

.btn-acquire.outline {
  background-color: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-acquire.outline:hover {
  background-color: rgba(21, 19, 18, 0.05);
  border-color: var(--garnet);
  color: var(--garnet);
}

/* ==========================================================================
   Section 8: Footer (min 100vh)
   ========================================================================== */
.section-footer {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 80px clamp(20px, 4vw, 64px) 36px;
  border-top: 1px solid var(--border-line);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--garnet);
}

.giant-wordmark-wrap {
  width: 100%;
  text-align: center;
  margin: 60px 0 20px;
  user-select: none;
  overflow: hidden;
}

.giant-wordmark {
  font-family: var(--serif);
  font-size: clamp(80px, 24vw, 360px);
  line-height: 0.82;
  color: #f3f2ef;
  text-shadow: 0 1px 2px rgba(21, 19, 18, 0.06);
  letter-spacing: -0.025em;
  display: block;
  opacity: 0.9;
}

.footer-base-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-line);
  padding-top: 24px;
}

.footer-base-row a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-base-row a:hover {
  color: var(--garnet);
}

.footer-base-right {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

/* ===== Site Credit Badge: Fabulous Media | GoCommercially ===== */
.site-credit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  line-height: 0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-credit:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.site-credit a {
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-credit a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.site-credit img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.site-credit .divider {
  width: 1px;
  height: 18px;
  background: #d1d5db;
}

/* ==========================================================================
   Responsive Adaptations (<= 860px)
   ========================================================================== */
@media (max-width: 860px) {
  .nav-links,
  .progress-rail {
    display: none !important;
  }

  .nav {
    padding: 18px 20px;
  }

  .hero-bottom-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-scroll-cue {
    display: none;
  }

  .hero-bottom-right {
    justify-self: start;
    text-align: left;
  }

  .sticky-viewport {
    align-items: flex-end;
    padding-bottom: 40px;
  }

  .draw-card,
  .pocket-card-right,
  .blade-content-top {
    max-width: 100%;
    margin: 0;
    text-align: left;
    text-shadow: 0 1px 8px rgba(221, 220, 216, 0.85);
  }

  .specs-bar {
    grid-template-columns: repeat(2, 1fr);
    bottom: 4vh;
  }

  .return-gauge-left {
    top: auto;
    bottom: 120px;
    transform: none;
  }

  .return-caption-right {
    top: auto;
    bottom: 40px;
    right: 20px;
    transform: none;
  }

  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-base-row {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .footer-base-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .scroll-line-pip {
    animation: none !important;
  }
  .reveal-word {
    transform: none !important;
    transition: none !important;
  }
}
