/* ==========================================================================
   Primoria – Website
   Design: deep night sky, golden elemental accents, glass surfaces.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-400.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-500.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-600.woff') format('woff');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gloock';
  src: url('../fonts/gloock-400.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07061a;
  --bg-2: #0d0b2a;
  --night: #141046;
  --violet: #2a1f74;
  --ink: #f4f1ff;
  --ink-2: #c9cdf2;
  --ink-3: #8e93c8;
  --gold: #ffd27a;
  --gold-2: #ffe7b0;
  --gold-deep: #c98d2e;
  --water: #5cc8ff;
  --fire: #ff8a4c;
  --air: #d8ecff;
  --earth: #7fe08a;
  --glass: rgba(30, 32, 98, 0.55);
  --glass-strong: rgba(26, 26, 84, 0.86);
  --line: rgba(160, 175, 255, 0.18);
  --line-strong: rgba(255, 210, 122, 0.45);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --font-display: 'Gloock', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fixed night-sky backdrop (works on iOS, unlike background-attachment: fixed). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 800px at 15% -10%, rgba(92, 70, 220, 0.38), transparent 60%),
    radial-gradient(900px 700px at 100% 10%, rgba(40, 110, 255, 0.24), transparent 60%),
    radial-gradient(1000px 900px at 50% 120%, rgba(190, 70, 210, 0.2), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 55%, #05040f);
}

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

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--gold-2);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--gold);
  color: #1a1030;
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.container {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Typography ---------- */

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.005em;
  margin: 0 0 0.4em;
}
h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.8rem);
}
h2 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
}
h3 {
  font-size: 1.45rem;
  line-height: 1.2;
}
p {
  margin: 0 0 1em;
}

