/* ============================================================
   FLUX & FORM — public site styles
   Dark + neon. Accent colors are driven by admin settings
   via --accent / --accent2 custom properties set in app.js.
   ============================================================ */
:root {
  --bg: #0a0a0f;
  --bg2: #101018;
  --surface: #14141f;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f2f7;
  --muted: #8b8b9e;
  --accent: #00f0ff;
  --accent2: #ff2ee6;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.87, 0, 0.13, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overscroll-behavior-y: none; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
::selection { background: var(--accent); color: #000; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* On devices with a fine pointer we hide the native cursor (custom one takes over) */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
}

/* ---------- preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: grid; place-items: center;
  transition: clip-path 0.9s var(--ease-expo);
  clip-path: inset(0 0 0 0);
}
.preloader.done { clip-path: inset(0 0 100% 0); }
.preloader-inner { text-align: center; }
.preloader-brand {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700; letter-spacing: 0.35em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.preloader-count {
  margin-top: 1rem;
  font-family: ui-monospace, monospace;
  font-size: 3rem; font-weight: 300; color: var(--text);
}
.preloader-bar {
  width: 200px; height: 1px; margin: 1rem auto 0;
  background: var(--line); overflow: hidden;
}
.preloader-bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.2s linear;
}

/* ---------- curtain transition ---------- */
.curtain { position: fixed; inset: 0; z-index: 150; pointer-events: none; display: flex; }
.curtain-panel {
  flex: 1; background: var(--bg2);
  transform: scaleY(0); transform-origin: top;
  border-right: 1px solid rgba(255,255,255,0.03);
}
.curtain.animate-in .curtain-panel { animation: curtainIn 0.5s var(--ease-expo) forwards; }
.curtain.animate-out .curtain-panel { transform: scaleY(1); transform-origin: bottom; animation: curtainOut 0.5s var(--ease-expo) forwards; }
.curtain-panel:nth-child(2) { animation-delay: 0.06s !important; }
.curtain-panel:nth-child(3) { animation-delay: 0.12s !important; }
@keyframes curtainIn { to { transform: scaleY(1); } }
@keyframes curtainOut { to { transform: scaleY(0); } }

/* ---------- custom cursor ---------- */
.cursor, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; display: none; }
body.has-cursor .cursor, body.has-cursor .cursor-ring { display: block; }
.cursor {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--accent);
}
.cursor-ring {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  transform: translate(-50%, -50%);
  display: none; place-items: center;
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
              background-color 0.3s, border-color 0.3s;
}
body.has-cursor .cursor-ring { display: grid; }
.cursor-ring.grow {
  width: 88px; height: 88px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--accent);
  backdrop-filter: blur(2px);
}
.cursor-label {
  font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: 0.15em;
  color: var(--text); opacity: 0; transition: opacity 0.2s;
}
.cursor-ring.grow .cursor-label { opacity: 1; }
.cursor.down { transform: translate(-50%, -50%) scale(2.2); }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -100%; z-index: 120; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); } 25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); } 75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s, backdrop-filter 0.4s, transform 0.45s var(--ease-out);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav.hidden { transform: translateY(-110%); }
.nav-logo { display: flex; align-items: center; gap: 0.7rem; }
.nav-logo-mark { width: 34px; height: 34px; }
.nav-brand {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.85rem;
}
.nav-links { display: flex; gap: clamp(1rem, 3vw, 2.4rem); }
.nav-link {
  font-family: ui-monospace, monospace; font-size: 0.8rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  transition: color 0.3s; position: relative; padding: 0.4rem 0;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease-out);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-right { display: flex; align-items: center; gap: 0.8rem; }
