/* ============================================================
   OPALINE GAME STUDIOS — PRISMBURST theme
   "Color is pressure; structure is glass — color appears only
    where energy is contained, leaking, or detonating."
   ============================================================ */

:root {
  /* Grounds */
  --ground-smoke:  #0C0C10;
  --ground-leaded: #15151B;
  --ground-facet:  #1E1E26;
  /* Ink */
  --ink-glasswhite: #F2F3F7;
  --ink-vapor:      #C6C8D2;
  --ink-fog:        #8B8E9B;
  --ink-etched:     #5A5D68;
  --chrome-irid:    rgba(198, 200, 210, 0.18);
  /* Spectrum shards */
  --shard-red:    #FF3B4A;
  --shard-orange: #FF9F1C;
  --shard-yellow: #FFE14D;
  --shard-green:  #3EE07A;
  --shard-capri:  #00B9FF;
  --shard-blue:   #3D7BFF;
  --shard-violet: #B14DFF;
  --shard-pink:   #FFB9FF;
  /* Seamless 8-shard loop */
  --grad-loop: conic-gradient(from var(--loop-angle, 0deg),
    var(--shard-red), var(--shard-orange), var(--shard-yellow),
    var(--shard-green), var(--shard-capri), var(--shard-blue),
    var(--shard-violet), var(--shard-pink), var(--shard-red));
  --grad-linear: linear-gradient(100deg,
    var(--shard-red), var(--shard-orange), var(--shard-yellow),
    var(--shard-green), var(--shard-capri), var(--shard-blue),
    var(--shard-violet), var(--shard-pink));
  /* Type */
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;

  --radius: 14px;
  --maxw: 1180px;
}

@property --loop-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ground-smoke);
  color: var(--ink-vapor);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 { font-family: var(--font-display); color: var(--ink-glasswhite); line-height: 1.15; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

::selection { background: var(--shard-violet); color: #fff; }

/* ---------- Smoked-glass panel (chamfered bevel feel) ---------- */
.glass {
  position: relative;
  background:
    linear-gradient(rgba(255,255,255,0.03), rgba(255,255,255,0) 30%),
    var(--ground-leaded);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 18px 40px rgba(0,0,0,0.45);
}

/* Iridescent edge that lives on borders only (Contained tier) */
.glass::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--loop-angle, 0deg),
    transparent 0 18%, var(--chrome-irid) 24%, transparent 30%,
    transparent 55%, var(--chrome-irid) 66%, transparent 74%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  pointer-events: none;
  animation: loop-spin 14s linear infinite;
}

@keyframes loop-spin { to { --loop-angle: 360deg; } }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--ink-glasswhite);
  background: var(--ground-facet);
  cursor: pointer;
  overflow: hidden;
  transition: transform 120ms ease, color 200ms ease, border-color 200ms ease;
  isolation: isolate;
}

.btn:active { transform: scale(0.97); }

/* Primary — the lawful resting leak: faint standing swirl */
.btn-primary { border-color: transparent; }
.btn-primary::before {
  content: "";
  position: absolute; inset: -2px;
  z-index: -2;
  background: conic-gradient(from var(--loop-angle, 0deg),
    var(--shard-red), var(--shard-orange), var(--shard-yellow),
    var(--shard-green), var(--shard-capri), var(--shard-blue),
    var(--shard-violet), var(--shard-pink), var(--shard-red));
  animation: loop-spin 6s linear infinite;
  opacity: 0.9;
}
.btn-primary::after {
  content: "";
  position: absolute; inset: 2px;
  z-index: -1;
  border-radius: 8px;
  background:
    radial-gradient(120% 160% at 20% 0%, rgba(177,77,255,0.16), transparent 55%),
    radial-gradient(120% 160% at 85% 110%, rgba(0,185,255,0.14), transparent 55%),
    var(--ground-facet);
  transition: opacity 200ms ease;
}
.btn-primary:hover { color: #fff; }
.btn-primary:hover::after { opacity: 0.35; }  /* tier 2: the flood */
.btn-primary:hover { text-shadow: 0 1px 8px rgba(0,0,0,0.8); }

/* Secondary — glass at rest, border sweep on hover */
.btn-secondary::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--loop-angle, 0deg),
    var(--shard-red), var(--shard-orange), var(--shard-yellow),
    var(--shard-green), var(--shard-capri), var(--shard-blue),
    var(--shard-violet), var(--shard-pink), var(--shard-red));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 200ms ease;
  animation: loop-spin 4s linear infinite;
}
.btn-secondary:hover { border-color: transparent; }
.btn-secondary:hover::before { opacity: 1; }

