:root {
  --bg: #07060b;
  --surface: #13111c;
  --surface-2: #1b1828;
  --text: #f4f2fa;
  --muted: #a9a4bd;
  --accent: #8c73ff;
  --accent-2: #b4a5ff;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Language: every block exists in French and English; the html element picks one. */
html[data-lang="fr"] [lang="en"]:not(html),
html[data-lang="en"] [lang="fr"]:not(html) { display: none !important; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

header.bar {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: rgba(7, 6, 11, 0.72);
  border-bottom: 1px solid var(--line);
}
header.bar .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand:hover { text-decoration: none; }
nav { margin-left: auto; display: flex; gap: 18px; align-items: center; font-size: 15px; }
nav a { color: var(--muted); }
nav a[aria-current="page"] { color: var(--text); }
.lang-switch {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer;
}

.hero { padding: 72px 0 40px; text-align: center; }
.hero .icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 20px 60px rgba(140, 115, 255, 0.35); }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; margin: 24px 0 12px; letter-spacing: -0.02em; }
.hero p.lead { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 680px; margin: 0 auto 28px; }
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text); color: #0b0a10; font-weight: 600;
  padding: 12px 22px; border-radius: 999px;
}
.cta:hover { text-decoration: none; opacity: 0.9; }
.note { color: var(--muted); font-size: 14px; margin-top: 12px; }

.showcase { margin: 24px auto 64px; }
.showcase img { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--line); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 72px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .glyph { font-size: 26px; margin-bottom: 10px; display: block; }

