/* ============================================================================
   Relay Business — website styles. The base below is copied from
   relay.website/public/relay.css (tokens, type, glass, nav, buttons, steps,
   footer, form) so the two sites read as one brand; business-only styles
   follow at the end. Used by index.html and 404.html.
   ========================================================================== */

:root {
  --violet: #5B4BE8;
  --violet-deep: #3B2CC9;
  --violet-soft: rgba(91, 75, 232, 0.10);
  --violet-line: rgba(91, 75, 232, 0.20);
  --ink: #0B0A14;
  --ink-2: rgba(11, 10, 20, 0.62);
  --ink-3: rgba(11, 10, 20, 0.42);
  --ink-4: rgba(11, 10, 20, 0.14);
  --page: #EEEDF4;
  --signal: #05A275;
  --amber: #C77A05;
  --coral: #E0294F;

  --dest-sms: #3B82F6;
  --dest-telegram: #22A6E8;
  --dest-email: #8B5CF6;
  --dest-webhook: #12B8A0;
  --dest-intent: #F97316;

  --glass-fill: rgba(255, 255, 255, 0.62);
  --glass-stroke: rgba(255, 255, 255, 0.8);
  --glass-rim: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 22px 54px -26px rgba(24, 20, 60, 0.34);

  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-data: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 26px;
  --radius-sm: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shell: 1120px;
}

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

html { scroll-behavior: smooth; }
section[id], header[id] { scroll-margin-top: 96px; }
body {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(91, 75, 232, 0.18); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

/* --- One directional light, matching the app's canvas -------------------- */
.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(58% 42% at 4% -6%, rgba(91, 75, 232, 0.26), transparent 62%),
    radial-gradient(42% 32% at 98% 4%, rgba(122, 107, 255, 0.14), transparent 66%),
    radial-gradient(50% 38% at 78% 96%, rgba(18, 184, 160, 0.13), transparent 62%);
}

/* --- Type roles ---------------------------------------------------------- */
.display-1, .display-2, .display-3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}
.display-1 { font-size: clamp(2.8rem, 7vw, 4.6rem); }
.display-2 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); letter-spacing: -0.026em; line-height: 1.06; }
.display-3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.16; }

.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.body { color: var(--ink-2); }
.small { font-size: 0.9rem; line-height: 1.55; color: var(--ink-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--violet);
}
.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.dim { color: var(--ink-3); }

/* The one typographic flourish: a highlight that sits behind the baseline,
   like a marker pass over the word that carries the promise. */
/* inline-block + line-height 1 makes the span's box the glyph box, so the
   rule lands under the baseline instead of somewhere in the line box. */
