/* Relayant — relayant.net. One stylesheet, no framework. */

:root {
  --navy: #0b1f3a;
  --navy-2: #12305a;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --amber: #f5a623;
  --amber-2: #ffc35c;
  --green: #22c55e;
  --blue: #3b82f6;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px -12px rgba(15, 23, 42, 0.18);
  --wrap: 1180px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); line-height: 1.12; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

/* ----------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--navy); color: #fff; text-decoration: none; font-weight: 600;
  padding: 12px 20px; border-radius: 12px; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--navy-2); transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(11, 31, 58, .55); }
.btn-sm { padding: 9px 16px; font-size: .95rem; border-radius: 10px; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; box-shadow: var(--shadow); }
.btn-amber { background: var(--amber); color: var(--navy); }
.btn-amber:hover { background: var(--amber-2); box-shadow: 0 10px 28px -10px rgba(245, 166, 35, .7); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .08); }

/* ----------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(15, 23, 42, .4); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; }
.brand .mark { width: 30px; height: 30px; }
.menu { display: flex; align-items: center; gap: 28px; }
.menu a:not(.btn) { text-decoration: none; color: var(--text); font-weight: 500; font-size: .97rem; transition: color .15s; }
.menu a:not(.btn):hover { color: var(--ink); }
.menu .signin { color: var(--ink) !important; font-weight: 600 !important; }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; border-radius: 10px; }
.menu-btn span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 16px 18px; box-shadow: 0 20px 30px -20px rgba(15, 23, 42, .35);
    display: none;
  }
  .menu.open { display: flex; }
  .menu a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .menu .btn { margin-top: 14px; padding: 14px; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ----------------------------------------------------------- hero */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; background: linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%); }
