/* ==========================================================================
   MYX — Shared premium design system
   Glassmorphism · reusable layout · components
   ========================================================================== */

:root {
  /* Brand */
  --bg-0: #070d15;
  --bg-1: #0b1420;
  --bg-2: #101d2e;

  --surface: rgba(255, 255, 255, .055);
  --surface-2: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, .10);
  --border-strong: rgba(255, 255, 255, .18);

  --text: #eef3f9;
  --muted: #9fb0c4;
  --faint: #6b7c92;

  /* Accent (overridable per app) */
  --accent: #ff7b1d;
  --accent-2: #ff9d4d;
  --accent-soft: rgba(255, 123, 29, .16);
  --accent-glow: rgba(255, 123, 29, .35);

  --radius: 22px;
  --radius-lg: 30px;
  --radius-sm: 14px;

  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .55);
  --shadow-glow: 0 20px 60px -18px var(--accent-glow);

  --maxw: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font-head: "Outfit", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* Per-app accents */
body[data-app="memoone"]  { --accent:#ff7b1d; --accent-2:#ffb066; --accent-soft:rgba(255,123,29,.16); --accent-glow:rgba(255,123,29,.35); }
body[data-app="lifeone"]  { --accent:#37c26b; --accent-2:#7fe0a0; --accent-soft:rgba(55,194,107,.16); --accent-glow:rgba(55,194,107,.32); }
body[data-app="qrone"]    { --accent:#3b9dff; --accent-2:#7cc0ff; --accent-soft:rgba(59,157,255,.16); --accent-glow:rgba(59,157,255,.32); }
body[data-app="remoteone"]{ --accent:#a982ff; --accent-2:#c7abff; --accent-soft:rgba(169,130,255,.16); --accent-glow:rgba(169,130,255,.32); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: clip;
  position: relative;
}

/* Ambient aurora background */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -2;
  width: 60vw;
  height: 60vw;
  max-width: 780px;
  max-height: 780px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .5;
  pointer-events: none;
}
body::before {
  top: -18vw; right: -12vw;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
  animation: drift1 18s var(--ease) infinite alternate;
}
body::after {
  bottom: -22vw; left: -14vw;
  background: radial-gradient(circle, #2a63d6 0%, transparent 68%);
  opacity: .35;
  animation: drift2 22s var(--ease) infinite alternate;
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.04), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 60%);
}

@keyframes drift1 { to { transform: translate(-60px, 40px) scale(1.1); } }
@keyframes drift2 { to { transform: translate(50px, -40px) scale(1.15); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Layout ---------- */
.container { width: min(var(--maxw), 92%); margin-inline: auto; }
section { position: relative; }
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section-sm { padding: clamp(40px, 5vw, 64px) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--font-body);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-2);
  padding: 8px 14px; border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; overflow-wrap: break-word; }
img { max-width: 100%; }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4.5vw, 46px); margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: clamp(16px, 2vw, 18px); }