/* Ghost — flat; text floods with spectrum on hover */
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.18); }
.btn-ghost:hover {
  background-image: var(--grad-linear);
  background-size: 300% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: text-flow 2.2s linear infinite;
  border-color: rgba(255,255,255,0.35);
}

@keyframes text-flow {
  from { background-position: 0% 50%; }
  to   { background-position: 300% 50%; }
}

.btn-small { padding: 9px 18px; font-size: 13px; }
.btn-wide  { width: 100%; }

.btn:focus-visible {
  outline: 2px solid var(--shard-capri);
  outline-offset: 3px;
}

/* Detonation shards (spawned by JS on click) */
.shard-burst {
  position: fixed;
  width: 10px; height: 10px;
  pointer-events: none;
  z-index: 9999;
  clip-path: polygon(12% 54%, 38% 12%, 58% 33%, 33% 88%);
  animation: shard-fly 850ms cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}
@keyframes shard-fly {
  0%   { transform: translate(0,0) rotate(0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.2); opacity: 0; }
}

/* ---------- Navigation ---------- */
.nav-shell {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px clamp(14px, 4vw, 40px);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-radius: 14px;
  background:
    linear-gradient(rgba(255,255,255,0.03), rgba(255,255,255,0) 40%),
    rgba(18, 18, 24, 0.82);
  backdrop-filter: blur(0px); /* intentional: smoked glass reads from tone, not blur */
}

.nav-brand { display: flex; align-items: center; gap: 10px; }

.brand-prism { width: 30px; height: 30px; }
.brand-prism .tri  { fill: none; stroke: var(--ink-glasswhite); stroke-width: 1.6; stroke-linejoin: bevel; }
.brand-prism .beam { stroke: #fff; stroke-width: 1.4; }
.brand-prism .ray  { stroke-width: 1.4; }
.brand-prism .r1 { stroke: var(--shard-capri); }
.brand-prism .r2 { stroke: var(--shard-green); }
.brand-prism .r3 { stroke: var(--shard-violet); }

.brand-word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--ink-glasswhite);
  line-height: 1.1;
  display: flex; flex-direction: column;
}
.brand-word em {
  font-style: normal;
  font-weight: 400;
  font-size: 8.5px;
  letter-spacing: 0.42em;
  color: var(--ink-fog);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 30px);
  list-style: none;
}

.nav-links a:not(.btn) {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-vapor);
  position: relative;
  padding: 6px 2px;
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--grad-linear);
  transition: right 250ms cubic-bezier(0.33, 1, 0.68, 1);
}
.nav-links a:not(.btn):hover { color: var(--ink-glasswhite); }
.nav-links a:not(.btn):hover::after { right: 0; }

/* Current page — the underline stays lit */
.nav-links a:not(.btn).active { color: var(--ink-glasswhite); }
.nav-links a:not(.btn).active::after { right: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: 0; cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--ink-glasswhite);
  transition: transform 200ms ease, opacity 200ms ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  overflow: hidden;
}

/* The contained swirl — deep, slow, ≤20% presence, behind smoke */
.hero-aurora {
  position: absolute; inset: -20%;
  background:
    radial-gradient(38% 45% at 22% 30%, rgba(177, 77, 255, 0.20), transparent 70%),
    radial-gradient(42% 48% at 78% 26%, rgba(0, 185, 255, 0.16), transparent 70%),
    radial-gradient(36% 44% at 62% 78%, rgba(62, 224, 122, 0.11), transparent 70%),
    radial-gradient(30% 40% at 34% 82%, rgba(255, 59, 74, 0.10), transparent 70%),
    radial-gradient(26% 34% at 50% 50%, rgba(255, 159, 28, 0.07), transparent 70%);
  filter: saturate(1.15);
  animation: aurora-drift 26s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(4deg) scale(1.08) translate(2%, -2%); }
  100% { transform: rotate(-3deg) scale(1.04) translate(-2%, 2%); }
}