.nav-status {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 0.75rem; letter-spacing: 0.06em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px; padding: 0.45rem 0.95rem;
  transition: border-color 0.3s, color 0.3s;
}
.nav-status:hover { border-color: var(--accent); color: var(--text); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3dff8b;
  box-shadow: 0 0 8px #3dff8b; animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }
.install-chip {
  font-size: 0.75rem; letter-spacing: 0.06em;
  border: 1px solid var(--accent); color: var(--accent);
  border-radius: 99px; padding: 0.45rem 0.95rem;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  transition: background 0.3s, color 0.3s;
}
.install-chip:hover { background: var(--accent); color: #000; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; position: relative;
  display: grid; place-items: center; overflow: hidden;
  padding: 6rem clamp(1.2rem, 4vw, 3rem) 4rem;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-content { position: relative; text-align: center; max-width: 1100px; }
.hero-kicker {
  font-family: ui-monospace, monospace; font-size: 0.78rem;
  letter-spacing: 0.35em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 1.4rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 9.5rem);
  font-weight: 700; line-height: 0.95; letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero-title .char {
  display: inline-block; white-space: pre;
  transform: translateY(110%) rotate(6deg); opacity: 0;
  transition: transform 0.9s var(--ease-expo), opacity 0.6s, color 0.25s;
}
.hero-title .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-title.in .char { transform: translateY(0) rotate(0); opacity: 1; }
.hero-title .char:hover { color: var(--accent); }
.hero-title em, .hero-title .alt {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-tagline {
  margin: 1.6rem auto 0; max-width: 560px;
  font-size: clamp(1rem, 1.6vw, 1.25rem); color: var(--muted); font-weight: 300;
}
.hero-cta { margin-top: 2.4rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
  padding: 0.95rem 2rem; border-radius: 99px; position: relative;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s, color 0.3s;
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent2)); color: #06060a;
}
.btn-primary:hover { box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: inset 0 0 22px color-mix(in srgb, var(--accent) 12%, transparent); }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px; border: 1px solid var(--line); border-radius: 14px;
}
.hero-scroll span {
  position: absolute; top: 7px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--accent);
  animation: scrollHint 1.8s var(--ease-out) infinite;
}
@keyframes scrollHint { 60% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.1rem 0; position: relative; background: var(--bg2);
}
.marquee-track {
  display: inline-flex; will-change: transform;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1rem, 2.4vw, 1.6rem); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  animation: marquee 28s linear infinite;
}
.marquee-alt .marquee-track {
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 65%, transparent);
  animation-duration: 34s; animation-direction: reverse;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: clamp(5rem, 10vw, 9rem) clamp(1.2rem, 4vw, 3rem); max-width: 1500px; margin: 0 auto; }
.section-title {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(2.6rem, 7vw, 5.5rem); font-weight: 700; line-height: 0.95; letter-spacing: -0.02em;
}
.section-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap; margin-bottom: 3.5rem;
}

