/* ============================================================
   KARAMAI STUDIOS — design system
   Dark + purple glow. Palette derived from the 2022 logo set.
   ============================================================ */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0913;
  --bg-elev: #100e1c;
  --bg-elev-2: #16132a;
  --text: #efedf8;
  --muted: #a29cb9;
  --faint: #6f6a88;

  --brand-1: #7231cf;
  --brand-2: #a44fe0;
  --brand-3: #d86dff;
  --brand-4: #ee3dc6;
  --grad: linear-gradient(100deg, var(--brand-1), var(--brand-3) 55%, var(--brand-4));

  --line: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: rgba(255, 255, 255, 0.06);

  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1160px;
  --nav-h: 72px;

  --shadow-card: 0 18px 50px -18px rgba(0, 0, 0, 0.65);
  --glow: 0 0 44px -8px rgba(168, 85, 247, 0.45);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: var(--brand-3); text-decoration: none; }
a:hover { color: #e3b8ff; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }

::selection { background: rgba(168, 85, 247, 0.45); }

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--brand-1);
  border-radius: 8px;
  color: #fff;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Ambient background glow ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52% 38% at 78% -6%, rgba(114, 49, 207, 0.26), transparent 70%),
    radial-gradient(40% 30% at 8% 18%, rgba(238, 61, 198, 0.10), transparent 70%),
    radial-gradient(46% 40% at 50% 108%, rgba(114, 49, 207, 0.16), transparent 70%);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background 0.25s, border-color 0.25s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 9, 19, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav > nav { display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { height: 34px; width: auto; }
.brand span {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.22em;
  color: var(--text);
  display: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a:not(.btn) {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.15s;
}
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"] {
  position: relative;
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle::before { margin-bottom: 6px; }
.nav-toggle::after { margin-top: 6px; }
body.nav-open .nav-toggle span { opacity: 0; }
body.nav-open .nav-toggle::before { transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15.5px;
  font-family: var(--font-body);
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, background 0.2s, border-color 0.2s, color 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { flex: none; }
.btn-primary {
  background-image: var(--grad);
  color: #fff;
  box-shadow: 0 10px 34px -10px rgba(168, 85, 247, 0.55);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 44px -10px rgba(168, 85, 247, 0.75);
}
.btn-ghost {
  border-color: var(--line);
  background: var(--glass);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(216, 109, 255, 0.55);
  color: #fff;
  box-shadow: var(--glow);
}
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: max(640px, 92svh);
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 56px) 0 72px;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  animation: heroZoom 26s ease-out forwards;
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 9, 19, 0.62) 0%, rgba(10, 9, 19, 0.22) 42%, var(--bg) 96%),
    linear-gradient(100deg, rgba(10, 9, 19, 0.86) 0%, rgba(10, 9, 19, 0.35) 55%, rgba(10, 9, 19, 0.1) 100%);
}
.hero-inner { max-width: 720px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brand-3);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--grad);
  border-radius: 2px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.1rem);
  font-weight: 700;
  margin-bottom: 22px;
}
.hero p.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 34px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Stats band ---------- */
.stats {
  border-block: 1px solid var(--line);
  background: var(--bg-elev);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 34px 0;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { color: var(--muted); font-size: 14.5px; letter-spacing: 0.02em; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::after {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--grad);
  border-radius: 2px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
}
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Product cards ---------- */
.grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
  box-shadow: var(--shadow-card);
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(216, 109, 255, 0.45);
  box-shadow: var(--shadow-card), var(--glow);
}
.card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elev-2);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.card:hover .card-media img { transform: scale(1.045); }
.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
  flex: 1;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card h3 {
  font-size: 1.22rem;
  font-weight: 600;
  margin: 0;
}
.card p {
  color: var(--muted);
  font-size: 14.6px;
  margin: 0;
  flex: 1;
}
.card .go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 14.5px;
  margin-top: 8px;
}