.gold {
  background: linear-gradient(180deg, #fff6d8 0%, var(--gold) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  color: var(--ink-2);
  max-width: 40em;
}

.section {
  padding: clamp(72px, 10vw, 130px) 0;
  position: relative;
}
.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section-head.center .eyebrow::after {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-gold {
  color: #2a1606;
  background: linear-gradient(180deg, #fff1c9, var(--gold) 55%, #e9a948);
  box-shadow: 0 10px 30px -8px rgba(255, 190, 90, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.btn-gold:hover {
  color: #2a1606;
  box-shadow: 0 16px 40px -8px rgba(255, 190, 90, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}
.btn-store {
  min-height: 58px;
  padding: 0 22px 0 18px;
  color: #fff;
  background: #050510;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-store:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-store svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.btn-store .store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}
.btn-store small {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.8;
}
.btn-store strong {
  font-size: 1.15rem;
  font-weight: 600;
}
.btn-store[data-soon='true'] {
  cursor: default;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(8, 7, 30, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
}
.brand img {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 12px rgba(120, 180, 255, 0.45));
}
.brand:hover {
  color: var(--gold-2);
}
.nav {
  margin-left: auto;
}
.nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch a {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-decoration: none;
}
.lang-switch a[aria-current='true'] {
  color: #1d1230;
  background: var(--gold);
}
.header-cta {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.92rem;
}
.menu-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1100px) {
  .menu-toggle {
    display: block;
  }
  .header-cta {
    display: none;
  }
  .nav {
    position: fixed;
    inset: 76px 0 auto 0;
    margin: 0;
    padding: 18px var(--gutter) 28px;
    background: rgba(8, 7, 30, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav ul {
    flex-direction: column;
    align-items: stretch;
  }
  .nav a {
    padding: 14px 12px;
    font-size: 1.05rem;
  }
  .nav .lang-item {
    margin-top: 10px;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(24px, 4vw, 56px) 0 clamp(70px, 9vw, 120px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 70px);
  align-items: center;
}
.hero-logo {
  width: clamp(150px, 15vw, 200px);
  margin: -10px 0 8px -12px;
  filter: drop-shadow(0 20px 50px rgba(90, 140, 255, 0.35));
  animation: float 7s ease-in-out infinite;
}
.hero h1 {
  margin-bottom: 0.3em;
}
.hero .lead {
  margin-bottom: 30px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font-size: 0.92rem;
}
.trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.trust li::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    text-align: center;
  }
  .hero-logo {
    margin: 0 auto 8px;
  }
  .hero .lead {
    margin-inline: auto;
  }
  .cta-row,
  .trust {
    justify-content: center;
  }
}

/* ---------- Phone + demo ---------- */

.phone-wrap {
  position: relative;
  display: grid;
  place-items: center;
}
.phone-wrap::before {
  content: '';
  position: absolute;
  width: 115%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 150, 255, 0.35), rgba(160, 80, 255, 0.12) 45%, transparent 70%);
  filter: blur(10px);
  z-index: -1;
}
.phone {
  width: min(360px, 88vw);
  border-radius: 48px;
  padding: 12px;
  background: linear-gradient(160deg, #3b3a5c, #12122a 40%, #2a2946);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.screen {
  position: relative;
  border-radius: 38px;
  overflow: hidden;
  padding: 46px 16px 18px;
  background:
    radial-gradient(420px 300px at 20% 0%, rgba(110, 80, 230, 0.55), transparent 70%),
    radial-gradient(400px 360px at 100% 100%, rgba(50, 110, 255, 0.35), transparent 70%),
    linear-gradient(180deg, #1a1650, #0c0b2c);
}
.screen::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  width: 96px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: #050510;
}
.demo-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.hud-item {
  padding: 7px 8px;
  border-radius: 12px;
  border: 1px solid rgba(150, 200, 255, 0.35);
  background: rgba(30, 36, 110, 0.6);
  text-align: center;
}
.hud-item span {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hud-item strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--gold-2);
}
.demo-board {
  --size: 4;
  --gap: 7px;
  position: relative;
  aspect-ratio: 1;
  padding: var(--gap);
  border-radius: 20px;
  border: 1.5px solid rgba(140, 200, 255, 0.55);
  background: linear-gradient(160deg, rgba(40, 60, 170, 0.45), rgba(12, 16, 64, 0.8));
  box-shadow: 0 0 34px rgba(60, 120, 255, 0.35);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.demo-board:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.demo-cells,
.demo-tiles {
  position: absolute;
  inset: var(--gap);
}
.demo-cells {
  display: grid;
  grid-template-columns: repeat(var(--size), 1fr);
  gap: var(--gap);
}
.demo-cells i {
  border-radius: 22%;
  background: rgba(6, 10, 44, 0.55);
  border: 1px solid rgba(130, 170, 255, 0.14);
}
.tile {
  position: absolute;
  top: 0;
  left: 0;
  width: calc((100% - (var(--size) - 1) * var(--gap)) / var(--size));
  aspect-ratio: 1;
  transition: transform 0.13s cubic-bezier(0.2, 0.7, 0.3, 1);
  will-change: transform;
}
.tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 22%;
  overflow: hidden;
}
.tile img {
  width: 100%;
  height: 100%;
}
.tile b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5%;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.56rem, 2.3vw, 0.72rem);
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 20, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 3px;
}
.tile.is-new .tile-inner {
  animation: pop 0.38s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.tile.is-merged .tile-inner {
  animation: merge 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  box-shadow: 0 0 0 2px rgba(255, 226, 154, 0.9), 0 0 24px rgba(255, 210, 120, 0.8);
}
.tile.is-gone {
  opacity: 0;
  transition: transform 0.13s ease, opacity 0.16s ease 0.08s;
}
.demo-toast {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 5;
  transform: translate(-50%, -50%) scale(0.8);
  min-width: 70%;
  padding: 14px 16px 12px;
  border-radius: 18px;
  border: 1.5px solid var(--gold);
  background: rgba(24, 22, 78, 0.95);
  box-shadow: 0 0 40px rgba(255, 200, 100, 0.45);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.demo-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.demo-toast small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.demo-toast img {
  width: 64px;
  height: 64px;
  margin: 8px auto 6px;
  border-radius: 22%;
}
.demo-toast strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
}
.demo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--ink-3);
}
.demo-foot button {
  border: 1px solid rgba(150, 200, 255, 0.4);
  background: rgba(30, 36, 110, 0.6);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font: 600 0.78rem var(--font-body);
  cursor: pointer;
}
.demo-foot button:hover {
  border-color: var(--gold);
}
.demo-over {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  place-items: center;
  border-radius: 20px;
  background: rgba(8, 8, 30, 0.82);
  text-align: center;
  padding: 20px;
}
.demo-over.is-visible {
  display: grid;
}
.demo-over p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.demo-hint {
  margin: 14px auto 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.9rem;
}

.orbit {
  position: absolute;
  width: 74px;
  border-radius: 22%;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  animation: float 6s ease-in-out infinite;
  z-index: 2;
}
.orbit.o1 {
  top: 6%;
  left: -2%;
  animation-delay: -1s;
}
.orbit.o2 {
  top: 18%;
  right: -4%;
  width: 62px;
  animation-delay: -3s;
}
.orbit.o3 {
  bottom: 12%;
  left: 2%;
  width: 58px;
  animation-delay: -2s;
}
.orbit.o4 {
  bottom: 4%;
  right: 0;
  animation-delay: -4s;
}
@media (max-width: 520px) {
  .orbit {
    display: none;
  }
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(40, 42, 120, 0.45), rgba(16, 16, 56, 0.4));
  backdrop-filter: blur(6px);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 22px;
  right: 24px;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  color: rgba(255, 210, 122, 0.18);
}
.step p {
  color: var(--ink-2);
  margin: 0;
}
.formula {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
}
.formula img {
  width: 54px;
  height: 54px;
  border-radius: 22%;
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- Feature cards ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 210, 122, 0.5), transparent 35%, transparent 65%, rgba(92, 200, 255, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
}
.card .icon {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(255, 226, 154, 0.35), rgba(80, 90, 220, 0.25));
  border: 1px solid rgba(255, 210, 122, 0.35);
}
.card .icon img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.card p {
  color: var(--ink-2);
  margin: 0;
}
@media (max-width: 960px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 26px;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--line-strong);
  background: linear-gradient(90deg, rgba(60, 40, 140, 0.4), rgba(20, 30, 100, 0.4));
  box-shadow: 0 0 60px rgba(255, 200, 100, 0.08) inset;
}
.stat {
  text-align: center;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.1;
}
.stat span {
  color: var(--ink-3);
  font-size: 0.9rem;
}
@media (max-width: 760px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:last-child {
    grid-column: 1 / -1;
  }
}

