/* =============================================================================
   BLACK FORGE // BASE STYLESHEET
   Archival cardstock surface, typography, floating glass nav, buttons,
   registration frames, custom optical cursor, and footer.
   ============================================================================= */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: clip;
  background-color: var(--bg-gallery);
  color: var(--ink-primary);
  color-scheme: dark;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  position: relative;
  background-color: var(--bg-gallery);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 65%),
    url('../images/paper-cardstock.png');
  background-size: 100% 100%, 1024px 1024px;
  background-repeat: no-repeat, repeat;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.drawer-open {
  overflow: hidden;
}

::selection {
  background-color: rgba(var(--accent-rgb), 0.28);
  color: #ffffff;
}

:focus-visible {
  outline: 1px solid rgba(var(--accent-rgb), 0.9);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-primary);
  font-weight: 700;
  letter-spacing: -0.035em;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

/* Top 1px Optical Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  z-index: 260;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.35), var(--accent));
  transform: scaleX(0);
  transform-origin: left center;
}

/* Custom Optical Cursor Reticle (Desktop Fine-Pointer Only) */
.optical-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 950;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  transition: opacity 0.22s ease;
  will-change: transform;
}

.optical-cursor.is-visible {
  opacity: 1;
}

.optical-cursor__ring {
  position: relative;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
  border: 1px solid rgba(var(--accent-rgb), 0.48);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    width 0.24s var(--ease-museum),
    height 0.24s var(--ease-museum),
    margin 0.24s var(--ease-museum),
    border-radius 0.24s var(--ease-museum),
    border-color 0.24s ease,
    background-color 0.24s ease;
}

.optical-cursor__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--accent-soft);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.optical-cursor__tag {
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.12rem 0.42rem;
  background-color: rgba(6, 7, 9, 0.92);
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  color: var(--accent-soft);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.optical-cursor.is-hovering .optical-cursor__ring {
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  border-radius: 2px;
  border-color: rgba(var(--accent-rgb), 0.85);
  background-color: rgba(var(--accent-rgb), 0.06);
}

.optical-cursor.is-hovering .optical-cursor__dot {
  opacity: 0;
}

.optical-cursor.has-tag .optical-cursor__tag {
  opacity: 1;
}

/* =============================================================================
   CONTAINERS & SECTIONS
   ============================================================================= */

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 4vw, 2.5rem);
  position: relative;
  z-index: 2;
}

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

.section {
  padding: clamp(4.25rem, 8vw, 7rem) 0;
  position: relative;
  border-top: 1px solid var(--hairline);
}

.section--flush {
  padding: 0;
}

.section--compact {
  padding: clamp(2.75rem, 5.5vw, 4.5rem) 0;
}

.section--plinth {
  background-color: rgba(6, 7, 9, 0.72);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 680px;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}

.section-head--split {
  max-width: none;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.catalog-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.catalog-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.75);
}

.section-title {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.04;
  font-weight: 800;
}

.section-lead {
  font-size: clamp(1rem, 1.45vw, 1.12rem);
  color: var(--ink-secondary);
  max-width: 52ch;
}

/* Optical + Corner Registration Crosshairs */
.reg-frame {
  position: relative;
}

.reg-tick {
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
  z-index: 6;
  transition: transform 0.45s var(--ease-museum);
}

.reg-frame:hover .reg-tick {
  transform: rotate(90deg);
}

.reg-tick::before,
.reg-tick::after {
  content: "";
  position: absolute;
  background-color: var(--crosshair);
  transition: background-color 0.3s ease;
}

.reg-frame:hover .reg-tick::before,
.reg-frame:hover .reg-tick::after {
  background-color: rgba(var(--accent-rgb), 0.85);
}

.reg-tick::before {
  top: 5px;
  left: 0;
  width: 11px;
  height: 1px;
}

.reg-tick::after {
  top: 0;
  left: 5px;
  width: 1px;
  height: 11px;
}

.reg-tick--tl { top: -6px; left: -6px; }
.reg-tick--tr { top: -6px; right: -6px; }
.reg-tick--bl { bottom: -6px; left: -6px; }
.reg-tick--br { bottom: -6px; right: -6px; }

