:root {
  --bg: #05080a;
  --bg-deep: #0b1013;
  --ink: #e7eee9;
  --ink-soft: #97a59c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(96, 214, 112, 0.34);
  --card: rgba(14, 20, 18, 0.8);
  --accent: #5fd66d;
  --accent-deep: #3fb352;
  --accent-soft: rgba(95, 214, 109, 0.1);
  --on-accent: #04130a;
  --steel: #b9c2c7;
  --radius: 4px;
  --notch: 16px;
  --display: "Orbitron", "Eurostile", system-ui, sans-serif;
  --body: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --glow: 0 0 14px rgba(95, 214, 109, 0.18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(95, 214, 109, 0.06), transparent 60%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 4px; z-index: 200; font-weight: 700; }
.skip:focus { left: 12px; }

/* Chamfered corners: the logo's angular language */
.notched {
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + var(--safe-top)) 18px 10px;
  background: rgba(5, 8, 10, 0.78);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-family: var(--display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.16em; text-transform: uppercase; }
.brand img { border-radius: 50%; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn, .install-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; border-radius: 4px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.icon-btn { width: 40px; }
.install-btn { padding: 0 14px 0 10px; font-family: var(--body); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.01em; }
.icon-btn svg, .install-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover, .install-btn:hover { background: var(--accent-soft); border-color: var(--line-strong); color: var(--accent); }
.icon-btn:active, .install-btn:active { transform: scale(0.94); }
[hidden] { display: none !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  text-align: center;
  isolation: isolate;
}
/* Perspective grid floor */
.hero-grid {
  position: absolute; z-index: -2;
  left: 50%; bottom: -40px;
  width: 220%; height: 70%;
  transform: translateX(-50%) perspective(420px) rotateX(62deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(95, 214, 109, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 214, 109, 0.22) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%);
          mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  opacity: 0.3;
}
.hero-glow {
  position: absolute; z-index: -1;
  left: 50%; top: 40px;
  width: 520px; height: 520px; margin-left: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 214, 109, 0.1), transparent 62%);
  animation: breathe 8s ease-in-out infinite alternate;
}
@keyframes breathe { from { opacity: 0.7; transform: scale(0.97); } to { opacity: 1; transform: scale(1.03); } }

/* "New apps arriving weekly" badge at the top of the hero */
.new-badge {
  --notch: 8px;
  display: flex; align-items: center; gap: 10px; width: fit-content;
  margin: 0 auto 14px; padding: 5px 14px 5px 5px;
  border: 1px solid var(--line-strong); background: var(--accent-soft);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink);
}
.new-badge-tag {
  --notch: 5px;
  padding: 3px 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 8px;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 3s ease-in-out infinite; }