/* smoke layer keeps text on dark glass — never the flooded page */
.hero-grain {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 30%, var(--ground-smoke) 88%),
    linear-gradient(rgba(12,12,16,0.55), rgba(12,12,16,0.55));
}

.hero-inner { position: relative; max-width: 860px; }

.hero-motif { width: 170px; margin: 0 auto 26px; }
.hero-motif .tri  { fill: rgba(30,30,38,0.5); stroke: var(--ink-glasswhite); stroke-width: 1.6; stroke-linejoin: bevel; }
.hero-motif .beam { stroke: #fff; stroke-width: 2; }
.hero-motif .rays path { stroke-width: 1.6; fill: none; }
.hero-motif .rays path:nth-child(1) { stroke: var(--shard-red); }
.hero-motif .rays path:nth-child(2) { stroke: var(--shard-orange); }
.hero-motif .rays path:nth-child(3) { stroke: var(--shard-yellow); }
.hero-motif .rays path:nth-child(4) { stroke: var(--shard-green); }
.hero-motif .rays path:nth-child(5) { stroke: var(--shard-capri); }
.hero-motif .rays path:nth-child(6) { stroke: var(--shard-blue); }
.hero-motif .rays path:nth-child(7) { stroke: var(--shard-violet); }
.hero-motif .rays path:nth-child(8) { stroke: var(--shard-pink); }
.hero-motif .rays path { opacity: 0.85; animation: ray-pulse 4s ease-in-out infinite; }
.hero-motif .rays path:nth-child(odd) { animation-delay: 1.2s; }
@keyframes ray-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.hero-kicker {
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-fog);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(34px, 6.4vw, 68px);
  font-weight: 900;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

/* Spectral text — the leak in the headline */
.spectral-text {
  background-image: var(--grad-linear);
  background-size: 300% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: text-flow 6s linear infinite;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 36px;
  font-size: 17px;
  color: var(--ink-vapor);
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Compact hero for interior pages */
.hero--page {
  min-height: 0;
  padding: 170px 20px 70px;
}
.hero--page .hero-title { font-size: clamp(30px, 5vw, 52px); margin-bottom: 16px; }
.hero--page .hero-sub { margin-bottom: 0; }

.scroll-cue {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  display: flex; justify-content: center;
}
.scroll-cue span {
  width: 3px; height: 8px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--grad-linear);
  background-size: 100% 400%;
  animation: cue-drop 1.8s ease-in-out infinite;
}
@keyframes cue-drop {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(70px, 10vw, 120px) clamp(18px, 5vw, 48px);
  max-width: calc(var(--maxw) + 96px);
  margin: 0 auto;
}

.section-alt {
  max-width: none;
  background:
    linear-gradient(transparent, rgba(21,21,27,0.6) 12% 88%, transparent);
}
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.section-head { text-align: center; margin-bottom: clamp(40px, 6vw, 64px); }

.section-kicker {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-fog);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-sub { max-width: 560px; margin: 0 auto; color: var(--ink-fog); }

/* ---------- Game cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
}

/* Single featured card, centered (home page) */
.game-grid--featured { grid-template-columns: minmax(0, 640px); justify-content: center; }

.game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 250ms cubic-bezier(0.33, 1, 0.68, 1);
}
.game-card:hover { transform: translateY(-6px); }