.chip {
  display: inline-block;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(216, 109, 255, 0.35);
  color: var(--brand-3);
  background: rgba(114, 49, 207, 0.14);
  white-space: nowrap;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
}
.rating .star { color: #ffd166; }
.rating .count { color: var(--faint); }

/* ---------- Feature blocks ---------- */
.features {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.feature {
  padding: 30px 28px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.feature:hover {
  border-color: rgba(216, 109, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--glow);
}
.feature .icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(114, 49, 207, 0.35), rgba(238, 61, 198, 0.2));
  border: 1px solid rgba(216, 109, 255, 0.3);
}
.feature h3 { font-size: 1.13rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14.8px; margin: 0; }

/* ---------- Showcase split ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
.split-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.split-media img { width: 100%; }
.split-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(114, 49, 207, 0.14), transparent 45%);
  pointer-events: none;
}
.split h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.split p { color: var(--muted); }
.split .btn { margin-top: 10px; }
.checklist {
  list-style: none;
  margin: 22px 0 26px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.checklist li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--muted);
}
.checklist li::before {
  content: "◆";
  font-size: 10px;
  color: var(--brand-3);
  transform: translateY(-1px);
}
.checklist b { color: var(--text); font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border: 1px solid rgba(216, 109, 255, 0.28);
  border-radius: 24px;
  padding: clamp(44px, 7vw, 72px);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(70% 120% at 50% -20%, rgba(114, 49, 207, 0.4), transparent 65%),
    radial-gradient(45% 80% at 85% 115%, rgba(238, 61, 198, 0.22), transparent 70%),
    var(--bg-elev);
}
.cta-band h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.cta-band p { color: var(--muted); max-width: 52ch; margin: 0 auto 30px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: calc(var(--nav-h) + 84px) 0 64px;
  position: relative;
  isolation: isolate;
}
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 18ch; }
.page-hero .lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  max-width: 60ch;
  margin: 0;
}

/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0 36px;
}
.filter-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s;
}
.filter-btn:hover { color: var(--text); border-color: rgba(216, 109, 255, 0.45); }
.filter-btn.active {
  background-image: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 26px -8px rgba(168, 85, 247, 0.6);
}

/* ---------- Prose (about) ---------- */
.prose {
  max-width: 720px;
}
.prose p { color: var(--muted); font-size: 1.03rem; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 1.6em; }
.prose b, .prose strong { color: var(--text); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 26px;
  align-items: start;
}
.contact-card {
  padding: 34px 32px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.contact-card:hover { border-color: rgba(216, 109, 255, 0.4); }
.contact-card.wide { grid-column: 1 / -1; }
.contact-card h3 { font-size: 1.2rem; display: flex; align-items: center; gap: 12px; }
.contact-card p { color: var(--muted); font-size: 15px; }
.contact-card .icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(140deg, rgba(114, 49, 207, 0.35), rgba(238, 61, 198, 0.2));
  border: 1px solid rgba(216, 109, 255, 0.3);
  flex: none;
}
.contact-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.contact-card a.mail { font-weight: 600; font-size: 15.5px; }
.contact-note { color: var(--faint); font-size: 13px; margin-top: 10px; }

.faq { max-width: 760px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--glass);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-family: var(--font-head);
  font-size: 15.5px;
  list-style: none;
  position: relative;
  padding-right: 52px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--brand-3);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .faq-body { padding: 0 22px 18px; color: var(--muted); font-size: 15px; }

/* ---------- 404 ---------- */
.error-hero { text-align: center; padding: calc(var(--nav-h) + 110px) 0 120px; }
.error-code {
  font-family: var(--font-head);
  font-size: clamp(6rem, 18vw, 11rem);
  font-weight: 700;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 34px rgba(168, 85, 247, 0.35));
}
.error-hero p { color: var(--muted); max-width: 46ch; margin: 18px auto 34px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 64px 0 48px;
}
.footer-grid .brand { margin-bottom: 16px; }
.footer-tag { color: var(--muted); font-size: 14.8px; max-width: 34ch; }
.footer-col h4 {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { color: var(--muted); font-size: 14.8px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: var(--faint);
  font-size: 13.5px;
}
.footer-bottom .unreal-note { font-size: 12.5px; }

.socials { display: flex; gap: 12px; }
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--muted);
  transition: all 0.18s;
}
.socials a:hover {
  color: #fff;
  border-color: rgba(216, 109, 255, 0.55);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

/* ---------- Reveal animations (only when JS is available) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.no-anim .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.no-anim .hero-media img { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img { animation: none; }
  .card, .card-media img, .feature, .btn, .socials a { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .section { padding: 68px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(12, 10, 22, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 22px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  body.nav-open .nav-links {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: 0; padding-top: 14px; }
  .nav-links a:not(.btn) {
    display: block;
    padding: 15px 2px;
    font-size: 16px;
  }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links .btn { justify-content: center; width: 100%; }
  .brand span { display: inline; }
  .stats-grid { grid-template-columns: 1fr; gap: 26px; padding: 30px 0; }
  .grid, .grid-3 { grid-template-columns: 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 36px; }
  .hero { min-height: auto; padding-bottom: 56px; }
}