/* ---------- Powers ---------- */

.rarity-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.rarity-legend span,
.power .rarity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.04);
}
.r-common {
  color: #8fd3ff;
}
.r-rare {
  color: #5cf0c2;
}
.r-epic {
  color: #c48bff;
}
.r-legendary {
  color: #ffd36b;
}
.powers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.power {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(22, 24, 80, 0.55);
}
.power img {
  width: 58px;
  height: 58px;
}
.power h3 {
  font-size: 1.12rem;
  margin: 0 0 2px;
}
.power p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.45;
}
.power .rarity {
  padding: 2px 8px;
  font-size: 0.68rem;
  margin-bottom: 6px;
}
.power.is-legendary {
  border-color: rgba(255, 211, 107, 0.55);
  box-shadow: 0 0 30px rgba(255, 200, 90, 0.15);
}
.power.is-epic {
  border-color: rgba(196, 139, 255, 0.45);
}

/* ---------- Myth highlight ---------- */

.myth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding: clamp(30px, 5vw, 60px);
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid rgba(196, 139, 255, 0.4);
  background:
    radial-gradient(500px 300px at 90% 10%, rgba(255, 120, 90, 0.18), transparent 70%),
    radial-gradient(500px 400px at 0% 100%, rgba(160, 90, 255, 0.28), transparent 70%),
    rgba(20, 16, 64, 0.6);
}
.myth-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.myth-tiles figure {
  margin: 0;
  text-align: center;
}
.myth-tiles img {
  border-radius: 22%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s ease;
}
.myth-tiles figure:hover img {
  transform: translateY(-5px) rotate(-2deg);
}
.myth-tiles figcaption {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink-2);
}
@media (max-width: 860px) {
  .myth {
    grid-template-columns: 1fr;
  }
}

/* ---------- Element marquee ---------- */

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee 60s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee figure {
  margin: 0;
  width: 108px;
  text-align: center;
}
.marquee img {
  width: 108px;
  height: 108px;
  border-radius: 22%;
}
.marquee figcaption {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--ink-3);
}

/* ---------- Studio ---------- */