.gradient-text {
  background: linear-gradient(100deg, var(--accent-2), var(--accent) 55%, #fff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --pad: 14px 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--pad);
  border-radius: var(--radius-sm);
  font: 700 15px var(--font-body);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #0a1018; box-shadow: var(--shadow-glow);
}
.btn-primary:hover { box-shadow: 0 26px 70px -16px var(--accent-glow); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); backdrop-filter: blur(12px); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Glass card ---------- */
.glass {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(9, 15, 24, .72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand .wordmark { font: 800 24px var(--font-head); letter-spacing: -.02em; }
.brand .wordmark span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  text-decoration: none; color: var(--muted);
  font: 600 15px var(--font-body);
  padding: 9px 15px; border-radius: 11px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--accent-2); }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 0 0 auto 0; top: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 88px 6% 28px;
    background: rgba(9, 15, 24, .96);
    backdrop-filter: blur(20px);
    transform: translateY(-100%); opacity: 0; visibility: hidden;
    transition: transform .35s var(--ease), opacity .3s;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links a { padding: 14px 16px; font-size: 17px; }
  .nav-cta { margin: 12px 0 0; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { font-size: clamp(38px, 6.4vw, 72px); margin-bottom: 22px; }
.hero .lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; color: var(--faint); font-size: 14px; }
.hero-meta b { color: var(--text); font-family: var(--font-head); font-size: 22px; display: block; }

.app-icon-badge {
  width: 84px; height: 84px; border-radius: 22px;
  display: grid; place-items: center; font-size: 44px;
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
  box-shadow: var(--shadow-glow); margin-bottom: 26px;
}

/* Hero phone mockup */
.hero-visual { display: flex; justify-content: center; align-items: center; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-actions, .hero-meta { justify-content: center; }
  .app-icon-badge { margin-inline: auto; }
  .hero-visual { order: -1; }
}

/* ---------- Phone frame ---------- */
.phone {
  position: relative;
  width: min(280px, 74vw);
  aspect-ratio: 1080 / 2340;
  border-radius: 40px;
  padding: 11px;
  background: linear-gradient(160deg, #2a3444, #131c28);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.08);
}
.phone::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 42%; height: 8px; border-radius: 99px; background: #0a0f17; z-index: 3;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; display: block; }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.feature {
  padding: 30px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.feature:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.feature .f-icon {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  font-size: 26px; margin-bottom: 20px;
  background: var(--accent-soft); border: 1px solid var(--border);
}
.feature h3 { font-size: 20px; margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: 15.5px; }

/* Alternating feature rows */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.feature-row + .feature-row { margin-top: clamp(48px, 7vw, 96px); }
.feature-row:nth-child(even) .fr-visual { order: -1; }
.feature-row .fr-text h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 16px; }
.feature-row .fr-text p { color: var(--muted); font-size: 17px; margin-bottom: 20px; }
.fr-list { list-style: none; display: grid; gap: 12px; }
.fr-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.fr-list li::before {
  content: "✓"; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: var(--accent-soft); color: var(--accent-2); margin-top: 2px;
}
@media (max-width: 820px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) .fr-visual { order: 0; }
}

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 12px 4px 28px; scrollbar-width: none; -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: center; flex: 0 0 auto; display: flex; justify-content: center; }
.slide.slide-phone { width: min(280px, 72vw); }
.slide.slide-wide { width: min(760px, 88vw); }
.slide.slide-wide img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); display: block;
}
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.carousel-btn {
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  display: grid; place-items: center; transition: background .2s, border-color .2s, transform .2s;
}
.carousel-btn:hover { background: var(--accent); color: #0a1018; border-color: var(--accent); transform: scale(1.06); }
.carousel-btn svg { width: 22px; height: 22px; }
.carousel-dots { display: flex; gap: 9px; }
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 99px; border: none; cursor: pointer;
  background: var(--border-strong); transition: width .3s var(--ease), background .3s;
}
.carousel-dots button.active { width: 26px; background: var(--accent); }

.gallery-empty {
  text-align: center; padding: clamp(48px, 7vw, 80px) 24px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--muted);
}
.gallery-empty .ge-icon { font-size: 40px; margin-bottom: 14px; }

