/* NexaFleet Quantum — shared styles for every page of nexafleetquantum.com.
   The palette mirrors mobile/src/theme/theme.ts so the site, the admin portal and the app share one look. */

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

:root {
  color-scheme: dark;

  --navy-950: #08152A;
  --navy-900: #0A1730;
  --navy-850: #0D1D3A;
  --navy-800: #0F2240;
  --navy-750: #132849;
  --navy-700: #183058;
  --navy-600: #1F3A63;
  --navy-500: #2B4672;
  --brand-navy: #102A56;
  --teal-navy: #0C4565;

  --blue: #2E7CF6;
  --blue-light: #6AA6FF;
  --cyan: #14B8C8;
  --cyan-dark: #0E9AAB;
  --cyan-light: #5EEAD4;
  --cyan-text: #8DE6EF;
  --orange: #F08A4B;
  --orange-text: #FFC49E;
  --success: #22C59A;

  --text-high: #E2EAF7;
  --text-mid: #A9BAD5;
  --text-low: #7F93B3;
  --on-cyan: #042A31;

  --border: var(--navy-600);
  --border-soft: rgba(255, 255, 255, 0.08);
  --container: 1140px;
  --nav-h: 68px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-high);
  background: var(--navy-950);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }
a { color: var(--cyan); }
strong { color: #fff; font-weight: 700; }

::selection { background: rgba(20, 184, 200, 0.35); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--navy-950); }
::-webkit-scrollbar-thumb { background: var(--navy-600); border-radius: 999px; border: 2px solid var(--navy-950); }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-dark); }
html { scrollbar-color: var(--navy-600) var(--navy-950); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--cyan); color: var(--on-cyan);
  padding: 0.65rem 1.1rem; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

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

/* Icons come from the inline sprite at the top of each page */
.icon {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 18px; height: 18px; }

.icon-tile {
  width: 48px; height: 48px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  color: var(--cyan-text);
  background: rgba(20, 184, 200, 0.12);
  border: 1px solid rgba(20, 184, 200, 0.28);
}
.icon-tile--blue { color: #B7D3FF; background: rgba(46, 124, 246, 0.14); border-color: rgba(46, 124, 246, 0.32); }
.icon-tile--orange { color: var(--orange-text); background: rgba(240, 138, 75, 0.12); border-color: rgba(240, 138, 75, 0.3); }
.icon-tile--green { color: #9FF0D6; background: rgba(34, 197, 154, 0.12); border-color: rgba(34, 197, 154, 0.3); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 18px); }
}
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Layout ---------- */

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 0; position: relative; }
.section--alt { background: var(--navy-900); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
@media (max-width: 640px) { .section { padding: 4.5rem 0; } }

.section-head { text-align: center; max-width: 740px; margin: 0 auto 3.5rem; }
.section-head--left { text-align: left; margin-left: 0; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan-text); margin-bottom: 0.9rem;
}
.section-title {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em; color: #fff; margin-bottom: 1rem;
}
.section-title span { color: var(--cyan); }
.lead { color: var(--text-mid); font-size: 1.08rem; line-height: 1.7; }

