/* Relay website. System fonts only (fast on any connection); light and
   dark follow the visitor's phone or computer. */

:root {
  --accent: #0a7ea4;
  --accent-strong: #086a8a;
  --accent-soft: #e3f3f8;
  --green: #1f9d55;
  --ink: #0b141a;
  --text: #17222a;
  --muted: #55636d;
  --line: #e2e8ec;
  --bg: #ffffff;
  --bg-alt: #f5f8fa;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(11, 20, 26, 0.06), 0 8px 24px rgba(11, 20, 26, 0.06);
  --radius: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #3fb5dc;
    --accent-strong: #67c7e6;
    --accent-soft: #10303c;
    --green: #3ecf7a;
    --text: #e9edef;
    --muted: #9aa8b1;
    --line: #22313a;
    --bg: #0b141a;
    --bg-alt: #111c23;
    --card: #15232b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent;
  transition: background-color 0.15s, transform 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { color: #06212b; } }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }
.btn-wide { width: 100%; }
.btn.is-disabled { background: var(--line); color: var(--muted); cursor: default; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* --- Header --- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand img { border-radius: 10px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--text); }
.menu { display: none; }

@media (max-width: 860px) {
  .top-cta { margin-left: auto; }
  .menu {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 10px; background: none; border: 0; cursor: pointer;
  }
  .menu span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
  .menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 8px 20px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
}

/* --- Hero --- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(800px 400px at -10% 110%, color-mix(in srgb, var(--green) 10%, transparent), transparent 70%);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.01em;
}
.lock { width: 12px; height: 14px; position: relative; display: inline-block; }
.lock::before { content: ""; position: absolute; left: 1px; right: 1px; bottom: 0; height: 8px; border-radius: 2px; background: currentColor; }
.lock::after { content: ""; position: absolute; left: 3px; right: 3px; top: 0; height: 9px; border: 2px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.meta { color: var(--muted); font-size: 0.9rem; }
.device-hint { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--line); font-size: 0.92rem; color: var(--muted); }

.hero-art { position: relative; height: 560px; }
.phone {
  position: absolute; margin: 0; width: 260px; padding: 30px 10px 12px;
  background: #0b141a; border-radius: 40px;
  box-shadow: 0 30px 60px rgba(11, 20, 26, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.phone img { border-radius: 6px 6px 30px 30px; width: 100%; }
/* The camera, in the frame above the screen. */
.phone::before {
  content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 50%; background: #1f2c34; box-shadow: inset 0 0 0 3px #0b141a;
}
.phone-front { right: 150px; top: 10px; z-index: 2; }
.phone-back { right: 0; top: 60px; transform: rotate(4deg); opacity: 0.96; }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 48px; }
  .hero-art { height: 480px; max-width: 460px; margin: 0 auto; width: 100%; }
  .phone { width: 220px; }
  .phone-front { left: 0; right: auto; }
  .phone-back { right: 0; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero-art { height: 400px; }
  .phone { width: 180px; padding: 24px 8px 10px; border-radius: 32px; }
  .phone img { border-radius: 5px 5px 25px 25px; }
  .phone::before { top: 7px; width: 10px; height: 10px; }
  .cta-row .btn { width: 100%; }
}

/* --- Strip --- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.strip-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 22px; padding-bottom: 22px; }
.strip p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.strip strong { display: block; color: var(--text); }
@media (max-width: 600px) { .strip-inner { grid-template-columns: 1fr; gap: 12px; } }

/* --- Sections --- */
.section { padding: 88px 0; }
.section-lede { color: var(--muted); font-size: 1.1rem; max-width: 40em; margin-bottom: 36px; }
@media (max-width: 600px) { .section { padding: 60px 0; } }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.ic {
  width: 44px; height: 44px; padding: 10px; margin-bottom: 14px; border-radius: 12px;
  background: var(--accent-soft); stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* --- Gallery --- */
.gallery-section { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gallery {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 12px max(20px, calc((100vw - 1120px) / 2 + 20px)) 24px;
  scrollbar-width: thin;
}
.shot { flex: 0 0 auto; width: 240px; margin: 0; scroll-snap-align: center; }
.shot img { border-radius: 28px; border: 8px solid #0b141a; box-shadow: var(--shadow); width: 100%; }
.shot figcaption { text-align: center; margin-top: 12px; font-weight: 700; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 480px) { .shot { width: 200px; } }

/* --- Privacy (always dark) --- */
.dark { background: #0b141a; color: #e9edef; }
.dark .section-lede { color: #aebac1; }
.privacy-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .privacy-inner { grid-template-columns: 1fr; gap: 8px; } }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.points li {
  padding: 18px 20px 18px 54px; border-radius: 16px; background: #15232b; border: 1px solid #22313a;
  color: #c7ced3; position: relative; font-size: 0.98rem;
}
.points li::before {
  content: ""; position: absolute; left: 20px; top: 22px; width: 18px; height: 18px; border-radius: 50%;
  background: #3ecf7a; box-shadow: inset 0 0 0 5px #15232b, 0 0 0 2px #3ecf7a;
}
.points strong { color: #fff; }

/* --- Install --- */
.install-inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .install-inner { grid-template-columns: 1fr; } }
.download-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 32px;
  box-shadow: var(--shadow); text-align: center; position: sticky; top: 88px;
}
@media (max-width: 900px) { .download-card { position: static; } }
@media (max-width: 480px) { .download-card { padding: 26px 20px; } }
.download-card > img { margin: 0 auto 16px; border-radius: 18px; }
.download-card h2 { font-size: 1.6rem; }
.download-card .meta { margin: 12px 0 0; }
.soon { color: var(--muted); }
.download-card .btn-ghost { margin-top: 4px; }
.invite { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.sha { margin-top: 14px; display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); }
.sha code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; word-break: break-all; background: var(--bg-alt); padding: 4px 8px; border-radius: 6px; max-width: 100%; }
.copy { font: inherit; font-weight: 700; color: var(--accent); background: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }

.steps ol { list-style: none; counter-reset: step; margin: 0 0 24px; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 4px 0 4px 56px; color: var(--muted); }
.steps li strong { color: var(--text); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800;
}
.note { padding: 16px 18px; border-radius: 14px; background: color-mix(in srgb, var(--green) 10%, var(--bg)); border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line)); color: var(--text); font-size: 0.97rem; }

/* --- FAQ --- */
.faq { background: var(--bg-alt); border-top: 1px solid var(--line); }
.faq-inner > * { max-width: 820px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
summary {
  cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font-weight: 700; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details p { padding: 0 20px 18px; margin: 0; color: var(--muted); }

/* --- Footer --- */
.foot { border-top: 1px solid var(--line); padding: 36px 0; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; color: var(--muted); font-size: 0.92rem; }
.foot-inner p { margin: 0; }
.brand-foot { font-size: 1.05rem; }
.brand-foot img { border-radius: 8px; }
.foot-links { margin-left: auto !important; }
.foot-links a { color: var(--muted); }
@media (max-width: 600px) { .foot-links { margin-left: 0 !important; } }

/* --- 404 --- */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.lost img { margin: 0 auto 20px; border-radius: 18px; }