/* Rarity edges: legendary card gets the lawful full-loop frame */
.game-card[data-rarity="legendary"]::before {
  background: conic-gradient(from var(--loop-angle, 0deg),
    var(--shard-red), var(--shard-orange), var(--shard-yellow),
    var(--shard-green), var(--shard-capri), var(--shard-blue),
    var(--shard-violet), var(--shard-pink), var(--shard-red));
  opacity: 0.55;
  animation-duration: 9s;
}
.game-card[data-rarity="epic"]::before {
  background: conic-gradient(from var(--loop-angle, 0deg),
    transparent, var(--shard-capri), var(--shard-blue),
    var(--shard-violet), var(--shard-pink), transparent 72%);
  opacity: 0.5;
}
.game-card[data-rarity="rare"]::before {
  background: conic-gradient(from var(--loop-angle, 0deg),
    transparent 0 30%, var(--shard-green), var(--shard-capri), transparent 70%);
  opacity: 0.5;
}

.game-art {
  position: relative;
  height: 190px;
  background: var(--ground-facet);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.art-swirl { position: absolute; inset: -30%; opacity: 0.5; filter: blur(2px); }
.swirl-a {
  background:
    radial-gradient(45% 60% at 30% 40%, rgba(255,59,74,0.5), transparent 70%),
    radial-gradient(50% 55% at 72% 30%, rgba(255,159,28,0.45), transparent 70%),
    radial-gradient(55% 60% at 55% 78%, rgba(177,77,255,0.5), transparent 70%);
  animation: aurora-drift 18s ease-in-out infinite alternate;
}
.swirl-b {
  background:
    radial-gradient(45% 60% at 32% 36%, rgba(0,185,255,0.5), transparent 70%),
    radial-gradient(50% 55% at 74% 40%, rgba(61,123,255,0.45), transparent 70%),
    radial-gradient(55% 60% at 50% 82%, rgba(177,77,255,0.4), transparent 70%);
  animation: aurora-drift 22s ease-in-out infinite alternate-reverse;
}
.swirl-c {
  background:
    radial-gradient(45% 60% at 30% 45%, rgba(62,224,122,0.42), transparent 70%),
    radial-gradient(50% 55% at 72% 35%, rgba(0,185,255,0.4), transparent 70%),
    radial-gradient(50% 60% at 55% 85%, rgba(255,225,77,0.28), transparent 70%);
  animation: aurora-drift 20s ease-in-out infinite alternate;
}

/* keep art smoked at rest; flood a little on hover (tier 2) */
.game-art::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(12,12,16,0.55);
  transition: background 400ms ease;
}
.game-card:hover .game-art::after { background: rgba(12,12,16,0.2); }

.game-glyph {
  position: relative; z-index: 1;
  font-size: 44px;
  color: rgba(242,243,247,0.9);
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
}

.game-body { display: flex; flex-direction: column; gap: 14px; padding: 24px; flex: 1; }

.game-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-fog);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 4px 10px;
  border-radius: 99px;
}
.tag-legendary {
  color: var(--ink-glasswhite);
  border-color: transparent;
  background:
    linear-gradient(var(--ground-facet), var(--ground-facet)) padding-box,
    var(--grad-linear) border-box;
  border: 1px solid transparent;
}
.tag-epic { color: var(--shard-violet); border-color: rgba(177,77,255,0.4); }
.tag-rare { color: var(--shard-capri); border-color: rgba(0,185,255,0.35); }

.game-name { font-size: 22px; font-weight: 700; }

.game-desc { color: var(--ink-vapor); flex: 1; }

.game-meta {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px;
  color: var(--ink-fog);
}