.marked {
  position: relative;
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
}
.marked::after {
  content: '';
  position: absolute; left: 0.01em; right: 0.01em; bottom: -0.02em;
  height: 0.11em;
  border-radius: 0.06em;
  background: linear-gradient(90deg, var(--violet), #22A6E8);
}

/* --- Layout -------------------------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section-head { max-width: 640px; }
.section-head .display-2 { margin-top: 14px; }
.section-head .lead { margin-top: 18px; }

.glass {
  background: var(--glass-fill);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-rim);
  border-radius: var(--radius);
}
.card { padding: clamp(22px, 3vw, 30px); }

/* --- Nav ----------------------------------------------------------------- */
.nav-wrap { position: sticky; top: 0; z-index: 60; padding: 16px 0 0; }
.nav {
  display: flex; align-items: center; gap: 20px;
  padding: 8px 10px 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.80);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: -0.02em; }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(148deg, #6A5BFF, #3B2CC9);
  box-shadow: 0 8px 18px -8px rgba(91, 75, 232, 0.9), inset 0 1px 0 rgba(255,255,255,.3);
}
.nav-links { display: none; gap: 2px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; color: var(--ink-2);
  transition: background 180ms, color 180ms;
}
.nav-links a:hover { background: rgba(11, 10, 20, 0.05); color: var(--ink); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: 0.85rem; font-weight: 650;
  white-space: nowrap;
}
@media (max-width: 400px) { .nav-cta-more { display: none; } }
.live-dot { width: 6px; height: 6px; border-radius: 999px; background: #2AD69C; box-shadow: 0 0 0 3px rgba(42, 214, 156, 0.22); }
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-links + .nav-cta { margin-left: 0; }
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 22px;
  border-radius: var(--radius-sm);
  font-weight: 650; font-size: 0.98rem;
  transition: transform 180ms var(--ease), box-shadow 180ms;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(148deg, #6A5BFF, #4433D8 60%, #3524B8);
  box-shadow: 0 18px 34px -16px rgba(91, 75, 232, 0.9), inset 0 1px 0 rgba(255,255,255,.26);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-quiet { background: var(--glass-fill); border: 1px solid var(--glass-stroke); box-shadow: inset 0 1px 0 var(--glass-rim); }
.btn-store { align-items: center; }
.btn-store .store-line { display: flex; flex-direction: column; line-height: 1.18; text-align: left; }
.btn-store .store-top { font-size: 0.66rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.62; }
.btn-store .store-name { font-size: 1.02rem; font-weight: 700; }

/* --- Steps (a real sequence, so numbered) ------------------------------- */
.steps { display: grid; gap: 14px; margin-top: 44px; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding: 26px; }
.step-index {
  font-family: var(--font-data); font-size: 0.78rem; font-weight: 700;
  color: var(--violet); letter-spacing: 0.08em;
}
.step h3 { margin-top: 14px; }
.step p { margin-top: 8px; color: var(--ink-2); font-size: 0.94rem; }

/* --- Footer ------------------------------------------------------------ */
.footer { padding: 48px 0 56px; border-top: 1px solid var(--violet-line); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
.footer-fine { margin-top: 26px; font-size: 0.8rem; color: var(--ink-3); max-width: 46rem; line-height: 1.6; }

/* --- Scroll reveal ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* --- Form (the early-access form, from support.html) --------------------
   The form's states toggle the hidden attribute; a class that sets display
   would otherwise win over it. */
[hidden] { display: none !important; }

.support { max-width: 760px; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 96px); }
.support .display-1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-top: 14px; }
.support > .lead { margin-top: 18px; max-width: 36rem; }
.support-card { display: grid; gap: 22px; margin-top: 34px; padding: clamp(22px, 4vw, 34px); }

.topics { border: 0; display: grid; gap: 8px; }
.field { display: grid; gap: 8px; align-content: start; }
.field-row { display: grid; gap: 22px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-label { font-size: 0.86rem; font-weight: 650; color: var(--ink); padding: 0; }
.field-hint { font-size: 0.8rem; line-height: 1.5; color: var(--ink-3); }

.input {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--ink-4);
  border-radius: 14px;
  transition: border-color 160ms, box-shadow 160ms;
}
textarea.input { resize: vertical; min-height: 9.5rem; line-height: 1.55; }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.input[aria-invalid="true"] { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(224, 41, 79, 0.10); }

/* The app's segmented control: a tray with the chosen option lifted out of it. */
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border-radius: 14px;
  background: rgba(11, 10, 20, 0.05);
}
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.segmented span {
  display: block; text-align: center;
  padding: 10px 12px; border-radius: 11px;
  font-size: 0.92rem; font-weight: 650; color: var(--ink-2);
  transition: background 160ms, color 160ms, box-shadow 160ms;
}
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 4px 14px -6px rgba(24, 20, 60, 0.35); }
.segmented input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }

/* Off-screen, not display:none, so a bot that skips hidden fields still sees it. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-note { padding: 16px 18px; border-radius: 14px; background: rgba(199, 122, 5, 0.08); border: 1px solid rgba(199, 122, 5, 0.18); }
.form-note-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.form-note p { margin-top: 6px; font-size: 0.88rem; line-height: 1.55; color: var(--ink-2); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.form-actions .btn { border: 0; cursor: pointer; font-family: inherit; }
.form-actions .btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.form-status {
  padding: 13px 16px; border-radius: 14px;
  background: rgba(224, 41, 79, 0.08); border: 1px solid rgba(224, 41, 79, 0.2);
  color: #B3173A; font-size: 0.9rem; font-weight: 550; line-height: 1.5;
}
.form-status a { text-decoration: underline; }

.support-sent { justify-items: center; text-align: center; }
.support-sent:focus { outline: none; }
.support-sent p { color: var(--ink-2); max-width: 32rem; line-height: 1.65; }
.support-sent strong { color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.support-sent .lost-actions { margin-top: 4px; }
.sent-mark {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  color: #fff; background: linear-gradient(148deg, #2AD69C, var(--signal));
  box-shadow: 0 14px 28px -14px rgba(5, 162, 117, 0.8);
}

.support-more { margin-top: clamp(48px, 7vw, 72px); }
.support-more .faq { margin-top: 18px; }
.support-more .display-3 + .small { margin-top: 14px; }
.support-more .faq + .display-3 { margin-top: 44px; }
.support-more .small a { color: var(--violet); font-weight: 600; text-decoration: underline; text-decoration-color: var(--violet-line); text-underline-offset: 3px; }

/* ===========================================================================
   Relay Business only
   ========================================================================== */

