:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-elevated: #1a1a25;
  --border: rgba(255,255,255,0.12);
  --text: #f0f0f5;
  --text-muted: #a8a8b8;      /* ~8:1 on --bg */
  --accent: #818cf8;          /* ~6.6:1 on --bg — safe for text and links */
  --accent-strong: #4f46e5;   /* white text on this is ~6.3:1 — used for buttons */
  --accent-hover: #6366f1;
  --accent-glow: rgba(99,102,241,0.25);
  --gradient: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 200;
  background: #fff; color: #000; padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
nav .container { display: flex; justify-content: space-between; align-items: center; min-height: 72px; gap: 16px; flex-wrap: wrap; }
.logo {
  font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em; text-decoration: none;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--accent);
}
nav ul { display: flex; gap: 28px; list-style: none; flex-wrap: wrap; }
nav ul a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 8px 2px; display: inline-block; transition: color .2s; }
nav ul a:hover { color: var(--text); }

/* Hero */
.hero { padding: 120px 0 80px; text-align: center; position: relative; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent);
}
.hero .container { position: relative; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 24px;
}
.hero p.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 720px; margin: 0 auto 40px; }
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
  background: var(--accent-strong); color: #fff; text-decoration: none;
  padding: 12px 28px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 10px 30px var(--accent-glow); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface-elevated); border-color: var(--accent); }

/* Sections */
.section { padding: 80px 0; }
.section.alt { background: var(--surface); }
.section-title { font-size: 2.2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 16px; text-align: center; }
.section-sub { text-align: center; color: var(--text-muted); max-width: 640px; margin: 0 auto 56px; font-size: 1.05rem; }

/* Apps */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; list-style: none; }
.app-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px;
  display: flex; flex-direction: column; transition: transform .3s, border-color .3s, box-shadow .3s;
}
.app-card:hover { border-color: rgba(129,140,248,0.5); transform: translateY(-6px); box-shadow: 0 24px 48px rgba(0,0,0,.35); }
.app-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.app-icon { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); background: var(--surface-elevated); }
.app-card h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
.app-card p { color: var(--text-muted); font-size: .95rem; flex-grow: 1; margin-bottom: 20px; }
.play-link { font-weight: 600; font-size: .95rem; text-decoration: none; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.play-link:hover { text-decoration: underline; }
.play-link::after { content: "\2197"; font-size: .85rem; }

/* Services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px; }
.service { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 36px; }
.service h3 { font-size: 1.3rem; margin-bottom: 12px; }
.service p { color: var(--text-muted); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; list-style: none; margin-top: 8px; }
.principles li { border-left: 3px solid var(--accent-strong); padding: 4px 0 4px 18px; }
.principles strong { display: block; margin-bottom: 4px; }
.principles span { color: var(--text-muted); font-size: .95rem; }

/* About / contact */
.narrow { max-width: 720px; text-align: center; }
.narrow p { font-size: 1.1rem; color: var(--text-muted); }
.contact-line { font-size: 1.35rem; margin-top: 8px; }
.contact-line a { font-weight: 600; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 48px 0 32px; color: var(--text-muted); font-size: .9rem; }
footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer a { color: var(--text-muted); text-decoration: none; padding: 8px 0; display: inline-block; }
footer a:hover { color: var(--text); text-decoration: underline; }
.legal-links { display: flex; gap: 24px; flex-wrap: wrap; }

/* Legal pages */
.legal { max-width: 800px; margin: 0 auto; padding: 56px 24px 96px; line-height: 1.75; }
.legal h1 { font-size: 2.2rem; margin-bottom: 8px; letter-spacing: -0.02em; }
.legal h2 { margin-top: 2em; margin-bottom: .4em; font-size: 1.35rem; }
.legal p, .legal li { color: #d6d6e2; margin-bottom: .8em; }
.legal ul { padding-left: 1.4em; }
.legal .updated { color: var(--text-muted); margin-bottom: 2em; }

@media (max-width: 640px) {
  .hero { padding: 72px 0 56px; }
  nav ul { gap: 4px 18px; }
  nav .container { padding-top: 10px; padding-bottom: 10px; }
  footer .container { flex-direction: column; text-align: center; }
  .app-icon { width: 56px; height: 56px; }
  .section { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .app-card:hover, .btn:hover { transform: none; }
}
