/* Inter, served from our own domain rather than Google Fonts: one request
   instead of a DNS round trip plus two, and no visitor data leaving the site.
   The latin subset only, carrying the whole 400 to 900 weight axis in a single
   variable file. Anything outside the range below (Arabic in particular) falls
   back to the system stack, exactly as it did before. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/inter-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg-primary: #050508;
  --bg-secondary: #0a0a0f;
  --bg-card: #0f0f14;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --accent-primary: #00d4ff;
  --accent-secondary: #00ffaa;
  --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #00ffaa 100%);
  --border-color: rgba(255, 255, 255, 0.08);
  --color-error: #ff6b6b;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container-max: 1200px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  /* 70px header row + its 1px bottom border. Anchor offsets and the mobile
     nav sheet both measure off this, so the header can only be resized here. */
  --header-h: 71px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --lift: -3px;
  /* The page is dark, so tell the UA that. Windows Chromium renders the select
     popup from the page's colour scheme rather than the control's, which is
     how a dark control ended up with a white-on-white dropdown. This also
     darkens scrollbars and the rest of the UA-painted furniture. */
  color-scheme: dark;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Keeps every anchor target, focus jump and find-in-page hit clear of the
     fixed header. scroll-padding on the scrollport, not scroll-margin on the
     targets: the two would stack and double the offset. */
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

/* Smooth scrolling is opted into, not out of. The reduce block at the end of
   the file stays as a backstop for anything that slips past this. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-primary);
  background: var(--bg-primary);
  font-family: var(--font-family);
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
}

h1,
h2,
h3 {
  color: var(--text-primary);
  font-weight: 700;
}

p {
  color: var(--text-secondary);
}

/* Arabic runs (UDAR / يُدار): system fonts only, no download.
   letter-spacing reset because negative tracking breaks cursive joins. */
[lang="ar"] {
  font-family: 'Noto Naskh Arabic', 'Geeza Pro', 'Traditional Arabic', serif;
  letter-spacing: normal;
}

