:root {
  --bg: #06050e;
  --surface: #0e0c1b;
  --surface-2: #151228;
  --fg: #f3f2fa;
  --muted: #9a97b3;
  --line: #221e3a;
  --accent: #7551ef;
  --accent-soft: #a58cff;
  --accent-ink: #ffffff;
  --glow: rgba(117, 81, 239, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(6, 5, 14, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; display: block; }
nav.links { display: flex; gap: 22px; align-items: center; }
nav.links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
nav.links a:hover { color: var(--fg); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 120px) clamp(48px, 8vw, 100px);
}
.hero-art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(62%, 780px);
  background: url("hero.jpg") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%), linear-gradient(to bottom, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 38%), linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-composite: intersect;
  opacity: 0.95;
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-copy { max-width: 560px; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 20px;
}
h1 {
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 7.2vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--accent); }
.lede {
  margin: 0 0 32px;
  max-width: 32em;
  color: var(--muted);
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(6, 5, 14, 0.5);
  color: var(--fg);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn:hover { filter: brightness(1.12); }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
}

/* Sections */
section { padding-block: clamp(44px, 7vw, 84px); }
.sec-head { margin-bottom: 32px; }
h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}
.sec-head p { margin: 0; color: var(--muted); max-width: 36em; }

.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.app {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.app:hover { border-color: rgba(117, 81, 239, 0.55); box-shadow: 0 20px 60px -30px var(--glow); }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.tag {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.tag.live { color: var(--accent-soft); border-color: rgba(117, 81, 239, 0.5); }
.app h3 { margin: 6px 0 0; font-size: 1.5rem; letter-spacing: -0.02em; }
.app p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; padding: 0; list-style: none; }
.chips li {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg);
}
.app .btn { margin-top: auto; align-self: flex-start; }

.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.principle { padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.principle b { display: block; margin-bottom: 4px; font-size: 1.05rem; }
.principle span { color: var(--muted); font-size: 0.93rem; }

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
}
.about p { margin: 0 0 16px; color: var(--muted); }
.about p:first-of-type { color: var(--fg); font-size: 1.15rem; }

.contact-card {
  padding: clamp(28px, 5vw, 56px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(117, 81, 239, 0.16), transparent 70%),
    var(--surface);
  text-align: center;
}
.contact-card p { margin: 0 auto 22px; color: var(--muted); max-width: 30em; }
.mail-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.mail {
  font-weight: 800;
  font-size: clamp(1.05rem, 4.2vw, 1.7rem);
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  user-select: all;
}
.copied { margin-top: 12px; font-size: 0.9rem; color: var(--accent-soft); }
.copied:empty { display: none; }

footer.site { border-top: 1px solid var(--line); padding-block: 28px 36px; color: var(--muted); font-size: 0.9rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
footer.site .slogan { letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.74rem; color: var(--accent-soft); }
footer.site a { text-decoration: none; }
footer.site a:hover { color: var(--fg); }

@media (max-width: 820px) {
  .hero-art {
    width: 100%;
    opacity: 0.22;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 60%, transparent 100%);
    -webkit-mask-composite: source-over;
    mask-composite: add;
    background-position: 70% center;
  }
  .about { grid-template-columns: 1fr; }
  .apps { grid-template-columns: 1fr; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  nav.links a:not(.keep) { display: none; }
  .principles { grid-template-columns: 1fr; }
  .app { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app { transition: none; }
}

/* Privacy page */
.doc { padding-block: clamp(40px, 7vw, 80px); max-width: 720px; }
.doc h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); margin-bottom: 8px; }
.doc .meta { color: var(--muted); margin: 0 0 36px; }
.doc p { margin: 0 0 16px; }
.doc a { color: var(--accent-soft); }

/* Privacy page, extended */
.doc { max-width: 780px; counter-reset: sec; }
.doc .intro { font-size: 1.2rem; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.doc .summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 44px;
}
.doc .summary div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--muted);
}
.doc .summary b { display: block; color: var(--fg); font-size: 1.02rem; margin-bottom: 2px; }
.doc section { padding-block: 0; margin: 0 0 8px; }
.doc h2 {
  counter-increment: sec;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  margin: 38px 0 10px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.doc h2::before {
  content: counter(sec, decimal-leading-zero);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-soft);
}
.doc ul { margin: 0 0 16px; padding-left: 1.2em; color: var(--fg); }
.doc li { margin-bottom: 6px; }
.doc p { color: #d9d7ea; }
@media (max-width: 620px) { .doc .summary { grid-template-columns: 1fr; } }