/* line reveal */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-lines] .line { display: block; overflow: hidden; }
[data-reveal-lines] .line > span {
  display: block; transform: translateY(110%);
  transition: transform 0.9s var(--ease-expo);
}
[data-reveal-lines].in .line > span { transform: none; }
[data-reveal-lines] .line:nth-child(2) > span { transition-delay: 0.08s; }
[data-reveal-lines] .line:nth-child(3) > span { transition-delay: 0.16s; }
[data-reveal-lines] .line:nth-child(4) > span { transition-delay: 0.24s; }
[data-reveal-lines] .line:nth-child(5) > span { transition-delay: 0.32s; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.filter {
  font-family: ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px; padding: 0.55rem 1.2rem;
  transition: all 0.3s var(--ease-out);
}
.filter:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.filter.is-active {
  color: #06060a; border-color: transparent;
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ---------- project grid ---------- */
.grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr));
}
.card {
  position: relative; border-radius: 18px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  transform-style: preserve-3d; will-change: transform;
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), border-color 0.3s;
  opacity: 0; transform: translateY(40px) scale(0.97);
  display: block;
}
.card.in { opacity: 1; transform: translateY(0) scale(1); }
.card.hide { opacity: 0; transform: scale(0.94); pointer-events: none; position: absolute; visibility: hidden; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.card.featured { grid-column: span 1; }
@media (min-width: 1024px) { .card.featured { grid-column: span 2; } }
.card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg2); }
.card.featured .card-media { aspect-ratio: 21/9; }
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease-out), filter 0.6s;
  filter: saturate(0.85);
}
.card:hover .card-media img { transform: scale(1.06); filter: saturate(1.15); }
.card-glare {
  position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0;
  background: radial-gradient(600px circle at var(--gx, 50%) var(--gy, 50%),
    color-mix(in srgb, var(--accent) 14%, transparent), transparent 45%);
  transition: opacity 0.3s;
}
.card:hover .card-glare { opacity: 1; }
.card-cat {
  position: absolute; top: 1rem; left: 1rem; z-index: 3;
  font-family: ui-monospace, monospace; font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 0.35rem 0.8rem; border-radius: 99px;
  backdrop-filter: blur(8px); background: rgba(10,10,15,0.55); border: 1px solid var(--line);
}
.card-cat.physical { color: var(--accent2); border-color: color-mix(in srgb, var(--accent2) 45%, transparent); }
.card-cat.software { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.card-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
.card-summary { color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; font-weight: 300; }
.card-tags { margin-top: 0.7rem; display: flex; gap: 0.45rem; flex-wrap: wrap; }
.card-tag { font-family: ui-monospace, monospace; font-size: 0.66rem; letter-spacing: 0.1em; color: var(--muted); border: 1px solid var(--line); padding: 0.2rem 0.6rem; border-radius: 99px; }
.card-arrow {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 1.1rem; color: var(--muted);
  transition: all 0.35s var(--ease-out);
}
.card:hover .card-arrow {
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  color: #06060a; border-color: transparent; transform: rotate(45deg);
}
.grid-empty { color: var(--muted); text-align: center; padding: 3rem 0; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 6vw, 6rem); margin-top: 3.5rem; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.about-statement {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.35rem, 2.6vw, 2.1rem); line-height: 1.45; color: var(--text);
}
.side-label {
  display: block; font-family: ui-monospace, monospace; font-size: 0.7rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem;
}
.services { list-style: none; }
.services li {
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: 1.05rem; display: flex; align-items: center; gap: 0.8rem;
  transition: padding-left 0.3s var(--ease-out), color 0.3s;
}
.services li::before { content: "→"; color: var(--accent); transition: transform 0.3s; }
.services li:hover { padding-left: 0.5rem; color: var(--accent); }
.about-meta { margin-top: 2.2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.about-meta span:last-child { font-family: var(--font-display); }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact-kicker { font-family: ui-monospace, monospace; font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.contact-email {
  display: inline-block; margin-top: 1.6rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 6vw, 4.6rem); letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  position: relative; will-change: transform;
}
.contact-email::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0); transition: transform 0.5s var(--ease-expo);
}
.contact-email:hover::after { transform: scaleX(1); }
.socials { margin-top: 2.6rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.social {
  font-family: ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 99px; padding: 0.6rem 1.3rem; color: var(--muted);
  transition: all 0.3s var(--ease-out);
}
.social:hover { color: var(--text); border-color: var(--accent); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- footer ---------- */
.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.6rem clamp(1.2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  font-size: 0.78rem; color: var(--muted);
}
.footer-hint { opacity: 0.7; }
.footer-admin { opacity: 0.45; transition: opacity 0.3s, color 0.3s; }
.footer-admin:hover { opacity: 1; color: var(--accent); }

/* ---------- case study overlay ---------- */
.case {
  position: fixed; inset: 0; z-index: 140; background: var(--bg);
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.case.open { opacity: 1; pointer-events: auto; }
.case-scroller { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
.case-close {
  position: fixed; top: 1.4rem; right: 1.6rem; z-index: 10;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(10,10,15,0.6); backdrop-filter: blur(10px);
  font-size: 1.1rem; transition: all 0.3s var(--ease-out);
}
.case-close:hover { background: var(--accent); color: #000; border-color: transparent; transform: rotate(90deg); }
.case-hero { position: relative; height: min(72svh, 720px); overflow: hidden; }
.case-cover { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.2s var(--ease-out); }
.case.open .case-cover { transform: scale(1); }
.case-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,15,0.25), transparent 40%, rgba(10,10,15,0.92));
}
.case-heading { position: absolute; left: clamp(1.2rem, 4vw, 3.5rem); right: 1.2rem; bottom: 2.4rem; z-index: 2; }
.case-cat {
  font-family: ui-monospace, monospace; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
}
.case-title {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(2.2rem, 7vw, 5.5rem); font-weight: 700; line-height: 0.98; letter-spacing: -0.02em;
  margin-top: 0.5rem;
}
.case-body {
  display: grid; grid-template-columns: 300px 1fr; gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.2rem, 4vw, 3.5rem);
  max-width: 1400px; margin: 0 auto;
}
@media (max-width: 860px) { .case-body { grid-template-columns: 1fr; } }
.case-meta { display: flex; flex-direction: column; gap: 1.8rem; align-items: flex-start; }
.meta-block span:last-child { font-family: var(--font-display); }
.case-stats { display: grid; gap: 0.8rem; }
.case-stat .num {
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 700;
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.case-stat .lbl { font-size: 0.8rem; color: var(--muted); }
.case-text { font-size: 1.08rem; font-weight: 300; color: #cfcfda; max-width: 68ch; }
.case-text p + p { margin-top: 1.2em; }
.case-gallery {
  display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  padding: 0 clamp(1.2rem, 4vw, 3.5rem) 3rem; max-width: 1400px; margin: 0 auto;
}
.case-gallery img, .case-gallery video {
  width: 100%; border-radius: 14px; border: 1px solid var(--line);
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.case-gallery .in { opacity: 1; transform: none; }
.case-next {
  display: block; width: 100%; text-align: left;
  padding: 2.6rem clamp(1.2rem, 4vw, 3.5rem) 3.5rem;
  border-top: 1px solid var(--line);
  transition: background 0.4s;
}
.case-next:hover { background: var(--bg2); }
.case-next-title {
  display: block; font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(1.6rem, 4.5vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em;
  transition: color 0.3s;
}
.case-next:hover .case-next-title { color: var(--accent); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 1.6rem; left: 50%; transform: translate(-50%, 140%);
  z-index: 400; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 0.85rem 1.4rem; font-size: 0.9rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5); transition: transform 0.45s var(--ease-out);
  max-width: min(92vw, 480px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- konami party mode ---------- */
body.party { animation: hueSpin 4s linear infinite; }
@keyframes hueSpin { to { filter: hue-rotate(360deg); } }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .nav-brand { display: none; }
  .nav-status span:last-child { display: none; }
  .nav-status { padding: 0.45rem 0.6rem; }
  .footer { justify-content: center; text-align: center; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal], .card, .hero-title .char { opacity: 1 !important; transform: none !important; }
  [data-reveal-lines] .line > span { transform: none !important; }
  .grain, .hero-scroll { display: none; }
}
