/* OTP Vault landing page. No build step: edit and reload. */

:root {
  color-scheme: light dark;
  --bg: #f5f5fa;
  --surface: #ffffff;
  --surface-2: #eaeaf3;
  --ink: #15152a;
  --muted: #56566e;
  --line: rgba(21, 21, 42, 0.1);
  --accent: #4d4ddf;          /* the app's accent colour */
  --brand-a: #3f63e0;         /* the app icon's gradient */
  --brand-b: #7a4fd1;
  --glow: 0.2;
  --device-shadow: 0 30px 50px -24px rgba(30, 30, 90, 0.45);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --page: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b12;
    --surface: #15151f;
    --surface-2: #1e1e2b;
    --ink: #f3f3fa;
    --muted: #a6a6be;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #9292ff;
    --glow: 0.32;
    --device-shadow: 0 30px 50px -24px rgba(0, 0, 0, 0.9);
  }
}

*, *::before, *::after { box-sizing: border-box; }

/* The hero picture is wider than a phone screen on purpose; clip it so the page never scrolls sideways. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

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

h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.022em; line-height: 1.08; }
p { text-wrap: pretty; }

h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); font-weight: 750; letter-spacing: -0.035em; line-height: 1; }
h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 720; }
h3 { font-size: 1.25rem; font-weight: 650; line-height: 1.2; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Numbers and code-like text use the same monospaced digits as the app's codes. */
.code { font-family: var(--mono); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

section, .top, .bottom {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section { padding-block: clamp(44px, 6.5vw, 80px); scroll-margin-top: 12px; }
section > h2 { max-width: 16em; margin-bottom: clamp(28px, 4vw, 48px); }

/* ---------- Header ---------- */

.top { display: flex; align-items: center; gap: 20px; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 22.5%; }
.top nav { display: flex; gap: clamp(14px, 2.4vw, 28px); margin-left: auto; font-size: 0.94rem; }
.top nav a, .bottom nav a { color: var(--muted); }
.top nav a:hover, .bottom nav a:hover { color: var(--ink); text-decoration: none; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 56px; padding: 8px 26px; border: 0; font: inherit; text-align: left; cursor: pointer;
  background: var(--ink); color: var(--bg);
  border-radius: 16px; line-height: 1.1; white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.button:hover { text-decoration: none; opacity: 0.88; }
.button:active { transform: scale(0.98); }
.button.small { min-height: 38px; padding: 6px 16px; border-radius: 999px; font-size: 0.92rem; font-weight: 600; }

/* Apple's official "Download on the App Store" badge (img/app-store-badge-*.svg, from
   toolbox.marketingtools.apple.com), used unaltered. Apple's rules: at least 40px tall on screen,
   clear space of at least a quarter of its height around it, no other styling. */
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { display: block; width: auto; height: 54px; }
.store-badge:hover { opacity: 0.88; text-decoration: none; }
.store-badge:focus-visible { border-radius: 10px; }

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

.hero { position: relative; text-align: center; padding-top: clamp(40px, 7vw, 88px); }
.hero h1 { max-width: 11em; margin-inline: auto; }
.lede { max-width: 34em; margin: 22px auto 0; font-size: clamp(1.08rem, 2vw, 1.3rem); color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: 30px; }
.cta-note { text-align: left; font-size: 0.95rem; line-height: 1.4; color: var(--muted); }
.cta-note strong { color: var(--ink); font-weight: 650; }

.stage { position: relative; max-width: 1000px; margin: clamp(36px, 6vw, 64px) auto 0; }
.stage::before {                     /* soft glow in the icon's colours */
  content: ""; position: absolute; inset: 6% -8% -4%; z-index: -1;
  background:
    radial-gradient(45% 55% at 28% 45%, var(--brand-a), transparent 70%),
    radial-gradient(45% 55% at 74% 60%, var(--brand-b), transparent 70%);
  opacity: var(--glow); filter: blur(48px);
}
.stage .mac { width: 86%; margin-inline: auto; }
.stage .phone { position: absolute; right: 2%; bottom: -3%; width: 20%; }
.stage .watch { position: absolute; left: 4%; bottom: 1%; width: 13.5%; }

/* ---------- Device frames ----------
   Each frame is a box with the device's outer proportions; the screenshot sits inside it,
   inset by the bezel. All sizes are percentages, so a frame scales with its width. */

.device { position: relative; container-type: inline-size; background: #0c0c11; box-shadow: 0 0 0 1px #3b3b45, var(--device-shadow); }
.device picture { display: contents; }
.device img { position: absolute; max-width: none; }
.device::before, .device::after { content: ""; position: absolute; }

.phone { aspect-ratio: 420 / 892; border-radius: 15.24% / 7.17%; }
.phone img { left: 2.14%; top: 1.01%; width: 95.72%; height: 97.98%; border-radius: 13.68% / 6.29%; }
.phone::after { left: 35.2%; top: 2.5%; width: 29.6%; height: 4.1%; border-radius: 999px; background: #000; }  /* Dynamic Island */

.duo-closed { aspect-ratio: 482 / 694; border-radius: 3% 14.5% 14.5% 3% / 2.1% 10% 10% 2.1%; }
.duo-closed img { left: 1.66%; top: 1.15%; width: 96.68%; height: 97.7%; border-radius: 1.6% 12.6% 12.6% 1.6% / 1.1% 8.7% 8.7% 1.1%; }
.duo-closed::after { left: 84.2%; top: 5.7%; width: 7.6%; aspect-ratio: 1; border-radius: 50%; background: #000; }  /* camera */
.duo-closed::before { left: -2.2%; top: 1.5%; bottom: 1.5%; width: 2.6%; border-radius: 40% 0 0 40% / 4% 0 0 4%; background: linear-gradient(90deg, #2a2a31, #4a4a54); }  /* hinge */

.duo-open { aspect-ratio: 967 / 685; border-radius: 4.9% / 6.9%; }
.duo-open img { left: 0.83%; top: 1.17%; width: 98.34%; height: 97.66%; border-radius: 4.2% / 6%; }
.duo-open::after { left: 49.3%; top: 1.17%; bottom: 1.17%; width: 1.4%; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.09), rgba(255, 255, 255, 0.07), transparent); }  /* fold */

.ipad { aspect-ratio: 1246 / 870; border-radius: 2.9% / 4.15%; }
.ipad img { left: 1.44%; top: 2.07%; width: 97.12%; height: 95.86%; border-radius: 1.5% / 2.2%; }

.watch { aspect-ratio: 262 / 312; border-radius: 27% / 22.7%; background: linear-gradient(150deg, #8a857c, #4b4844 60%, #393734); box-shadow: 0 0 0 1px #2c2a28, var(--device-shadow); }
.watch img { left: 9.7%; top: 8.8%; width: 80.6%; height: 82.4%; border-radius: 21.8% / 17.9%; outline: 3.4cqw solid #000; }
.watch::after { right: -5.5%; top: 27%; width: 6.5%; height: 21%; border-radius: 0 35% 35% 0 / 0 12% 12% 0; background: linear-gradient(180deg, #6f6b64, #45423e); }  /* crown */
.watch::before { left: -2.6%; top: 38%; width: 3%; height: 24%; border-radius: 40% 0 0 40% / 6% 0 0 6%; background: #e8742a; }  /* action button */

/* ---------- Why (the five cards) ---------- */

.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card { grid-column: span 2; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card.wide { grid-column: span 3; padding: 34px; }
.card h3 { margin-top: 22px; }
.card.wide h3 { font-size: 1.55rem; }
.card p { margin-top: 10px; color: var(--muted); }
.card p .code { color: var(--ink); }

/* Icon tiles borrow the look of the app's account avatars. */
.glyph { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; color: #fff; }
.glyph svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.g-indigo { background: linear-gradient(160deg, #7b7bf5, #4d4ddf); }
.g-cyan { background: linear-gradient(160deg, #33dbe8, #00b9c9); }
.g-green { background: linear-gradient(160deg, #5fdd7a, #2fbe54); }
.g-orange { background: linear-gradient(160deg, #ffad55, #ff8419); }
.g-pink { background: linear-gradient(160deg, #ff6686, #ff2d55); }
.g-orange .solid { fill: #ff9632; }

/* ---------- Devices ---------- */

.tiles { display: grid; grid-template-columns: 5fr 3fr; gap: 16px; }
.tile { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tile-text { padding: 34px 34px 0; }
.tile-text h3 { font-size: 1.55rem; }
.tile-text p { margin-top: 10px; max-width: 30em; color: var(--muted); }

.tile-duo { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.7fr; align-items: center; gap: 24px; }
.tile-duo .tile-text { padding-bottom: 34px; }
.duo-pair { display: flex; align-items: flex-end; gap: 5%; padding: 40px 40px 40px 8px; }
/* Same height closed and open, like the real thing: the widths follow from the two aspect ratios. */
.duo-pair .duo-closed { flex: 0.492 1 0; }
.duo-pair .duo-open { flex: 1 1 0; }

.tile-ipad .ipad { width: calc(100% - 68px); margin: 34px 34px -8%; }
.tile-watch .watch { width: 52%; margin: 32px auto 36px; }

/* ---------- Security ---------- */

.security { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.security h2 { margin-bottom: clamp(24px, 3vw, 36px); }
.facts { list-style: none; padding: 0; display: grid; gap: 22px; }
.facts li { padding-left: 18px; border-left: 2px solid var(--line); }
.facts h3 { font-size: 1.1rem; }
.facts p { margin-top: 6px; color: var(--muted); }
.facts .code { font-size: 0.92em; color: var(--ink); }
.phone-pair { display: flex; justify-content: center; align-items: flex-start; gap: 5%; padding-bottom: 48px; }
.phone-pair .phone { flex: 0 1 44%; }
.phone-pair .phone:first-child { margin-top: 48px; }

/* ---------- Price ---------- */

.price { text-align: center; }
.price > h2 { margin-inline: auto; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; margin-inline: auto; text-align: left; }
.plan { display: flex; flex-direction: column; padding: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.plan h3 { color: var(--muted); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.amount { margin-top: 8px; }
.amount .code { font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1.1; letter-spacing: -0.04em; }
.once { color: var(--muted); font-size: 1.1rem; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.plan li { position: relative; padding-left: 26px; }
.plan li::before {
  content: ""; position: absolute; left: 3px; top: 0.42em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.plan.featured { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(140deg, var(--brand-a), var(--brand-b)) border-box; border: 2px solid transparent; }
.plan .button, .plan .store-badge { margin-top: 26px; align-self: flex-start; }
.fine { color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.price .fine { margin-top: 22px; }

/* ---------- FAQ ---------- */

.faq { max-width: calc(760px + 2 * var(--gutter)); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 2px; font-size: 1.12rem; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 1.5rem/1 var(--mono); color: var(--muted); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2px 22px; max-width: 40em; color: var(--muted); }
.faq .code { font-size: 0.92em; color: var(--ink); }

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

.bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding-block: 36px 56px; border-top: 1px solid var(--line); }
.bottom nav { display: flex; gap: 20px; font-size: 0.94rem; }
.bottom .fine { flex-basis: 100%; max-width: 52em; }

/* ---------- Text pages (privacy, 404) ---------- */

.prose { max-width: calc(720px + 2 * var(--gutter)); padding-block: clamp(40px, 7vw, 80px); }
.prose h1 { font-size: clamp(2.2rem, 5.5vw, 3.2rem); }
.prose h2 { font-size: 1.35rem; margin: 40px 0 0; letter-spacing: -0.015em; }
.prose p, .prose ul { margin-top: 14px; color: var(--muted); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .updated { font-size: 0.9rem; }

/* ---------- Smaller screens ---------- */

@media (max-width: 900px) {
  .card, .card.wide { grid-column: span 3; }
  .card:last-child { grid-column: 1 / -1; }
  .tiles { grid-template-columns: 1fr; }
  .tile-duo { grid-template-columns: 1fr; gap: 0; }
  .tile-duo .tile-text { padding-bottom: 0; }
  .duo-pair { padding: 32px 34px 38px; }
  .tile-watch { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; }
  .tile-watch .tile-text { padding-bottom: 34px; }
  .tile-watch .watch { width: 68%; }
  .security { grid-template-columns: 1fr; }
  .phone-pair { max-width: 520px; margin-inline: auto; width: 100%; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .top nav { display: none; }
  .top .button { margin-left: auto; }
  .cta { flex-direction: column; }
  .cta-note { text-align: center; }
  .stage { margin-inline: calc(-1 * var(--gutter)); padding-bottom: 14%; }
  .stage .mac { width: 108%; max-width: none; margin-left: -4%; }
  .stage .phone { width: 31%; right: 6%; bottom: 0; }
  .stage .watch { width: 21%; left: 7%; bottom: 3%; }
  .card, .card.wide { grid-column: 1 / -1; padding: 26px; }
  .card.wide h3, .tile-text h3 { font-size: 1.35rem; }
  .tile-text { padding: 26px 26px 0; }
  .duo-pair { padding: 26px 22px 30px; gap: 4%; }
  .tile-ipad .ipad { width: calc(100% - 44px); margin: 26px 22px -8%; }
  .tile-watch { grid-template-columns: 1fr; }
  .tile-watch .tile-text { padding-bottom: 0; }
  .tile-watch .watch { width: 44%; }
  .plans { grid-template-columns: 1fr; }
  .plan { padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .faq summary::after { transition: none; }
}