.status { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.status-live { color: var(--shard-green); }
.status-live::before { content: "● "; animation: ray-pulse 2s ease-in-out infinite; }
.status-hidden { color: var(--shard-yellow); }
.status-hidden::before { content: "◈ "; }

/* ---------- About ---------- */
.about-wrap {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.15fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}

.about-copy p { margin-bottom: 16px; }
.about-copy .section-title { margin: 14px 0 22px; }
.about-copy em { color: var(--ink-glasswhite); font-style: italic; }

.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.value-card { padding: 22px; }
.value-card .value-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  background-image: var(--grad-linear);
  background-size: 300% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.value-card h3 { font-size: 16px; margin: 10px 0 8px; }
.value-card p { font-size: 13.5px; color: var(--ink-fog); }

/* ---------- News ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.news-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 250ms cubic-bezier(0.33, 1, 0.68, 1);
}
.news-card:hover { transform: translateY(-4px); }

.news-card time {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-fog);
}
.news-card h3 { font-size: 17px; }
.news-card p { color: var(--ink-vapor); font-size: 14px; flex: 1; }
.news-link {
  font-size: 13px; font-weight: 700;
  color: var(--ink-fog);
  transition: color 200ms ease;
}
.news-card:hover .news-link {
  background-image: var(--grad-linear);
  background-size: 300% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: text-flow 2.5s linear infinite;
}

/* ---------- Newsletter ---------- */
.newsletter {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 70px) clamp(24px, 5vw, 80px);
  text-align: center;
}

.newsletter-swirl {
  position: absolute; inset: -40%;
  background:
    radial-gradient(40% 50% at 20% 35%, rgba(177,77,255,0.16), transparent 70%),
    radial-gradient(45% 50% at 80% 30%, rgba(0,185,255,0.14), transparent 70%),
    radial-gradient(40% 50% at 55% 85%, rgba(255,59,74,0.10), transparent 70%);
  animation: aurora-drift 24s ease-in-out infinite alternate;
  pointer-events: none;
}

.newsletter-inner { position: relative; }

.newsletter-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

.newsletter-form input[type="email"] {
  flex: 1 1 280px;
  max-width: 380px;
}

/* ---------- Forms ---------- */
input, select, textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-glasswhite);
  background: var(--ground-smoke);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 13px 16px;
  width: 100%;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}

input::placeholder, textarea::placeholder { color: var(--ink-etched); }

input:hover, select:hover, textarea:hover { border-color: rgba(255,255,255,0.2); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--shard-capri);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.4),
    0 0 0 3px rgba(0,185,255,0.18),
    0 0 24px rgba(0,185,255,0.12);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 49%, var(--ink-fog) 50%, transparent 60%),
    linear-gradient(-45deg, transparent 49%, var(--ink-fog) 50%, transparent 60%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
select option { background: var(--ground-facet); color: var(--ink-glasswhite); }

textarea { resize: vertical; min-height: 120px; }

.contact-wrap { max-width: 720px; margin: 0 auto; }

.contact-form {
  padding: clamp(26px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.form-field { display: flex; flex-direction: column; gap: 8px; }

.form-field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-fog);
}

.form-note { text-align: center; font-size: 13px; color: var(--ink-fog); }

.mail-link {
  color: var(--ink-vapor);
  border-bottom: 1px solid var(--ink-etched);
  transition: color 200ms ease, border-color 200ms ease;
}
.mail-link:hover { color: var(--shard-capri); border-color: var(--shard-capri); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(255,255,255,0.07);
  position: relative;
  padding: 50px clamp(18px, 5vw, 48px) 30px;
  background: var(--ground-leaded);
}
.footer::before {
  content: "";
  position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: var(--grad-linear);
  opacity: 0.35;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 10px; }

.footer-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; }
.footer-links a { color: var(--ink-fog); transition: color 200ms ease; }
.footer-links a:hover { color: var(--ink-glasswhite); }

.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--ink-fog);
  font-size: 15px;
  transition: color 200ms ease, border-color 200ms ease, transform 150ms ease;
}
.footer-social a:hover {
  color: var(--ink-glasswhite);
  border-color: var(--shard-violet);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(177,77,255,0.25);
}

.footer-fine {
  text-align: center;
  font-size: 12px;
  color: var(--ink-etched);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.99);
  transition: opacity 500ms ease, transform 550ms cubic-bezier(0.33, 1, 0.68, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Mobile nav ---------- */
@media (max-width: 800px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 4px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(18, 18, 24, 0.97);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 24px 50px rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 200ms ease, transform 200ms ease;
  }
  .nav-links a:not(.btn) { display: block; padding: 12px; }
  .nav-links .btn { margin-top: 8px; }

  .nav.menu-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .about-wrap { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion: OFF tier — flat glass, no swirl ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
}