.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(20, 184, 200, 0.14); border: 1px solid rgba(20, 184, 200, 0.35);
  color: #7EF0FA; font-size: 0.78rem; font-weight: 800;
  padding: 0.42rem 1rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none;
}
a.pill:hover { border-color: rgba(20, 184, 200, 0.6); color: #fff; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem; border-radius: 14px;
  font: inherit; font-size: 1rem; font-weight: 700; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(135deg, #14B8C8, #0E9AAB); color: var(--on-cyan); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(20, 184, 200, 0.3); }
.btn-outline { background: rgba(255, 255, 255, 0.02); color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.btn-outline:hover { border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.05); }
.btn-secondary { background: var(--navy-750); color: var(--text-high); border-color: var(--navy-500); }
.btn-secondary:hover { border-color: var(--cyan-dark); background: var(--navy-700); }
.btn-block { width: 100%; }

/* Google Play badge — official artwork, transparent clear space is baked into the PNG */
.play-badge { display: inline-flex; align-items: center; text-decoration: none; transition: transform 0.15s, filter 0.15s; }
.play-badge img { display: block; height: 64px; width: auto; }
.play-badge:hover { transform: translateY(-2px); filter: brightness(1.08); }
.play-badge--sm img { height: 56px; }
@media (max-width: 480px) { .play-badge img { height: 58px; } }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(8, 21, 42, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 0.7rem; flex: none;
  color: #fff; font-size: 1.15rem; font-weight: 800; letter-spacing: 0.01em; text-decoration: none;
}
.nav-brand img { width: 34px; height: 34px; display: block; border-radius: 9px; }
.nav-brand em { font-style: normal; color: var(--cyan); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: #C8D5EA; text-decoration: none; font-size: 0.95rem; font-weight: 600; white-space: nowrap; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: 0.5rem; }
.nav-signin, .nav-cta { text-decoration: none; white-space: nowrap; }
.nav-signin {
  padding: 0.5rem 1.05rem; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28); color: var(--text-high) !important; font-weight: 700 !important;
}
.nav-signin:hover { border-color: rgba(255, 255, 255, 0.55); color: #fff !important; }
.nav-cta {
  background: var(--cyan); color: var(--on-cyan) !important;
  padding: 0.5rem 1.15rem; border-radius: 10px; font-weight: 700 !important;
}
.nav-cta:hover { background: #2CC7D6; }

.nav-toggle {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 10px; cursor: pointer;
}
.nav-toggle:hover { border-color: rgba(255, 255, 255, 0.4); }
.nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* The nav needs ~1010px on one line. Keep this in sync with NAV_BREAKPOINT in site.js. */
@media (max-width: 1040px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    padding: 0.25rem 1.5rem 1.5rem;
    /* Solid: a backdrop-filter nested inside the nav's own one cannot blur the page and lets text ghost through. */
    background: var(--navy-950);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-menu.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { padding: 0.9rem 0.25rem; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
  .nav-actions { flex-direction: column; align-items: stretch; gap: 0.75rem; margin: 1.1rem 0 0; }
  .nav-actions a { text-align: center; padding: 0.85rem 1.25rem; }
}
@media (min-width: 1041px) {
  .nav-menu { display: flex; align-items: center; gap: 1.25rem; }
}

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

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #08152A 0%, #102A56 52%, #0C4565 100%);
  padding: 5rem 0 4.5rem;
}
.glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  animation: floatOrb 10s ease-in-out infinite;
}
.glow--cyan { background: radial-gradient(circle closest-side, rgba(28, 198, 215, 0.24), rgba(28, 198, 215, 0)); }
.glow--orange { background: radial-gradient(circle closest-side, rgba(240, 138, 75, 0.16), rgba(240, 138, 75, 0)); animation-duration: 13s; animation-direction: reverse; }
.glow--blue { background: radial-gradient(circle closest-side, rgba(46, 124, 246, 0.22), rgba(46, 124, 246, 0)); animation-duration: 12s; }
.hero .glow--cyan { width: 640px; height: 640px; top: -260px; right: -180px; }
.hero .glow--orange { width: 560px; height: 560px; bottom: -280px; left: -200px; }

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3rem; align-items: center;
}
.hero-copy > * { animation: fadeUp 0.7s ease both; }
.hero-copy .pill { animation-delay: 0s; margin-bottom: 1.5rem; }
.hero h1 {
  font-size: clamp(2.35rem, 4.6vw, 3.85rem); font-weight: 900; line-height: 1.08;
  letter-spacing: -0.025em; color: #fff; margin-bottom: 1.35rem; animation-delay: 0.05s;
}
.hero h1 span {
  background: linear-gradient(90deg, #14B8C8, #5EEAD4);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-lead { font-size: 1.15rem; color: #B8C6DD; line-height: 1.7; max-width: 560px; margin-bottom: 2.1rem; animation-delay: 0.12s; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; animation-delay: 0.2s; }
.hero-note { margin-top: 1.4rem; color: var(--text-low); font-size: 0.9rem; animation-delay: 0.26s; }

.hero-visual { position: relative; height: 540px; animation: fadeUp 0.9s ease 0.15s both; }
.phone {
  border-radius: 38px; padding: 9px;
  background: #050D1C;
  box-shadow: 0 0 0 1px rgba(159, 217, 242, 0.16), 0 40px 80px -20px rgba(0, 0, 0, 0.7);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 30px; }
.hero-visual .phone { position: absolute; top: 0; left: 50%; width: 252px; }
.hero-visual .phone--front { transform: translateX(-50%); z-index: 2; }
.hero-visual .phone--left { top: 60px; transform: translateX(-122%) rotate(-7deg) scale(0.84); opacity: 0.92; }
.hero-visual .phone--right { top: 60px; transform: translateX(22%) rotate(7deg) scale(0.84); opacity: 0.92; }

@media (max-width: 999px) {
  .hero { padding: 4rem 0 3rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 2.5rem; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { height: 470px; }
  .hero-visual .phone { width: 222px; }
}
@media (max-width: 480px) {
  .hero-visual { height: 400px; }
  .hero-visual .phone { width: 190px; }
  .hero-visual .phone--left { transform: translateX(-108%) rotate(-7deg) scale(0.8); }
  .hero-visual .phone--right { transform: translateX(8%) rotate(7deg) scale(0.8); }
}

/* ---------- Trust strip ---------- */

.trust { background: var(--navy-900); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.trust-list {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 1.6rem 0;
}
.trust-list li {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  padding: 0.35rem 1rem; color: var(--text-mid); font-size: 0.93rem; font-weight: 600; text-align: left;
}
.trust-list li + li { border-left: 1px solid var(--border-soft); }
.trust-list .icon { color: var(--cyan); }
.trust-list strong { color: var(--text-high); font-weight: 700; }
@media (max-width: 900px) {
  .trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0.5rem; }
  .trust-list li:nth-child(3) { border-left: none; }
}
@media (max-width: 520px) {
  .trust-list { grid-template-columns: minmax(0, 1fr); }
  .trust-list li { justify-content: flex-start; border-left: none !important; }
}

/* ---------- Gradient bands (offline, assistant, CTA) ---------- */

.band { position: relative; overflow: hidden; }
.band > .container { position: relative; z-index: 1; }
.band--offline { background: linear-gradient(135deg, #06101F 0%, #0C2447 55%, #0A3A52 100%); }
.band--offline .glow--cyan { width: 520px; height: 520px; top: -200px; right: -160px; }
.band--assistant { background: linear-gradient(135deg, #0A1730 0%, #123A63 55%, #0E5A6B 100%); }
.band--assistant .glow--cyan { width: 520px; height: 520px; top: -200px; left: -160px; }
.band--assistant .glow--blue { width: 480px; height: 480px; bottom: -220px; right: -140px; }
.band h2 { font-size: clamp(1.85rem, 4vw, 2.75rem); font-weight: 900; line-height: 1.14; letter-spacing: -0.02em; color: #fff; max-width: 780px; margin: 1.1rem 0 1rem; }
.band h2 span { color: var(--cyan); }
.band .lead { color: #C4D3E8; max-width: 680px; margin-bottom: 2.75rem; }

.glass-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1.25rem; }
.glass-card {
  background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px; padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.glass-card:hover { border-color: rgba(20, 184, 200, 0.4); transform: translateY(-3px); }
.glass-card .icon-tile { margin-bottom: 1.1rem; }
.glass-card h3 { font-size: 1.06rem; font-weight: 700; color: #fff; margin-bottom: 0.45rem; }
.glass-card p { color: var(--text-mid); font-size: 0.93rem; line-height: 1.6; }

.flow {
  display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap;
  margin-top: 2.75rem; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.flow-step { display: flex; align-items: center; gap: 0.6rem; color: #DCE5F5; font-weight: 600; font-size: 0.95rem; }
.flow-step b {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(20, 184, 200, 0.16); color: #7EF0FA; font-size: 0.88rem; font-weight: 800;
}
.flow-arrow { color: var(--cyan); display: inline-flex; }

/* ---------- Cards & grids ---------- */

.card {
  background: var(--navy-800); border: 1px solid var(--border);
  border-radius: 20px; padding: 1.85rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(20, 184, 200, 0.45); box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.75); }
.card .icon-tile { margin-bottom: 1.15rem; }
.card h3 { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.card p { color: var(--text-mid); font-size: 0.95rem; line-height: 1.62; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- App screen gallery ---------- */

.app-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; margin-bottom: 2.5rem; }
.app-intro .section-head { margin-bottom: 0; }
.gallery-controls { display: flex; gap: 0.6rem; }
.gallery-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy-800); color: var(--text-high);
  border: 1px solid var(--border); cursor: pointer;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}
.gallery-btn:hover:not(:disabled) { border-color: var(--cyan); background: var(--navy-750); }
.gallery-btn:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 760px) {
  .app-intro { grid-template-columns: minmax(0, 1fr); }
  .gallery-controls { display: none; }
}

.gallery-track {
  list-style: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 1.5rem;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: 1.5rem;
  padding: 0.5rem 1.5rem 1.5rem;
  margin: 0 -1.5rem;
  scrollbar-width: thin;
  --fade-start: 0px;
  --fade-end: 72px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent 100%);
}
.gallery-track:not(.at-start) { --fade-start: 56px; }
.gallery-track.at-end { --fade-end: 0px; }
.gallery-track > li { scroll-snap-align: start; }
.gallery-track .phone { padding: 7px; border-radius: 32px; }
.gallery-track .phone img { border-radius: 26px; }
.gallery-track figcaption { margin-top: 1rem; }
.gallery-track figcaption strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.gallery-track figcaption span { color: var(--text-mid); font-size: 0.9rem; line-height: 1.5; }
@media (max-width: 480px) { .gallery-track { grid-auto-columns: 74%; } }

/* ---------- How it works ---------- */

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; position: relative; }
.step { position: relative; }
.step-number {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue), #1D5FD6); color: #fff;
  font-size: 1.15rem; font-weight: 800; margin-bottom: 1.1rem;
  box-shadow: 0 0 0 6px rgba(46, 124, 246, 0.14);
}
@media (min-width: 761px) {
  .steps::before {
    content: ''; position: absolute; top: calc(1.85rem + 23px); left: 12%; right: 12%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--navy-500) 15%, var(--navy-500) 85%, transparent);
  }
  .step.card:hover { transform: none; }
}
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Admin portal ---------- */

.portal-points { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem 1.6rem; margin-bottom: 4rem; }
.portal-point { display: flex; gap: 0.95rem; align-items: flex-start; }
.portal-point .icon-tile { width: 42px; height: 42px; border-radius: 12px; }
.portal-point .icon { width: 20px; height: 20px; }
.portal-point h3 { font-size: 0.98rem; font-weight: 700; color: #fff; margin-bottom: 0.2rem; }
.portal-point p { color: var(--text-mid); font-size: 0.9rem; line-height: 1.55; }
@media (max-width: 960px) { .portal-points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .portal-points { grid-template-columns: minmax(0, 1fr); } }

.subhead { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.subhead h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 800; color: #fff; letter-spacing: -0.01em; margin-bottom: 0.6rem; }
.subhead p { color: var(--text-mid); font-size: 1.02rem; line-height: 1.7; }

.portal-frame {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.8);
  background: var(--navy-900);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.portal-frame.is-zoomable { cursor: zoom-in; }
.portal-frame.is-zoomable:hover,
.portal-frame.is-zoomable:focus-visible { transform: translateY(-4px); border-color: rgba(20, 184, 200, 0.5); }
.portal-frame-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  background: var(--navy-850);
  border-bottom: 1px solid var(--border-soft);
}
/* Balances the three dots so the address bar sits truly centred */
.portal-frame-bar::after { content: ''; flex: none; width: 44px; }
.portal-frame-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.portal-frame-dot:nth-child(1) { background: #FF5F57; }
.portal-frame-dot:nth-child(2) { background: #FEBC2E; }
.portal-frame-dot:nth-child(3) { background: #28C840; }
.portal-frame-url {
  flex: 0 1 380px; margin: 0 auto; min-width: 0;
  padding: 4px 12px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-mid); font-size: 0.74rem; text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.portal-frame img { width: 100%; height: auto; display: block; }
.portal-shots .portal-frame img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }

.portal-highlight {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 2.75rem; align-items: start;
  margin-bottom: 3.5rem;
}
.portal-highlight-copy h3 { font-size: 1.45rem; font-weight: 800; color: #fff; margin-bottom: 0.85rem; }
.portal-highlight-copy > p { color: var(--text-mid); line-height: 1.7; margin-bottom: 1.2rem; }
.check-list { list-style: none; display: grid; gap: 0.65rem; }
.check-list li { position: relative; padding-left: 1.85rem; color: var(--text-mid); font-size: 0.96rem; line-height: 1.5; }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 0.15rem; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: rgba(20, 184, 200, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314B8C8' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
}
/* The appraisal screenshot is cropped mid-page; fade it out rather than cutting it off. */
.portal-highlight-shot .portal-frame { position: relative; }
.portal-highlight-shot .portal-frame::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(10, 23, 48, 0), var(--navy-900) 92%);
}
@media (max-width: 860px) {
  .portal-highlight { grid-template-columns: minmax(0, 1fr); }
  .portal-highlight-shot { max-width: 620px; margin: 0 auto; width: 100%; }
}

.portal-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 820px) { .portal-shots { grid-template-columns: minmax(0, 1fr); } }
.portal-figure { margin: 0; }
.portal-figure--wide { grid-column: 1 / -1; }
.portal-figure figcaption { margin-top: 0.9rem; }
.portal-figure figcaption strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.portal-figure figcaption span { color: var(--text-mid); font-size: 0.92rem; line-height: 1.5; }

.doc-showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; align-items: start; }
@media (max-width: 820px) { .doc-showcase { grid-template-columns: 1fr; } }
.doc-figure { margin: 0; }
.doc-card { background: var(--navy-800); border: 1px solid var(--border); border-radius: 18px; padding: 1rem 1rem 0; }
.doc-paper { position: relative; border-radius: 10px 10px 0 0; overflow: hidden; background: #fff; max-height: 560px; }
.doc-paper img { width: 100%; height: auto; display: block; }
.doc-paper::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(to bottom, rgba(15, 34, 64, 0), var(--navy-800));
  pointer-events: none;
}
.doc-figure figcaption { margin-top: 1rem; }
.doc-figure figcaption strong { display: block; font-size: 1.05rem; margin-bottom: 0.25rem; }
.doc-figure figcaption span { color: var(--text-mid); font-size: 0.94rem; line-height: 1.6; }

.cta-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900), var(--brand-navy) 60%, var(--teal-navy));
  border: 1px solid var(--border); border-radius: 28px;
  padding: 3rem 2rem; text-align: center;
}
.cta-card .glow--cyan { width: 420px; height: 420px; top: -200px; right: -120px; }
.cta-card > *:not(.glow) { position: relative; z-index: 1; }
.cta-card h3 { font-size: 1.6rem; font-weight: 800; color: #fff; margin-bottom: 0.75rem; }
.cta-card p { color: #C8D5EA; max-width: 540px; margin: 0 auto 2rem; line-height: 1.7; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; }

/* Screenshot lightbox */
.shot-lightbox {
  border: none; padding: 0; background: transparent; overflow: visible;
  width: min(1400px, 94vw); max-width: none; max-height: none; margin: auto;
}
.shot-lightbox::backdrop { background: rgba(8, 21, 42, 0.9); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.shot-lightbox-body {
  max-height: 86vh; overflow: auto; border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); background: var(--navy-900);
}
.shot-lightbox-body img { display: block; width: 100%; height: auto; }
.shot-lightbox-caption { margin-top: 0.85rem; text-align: center; color: #C8D5EA; font-size: 0.95rem; }
.shot-lightbox-close {
  position: absolute; top: -14px; right: -14px; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--navy-800); color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.shot-lightbox-close:hover { background: var(--navy-700); border-color: var(--cyan); }
@media (max-width: 640px) { .shot-lightbox-close { top: -50px; right: 0; } }

/* ---------- Pricing ---------- */

.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; max-width: 1040px; margin: 0 auto; align-items: stretch; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: minmax(0, 1fr); max-width: 440px; } }
.price-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--navy-800); border: 1px solid var(--border); border-radius: 24px;
  padding: 2.25rem 2rem 2rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.price-card:hover { transform: translateY(-4px); border-color: var(--navy-500); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8); }
.price-card.featured {
  border-color: rgba(20, 184, 200, 0.7);
  background: linear-gradient(180deg, rgba(20, 184, 200, 0.1), rgba(20, 184, 200, 0) 45%), var(--navy-800);
  box-shadow: 0 0 0 1px rgba(20, 184, 200, 0.25), 0 30px 60px -28px rgba(20, 184, 200, 0.45);
}
.price-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--cyan); color: var(--on-cyan);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.85rem; border-radius: 999px; white-space: nowrap;
}
.price-card h3 { font-size: 1.2rem; font-weight: 700; color: #fff; }
.price-drivers { color: var(--text-mid); font-size: 0.95rem; margin-top: 0.2rem; }
.price-amount { font-size: 3rem; font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1; margin: 1.4rem 0 0.4rem; }
.price-amount span { font-size: 1rem; font-weight: 600; color: var(--text-mid); letter-spacing: 0; }
.price-features { list-style: none; display: grid; align-content: start; gap: 0.6rem; margin: 1.6rem 0 2rem; flex: 1; }
.price-features li { position: relative; padding-left: 1.7rem; color: var(--text-mid); font-size: 0.95rem; }
.price-features li::before {
  content: ''; position: absolute; left: 0; top: 0.3rem; width: 1rem; height: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314B8C8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pricing-note { text-align: center; color: var(--text-low); font-size: 0.92rem; margin-top: 2rem; }

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

.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 0.85rem; }
.faq-item { background: var(--navy-800); border: 1px solid var(--border); border-radius: 16px; transition: border-color 0.2s; }
.faq-item[open] { border-color: rgba(20, 184, 200, 0.5); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.35rem; font-weight: 700; color: #fff; font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--cyan); transition: transform 0.2s ease; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item summary:focus-visible { outline-offset: -2px; border-radius: 16px; }
.faq-answer { padding: 0 1.35rem 1.25rem; color: var(--text-mid); line-height: 1.7; font-size: 0.97rem; }
.faq-answer p + p { margin-top: 0.6rem; }

/* ---------- Final CTA ---------- */

.final-cta { position: relative; overflow: hidden; background: linear-gradient(135deg, #08152A, #102A56 60%, #0C4565); text-align: center; padding: 6rem 0; }
.final-cta .glow--cyan { width: 560px; height: 560px; top: -260px; left: 50%; margin-left: -280px; }
.final-cta .container { position: relative; z-index: 1; }
.final-cta h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; color: #fff; margin-bottom: 1rem; }
.final-cta p { color: #B8C6DD; max-width: 600px; margin: 0 auto 2.25rem; font-size: 1.05rem; line-height: 1.7; }
.final-cta .hero-actions { justify-content: center; }

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

.footer { background: var(--navy-900); border-top: 1px solid var(--border-soft); color: var(--text-mid); font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)) auto; gap: 2.5rem; padding: 4rem 0 3rem; }
.footer-brand p { margin-top: 1rem; max-width: 300px; line-height: 1.6; color: var(--text-low); }
.footer h2 { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-high); margin-bottom: 1rem; }
.footer ul { list-style: none; display: grid; gap: 0.6rem; }
.footer a { color: var(--text-mid); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-app .play-badge { margin-left: -6px; }
.footer .nav-brand { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--border-soft); padding: 1.6rem 0 2rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem;
  color: var(--text-low); font-size: 0.84rem;
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand, .footer-app { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Legal & secondary pages ---------- */

.page-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #08152A 0%, #102A56 60%, #0C4565 100%); padding: 4rem 0 3.25rem; border-bottom: 1px solid var(--border-soft); }
.page-hero .glow--cyan { width: 480px; height: 480px; top: -240px; right: -120px; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.85rem); font-weight: 800; letter-spacing: -0.02em; color: #fff; margin: 0.4rem 0 0.6rem; }
.page-hero p { color: #B8C6DD; max-width: 680px; font-size: 1.05rem; line-height: 1.7; }
.page-hero .hero-actions { margin-top: 1.8rem; }
/* Lines the heading up with the .legal text column below it */
.page-hero--narrow .container { max-width: 800px; }

.legal { max-width: 800px; margin: 0 auto; padding: 3.5rem 1.5rem 5rem; }
.legal h2 { font-size: 1.25rem; font-weight: 700; color: #fff; margin: 2.4rem 0 0.7rem; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--text-mid); font-size: 1rem; line-height: 1.75; margin-bottom: 0.8rem; }
.legal ul, .legal ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.legal li::marker { color: var(--cyan); }
.legal a { color: var(--cyan); text-underline-offset: 2px; }
.legal a:hover { color: var(--cyan-text); }
.legal .last-updated { color: var(--text-low); font-size: 0.93rem; margin-bottom: 2rem; }
.legal .panel {
  background: var(--navy-800); border: 1px solid var(--border); border-left: 4px solid var(--cyan);
  border-radius: 12px; padding: 1.2rem 1.4rem; margin: 1.4rem 0;
}
.legal .panel p:last-child { margin-bottom: 0; }
.legal .table-wrap { overflow-x: auto; margin-bottom: 1.2rem; border: 1px solid var(--border); border-radius: 12px; }
.legal table { width: 100%; border-collapse: collapse; background: var(--navy-800); }
.legal th, .legal td { text-align: left; padding: 0.75rem 0.95rem; border-bottom: 1px solid var(--border); font-size: 0.95rem; color: var(--text-mid); vertical-align: top; }
.legal tr:last-child th, .legal tr:last-child td { border-bottom: none; }
.legal th { color: var(--text-high); font-weight: 700; }
.legal td { overflow-wrap: break-word; }
.legal .kv th { width: 38%; }
/* Phones: key/value rows stack; .stack tables become one card per row, labelled from data-label */
@media (max-width: 560px) {
  .legal th, .legal td { padding-left: 0.8rem; padding-right: 0.8rem; }
  .legal .kv th, .legal .kv td { display: block; width: auto; }
  .legal .kv th { padding-bottom: 0.1rem; border-bottom: none; }
  .legal .kv td { padding-top: 0; }
  .legal .stack thead { display: none; }
  .legal .stack tr, .legal .stack td { display: block; }
  .legal .stack tr { padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
  .legal .stack tr:last-child { border-bottom: none; }
  .legal .stack td { border-bottom: none; padding-top: 0.3rem; padding-bottom: 0.3rem; }
  .legal .stack td::before {
    content: attr(data-label); display: block; margin-bottom: 0.1rem;
    color: var(--text-low); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  }
}
.legal .related { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-soft); }

/* ---------- Motion preferences ---------- */

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