.hero-glow {
  position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%;
  background:
    radial-gradient(closest-side, rgba(59, 130, 246, .14), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgba(245, 166, 35, .12), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #b26f00;
  margin-bottom: 14px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.eyebrow-light { color: var(--amber-2); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); font-weight: 800; letter-spacing: -0.04em; }
.grad { background: linear-gradient(90deg, #1d4f91 0%, #2f6fd0 100%); -webkit-box-decoration-break: clone; box-decoration-break: clone; -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--text); margin-top: 22px; max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ticks { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 26px 0 0; color: var(--ink); font-weight: 600; font-size: .95rem; }
.ticks li { display: inline-flex; align-items: center; gap: 8px; }
.ticks li::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(34, 197, 94, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* the flow diagram */
.flow { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.node {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); position: relative;
}
.node-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.net { font-size: .8rem; color: var(--muted); font-weight: 500; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(11, 31, 58, .08); color: var(--navy); }
.pill-amber { background: rgba(245, 166, 35, .16); color: #8a5300; }
.pill-green { background: rgba(34, 197, 94, .14); color: #15803d; }
.devices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.dev { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--ink); background: var(--bg-alt); border-radius: 12px; padding: 12px 6px; text-align: center; }
.dev svg { width: 22px; height: 22px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.box-chip { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 600; font-size: .92rem; }
.box-chip svg { width: 22px; height: 22px; color: #fff; }
.live { margin-left: auto; font-size: .74rem; font-weight: 700; color: #86efac; display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
.addr { margin-top: 12px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 1.02rem; color: var(--ink); background: var(--bg-alt); border: 1px dashed #cbd5e1; padding: 10px 12px; border-radius: 10px; overflow-wrap: anywhere; }
.addr span { font-weight: 700; color: var(--navy); }
.small { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.screens i {
  aspect-ratio: 16 / 10; border-radius: 8px; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 5px 6px; font-style: normal; font-size: .62rem; font-weight: 600; color: rgba(255, 255, 255, .85); letter-spacing: .02em;
  background: linear-gradient(135deg, #1e3a66, #0b1f3a);
  position: relative; overflow: hidden;
}
.screens i::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .14) 50%, transparent 70%);
  transform: translateX(-100%); animation: sheen 4s ease-in-out infinite;
}
.screens i b { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; align-self: flex-start; box-shadow: 0 0 0 2px rgba(239, 68, 68, .25); }
.screens i:nth-child(2)::after { animation-delay: .6s; }
.screens i:nth-child(3)::after { animation-delay: 1.2s; }
.screens i:nth-child(4)::after { animation-delay: 1.8s; }

.link { position: relative; height: 54px; margin: 0 auto; width: 2px; background: repeating-linear-gradient(180deg, #94a3b8 0 6px, transparent 6px 12px); }
.link em { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .76rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.packet { position: absolute; left: -4px; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(245, 166, 35, .2); animation: down 1.8s linear infinite; }
.packet.p2 { animation-delay: .9s; background: var(--blue); box-shadow: 0 0 0 4px rgba(59, 130, 246, .2); }

@keyframes down { from { top: -6px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { top: 50px; opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); } }
@keyframes sheen { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

@media (max-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .flow { max-width: 520px; width: 100%; margin: 0 auto; }
}

/* ----------------------------------------------------------- problem band */
.band { background: var(--navy); color: #cbd5e1; padding: 44px 0; }
.problem { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.h-sm { font-size: 1.35rem; color: #fff; font-weight: 800; }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.problem-grid strong { color: #fff; display: block; margin-bottom: 6px; font-size: 1.02rem; }
.problem-grid p { font-size: .95rem; }
@media (max-width: 900px) {
  .problem { grid-template-columns: 1fr; gap: 20px; }
  .problem-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ----------------------------------------------------------- sections */
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 52px; }
@media (max-width: 700px) { .section { padding: 72px 0; } .section-head { margin-bottom: 36px; } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; position: relative; }
.steps p { margin-top: 10px; }
.num { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 18px; font-size: 1.05rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d6deea; }
.card p { margin-top: 10px; font-size: .97rem; }
.ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(11, 31, 58, .08), rgba(245, 166, 35, .16)); margin-bottom: 18px; }
.ic svg { width: 22px; height: 22px; fill: none; stroke: var(--navy); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

/* security */
.section-dark { background: radial-gradient(1200px 600px at 85% 0%, #17396b 0%, var(--navy) 55%); color: #cbd5e1; }
.section-dark h2 { color: #fff; }
.lead-light { color: #cbd5e1; }
.sec-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.sec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.sec-list li { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 16px 18px 16px 52px; position: relative; font-size: .97rem; }
.sec-list li::before {
  content: ''; position: absolute; left: 16px; top: 17px; width: 22px; height: 22px; border-radius: 7px;
  background: rgba(245, 166, 35, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffc35c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.sec-list strong { color: #fff; }
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr; gap: 36px; } }

/* who */
.who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.who-item { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, #fff, #fbfcfe); border-top: 4px solid var(--amber); }
.who-item p { margin-top: 10px; font-size: .97rem; }
@media (max-width: 900px) { .who { grid-template-columns: 1fr; } }

/* faq */
.faq-wrap { max-width: 860px; }
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; transition: box-shadow .2s ease; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; font-weight: 600; color: var(--ink); position: relative; font-size: 1.03rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 2px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 20px; }

/* contact */
.cta { background: radial-gradient(900px 400px at 50% 0%, #1b427a 0%, var(--navy) 70%); color: #cbd5e1; text-align: center; }
.cta h2 { color: #fff; }
.cta-inner { max-width: 760px; }
.cta-inner > p { margin-top: 16px; font-size: 1.1rem; }
.cta-center { justify-content: center; }
@media (max-width: 480px) { .cta-row .btn { width: 100%; } }

/* footer */
.footer { background: #071426; color: #94a3b8; padding: 40px 0; font-size: .92rem; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.brand-foot { color: #fff; font-size: 1.15rem; }
.brand-foot .mark { width: 26px; height: 26px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: #fff; }
@media (max-width: 700px) { .foot-inner { flex-direction: column; align-items: flex-start; } }

/* reveal on scroll: only when JS is running, so the page never hides content */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