.hero-logo {
  margin: 4px auto 0;
  width: min(100%, 440px);
  font-size: 0;
}
/* The logo sits on pure black, so screen-blend it into the page */
.hero-logo img { width: 100%; height: auto; mix-blend-mode: screen; }
.hero-logo { animation: materialise 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes materialise { from { opacity: 0; transform: scale(0.88); } }
.tagline {
  margin: 6px 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.1rem, 4.2vw, 1.7rem);
  line-height: 1.3;
  letter-spacing: 0.03em;
}
.tagline em { font-style: normal; color: var(--accent); }
.lede { max-width: 44ch; margin: 18px auto 0; color: var(--ink-soft); font-size: 1.05rem; }
.hero > :not(.hero-grid):not(.hero-glow):not(.hero-logo) { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero > .new-badge { animation-delay: 0s; }
.hero > .eyebrow { animation-delay: 0.05s; }
.hero > .tagline { animation-delay: 0.35s; }
.hero > .lede { animation-delay: 0.45s; }
.hero > .hero-ctas { animation-delay: 0.55s; }
.hero > .perks { animation-delay: 0.6s; }
.hero > .trust { animation-delay: 0.7s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.btn {
  --notch: 12px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px;
  font-family: var(--body); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; text-decoration: none;
  border: 1px solid transparent;
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  transition: transform 0.15s, filter 0.2s, background 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--line-strong); }

/* Pricing / privacy perks under the hero buttons */
.perks {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: 560px; margin: 26px auto 0; padding: 0; list-style: none;
}
.perks li {
  --notch: 8px;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--line-strong); background: var(--accent-soft);
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.perks svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Trust line under the hero buttons */
.trust {
  display: inline-flex; align-items: center; gap: 10px; max-width: 46ch;
  margin: 26px auto 0; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: 2px; background: rgba(255, 255, 255, 0.02);
  color: var(--ink-soft); font-size: 0.9rem; line-height: 1.4; text-align: left;
}
.trust svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.trust strong { color: var(--ink); }

/* ---------- Section headings ---------- */
.h-index {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em;
  color: var(--accent); border: 1px solid var(--line-strong); padding: 1px 6px; border-radius: 2px;
}

/* ---------- Apps ---------- */
.apps { max-width: 1080px; margin: 0 auto; padding: 8px 16px 40px; scroll-margin-top: 72px; }
.section-head { padding: 0 4px; margin-bottom: 18px; }
.section-head h2 {
  margin: 0 0 14px;
  font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.06em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.count { font-family: var(--mono); font-size: 0.75rem; font-weight: 500; color: var(--ink-soft); border: 1px solid var(--line); padding: 1px 8px; border-radius: 2px; letter-spacing: 0.05em; }
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -20px; padding: 2px 20px 6px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  font-family: var(--body); font-size: 0.85rem; font-weight: 500; color: var(--ink-soft);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip:active { transform: scale(0.95); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--line-strong); color: var(--accent); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }

.tile {
  --tile-accent: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  grid-template-areas: "icon text" "icon action";
  column-gap: 16px; row-gap: 10px;
  align-items: start;
  padding: 16px;
  background: linear-gradient(160deg, rgba(18, 25, 22, 0.9), rgba(9, 13, 12, 0.92));
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  isolation: isolate;
}
/* Hairline frame that follows the chamfer (clip-path hides normal borders) */
.tile::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  padding: 1px;
  background: linear-gradient(140deg, rgba(95, 214, 109, 0.26), rgba(255, 255, 255, 0.06) 40%, rgba(255, 255, 255, 0.04));
  clip-path: inherit;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
}
.tile-icon {
  grid-area: icon; width: 84px; height: 84px; object-fit: cover; border-radius: 4px;
  background: #0d1311; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.tile-text { grid-area: text; min-width: 0; }
.tile-cat { display: inline-block; font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.tile h3 { margin: 2px 0 4px; font-family: var(--body); font-weight: 700; font-size: 1.12rem; letter-spacing: 0.005em; line-height: 1.3; }
.tile p { margin: 0; color: var(--ink-soft); font-size: 0.93rem; line-height: 1.45; }
.tile-action { grid-area: action; }
.tile-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 2px;
  border: 1px solid var(--line-strong); background: var(--accent-soft); color: var(--accent); text-decoration: none;
  font-family: var(--body); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.01em;
  transition: gap 0.2s, background 0.2s, color 0.2s;
}
.tile-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Whole tile is tappable via the button's stretched hit area */
.tile-btn::after { content: ""; position: absolute; inset: 0; }
.tile:hover .tile-btn { gap: 9px; background: var(--accent); color: var(--on-accent); }
.soon {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px; border-radius: 2px;
  border: 1px dashed rgba(255, 255, 255, 0.14); color: var(--ink-soft);
  font-family: var(--mono); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.soon::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); }
@keyframes pulse { 50% { opacity: 0.4; } }

/* Small print on a tile (e.g. a disclaimer) */
.tile-note {
  display: block; margin-top: 8px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.02em; line-height: 1.4; color: var(--ink-soft); opacity: 0.85;
}

/* ---------- Most popular ---------- */
.featured { max-width: 1080px; margin: 0 auto; padding: 8px 16px 32px; scroll-margin-top: 72px; }
.tile-feature { grid-template-columns: 1fr; grid-template-areas: "icon" "text" "action"; padding: 0 0 20px; row-gap: 14px; }
.tile-feature .tile-icon { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 0; box-shadow: none; }
.tile-feature .tile-text, .tile-feature .tile-action { padding: 0 20px; }
.tile-feature::before { background: linear-gradient(140deg, rgba(95, 214, 109, 0.5), rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.05)); }
.tile-badge {
  position: absolute; top: 12px; left: 22px; z-index: 1;
  padding: 3px 9px; border-radius: 2px;
  background: rgba(5, 8, 10, 0.82); border: 1px solid var(--line-strong); color: var(--accent);
  font-family: var(--mono); font-size: 0.64rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
}