.studio {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.studio-quote {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.2;
  margin: 0;
}
.studio-quote span {
  display: block;
}
.studio-quote span:nth-child(2) {
  color: var(--water);
}
.studio-quote span:nth-child(3) {
  color: var(--fire);
}
.studio-quote span:nth-child(4) {
  color: var(--earth);
}
.studio p {
  color: var(--ink-2);
}
@media (max-width: 860px) {
  .studio {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 860px;
  margin-inline: auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--gold);
  font-weight: 400;
  font-size: 1.3rem;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  padding: 0 4px 22px;
  margin: 0;
  color: var(--ink-2);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}
.contact-info p {
  color: var(--ink-2);
}
.contact-info ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}
.contact-info li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-2);
}
.contact-info li strong {
  display: block;
  color: var(--ink);
}
.form {
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid rgba(160, 175, 255, 0.28);
  background: rgba(6, 8, 34, 0.7);
  color: var(--ink);
  font: 400 1rem/1.4 var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.field textarea {
  min-height: 150px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 210, 122, 0.2);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #ff7a8a;
}
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 6px 0 22px;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--gold);
  flex: none;
}
.form-status {
  margin: 16px 0 0;
  padding: 0;
  min-height: 1.4em;
  font-weight: 500;
}
.form-status.is-ok {
  color: #7ef0b0;
}
.form-status.is-error {
  color: #ff9aa8;
}
.form button[disabled] {
  opacity: 0.6;
  cursor: progress;
}
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  padding: clamp(46px, 7vw, 80px) clamp(20px, 5vw, 60px);
  border-radius: calc(var(--radius) + 12px);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(255, 200, 100, 0.2), transparent 70%),
    linear-gradient(180deg, rgba(50, 40, 140, 0.6), rgba(16, 14, 60, 0.7));
}
.cta-band img {
  width: 110px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 10px 30px rgba(120, 180, 255, 0.5));
}
.cta-band .lead {
  margin-inline: auto;
  margin-bottom: 28px;
}
.cta-band .cta-row {
  justify-content: center;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 40px;
  padding: 60px 0 40px;
  border-top: 1px solid var(--line);
  background: rgba(5, 4, 15, 0.6);
  color: var(--ink-3);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 30px;
}
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.site-footer a {
  color: var(--ink-3);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--gold);
}
.site-footer address {
  font-style: normal;
  margin-top: 14px;
  line-height: 1.6;
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.link-button:hover {
  color: var(--gold);
}
.socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.socials a:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.socials svg {
  width: 18px;
  height: 18px;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}
@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Legal pages ---------- */

.legal {
  padding: clamp(40px, 7vw, 80px) 0 80px;
}
.legal article {
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(26px, 5vw, 56px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(14, 14, 50, 0.72);
}
.legal h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}
.legal h2 {
  font-size: 1.6rem;
  margin-top: 2em;
}
.legal h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.6em;
}
.legal p,
.legal li {
  color: var(--ink-2);
}
.legal .updated {
  color: var(--ink-3);
  font-size: 0.9rem;
}
.legal hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 3em 0;
}

/* ---------- Consent banner ---------- */

.consent {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 300;
  width: min(760px, calc(100% - 24px));
  transform: translate(-50%, 140%);
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: rgba(14, 12, 48, 0.97);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}
.consent.is-visible {
  transform: translate(-50%, 0);
}
.consent h2 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}
.consent p {
  font-size: 0.92rem;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.consent-actions .btn {
  min-height: 44px;
  font-size: 0.92rem;
}
.consent-options {
  display: none;
  margin: 4px 0 16px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.consent.show-options .consent-options {
  display: block;
}
.consent-options li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-2);
}
.consent-options strong {
  display: block;
  color: var(--ink);
}
.switch {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
}
.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.2s ease;
  pointer-events: none;
}
.switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.switch input:checked + span {
  background: var(--gold-deep);
}
.switch input:checked + span::after {
  transform: translateX(20px);
}
.switch input:disabled + span {
  opacity: 0.6;
}
.switch input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.embed-placeholder {
  display: grid;
  place-items: center;
  gap: 12px;
  aspect-ratio: 16 / 9;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  text-align: center;
  color: var(--ink-2);
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 0;
}
.notfound img {
  width: 160px;
  margin: 0 auto 20px;
  animation: float 6s ease-in-out infinite;
}

/* ---------- Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.no-js .reveal {
  opacity: 1;
  transform: none;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}
@keyframes pop {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes merge {
  0% {
    transform: scale(0.6);
  }
  55% {
    transform: scale(1.22);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Additions ---------- */
.btn-choice {
  color: #1d1230;
  background: linear-gradient(180deg, #fff1c9, var(--gold));
}
.btn-choice:hover {
  color: #1d1230;
}
.consent:not(.show-options) [data-consent-action='save'] {
  display: none;
}
.consent.show-options [data-consent-action='options'] {
  display: none;
}
.embed-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius);
}
.footer-grid p {
  margin: 14px 0 0;
  max-width: 28em;
}
.contact-info li > span[aria-hidden] {
  color: var(--gold);
}
.stats {
  margin-top: 40px;
}
.header-cta svg {
  flex: none;
}

@media (max-width: 620px) {
  .consent {
    padding: 18px;
    bottom: 10px;
  }
  .consent p {
    font-size: 0.86rem;
  }
  .consent-actions .btn {
    flex: 1 1 auto;
  }
}
.hero,
.section,
.site-footer {
  overflow-x: clip;
}
.legal article {
  overflow-wrap: break-word;
  hyphens: auto;
}