.brand-sub { color: var(--violet); }
.brand { white-space: nowrap; }
/* A phone has room for the name or the dot, not both. */
@media (max-width: 400px) {
  .nav { gap: 10px; }
  .nav .soon-dot { display: none; }
  .nav-cta { padding: 9px 14px; }
}
.soon-dot { width: 6px; height: 6px; border-radius: 999px; background: #F5A524; box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.24); }

/* --- Hero ---------------------------------------------------------------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 5vw, 64px); }
.hero-grid { display: grid; gap: clamp(36px, 6vw, 64px); align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1fr 420px; } }
.hero h1 { margin-top: 20px; }
.hero .lead { margin-top: 22px; max-width: 33rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 34px; }
.hero-note { font-size: 0.86rem; font-weight: 600; color: var(--ink-3); line-height: 1.45; }
.hero-note a { color: var(--violet); text-decoration: underline; text-decoration-color: var(--violet-line); text-underline-offset: 3px; }

/* --- The two-way flow: systems -> phone -> customer, and the reply back ---- */
.flow { padding: clamp(20px, 3vw, 26px); }
.flow-node { display: flex; align-items: center; gap: 12px; }
.flow-node b { display: block; font-size: 0.95rem; font-weight: 650; }
.flow-node small { display: block; font-size: 0.8rem; color: var(--ink-3); }
.swatch {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 13px; color: #fff;
}
.swatch-sys { background: linear-gradient(148deg, #3B3A4A, var(--ink)); }
.swatch-sim { background: linear-gradient(148deg, #6A5BFF, var(--violet-deep)); }
.swatch-you { background: linear-gradient(148deg, #5FD0F5, var(--dest-telegram)); }
/* The wire runs down from the centre of the swatch above it. */
.flow-link {
  position: relative; margin-left: 19px; padding: 12px 0 12px 21px;
  border-left: 2px dashed var(--violet-line);
}
.flow-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-family: var(--font-data); font-size: 0.72rem; font-weight: 700; letter-spacing: -0.01em;
  color: var(--violet); background: var(--violet-soft);
}
.flow-thread { display: grid; gap: 6px; margin: 14px 0 0 52px; }
.bubble { max-width: 92%; padding: 9px 13px; font-size: 0.86rem; line-height: 1.45; border-radius: 16px; }
.bubble-in { justify-self: start; background: #fff; border: 1px solid var(--ink-4); border-bottom-left-radius: 6px; }
.bubble-out { justify-self: end; color: #fff; background: linear-gradient(148deg, #6A5BFF, var(--violet-deep)); border-bottom-right-radius: 6px; font-weight: 650; }
.flow-back {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 11px 14px; border-radius: 14px;
  font-size: 0.84rem; color: var(--ink-2);
  background: rgba(5, 162, 117, 0.08); border: 1px solid rgba(5, 162, 117, 0.2);
}
.flow-back svg { flex: none; color: var(--signal); }
.flow-back b { color: var(--ink); font-weight: 650; }

/* --- Uses and reasons: three cards each ---------------------------------- */
.trio { display: grid; gap: 14px; margin-top: 44px; }
@media (min-width: 860px) { .trio { grid-template-columns: repeat(3, 1fr); } }
.trio .card h3 { margin-top: 18px; font-size: 1.08rem; font-weight: 650; letter-spacing: -0.01em; }
.trio .card p { margin-top: 8px; color: var(--ink-2); font-size: 0.94rem; }
.trio .swatch { width: 44px; height: 44px; border-radius: 14px; }
.swatch-otp { background: linear-gradient(148deg, #6A5BFF, var(--violet-deep)); }
.swatch-tx { background: linear-gradient(148deg, #3EE0C6, var(--dest-webhook)); }
.swatch-mkt { background: linear-gradient(148deg, #FDA65A, var(--dest-intent)); }
.reason-k { font-family: var(--font-data); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; color: var(--violet); }
.trio .reason h3 { margin-top: 10px; }

/* --- Early access -------------------------------------------------------- */
.access { display: grid; gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (min-width: 940px) { .access { grid-template-columns: 1fr 1.15fr; } }
.access .support-card { margin-top: 0; }
.access-copy .lead { margin-top: 18px; }
.access-copy .small { margin-top: 18px; max-width: 26rem; }
.access-copy .small a { color: var(--violet); font-weight: 600; text-decoration: underline; text-decoration-color: var(--violet-line); text-underline-offset: 3px; }

/* --- Not found ----------------------------------------------------------- */
.lost { max-width: 640px; text-align: center; padding-top: clamp(64px, 10vw, 128px); padding-bottom: clamp(64px, 10vw, 128px); }
.lost .lead { margin: 20px auto 0; }
.lost .btn { margin-top: 30px; }
