:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5b606b;
  --line: #e6e6e3;
  --accent: #1560a8;
  --accent-text: #ffffff;
  --brand-blue: #1560a8;
  --brand-gray: #7d8f9a;
  --soon-bg: #fff3d6;
  --soon-text: #7a5200;
  --header-bg: rgb(251 251 250 / 0.78);
  --glow-strength: 30%;
  --radius: 22px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f12;
    --surface: #16181d;
    --text: #eceef2;
    --muted: #a1a6b1;
    --line: #262930;
    --accent: #5b9be0;
    --accent-text: #0b1220;
    --brand-blue: #ffffff;
    --brand-gray: #ffffff;
    --soon-bg: #3a2f14;
    --soon-text: #f5cf73;
    --header-bg: rgb(14 15 18 / 0.72);
    --glow-strength: 38%;
  }
}

* { box-sizing: border-box; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

a { color: var(--accent); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 0;
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
}

.site-header.scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-block;
  line-height: 0;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}

.site-header.hide-brand .brand,
html.js .site-header:not(.brand-ready) .brand {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.logo { height: 34px; width: auto; }
.lg-exult, .lg-arc { fill: var(--brand-blue); }
.lg-net, .lg-slash { fill: var(--brand-gray); }

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

.hero {
  position: relative;
  padding: 40px 0 56px;
}

.hero-glow {
  position: absolute;
  inset: -120px 0 auto;
  height: 520px;
  z-index: -1;
  background:
    radial-gradient(40% 60% at 22% 40%, color-mix(in srgb, #1560a8 22%, transparent), transparent 70%),
    radial-gradient(35% 50% at 70% 20%, color-mix(in srgb, #7d8f9a 22%, transparent), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-mark { margin: 0 0 28px; line-height: 0; }

.hero-logo {
  height: clamp(64px, 11vw, 104px);
  width: auto;
  overflow: visible;
}

.hero-title, .hero h1:not(.hero-mark) {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 750;
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 14em;
}

.lede {
  margin: 0;
  max-width: 36em;
  font-size: 19px;
  color: var(--muted);
}

/* Logo intro: arc sweeps in like a gauge, the slash swings to its mark,
   then the wordmark rises letter by letter. Runs once per tab. */
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.intro-seen) .hero-logo .sweep {
    stroke-dasharray: 100 100;
    animation: sweep 0.95s cubic-bezier(.65, 0, .35, 1) 0.1s both;
  }
  html.js:not(.intro-seen) .hero-logo .needle {
    transform-box: view-box;
    animation: needle 0.9s cubic-bezier(.34, 1.56, .64, 1) 0.45s both;
  }
  html.js:not(.intro-seen) .hero-logo .ltr {
    animation: rise 0.55s var(--ease-out) calc(0.7s + var(--i) * 0.055s) both;
  }
  html.js:not(.intro-seen) .hero-title,
  html.js:not(.intro-seen) .lede {
    animation: fade-up 0.7s var(--ease-out) both;
  }
  html.js:not(.intro-seen) .hero-title { animation-delay: 0.2s; }
  html.js:not(.intro-seen) .lede { animation-delay: 0.35s; }
}

@keyframes sweep {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

@keyframes needle {
  from { transform: rotate(-120deg); opacity: 0; }
  20%  { opacity: 1; }
  to   { transform: rotate(0deg); opacity: 1; }
}

@keyframes rise {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes fade-up {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ---------- App cards ---------- */

.section-title {
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.apps { padding: 8px 0 88px; }

.app-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

.app-card {
  --glow: #1560a8;
  --glow2: var(--glow);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: center;
  min-height: 360px;
  padding: 32px 0 32px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .4s, box-shadow .4s, transform .4s var(--ease-out);
}

/* Soft colour glow behind the screenshots, taken from each app's icon. */
.app-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(42% 70% at 82% 55%, color-mix(in srgb, var(--glow) var(--glow-strength), transparent), transparent 70%),
    radial-gradient(30% 50% at 95% 15%, color-mix(in srgb, var(--glow2) var(--glow-strength), transparent), transparent 70%);
  transition: opacity .4s;
  opacity: .85;
}

.app-card:hover {
  border-color: color-mix(in srgb, var(--glow) 45%, var(--line));
  box-shadow: 0 18px 50px -20px color-mix(in srgb, var(--glow) 55%, transparent);
  transform: translateY(-3px);
}

.app-card:hover::before { opacity: 1; }

.app-body { min-width: 0; }

.app-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.app-icon {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 22%;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.1),
    0 8px 24px -6px color-mix(in srgb, var(--glow) 60%, transparent);
}

.app-head h3 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.tag {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  margin-right: 4px;
  white-space: nowrap;
}

.tag-soon {
  background: var(--soon-bg);
  color: var(--soon-text);
  border-color: transparent;
  font-weight: 600;
}

.app-body p { margin: 0 0 12px; }

.aside {
  font-size: 14px;
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: filter .2s, transform .2s;
}

.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-quiet {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 500;
}

.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Screenshot fan ---------- */

.gallery {
  position: relative;
  height: 330px;
}

.shot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 138px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.12), 0 18px 40px -12px rgb(0 0 0 / 0.45);
  transition: transform .55s var(--ease-out);
}

.shot.s1 { z-index: 3; transform: translate(-50%, -50%); }
.shot.s2 { z-index: 1; transform: translate(-50%, -50%) translateX(-78px) rotate(-9deg) scale(.88); }
.shot.s3 { z-index: 2; transform: translate(-50%, -50%) translateX(78px) rotate(9deg) scale(.88); }

.app-card:hover .shot.s1 { transform: translate(-50%, -54%) scale(1.04); }
.app-card:hover .shot.s2 { transform: translate(-50%, -50%) translateX(-104px) rotate(-13deg) scale(.88); }
.app-card:hover .shot.s3 { transform: translate(-50%, -50%) translateX(104px) rotate(13deg) scale(.88); }

/* Drawn device frames for raw screenshots (OnPlan). */
.phone {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 142px;
  padding: 5px;
  border-radius: 26px;
  background: #0b0b0d;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.12),
    0 18px 40px -12px rgb(0 0 0 / 0.5);
  transition: transform .55s var(--ease-out);
}

.phone::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 34%;
  height: 11px;
  translate: -50% 0;
  border-radius: 999px;
  background: #0b0b0d;
}

.phone img, .watch img {
  display: block;
  width: 100%;
  height: auto;
}

.phone img { border-radius: 21px; }

.phone.p1 { z-index: 2; transform: translate(-50%, -50%) translateX(-34px) rotate(-3deg); }
.phone.p2 { z-index: 1; transform: translate(-50%, -50%) translateX(42px) rotate(7deg) scale(.9); }

.watch {
  position: absolute;
  z-index: 3;
  top: 62%;
  left: 50%;
  width: 104px;
  padding: 7px;
  border-radius: 30px;
  background: #0b0b0d;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.14),
    0 16px 34px -10px rgb(0 0 0 / 0.55);
  transform: translate(-50%, -50%) translateX(78px) rotate(4deg);
  transition: transform .55s var(--ease-out);
}

.watch::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 30%;
  width: 6px;
  height: 22px;
  border-radius: 3px;
  background: #2a2b30;
}

.watch img { border-radius: 23px; }

.app-card:hover .phone.p1 { transform: translate(-50%, -53%) translateX(-44px) rotate(-5deg); }
.app-card:hover .phone.p2 { transform: translate(-50%, -50%) translateX(52px) rotate(10deg) scale(.9); }
.app-card:hover .watch { transform: translate(-50%, -54%) translateX(92px) rotate(8deg); }

/* ---------- Scroll reveal (only when JS is running) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html.js .app-card.reveal {
    opacity: 0;
    transform: translateY(28px);
  }
  html.js .app-card.reveal.in {
    opacity: 1;
    transform: none;
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out),
                border-color .4s, box-shadow .4s;
  }
  html.js .app-card.reveal.in:hover { transform: translateY(-3px); }
  html.js .app-card.reveal .shot,
  html.js .app-card.reveal .phone,
  html.js .app-card.reveal .watch { opacity: 0; }
  html.js .app-card.reveal.in .shot,
  html.js .app-card.reveal.in .phone,
  html.js .app-card.reveal.in .watch {
    opacity: 1;
    transition: opacity .6s var(--ease-out) .15s, transform .55s var(--ease-out);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-card, .app-card:hover,
  .shot, .phone, .watch, .btn { transition: none; }
  .app-card:hover { transform: none; }
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer p { margin: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  .app-card {
    grid-template-columns: 1fr;
    padding: 26px 24px 8px;
    min-height: 0;
  }
  .app-card::before {
    background:
      radial-gradient(70% 40% at 50% 88%, color-mix(in srgb, var(--glow) var(--glow-strength), transparent), transparent 70%),
      radial-gradient(50% 30% at 85% 100%, color-mix(in srgb, var(--glow2) var(--glow-strength), transparent), transparent 70%);
  }
  .gallery { height: 290px; }
  .gallery.devices { height: 350px; }
  .shot { width: 120px; }
  .shot.s2 { transform: translate(-50%, -50%) translateX(-70px) rotate(-9deg) scale(.88); }
  .shot.s3 { transform: translate(-50%, -50%) translateX(70px) rotate(9deg) scale(.88); }
}

@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 24px 0 36px; }
  .app-card { padding: 22px 18px 4px; }
  .app-icon { width: 60px; height: 60px; }
  .app-head h3 { font-size: 22px; }
}