.skeleton { min-height: 132px; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(95, 214, 109, 0.05) 50%, transparent 70%);
  animation: sweep 1.3s linear infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-soft); grid-column: 1 / -1; }
.empty code { font-family: var(--mono); color: var(--accent); }

/* ---------- About ---------- */
.about { max-width: 1080px; margin: 0 auto; padding: 16px 16px 48px; scroll-margin-top: 72px; }
.about-card {
  --notch: 26px;
  position: relative; overflow: hidden;
  padding: 34px 24px;
  background:
    linear-gradient(150deg, #0f1714, #070b0a 70%);
  color: var(--ink);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  isolation: isolate;
}
/* Live backdrop: Earth at night (NASA Black Marble), spun on a canvas by main.js */
.about-fx { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; max-width: none; }
.globe {
  position: absolute; width: 340px; height: 340px; right: -110px; top: 50%;
  transform: translateY(-50%); opacity: 0.7; border-radius: 50%;
  /* Faint atmosphere glow around the limb */
  box-shadow: 0 0 40px 4px rgba(95, 214, 109, 0.12), inset 0 0 0 1px rgba(95, 214, 109, 0.18);
}
.globe-earth { display: block; width: 100%; height: 100%; border-radius: 50%; opacity: 0; transition: opacity 1.2s ease; }
.globe-earth.ready { opacity: 1; }
/* ---------- Founder ---------- */
.founder { max-width: 1080px; margin: 0 auto; padding: 0 16px 48px; }
.founder-card {
  --notch: 20px;
  display: flex; flex-direction: column; gap: 18px;
  padding: 28px 24px;
  background: var(--card);
  border-left: 2px solid var(--accent);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.founder-mark { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong), var(--glow); }
.founder-card h2 { margin: 6px 0 8px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.04em; }
.founder-card p:not(.eyebrow) { margin: 0 0 18px; color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Footer ---------- */
.footer {
  max-width: 1080px; margin: 0 auto;
  padding: 24px 16px calc(32px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center; color: var(--ink-soft); font-size: 0.9rem;
}
.footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.footer-links a, .link-btn {
  color: var(--ink); text-decoration: none; background: none; border: 0; padding: 0;
  font-size: 0.9rem; border-bottom: 1px solid var(--line-strong);
}
.footer-links a:hover, .link-btn:hover { color: var(--accent); }
.secure-badge {
  --notch: 10px;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  box-shadow: var(--glow);
}
.secure-lock { width: 28px; height: 28px; flex: none; }
.secure-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.secure-text strong { font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.secure-text small { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-soft); }
.secure-cards { display: inline-flex; gap: 6px; padding-left: 12px; border-left: 1px solid var(--line); color: var(--steel); }
.secure-cards svg { width: 28px; height: 19px; display: block; }
@media (max-width: 360px) { .secure-cards { display: none; } }
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .tile { grid-template-columns: 1fr; grid-template-areas: "icon" "text" "action"; padding: 0 0 22px; row-gap: 14px; }
  .tile-icon { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 0; box-shadow: none; }
  .tile-text, .tile-action { padding: 0 22px; }
  .section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .section-head h2 { margin: 0; }
  .chips { margin: 0; padding: 2px 0; -webkit-mask-image: none; mask-image: none; }
  .about-card { padding: 48px; }
  .featured-grid { grid-template-columns: repeat(3, 1fr); }
  .founder-card { flex-direction: row; align-items: center; gap: 28px; padding: 36px 48px; }
  .founder-mark { width: 88px; height: 88px; }
  .globe { right: -60px; opacity: 0.8; }
}
@media (min-width: 960px) {
  .globe { right: 3%; opacity: 1; }
  .hero { padding: 36px 24px 88px; }
  .hero-logo { width: 500px; }
  .hero-glow { width: 680px; height: 680px; margin-left: -340px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}
/* Installed (standalone) mode: a touch more breathing room under the status bar */
@media (display-mode: standalone) {
  .hero { padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Legal pages (privacy, terms) ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 40px 20px 56px; }
.legal h1 { margin: 0 0 20px; font-family: var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: 0.04em; }
.legal h2 { margin: 32px 0 8px; font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase; }
.legal p { margin: 0 0 14px; color: var(--ink-soft); }
.legal a { color: var(--accent); }
a.install-btn { text-decoration: none; }
