/* ============================================
   STUDIO SPEC // STYLES
   Matches jhj.me design system
   ============================================ */

@font-face { font-family: 'Switzer'; src: url('assets/fonts/switzer-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('assets/fonts/switzer-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('assets/fonts/switzer-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #080808;
  --text: #f0ece6;
  --text-muted: rgba(240, 236, 230, 0.7);
  --text-dim: rgba(240, 236, 230, 0.55);
  --text-secondary: rgba(240, 236, 230, 0.65);
  --accent: #c8a87c;
  --ui-border: rgba(240, 236, 230, 0.1);
  --ui-border-hover: rgba(240, 236, 230, 0.22);
  --ui-surface: rgba(240, 236, 230, 0.04);
  --font: 'Switzer', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --ease-out: cubic-bezier(0.2, 1, 0.3, 1);
  --label: 14px;
  --body: 16px;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

body {
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  height: 100%;
  width: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  animation: pageEnter 0.6s ease 0.15s forwards;
}

@keyframes pageEnter { to { opacity: 1; } }

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

.brand-mark {
  position: fixed;
  top: 22px;
  left: 22px;
  z-index: 1001;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 4px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.4s ease, letter-spacing 0.4s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.brand-mark:hover {
  color: var(--text);
  letter-spacing: 5px;
}

/* ── Canvas ── */
#canvas1 {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
}

/* Film grain */
body::after {
  content: '';
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ── Sections ── */
section {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 6vw;
  position: relative;
  z-index: 10;
  scroll-snap-align: center;
}

/* Staggered text entrance */
section h2,
section h1,
section p,
.equipment-list,
.spec-meta,
.footer-link {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

section.in-view h2 { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
section.in-view h1 { opacity: 1; transform: translateY(0); transition-delay: 0.45s; }
section.in-view p { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
section.in-view .equipment-list { opacity: 1; transform: translateY(0); transition-delay: 0.7s; }
section.in-view .spec-meta { opacity: 1; transform: translateY(0); transition-delay: 0.65s; }
section.in-view .footer-link { opacity: 1; transform: translateY(0); transition-delay: 0.7s; }

/* ── Typography ── */
h1 {
  font-size: clamp(2.4rem, 10vw, 5vw);
  margin: 6px 0;
  text-transform: uppercase;
  line-height: 0.95;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 0 40px rgba(8, 8, 8, 0.6);
}

h2 {
  font-family: var(--font-mono);
  font-size: var(--label);
  color: var(--text-muted);
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: 500;
}

section p {
  max-width: 420px;
  font-size: var(--body);
  line-height: 1.75;
  color: rgba(240, 236, 230, 0.8);
  margin: 12px 0 0 0;
}

/* ── Equipment list ── */
.equipment-list {
  margin-top: 20px;
  max-width: 480px;
  width: 100%;
}

.equipment-item {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  padding: 5px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  letter-spacing: 0.5px;
}

.equipment-item .eq-name {
  color: var(--text-secondary);
}

.equipment-item .eq-qty {
  color: var(--text-dim);
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 12px;
}

/* ── Hero meta row ── */
.spec-meta {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}

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

.spec-meta-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.spec-meta-value {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

/* ── Footer link ── */
.footer-link {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: var(--label);
  letter-spacing: 2.5px;
  padding: 14px 36px;
  border: 1px solid var(--ui-border-hover);
  color: var(--text-muted);
  text-transform: uppercase;
  transition: all 0.4s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.footer-link:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ── Scroll hint ── */
.scroll-hint {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  animation: scrollHintIn 0.8s ease 1.2s forwards;
  transition: opacity 0.4s ease;
}

.scroll-hint::after {
  content: '';
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--text-dim) 0%, transparent 100%);
  animation: scrollHintLine 2.2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollHintIn { to { opacity: 0.7; } }
@keyframes scrollHintLine {
  0% { transform: scaleY(0.3); opacity: 0.3; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  body { animation: none; opacity: 1; }
  section h1, section h2, section p, .equipment-list, .spec-meta, .footer-link {
    opacity: 1; transform: none; transition: none;
  }
  #canvas1 { display: none; }
  body::after { display: none; }
  .scroll-hint { animation: none; opacity: 0.7; }
  .scroll-hint::after { animation: none; }
}

/* ── Tablet (640px+) ── */
@media (min-width: 640px) {
  .brand-mark { top: 28px; left: 30px; font-size: 16px; letter-spacing: 5px; }
  section { padding: 0 8vw; }
  h1 { font-size: clamp(2.8rem, 8vw, 5vw); }
  h2 { font-size: 14px; letter-spacing: 5px; }
  section p { font-size: 16px; max-width: 460px; }
}

/* ── Desktop (1024px+) ── */
@media (min-width: 1024px) {
  .brand-mark { top: 30px; left: 40px; font-size: 16px; letter-spacing: 5px; }
  .brand-mark:hover { letter-spacing: 6px; }
  section { padding: 0 15vw 120px; }
  h1 { font-size: 5vw; }
  h2 { font-size: 14px; letter-spacing: 6px; }
  section p { font-size: 16px; max-width: 440px; }
}