/* Colours follow the app's theme (Source/UI/Theme.h): black window, #1c1c1e cards,
   Apple system colours, and the orange-pink-purple gradient of the logo. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("assets/fonts/Inter-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("assets/fonts/Inter-SemiBold.ttf") format("truetype"); }

:root {
  --bg: #000;
  --surface: #1c1c1e;
  --surface-hi: #2c2c2e;
  --hairline: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --text-mid: #98989f;
  --text-lo: #636366;
  --accent: #0a84ff;
  --orange: #ff9f0a;
  --pink: #ff375f;
  --purple: #bf5af2;
  --brand: linear-gradient(100deg, var(--orange) 0%, var(--pink) 50%, var(--purple) 100%);
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; overflow-x: clip; }
main { overflow-x: clip; } /* the hero glow bleeds past the viewport; mobile browsers ignore overflow on body */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: #2997ff; text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; color: var(--text); }
code {
  font: 0.86em/1 ui-monospace, "Cascadia Code", Consolas, monospace;
  background: var(--surface-hi);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--text);
  overflow-wrap: anywhere;
}

h1, h2, h3 { font-weight: 600; margin: 0; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -0.03em; text-align: center; margin-bottom: 56px; }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; margin-bottom: 6px; }
.dim { color: var(--text-lo); }