.doc { padding: 56px 0 80px; max-width: 760px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.02em; margin: 0 0 8px; }
.doc .updated { color: var(--muted); margin: 0 0 32px; font-size: 15px; }
.doc h2 { font-size: 22px; margin: 40px 0 10px; }
.doc p, .doc li { color: #d9d5e6; }
.doc ul { padding-left: 22px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 20px 0; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { color: var(--muted); }

@media (max-width: 560px) {
  nav { gap: 12px; font-size: 14px; }
  nav a[href="./"] { display: none; }   /* the logo already leads home */
  .hero { padding-top: 48px; }
}

/* ── Free badge ─────────────────────────────────────────── */
.free-badge { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.free-badge b { font-weight: 600; }
.free { text-align: center; padding: 40px 0 72px; }
.free h2 {
  font-size: clamp(32px, 5vw, 52px); letter-spacing: -0.02em; margin: 0 0 12px;
  background: linear-gradient(90deg, var(--text), var(--accent-2), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.free p { color: var(--muted); font-size: clamp(17px, 2.2vw, 20px); max-width: 620px; margin: 0 auto; }

/* ── Feature tour with the 3D iPhone ────────────────────── */
.story { --w: min(290px, calc(68vh / 2.06)); --d: calc(var(--w) * 0.055); position: relative; }
.story.js { height: calc(var(--steps) * 100vh); }
.stage { position: relative; }
.story.js .stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.story:not(.js) .stage { display: grid; justify-items: center; gap: 32px; padding: 40px 16px; }

.phone-scene { perspective: 1500px; }
.story.js .phone-scene { position: absolute; inset: 0; display: grid; place-items: center; }
.phone-float { transform-style: preserve-3d; animation: phone-float 6s ease-in-out infinite; }
@keyframes phone-float { 50% { transform: translateY(-10px); } }

.phone {
  position: relative; width: var(--w); height: calc(var(--w) * 2.06);
  transform-style: preserve-3d; will-change: transform;
  transform: rotateY(-18deg) rotateX(6deg);
}
.phone-front, .phone-back, .phone-edge i {
  position: absolute; inset: 0; border-radius: calc(var(--w) * 0.165);
}
.phone-front {
  background: #050506; padding: calc(var(--w) * 0.032);
  box-shadow: inset 0 0 0 2px #5d5a66, inset 0 0 0 4px #121116;
  transform: translateZ(calc(var(--d) / 2)); backface-visibility: hidden;
}
.phone-back {
  transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); backface-visibility: hidden;
  background: radial-gradient(120% 80% at 30% 20%, #3a3350, #17141f 70%);
  box-shadow: inset 0 0 0 2px #5d5a66; display: grid; place-items: center;
}
.phone-back img { width: 26%; border-radius: 22%; opacity: 0.9; box-shadow: 0 10px 30px rgba(140, 115, 255, 0.35); }
.phone-edge { position: absolute; inset: 0; transform-style: preserve-3d; }
.phone-edge i { background: linear-gradient(90deg, #6d6978, #2c2a33 30%, #4a4753 70%, #77737f); }

.phone-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; background: #000;
  border-radius: calc(var(--w) * 0.135);
}
.phone-screen > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.35s ease;
}
.phone-screen > img.is-active { opacity: 1; }
.island {
  position: absolute; top: 1.4%; left: 50%; width: 30%; height: 4.1%;
  transform: translateX(-50%); background: #000; border-radius: 999px;
}
.glare {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.16) 48%, transparent 60%);
  background-size: 300% 100%; background-position: var(--glare, 50%) 0;
}
.phone-shadow {
  position: absolute; left: 50%; bottom: 6vh; width: calc(var(--w) * 1.1); height: 34px;
  margin-left: calc(var(--w) * -0.55); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(140, 115, 255, 0.35), transparent);
  filter: blur(8px); will-change: transform;
}
.story:not(.js) .phone-shadow { display: none; }

.captions { position: absolute; inset: 0; pointer-events: none; }
.story:not(.js) .captions { position: static; display: grid; gap: 24px; max-width: 520px; }
.caption { width: min(420px, 38vw); }
.story.js .caption {
  position: absolute; top: 50%; left: 50%; opacity: 0; will-change: transform, opacity;
}
.caption .kicker {
  margin: 0 0 8px; color: var(--accent-2); font-weight: 600; font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.caption h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 14px; }
.caption p:not(.kicker) { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); margin: 0; }

@media (max-width: 820px) {
  .story { --w: min(200px, calc(46vh / 2.06)); }
  .story.js .phone-scene { place-items: start center; padding-top: calc(64px + 3vh); }
  .phone-shadow { bottom: auto; top: calc(64px + 3vh + var(--w) * 2.06 + 10px); }
  .caption { width: min(520px, 100vw - 32px); text-align: center; }
  .story.js .caption { top: auto; bottom: 5vh; }
}
@media (prefers-reduced-motion: reduce) {
  .phone-float { animation: none; }
}

/* ── Mock screens drawn in HTML (calendar, Home Screen widgets) ── */
.phone-screen [data-screen] {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.35s ease;
}
.phone-screen [data-screen].is-active { opacity: 1; }
.mock {
  font-size: calc(var(--w) * 0.043); color: #fff; overflow: hidden;
  padding: 0 1.1em; line-height: 1.3; text-align: left;
}
.mock-calendar { background: #000; }
.m-status { height: 3.4em; display: flex; align-items: center; padding-left: 1.4em; font-weight: 600; font-size: 0.95em; }
.m-title { font-size: 2em; font-weight: 800; margin: 0.6em 0 0.4em; }
.m-seg { display: flex; background: #1c1c22; border-radius: 99px; padding: 0.2em; margin-bottom: 0.8em; font-size: 0.8em; }
.m-seg > span { flex: 1; text-align: center; padding: 0.35em 0; border-radius: 99px; color: #c9c6d3; }
.m-seg > span.on { background: #3a3842; color: #fff; font-weight: 600; }
.m-day { font-weight: 700; margin: 0.9em 0 0.45em; font-size: 0.95em; }
.m-row { display: flex; align-items: center; gap: 0.7em; }
.m-row img { width: 2.6em; height: 3.8em; object-fit: cover; border-radius: 0.4em; }
.m-row div { flex: 1; min-width: 0; }
.m-row b, .w-row b { display: block; font-size: 0.92em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-row small, .w-row small { color: #a7a3b3; font-size: 0.78em; }
.m-row em {
  font-style: normal; font-size: 0.7em; font-weight: 700; color: #fff;
  background: var(--accent); border-radius: 99px; padding: 0.2em 0.6em;
}
.m-tabs {
  position: absolute; left: 0.8em; right: 3.8em; bottom: 1.4em; height: 3em;
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(60, 58, 70, 0.75); border-radius: 99px;
}
.m-tabs span { width: 1.2em; height: 1.2em; border-radius: 0.3em; background: #8e8a99; }
.m-tabs span.on { background: var(--accent-2); box-shadow: 0 0 0 0.5em rgba(140, 115, 255, 0.25); }

.mock-home {
  background: radial-gradient(120% 70% at 20% 10%, #5b3fd1 0%, transparent 60%),
              radial-gradient(100% 60% at 90% 90%, #c2417e 0%, transparent 60%), #120d24;
}
.w { border-radius: 1.4em; overflow: hidden; box-shadow: 0 0.6em 1.6em rgba(0, 0, 0, 0.35); }
.w-continue { display: flex; gap: 2px; height: 7.6em; margin-top: 0.8em; background: #000; }
.w-hero {
  flex: 1; position: relative; background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 0.6em;
}
.w-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.85)); }
.w-hero small { position: relative; font-size: 0.7em; opacity: 0.85; }
.w-hero i { position: relative; display: block; height: 0.22em; margin-top: 0.35em; border-radius: 9px; background: rgba(255, 255, 255, 0.3); }
.w-hero i::after { content: ""; position: absolute; inset: 0; right: calc((1 - var(--p)) * 100%); background: #fff; border-radius: 9px; }
.w-label { text-align: center; font-size: 0.7em; margin: 0.35em 0 0.7em; opacity: 0.9; }
.w-upcoming { background: rgba(10, 8, 18, 0.92); padding: 0.8em 0.9em; }
.w-upcoming > p { margin: 0 0 0.5em; font-size: 0.72em; font-weight: 600; color: #a7a3b3; }
.w-row { display: flex; gap: 0.6em; align-items: center; margin-top: 0.45em; }
.w-row img { width: 3.6em; height: 2.1em; object-fit: cover; border-radius: 0.4em; }
.w-row div { min-width: 0; }
.w-row em { font-style: normal; color: var(--accent-2); }
.m-apps, .m-dock { display: flex; justify-content: space-between; padding: 0 0.3em; }
.m-apps span, .m-dock span {
  width: 3.3em; height: 3.3em; border-radius: 0.85em; background: rgba(255, 255, 255, 0.16);
}
.m-apps span.lumen { background: url(assets/icon.png) center / cover; }
.m-dock {
  position: absolute; left: 0.8em; right: 0.8em; bottom: 1.1em; padding: 0.7em;
  background: rgba(255, 255, 255, 0.14); border-radius: 1.8em;
}