/* ---------- Download badges ---------- */
.downloads { display: flex; flex-wrap: wrap; gap: 14px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 13px;
  padding: 12px 22px; border-radius: 14px; text-decoration: none;
  background: #0d1017; border: 1px solid var(--border-strong); color: #fff;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.store-badge:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.store-badge svg { width: 30px; height: 30px; flex: 0 0 auto; }
.store-badge .sb-text { display: flex; flex-direction: column; line-height: 1.2; }
.store-badge .sb-text small { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.store-badge .sb-text b { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.store-badge.soon { opacity: .78; cursor: default; }
.store-badge.soon:hover { transform: none; border-color: var(--border-strong); box-shadow: none; }

/* ---------- FAQ accordion ---------- */
.faq { display: grid; gap: 14px; max-width: 820px; margin-inline: auto; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden; transition: border-color .3s, background .3s;
}
.faq-item.open { border-color: var(--accent); background: var(--surface-2); }
.faq-q {
  width: 100%; text-align: left; cursor: pointer; border: none; background: none; color: var(--text);
  font: 600 17px var(--font-body); padding: 20px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-q .chev { flex: 0 0 auto; transition: transform .3s var(--ease); color: var(--accent-2); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .38s var(--ease); }
.faq-a p { padding: 0 22px 22px; color: var(--muted); }

/* ---------- Changelog timeline ---------- */
.timeline { position: relative; max-width: 760px; margin-inline: auto; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -33px; top: 4px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--bg-0); border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tl-version { font-family: var(--font-head); font-weight: 800; font-size: 20px; }
.tl-date { font-size: 13px; color: var(--faint); }
.tl-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-2);
}
.tl-list { list-style: none; display: grid; gap: 8px; }
.tl-list li { color: var(--muted); padding-left: 20px; position: relative; }
.tl-list li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Prose (privacy / legal) ---------- */
.prose { max-width: 820px; margin-inline: auto; }
.prose h2 { font-size: 26px; margin: 40px 0 14px; }
.prose h3 { font-size: 19px; margin: 28px 0 10px; }
.prose p { color: var(--muted); margin-bottom: 16px; }
.prose ul { color: var(--muted); margin: 0 0 18px 22px; display: grid; gap: 8px; }
.prose a { color: var(--accent-2); }
.prose .updated { color: var(--faint); font-size: 14px; margin-bottom: 30px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: clamp(40px, 6vw, 64px); border-radius: var(--radius-lg); }
.cta-band h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.cta-band p { color: var(--muted); max-width: 540px; margin: 0 auto 28px; font-size: 17px; }
.cta-band .downloads { justify-content: center; }

/* ---------- App directory cards ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.app-card {
  padding: 30px; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  display: flex; flex-direction: column;
}
.app-card::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s;
  background: radial-gradient(circle at 80% 0%, var(--ac-glow, rgba(255,123,29,.18)), transparent 60%);
}
.app-card:hover { transform: translateY(-8px); border-color: var(--ac, var(--accent)); box-shadow: var(--shadow); }
.app-card:hover::after { opacity: 1; }
.app-card .ac-icon {
  width: 62px; height: 62px; border-radius: 17px; display: grid; place-items: center; font-size: 32px;
  background: var(--ac-soft, var(--accent-soft)); border: 1px solid var(--border); margin-bottom: 20px;
}
.app-card h2 { font-size: 23px; margin-bottom: 8px; }
.app-card .ac-desc { color: var(--muted); font-size: 15px; flex: 1; margin-bottom: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tag { padding: 6px 13px; border-radius: 99px; font-size: 12.5px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.app-card .ac-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ac, var(--accent-2)); font-weight: 700; font-size: 15px; }
.app-card:hover .ac-link { gap: 11px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: clamp(40px, 6vw, 80px); background: rgba(6, 11, 18, .5); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding: clamp(48px, 6vw, 72px) 0 40px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { color: var(--muted); font-size: 14.5px; max-width: 280px; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 16px; font-family: var(--font-body); font-weight: 700; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; font-size: 15px; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom { border-top: 1px solid var(--border); padding: 22px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 14px; }
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent-2); }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Breadcrumb / page hero ---------- */
.page-hero { padding: clamp(48px, 7vw, 84px) 0 clamp(24px, 4vw, 40px); text-align: center; }
.page-hero h1 { font-size: clamp(34px, 5.5vw, 58px); margin-bottom: 16px; }
.page-hero p { color: var(--muted); max-width: 620px; margin-inline: auto; font-size: 18px; }
.breadcrumb { display: inline-flex; gap: 8px; align-items: center; color: var(--faint); font-size: 14px; margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-2); }
