:root {
  --bg: #FAF9FF;
  --bg-alt: #F1EFFB;
  --ink: #17152E;
  --muted: #5D5A78;
  --line: #E3E0F2;
  --card: #FFFFFF;
  --accent: #6A5AF0;
  --accent-ink: #FFFFFF;
  --warm: #FFB86B;
  --hill: #D98B66;
  --teal: #2B7568;
  --night: #14122B;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(23, 21, 46, .04), 0 12px 32px rgba(23, 21, 46, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: "Space Grotesk", "Inter", sans-serif; line-height: 1.15; letter-spacing: -.02em; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(90deg, rgba(17, 15, 38, .97) 0%, rgba(30, 25, 72, .96) 55%, rgba(48, 38, 120, .95) 100%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: #fff;
  border-bottom: 1px solid rgba(183, 174, 255, .10);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 20px; }
.brand b { color: #B7AEFF; font-weight: 700; }
.brand-mark { width: 32px; height: 32px; color: #B7AEFF; }
.brand-mark svg { width: 100%; height: 100%; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a { opacity: .8; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 999px;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px rgba(106, 90, 240, .35); }
.btn-primary:hover { background: #5847E6; }
.btn-ghost { border: 1.5px solid currentColor; }

/* HERO */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 85% -10%, #3A2F8F 0%, transparent 60%), var(--night);
  color: #fff;
  padding: 88px 0 104px;
}
.hero-glow {
  position: absolute; inset: auto -10% -45% auto; width: 680px; height: 680px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 107, .28), transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero .eyebrow { color: var(--warm); }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 700; margin-bottom: 20px; }
.lead { font-size: 18px; color: rgba(255,255,255,.75); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 44px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn-ghost:hover { border-color: #fff; }
.stats { list-style: none; display: flex; gap: 40px; }
.stats strong { display: block; font-family: "Space Grotesk", sans-serif; font-size: 32px; font-weight: 700; }
.stats span { font-size: 14px; color: rgba(255,255,255,.6); }

.hero-art { position: relative; height: 380px; }
.device {
  position: absolute; overflow: hidden;
  border: 8px solid #26234A; background: #26234A;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.device img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.device-land { width: 100%; aspect-ratio: 1024 / 500; top: 20px; left: 0; border-radius: 28px; transform: rotate(-3deg); }
.device-icon { width: 34%; aspect-ratio: 1; right: -4%; bottom: 0; border-radius: 30px; transform: rotate(6deg); animation: float 6s ease-in-out infinite; }
.device-icon img { border-radius: 22px; }
@keyframes float { 50% { transform: rotate(4deg) translateY(-10px); } }

/* SECTIONS */
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 44px; }
.section-head .eyebrow { width: 100%; margin-bottom: -8px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-alt); border-radius: 999px; }
.tab {
  font: 600 14px "Inter", sans-serif; color: var(--muted); cursor: pointer;
  border: 0; background: transparent; padding: 9px 18px; border-radius: 999px;
}
.tab.is-active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(23,21,46,.12); }

/* PRODUCTS */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.product {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.product:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(23,21,46,.04), 0 20px 48px rgba(23,21,46,.12); }
.product[hidden] { display: none; }
.product-media { aspect-ratio: 1024 / 500; overflow: hidden; background: #F6D7C2; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 28px 28px 30px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.product-title { display: flex; align-items: center; gap: 14px; }
.app-icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 2px 8px rgba(23,21,46,.15); }
.product h3 { font-size: 26px; font-weight: 700; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; }
.tag-game { background: #FCE3D3; color: #A44C21; }
.tag-app { background: #E7E2FF; color: #4B3BC4; }
.product-body > p { color: var(--muted); }
.features { list-style: none; display: grid; gap: 8px; font-size: 15px; }
.features li { position: relative; padding-left: 26px; }
.features li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.5l4.5-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.product-hill .features li::before { background-color: var(--teal); }
.store-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 9px 16px 9px 13px; border-radius: 12px;
  font-weight: 600; font-size: 15px; line-height: 1.15; transition: transform .15s;
}
.store:hover { transform: translateY(-1px); }
.store svg { width: 22px; height: 22px; flex: none; }
.store small { display: block; font-size: 10.5px; font-weight: 500; opacity: .75; }
.store-soon { background: transparent; color: var(--muted); border: 1.5px dashed var(--line); }
.store-soon:hover { transform: none; }

/* Dreamweave media */
.dream-media {
  position: relative; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 120%, #7C5BD9 0%, #4B3399 45%, #2A1D63 100%);
}
.dream-icon { width: 34% !important; height: auto !important; border-radius: 26%; box-shadow: 0 20px 50px rgba(0,0,0,.4); position: relative; z-index: 1; }
.dream-sky { position: absolute; inset: 0; }
.star { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: .7; animation: twinkle 3s ease-in-out infinite; }
.s1 { top: 18%; left: 14%; } .s2 { top: 30%; left: 82%; animation-delay: .8s; } .s3 { top: 70%; left: 10%; animation-delay: 1.6s; }
.s4 { top: 14%; left: 64%; animation-delay: 2.2s; } .s5 { top: 62%; left: 88%; animation-delay: 1.1s; }
@keyframes twinkle { 50% { opacity: .15; transform: scale(.6); } }
.dream-chips { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.dream-chips span { font-size: 12px; font-weight: 500; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); padding: 4px 10px; border-radius: 999px; }

/* Next card */
.product-next {
  grid-column: 1 / -1;
  background: linear-gradient(120deg, #EEEAFF, #FFF1E3);
  border-style: dashed;
}
.next-inner { padding: 36px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 28px; }
.next-badge { grid-row: span 2; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 999px; }
.product-next h3 { font-size: 22px; }
.product-next p { color: var(--muted); grid-column: 2; }
.product-next .btn { grid-row: 1 / span 2; grid-column: 3; color: var(--ink); }

/* ABOUT */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.about-copy h2 { margin-bottom: 20px; }
.about-copy p { color: var(--muted); font-size: 17px; margin-bottom: 14px; }
.values { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.values li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.v-ico { font-size: 26px; display: block; margin-bottom: 12px; }
.values h3 { font-size: 18px; margin-bottom: 6px; }
.values p { font-size: 15px; color: var(--muted); }

/* CONTACT */
.contact-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  background: var(--night); color: #fff; border-radius: 28px; padding: 56px;
  background-image: radial-gradient(600px 300px at 100% 0%, rgba(124, 108, 255, .35), transparent 70%);
}
.contact-card .eyebrow { color: var(--warm); }
.contact-card h2 { margin-bottom: 12px; }
.contact-card p { color: rgba(255,255,255,.7); font-size: 17px; }
.contact-list { display: grid; gap: 12px; }
.contact-list a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 20px; border-radius: 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  transition: background .2s, border-color .2s;
}
.contact-list a:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.contact-list span { font-size: 13px; color: rgba(255,255,255,.6); }
.contact-list b { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }

/* FOOTER */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.legal { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.legal span { color: var(--ink); font-weight: 500; }
.legal .sep { color: var(--line); }
.legal a:hover { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero-inner, .about, .contact-card { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 72px; }
  .hero-art { height: auto; aspect-ratio: 1.6; max-width: 560px; }
  .products { grid-template-columns: 1fr; }
  .next-inner { grid-template-columns: 1fr; text-align: left; }
  .next-badge, .product-next p, .product-next .btn { grid-row: auto; grid-column: auto; justify-self: start; }
}
@media (max-width: 640px) {
  .nav-links { gap: 16px; font-size: 14px; }
  .nav-links a:not(:last-of-type) { display: none; }
  .section { padding: 72px 0; }
  .stats { gap: 24px; }
  .stats strong { font-size: 26px; }
  .values { grid-template-columns: 1fr; }
  .contact-card { padding: 32px 22px; border-radius: 22px; }
  .product-body { padding: 22px; }
  .section-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