/* =============================================================================
   FLOATING GLASS NAVIGATION (SIGNATURE PILL + SHARP MOBILE DRAWER)
   ============================================================================= */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0.9rem 0;
  transition: padding 0.25s var(--ease-museum);
}

.site-nav.is-scrolled {
  padding: 0.55rem 0;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 54px;
  padding: 0 0.65rem 0 1rem;
  border-radius: 999px;
  background-color: var(--bg-glass);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-nav.is-scrolled .nav-pill {
  background-color: var(--bg-glass-strong);
  border-color: var(--hairline-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  transition: transform 0.25s var(--ease-museum);
}

.brand:hover .brand-mark {
  transform: scale(1.06);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.is-active {
  color: var(--ink-primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.nav-link.is-active::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.85);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 36px;
  padding: 0 1.05rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--hairline);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-primary);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background-color: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  cursor: pointer;
  color: var(--ink-primary);
}

/* Sharp Architectural Mobile Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  background-color: rgba(6, 7, 9, 0.96);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease-museum), transform 0.25s var(--ease-museum), visibility 0.25s;
}

.mobile-drawer[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--hairline);
}

.mobile-drawer__close {
  width: 42px;
  height: 42px;
  border-radius: 2px;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  margin-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}

.mobile-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 0.9rem 0.5rem;
  border-bottom: 1px solid var(--hairline);
  transition: background-color 0.2s ease;
}

.mobile-drawer__link.is-active,
.mobile-drawer__link:hover {
  background-color: rgba(var(--accent-rgb), 0.08);
}

.mobile-drawer__link-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.mobile-drawer__icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.mobile-drawer__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-primary);
  display: block;
  line-height: 1.15;
}

.mobile-drawer__sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.mobile-drawer__footer {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mobile-drawer__footer .btn {
  width: 100%;
}

/* =============================================================================
   SHARP ARCHITECTURAL BUTTONS
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 46px;
  padding: 0 1.45rem;
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  user-select: none;
  transition:
    transform 0.22s var(--ease-museum),
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.btn--sm {
  min-height: 36px;
  padding: 0 1rem;
  font-size: 0.82rem;
}

.btn-solid {
  background-color: var(--ink-primary);
  color: var(--bg-void);
}

.btn-solid::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.btn-solid:hover {
  background-color: #ffffff;
  transform: translateY(-1px);
}

.btn-solid:hover::after {
  left: 150%;
}

.btn-wire {
  background-color: transparent;
  border-color: var(--hairline-strong);
  color: var(--ink-primary);
}

.btn-wire:hover {
  background-color: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.72);
  color: #ffffff;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.16rem 0.48rem;
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  background-color: rgba(var(--accent-rgb), 0.08);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-soft);
  line-height: 1.3;
}

.btn-soon {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--hairline-strong);
  color: var(--ink-secondary);
  cursor: default;
}

.btn-soon::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  opacity: 0.85;
}

.btn-soon:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--hairline-strong);
  color: var(--ink-secondary);
  transform: none;
}

/* =============================================================================
   FOOTER & SAFE SCROLL REVEALS
   ============================================================================= */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  background-color: var(--bg-void);
  padding: 2.25rem 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.35rem;
}

.footer-links a {
  color: var(--ink-secondary);
}

.footer-links a:hover {
  color: var(--ink-primary);
}

.footer-domain {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-soft);
}

.js-anim-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.78s cubic-bezier(0.16, 1, 0.3, 1), transform 0.78s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.js-anim-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.js-anim-ready [data-reveal] .section-title {
  opacity: 0;
  filter: blur(10px);
  transform-origin: left center;
  transform: translate3d(0, 10px, 0) scale(1.025, 1.015);
  transition:
    opacity 1.15s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--reveal-delay, 0ms) + 80ms),
    filter 1.2s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--reveal-delay, 0ms) + 80ms),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--reveal-delay, 0ms) + 80ms);
}

.js-anim-ready [data-reveal].is-revealed .section-title {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}