.grad {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav-in { max-width: var(--max); margin: 0 auto; padding: 0 24px; height: 52px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { display: block; }
.nav nav { display: flex; align-items: center; gap: 26px; }
.nav nav a { color: var(--text-mid); font-size: 0.82rem; }
.nav nav a:hover { color: var(--text); text-decoration: none; }
.nav nav a.pill { color: #fff; }

/* ---------- buttons ---------- */

.pill {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 13px 26px;
  border-radius: 980px;
  transition: background 0.2s, transform 0.2s;
}
.pill:hover { background: #3395ff; text-decoration: none; transform: translateY(-1px); }
.pill.small { font-size: 0.78rem; padding: 5px 14px; }
.link { font-size: 1.02rem; }

/* ---------- hero ---------- */

.hero { position: relative; text-align: center; padding: 88px 24px 40px; max-width: var(--max); margin: 0 auto; }

.glow {
  position: absolute;
  inset: -80px -30vw auto;
  height: 900px;
  z-index: -1;
  background:
    radial-gradient(38% 30% at 30% 62%, rgba(255, 159, 10, 0.22), transparent 70%),
    radial-gradient(36% 30% at 52% 70%, rgba(255, 55, 95, 0.22), transparent 70%),
    radial-gradient(38% 32% at 72% 62%, rgba(191, 90, 242, 0.24), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

.app-icon {
  display: block;
  margin: 0 auto 28px;
  border-radius: 26px;
  box-shadow: 0 18px 50px rgba(255, 55, 95, 0.28), 0 0 0 1px var(--hairline);
}
.eyebrow { color: var(--text-mid); font-size: 0.95rem; font-weight: 600; margin: 0 0 14px; }
h1 { font-size: clamp(3rem, 9vw, 6.2rem); line-height: 1.02; letter-spacing: -0.045em; }
.lead { color: var(--text-mid); font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 700px; margin: 26px auto 0; }
.cta { display: flex; gap: 28px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 36px 0 14px; }
.fine { color: var(--text-lo); font-size: 0.82rem; margin: 0; }

.window { margin: 72px auto 0; max-width: 1000px; }
.window img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 40px 120px -20px rgba(255, 55, 95, 0.35),
    0 30px 80px rgba(0, 0, 0, 0.8);
}

/* ---------- at a glance ---------- */

.strip {
  max-width: var(--max);
  margin: 72px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.strip div { padding: 8px 12px; border-left: 1px solid var(--hairline); }
.strip div:first-child { border-left: 0; }
.strip strong { display: block; font-size: 2.1rem; letter-spacing: -0.03em; }
.strip span { color: var(--text-mid); font-size: 0.9rem; }

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

.section { max-width: var(--max); margin: 0 auto; padding: 140px 24px 0; }

/* Cards are tinted like Theme::drawTintedPanel: a wash of the colour from the top left. */
.tile, .note, .steps li {
  --c: var(--accent);
  position: relative;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--c) 17%, transparent) 0%,
                            color-mix(in srgb, var(--c) 6%, transparent) 30%, transparent 65%),
    var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 22px;
}

.bento > *, .steps > *, .notes > * { min-width: 0; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile { grid-column: span 3; padding: 30px 30px 32px; min-height: 230px; transition: transform 0.3s, border-color 0.3s; }
.tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.tile.wide { grid-column: span 4; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.tile.wide + .tile { grid-column: span 2; }
.tile p { color: var(--text-mid); margin: 0; font-size: 1rem; }

.ico {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  margin-bottom: 22px;
  background: color-mix(in srgb, var(--c) 18%, transparent);
}
.ico svg { width: 24px; height: 24px; fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* the signal chain, drawn like the app's block tiles */
.chain { position: relative; display: flex; gap: 12px; }
.chain::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1.5px;
  background: linear-gradient(90deg, var(--purple), var(--orange), #40c8e0);
  opacity: 0.6;
}
.blk {
  --c: var(--accent);
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 30px 12px 12px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.92rem;
  background: linear-gradient(170deg, color-mix(in srgb, var(--c) 22%, #1c1c1e), #1c1c1e 80%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blk::before { content: ""; position: absolute; left: 12px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.blk small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--text-mid); }
.blk.on {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c), #fff 28%), var(--c) 45%, color-mix(in srgb, var(--c), #000 25%));
  border-color: transparent;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--c) 35%, transparent);
}
.blk.on::before { background: #fff; }
.blk.on small { color: rgba(255, 255, 255, 0.85); }

/* ---------- install ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { padding: 30px; }
.steps li:nth-child(1) { --c: var(--orange); }
.steps li:nth-child(2) { --c: var(--pink); }
.steps li:nth-child(3) { --c: var(--purple); }
.steps p { color: var(--text-mid); margin: 0 0 10px; font-size: 0.98rem; }
.steps p:last-child { margin-bottom: 0; }
.num {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  margin-bottom: 20px;
  font-weight: 600;
  color: #fff;
  background: var(--c);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--c) 40%, transparent);
}

.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.note { padding: 26px 30px; }
.note h3 { font-size: 1.05rem; }
.note p { color: var(--text-mid); margin: 0; font-size: 0.96rem; }

/* ---------- closing ---------- */

.final { text-align: center; padding: 160px 24px 120px; }
.final img { display: block; margin: 0 auto 26px; }
.final h2 { margin-bottom: 0; }

footer { border-top: 1px solid var(--hairline); }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 28px 24px 40px; color: var(--text-lo); font-size: 0.8rem; }
.foot-in p { margin: 0 0 8px; }
.foot-in a { color: var(--text-mid); }

/* ---------- entrance ---------- */

.rise { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero .rise:nth-child(3) { animation-delay: 0.06s; }
.hero .rise:nth-child(4) { animation-delay: 0.12s; }
.hero .rise:nth-child(5) { animation-delay: 0.18s; }
.hero .rise:nth-child(6) { animation-delay: 0.24s; }
.hero .rise:nth-child(7) { animation-delay: 0.28s; }
.hero .window { animation-delay: 0.38s; animation-duration: 1.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .tile, .pill { transition: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .tile, .tile.wide, .tile.wide + .tile { grid-column: span 6; }
  .steps, .notes { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .strip div:nth-child(3) { border-left: 0; }
  .section { padding-top: 100px; }
}
@media (max-width: 560px) {
  .nav nav a:not(.pill) { display: none; }
  .chain { flex-wrap: wrap; }
  .chain::before { display: none; }
  .blk { flex: 1 1 40%; }
  .hero { padding-top: 56px; }
  .section { padding-left: 16px; padding-right: 16px; }
  .tile, .steps li, .note { padding: 24px; border-radius: 20px; }
  .strip { padding: 0 16px; }
  .window { margin-top: 48px; }
  .final { padding: 110px 16px 90px; }
  h2 { margin-bottom: 40px; }
}