.container {
  position: relative;
  z-index: 1;
  width: min(100% - 3rem, var(--container-max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.75rem 1rem;
  color: #000;
  background: var(--accent-gradient);
  border-radius: 8px;
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 0.2s var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* The landmark is focusable only so the skip link can land on it. It is not
   an interactive control, so it draws no ring; the skip link keeps its own. */
.landing-main:focus {
  outline: none;
}

.bg-gradient-animated,
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-gradient-animated {
  background:
    radial-gradient(ellipse 75% 45% at 50% -15%, rgba(0, 212, 255, 0.13), transparent),
    radial-gradient(ellipse 50% 35% at 95% 60%, rgba(0, 255, 170, 0.06), transparent);
}

.bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 60px 60px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.125em;
}

.header {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(5, 5, 8, 0.92);
  border-bottom: 1px solid var(--border-color);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo-enhanced {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 900;
}

.logo-enhanced:hover {
  color: var(--text-primary);
}

.logo-icon {
  display: inline-flex;
  color: var(--accent-primary);
  font-size: 1.4rem;
}

.logo-icon .icon {
  fill: url(#mgGrad);
  stroke: none;
}

/* Both marks turn, header and footer alike. They stay in step by
   construction rather than by synchronisation: same keyframes, same duration,
   and both start when the document's styles resolve, so nothing can drift
   them apart. Four-point symmetry means the silhouette repeats every 8s while
   the gradient keeps drifting for the full 32s. Reuses @keyframes spin. */
@media (prefers-reduced-motion: no-preference) {
  .logo-icon .icon {
    transform-origin: 50% 50%;
    animation: spin 32s linear infinite;
  }
}

.logo-text {
  color: var(--text-primary);
}

.logo-ai {
  margin-left: 0.05rem;
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav {
  display: none;
}

.nav a {
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text-primary);
}

.nav-buttons {
  display: flex;
  align-items: center;
}

.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.75rem;
  color: #000;
  background: var(--accent-gradient);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: box-shadow var(--transition-fast), filter var(--transition-fast), transform var(--transition-fast);
}

.btn:hover,
.btn:focus-visible {
  color: #000;
  filter: brightness(1.06);
  box-shadow: 0 8px 28px rgba(0, 212, 255, 0.25);
}

.btn-lg {
  min-height: 54px;
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Quiet companion to .btn. Used where two actions sit together and only
   one of them should carry the gradient. */
.btn-ghost {
  color: var(--text-primary);
  background: none;
  border: 1px solid var(--border-color);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  filter: none;
  box-shadow: none;
}

.btn-full {
  width: 100%;
}

.landing-main {
  position: relative;
  z-index: 1;
}

/* No scroll-margin here: html carries scroll-padding-top instead, and the
   two properties would add up into a double offset. */
.landing-main section {
  position: relative;
}

.landing-hero {
  padding: clamp(9rem, 15vw, 12rem) 0 clamp(5rem, 10vw, 8rem);
  border-bottom: 1px solid var(--border-color);
}

.hero-panel {
  max-width: 980px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 1.25rem;
  color: var(--accent-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.landing-hero h1 {
  max-width: 14ch;
  margin-bottom: 1.75rem;
  font-size: clamp(3rem, 7.2vw, 6.3rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.hero-lead {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.25rem;
}

/* Inner-page hero: same construction as the landing hero, one step down in
   scale so a section page never out-shouts the home page. Declared after
   .landing-hero h1 because both selectors carry the same specificity. */
.page-hero {
  padding: clamp(8rem, 13vw, 10.5rem) 0 clamp(4rem, 8vw, 6rem);
}

.page-hero h1 {
  max-width: 20ch;
  font-size: clamp(2.5rem, 5.5vw, 4.6rem);
}

.platform-section,
.how-section,
.landing-cta {
  padding-block: clamp(4.5rem, 9vw, 7rem);
}

.platform-section {
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  border-bottom: 1px solid var(--border-color);
}

.section-intro {
  max-width: 760px;
  margin: 0 0 clamp(3rem, 6vw, 4.5rem);
}

.section-intro-compact {
  max-width: 620px;
}

.section-intro h2,
.landing-cta h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.25rem, 4.8vw, 4.2rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
  text-wrap: balance;
}

.section-intro > h2 + p,
.landing-cta .cta-content > p:last-child {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.75;
}

.section-status {
  margin: 0.9rem 0 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.platform-grid,
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-color);
  list-style: none;
}

.platform-point,
.how-step {
  min-width: 0;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-inline-end: 1px solid var(--border-color);
}

.platform-point:first-child,
.how-step:first-child {
  padding-inline-start: 0;
}

.platform-point:last-child,
.how-step:last-child {
  padding-inline-end: 0;
  border-inline-end: 0;
}

.platform-index,
.step-index {
  display: block;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  color: var(--accent-primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.platform-point h3,
.how-step h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.platform-point p,
.how-step p {
  max-width: 34ch;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Section-level call to action, sitting under a platform grid. */
.section-cta {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  text-align: center;
}

.how-section {
  border-bottom: 1px solid var(--border-color);
}

.landing-cta .cta-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, rgba(0, 212, 255, 0.5), rgba(0, 255, 170, 0.2)) border-box;
  border: 1px solid transparent;
  border-radius: 24px;
}

.landing-cta .cta-content {
  max-width: 720px;
}

.landing-cta .cta-container > .btn {
  flex: none;
}

.footer {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.landing-footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  padding-bottom: 2.5rem;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand p {
  margin: 1rem 0 0;
  color: var(--text-secondary);
}

.landing-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  /* Row gap moves onto the links as padding so each one is a 44px target.
     The visual spacing between rows is unchanged. */
  gap: 0 1.5rem;
}

.landing-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.landing-footer-links a:hover,
.landing-footer-links a:focus-visible {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.footer-platforms {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.footer-heading {
  margin: 0 0 0.35rem;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-platforms a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

/* The Arabic fallback serif has a smaller apparent size than Inter, which
   is legible at heading size but not at 0.9rem. */
.footer-platforms [lang="ar"] {
  font-size: 1.15em;
}

.footer-platforms a:hover,
.footer-platforms a:focus-visible {
  color: var(--text-primary);
}

/* ==========================================================================
   Inner pages (about / pricing / contact / 404)

   Same vocabulary as the landing sections above: one bordered surface
   (.panel), one accent surface (.panel-accent, the .cta-container border
   trick), and grids that collapse at the existing breakpoints. Nothing here
   is used by index.html.
   ========================================================================== */

.page-section {
  padding-block: clamp(4.5rem, 9vw, 7rem);
}

.page-section-alt {
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  border-bottom: 1px solid var(--border-color);
}

.page-section-divided {
  border-bottom: 1px solid var(--border-color);
}

.panel {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
}

.panel-accent {
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, rgba(0, 212, 255, 0.5), rgba(0, 255, 170, 0.2)) border-box;
  border-color: transparent;
}

.panel h2,
.panel h3 {
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.panel p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- About ---------------------------------------------------------- */

.mission-panel {
  max-width: 860px;
}

.mission-panel h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.mission-panel p + p {
  margin-top: 1rem;
}

.mission-meta {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.value-card h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}

.value-card p {
  margin: 0;
  max-width: 52ch;
}

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

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.plan-flag {
  margin: 0 0 0.9rem;
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.plan-card h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.plan-tagline {
  margin: 0;
  font-size: 0.92rem;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 1.5rem 0 0.75rem;
}

.plan-amount {
  color: var(--text-primary);
  font-size: clamp(2.4rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}

.plan-term {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.plan-cap {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
}

.plan-note {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.plan-features {
  margin: 1.75rem 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  list-style: none;
}

.plan-features li {
  position: relative;
  padding-inline-start: 1.35rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Marker drawn in CSS so no dingbat character sits in the markup. */
.plan-features li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.7em;
  width: 0.55rem;
  height: 2px;
  background: var(--accent-primary);
}

.plan-card .btn {
  margin-top: auto;
}

.usage-explainer {
  max-width: 760px;
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.usage-explainer h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

.usage-explainer p {
  max-width: 62ch;
  margin: 0;
}

.usage-example {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Sits under the worked example, sharing its separator rather than drawing a
   second one. Scoped to the panel so it outranks `.usage-explainer p`, which
   zeroes the margin. */
.usage-explainer .usage-credit {
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

/* --- FAQ (native disclosure: works with JS off) --------------------- */

.faq-list {
  max-width: 800px;
  border-top: 1px solid var(--border-color);
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 44px;
  padding: 1.15rem 0;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-inline-end: 0.35rem;
  border-right: 2px solid var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
  transform: rotate(45deg) translate(-0.12rem, -0.12rem);
  transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
  transform: rotate(225deg) translate(-0.12rem, -0.12rem);
}

.faq-item summary:hover {
  color: var(--accent-primary);
}

.faq-item p {
  max-width: 66ch;
  margin: 0;
  padding: 0 0 1.35rem;
  line-height: 1.75;
}

/* --- Contact -------------------------------------------------------- */

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.option-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.option-card h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}

.option-card p {
  margin: 0 0 1.75rem;
}

.option-card .btn {
  margin-top: auto;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 2rem;
}

.contact-sidebar {
  display: grid;
  gap: 1.25rem;
}

.info-card {
  padding: 1.5rem;
  border-radius: 16px;
}

.info-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.info-card p {
  margin: 0;
  font-size: 0.9rem;
}

/* --- Form ----------------------------------------------------------- */

.form-panel h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

.form-intro {
  margin: 0.5rem 0 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
  margin-bottom: 1.35rem;
}

.form-field {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}

/* The row owns the spacing between its two fields. */
.form-row .form-field {
  margin-bottom: 0;
}

.form-label {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
}

.form-required {
  color: var(--accent-primary);
}

.form-input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font: inherit;
  font-size: 0.95rem;
  /* Redundant against the :root declaration, kept so the control stays dark
     even if the page scheme is ever narrowed again. */
  color-scheme: dark;
  transition: border-color var(--transition-fast);
}

/* Belt and braces for the popup: the root colour scheme is what actually
   fixes Windows Chromium, but painting the options explicitly means any UA
   that honours neither still gets readable text. */
.form-input option {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.form-input:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.form-input:focus {
  border-color: var(--accent-primary);
}

/* Pointer focus gets the accent border alone; keyboard focus keeps the
   site-wide ring, which this rule must not out-specify. */
.form-input:focus:not(:focus-visible) {
  outline: none;
}

.form-input::placeholder {
  color: rgba(160, 160, 176, 0.6);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.form-captcha {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-captcha .form-input {
  width: 7rem;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* A link sitting inside running text cannot rely on colour alone to be
   recognisable as a link. */
.form-consent a,
.panel p a,
.faq-item p a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.form-consent input[type="checkbox"] {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--accent-primary);
  color-scheme: dark;
}

.form-message {
  margin-bottom: 1.75rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.form-message h2 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.form-message p {
  margin: 0;
  font-size: 0.95rem;
}

.form-message-success {
  border-color: rgba(0, 255, 170, 0.35);
  background: rgba(0, 255, 170, 0.06);
}

.form-message-error {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.06);
}

.btn-loading {
  align-items: center;
  gap: 0.6rem;
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Legal pages (privacy-policy, terms-conditions). Long-form reference text:
   a measure you can read, headings you can scan, and no motion. */

.legal-content {
  max-width: 76ch;
}

.legal-intro {
  margin: 0 0 clamp(2.5rem, 5vw, 3.5rem);
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.75;
  text-wrap: pretty;
}

.legal-section {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.legal-section h2 {
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-color);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.legal-section h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.legal-section p,
.legal-section li {
  color: var(--text-secondary);
  line-height: 1.75;
  text-wrap: pretty;
}

.legal-section p {
  margin: 0 0 1rem;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 1.25rem;
  padding-inline-start: 1.35rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-section a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.legal-highlight {
  margin: 1.5rem 0;
  padding: 1.15rem 1.35rem;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-inline-start: 2px solid var(--accent-primary);
  border-radius: 12px;
}

.legal-highlight :last-child {
  margin-bottom: 0;
}

/* Carries .panel in the markup; this adds the offset and drops the ruled
   heading, which reads as a double border inside a card. */
.legal-contact {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.legal-contact h2 {
  margin-bottom: 0.75rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.last-updated {
  margin: 2rem 0 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Micro-interactions. Transform, border and colour only, and only on things
   that do something: nav, buttons, and the cards that carry a call to
   action. Reading surfaces stay still. */

.nav a[aria-current="page"] {
  color: var(--text-primary);
}

/* Marks the current page in the desktop nav. Suppressed in the mobile
   sheet, where a full-width bar under a 44px row reads as a divider. */
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 1rem;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
}

/* Fast in, eased out: the release rides .btn's own transition. */
.btn:active {
  transform: translateY(1px);
  transition-duration: 0.05s;
}

.plan-card,
.option-card {
  transition: transform 0.25s var(--ease-out), border-color var(--transition-fast);
}

@media (hover: hover) {
  .plan-card:hover,
  .option-card:hover {
    transform: translateY(var(--lift));
  }

  /* .panel-accent paints its border with a gradient background, so setting
     border-color on it would flatten the effect. */
  .plan-card:not(.panel-accent):hover,
  .option-card:not(.panel-accent):hover {
    border-color: rgba(255, 255, 255, 0.16);
  }
}

/* Scroll reveal: armed only when JS runs (html.js) and motion is allowed.
   No JS, no IntersectionObserver, reduced motion, or print -> content
   simply shows. Do not reorder: the transition shorthand resets
   transition-delay, so the delay must be declared after it. */
@media screen and (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
    transition-delay: var(--reveal-delay, 0s);
  }

  html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 960px) {
  .header-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
  }

  .nav {
    display: flex;
    gap: 1.5rem;
    justify-self: end;
  }

  /* Pads a 23px text link out to a 44px target. The header row is a fixed
     70px with centred items, so this changes nothing visually. */
  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .nav-buttons {
    display: none;
  }
}

@media (max-width: 959.98px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.5rem 1.5rem;
    background: rgba(10, 10, 15, 0.98);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: transform var(--transition-normal), opacity var(--transition-fast), visibility var(--transition-fast);
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 0.25rem;
  }

  .nav a[aria-current="page"]::after {
    content: none;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .platform-grid,
  .how-grid {
    grid-template-columns: 1fr;
  }

  .platform-point,
  .how-step,
  .platform-point:first-child,
  .how-step:first-child,
  .platform-point:last-child,
  .how-step:last-child {
    padding: 2rem 0;
    border-inline-end: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .platform-point:last-child,
  .how-step:last-child {
    border-bottom: 0;
  }

  .platform-index,
  .step-index {
    margin-bottom: 1.5rem;
  }

  .platform-point p,
  .how-step p {
    max-width: 56ch;
  }

  .landing-cta .cta-container {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-footer-main {
    flex-direction: column;
  }

  .landing-footer-links {
    justify-content: flex-start;
  }

  .value-grid,
  .option-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 2rem, var(--container-max));
  }

  .landing-hero {
    padding: 7.5rem 0 4.5rem;
  }

  .landing-hero h1 {
    font-size: clamp(2.65rem, 13vw, 3.45rem);
  }

  .page-hero h1 {
    font-size: clamp(2.25rem, 10.5vw, 2.9rem);
  }

  .hero-actions,
  .hero-actions .btn,
  .landing-cta .cta-container > .btn {
    width: 100%;
  }

  .platform-section,
  .how-section,
  .landing-cta,
  .page-section {
    padding-block: 4rem;
  }

  .landing-cta .cta-container {
    padding: 2rem 1.5rem;
  }

  .panel {
    padding: 1.5rem 1.25rem;
  }

  .info-card {
    padding: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
  }
}
