/* Glimsi site. Colours come from the app icon: a navy night sky, a gold star and a
   daytime blue. Self-contained: no web fonts or scripts, so visiting it sends nothing
   anywhere else. */

:root {
  color-scheme: dark;
  --night: #0a0f2c;
  --night-2: #121a4a;
  --dusk: #1d2a74;
  --sky: #5aa9ff;
  --gold: #f7c948;
  --gold-soft: #ffe08a;
  --ink: #f1f2ff;
  --muted: #a9afd8;
  --line: rgba(255, 255, 255, 0.10);
  --glass: rgba(255, 255, 255, 0.055);
  --radius: 22px;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* clip, not hidden: iOS Safari ignores overflow-x: hidden on body and lets anything
   that pokes out (the fanned phones) widen the whole page. */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 17px/1.6 var(--text);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

main { overflow-x: clip; }

/* A quiet starfield behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 62%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 9%, rgba(255,240,190,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 38%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 83% 14%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 71%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 84%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 56% 88%, rgba(255,240,190,.6) 50%, transparent 51%),
    radial-gradient(120% 80% at 80% -10%, var(--dusk) 0%, transparent 60%),
    radial-gradient(90% 70% at -10% 30%, #2a1f6e 0%, transparent 55%),
    var(--night);
}

a { color: var(--gold-soft); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

img { max-width: 100%; display: block; }

.wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Top bar ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(10, 15, 44, 0.62);
  border-bottom: 1px solid var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 700 1.25rem var(--round);
}

.brand img { width: 32px; height: 32px; }

.top nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.92rem;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}

.top nav a:hover { color: var(--ink); background: var(--glass); }

.top nav a.lang {
  color: var(--ink);
  border: 1px solid var(--line);
}

@media (max-width: 560px) {
  .top nav a.hide-sm { display: none; }
}

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--round); letter-spacing: -0.01em; }

.eyebrow {
  display: inline-block;
  font: 600 0.8rem var(--round);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.lead { font-size: 1.15rem; color: var(--muted); max-width: 34rem; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
  padding-block: 72px 40px;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.9rem);
  line-height: 1.05;
  margin: 0 0 18px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 45%, var(--sky) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-icon {
  width: 84px;
  height: 84px;
  margin-bottom: 22px;
  filter: drop-shadow(0 14px 30px rgba(247, 201, 72, 0.25));
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--night);
  font: 700 0.98rem var(--round);
}

.badge svg { width: 20px; height: 20px; }

.cta-note { color: var(--muted); font-size: 0.92rem; }

/* Three phones, fanned. */
.fan {
  position: relative;
  height: clamp(440px, 52vw, 600px);
}

.fan .phone {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(190px, 21vw, 260px);
}

.fan .phone:nth-child(1) { transform: translate(-112%, -46%) rotate(-8deg); opacity: 0.9; }
.fan .phone:nth-child(2) { transform: translate(-50%, -50%); z-index: 2; }
.fan .phone:nth-child(3) { transform: translate(12%, -46%) rotate(8deg); opacity: 0.9; }

@media (max-width: 860px) {
  /* minmax(0, 1fr), not 1fr: a plain 1fr column grows to the screenshots' natural
     720px width, which pushed the text past the screen edge. */
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 48px; text-align: center; }
  .hero .lead { margin: 0 auto; }
  .hero-icon { margin: 0 auto 20px; }
  .cta-row { justify-content: center; }
  /* Sized from the screen width, so the fan keeps its shape from an SE up. */
  .fan { height: min(520px, 112vw); }
  .fan .phone { width: min(230px, 44vw); }
  .fan .phone:nth-child(1) { transform: translate(-96%, -46%) rotate(-8deg); }
  .fan .phone:nth-child(3) { transform: translate(-4%, -46%) rotate(8deg); }
}

/* Phones: a wider gutter, type that scales with the screen, and calmer spacing. */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: clamp(1.9rem, 8.6vw, 2.5rem); }
  .hero-icon { width: 72px; height: 72px; }
  .lead { font-size: 1.02rem; }
  .badge { font-size: 0.92rem; padding: 11px 16px; }
  .section { padding-block: 44px; }
  .feature { gap: 26px; }
  .feature h2 { font-size: clamp(1.55rem, 7vw, 2rem); }
  .feature-media { gap: 14px; }
  .feature-media .phone { width: 44%; }
  .feature-media .phone.solo { width: 60%; }
  .feature-media .phone.raise { transform: translateY(-18px); }
  .closing { padding: 36px 20px; border-radius: 26px; }
  .doc { padding: 36px 20px 24px; }
}

/* ---------- Device ---------- */

/* The frame is drawn into the image (scripts/render_device_frames.py); this only
   adds the shadow it sits on. */
.phone img {
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 34px 38px rgba(0, 0, 0, 0.55))
    drop-shadow(0 12px 34px rgba(90, 169, 255, 0.16));
}

/* ---------- Feature sections ---------- */

.section { padding-block: 64px; }  /* block only: these are also .wrap, whose side gutter must survive */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

.feature.flip .feature-media { order: -1; }

.feature h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  margin: 0 0 14px;
}

.feature p { color: var(--muted); margin: 0 0 12px; max-width: 32rem; }

.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { position: relative; padding-left: 28px; margin: 8px 0; color: var(--ink); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-soft), var(--gold));
  box-shadow: 0 0 12px rgba(247, 201, 72, 0.5);
}

.feature-media {
  min-width: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.feature-media .phone { width: min(270px, 46%); }
.feature-media .phone.solo { width: min(290px, 72%); }
.feature-media .phone.raise { transform: translateY(-28px); }

@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); gap: 32px; text-align: center; }
  .feature.flip .feature-media { order: 0; }
  .feature p { margin-left: auto; margin-right: auto; }
  .ticks { display: inline-block; text-align: left; }
}

/* ---------- Trust grid ---------- */

.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.trust div {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--line);
}

.trust svg { width: 26px; height: 26px; color: var(--gold); }
.trust h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.trust p { margin: 0; color: var(--muted); font-size: 0.95rem; }

@media (max-width: 860px) { .trust { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .trust { grid-template-columns: 1fr; } }

.center { text-align: center; }
.center .lead { margin: 0 auto; }

/* ---------- Closing call ---------- */

.closing {
  margin: 32px 0 72px;
  padding: 48px 24px;
  border-radius: 32px;
  text-align: center;
  background:
    radial-gradient(80% 120% at 85% 0%, rgba(90,169,255,.35), transparent 60%),
    radial-gradient(70% 120% at 10% 100%, rgba(247,201,72,.18), transparent 60%),
    var(--night-2);
  border: 1px solid var(--line);
}

.closing img { width: 72px; height: 72px; margin: 0 auto 16px; }
.closing h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0 0 10px; }
.closing p { color: var(--muted); margin: 0 auto; max-width: 30rem; }

/* ---------- Document pages (privacy, support) ---------- */

.doc {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 56px 16px 32px;
}

.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; margin: 0 0 8px; }
.doc h2 { font-size: 1.35rem; margin: 2.6rem 0 0.6rem; }
.doc h3 { font-size: 1.05rem; margin: 1.6rem 0 0.3rem; color: var(--gold-soft); }
.doc p, .doc li { color: #d9dcf5; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 0.35rem 0; }
.updated { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.6rem; }

.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 1.4rem 0;
}

.card strong { font-family: var(--round); }
.card ul { margin: 0.6rem 0 0; }

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.foot .links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
