/* Brand tokens (fixed) */
:root {
  --ground: #0B0D12;
  --surface: #12151D;
  --ink: #E9EDF5;
  --mint: #2EF2B6;
  --mint-deep: #00A37A; /* white backgrounds only */

  --ink-dim: #AEB5C4;
  --ink-faint: #8A93A6;
  --line: #262C3A;
  --error: #FF8A8A;

  --font-sans: "Sora", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-arabic: "Noto Kufi Arabic", sans-serif;
}

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

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 36rem at 50% 38%, rgba(46, 242, 182, 0.07), transparent 70%),
    var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--mint); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

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

/* Decorative fan background */
.fan-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.fan-line {
  stroke: var(--ink);
  opacity: 0.1;
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: fan-draw 3.2s cubic-bezier(0.22, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--i) * 0.18s);
}
.fan-line--mid { stroke: var(--mint); opacity: 0.35; }
.fan-origin { fill: var(--mint); opacity: 0.8; }

@keyframes fan-draw { to { stroke-dashoffset: 0; } }

/* Page layout: centred column */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 20px;
}

header { display: flex; justify-content: center; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 0;
}

/* Logo lockup: Fan mark + Idraak | ادراك (brand sheet v1.0 proportions) */
.lockup { display: inline-flex; align-items: center; gap: 14px; }
.mark { width: 40px; height: 40px; flex: none; }
.mark-line { stroke: var(--ink); }
.mark-line--mid { stroke: var(--mint); }
.mark-dot { fill: var(--mint); }
.wordmark { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.divider { width: 2px; height: 34px; background: var(--mint); }
.arabic { font-family: var(--font-arabic); font-size: 28px; font-weight: 800; line-height: 1.3; }

/* Hero */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 242, 182, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(46, 242, 182, 0); }
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.subhead {
  margin: 20px 0 40px;
  max-width: 34rem;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-dim);
}

/* Waitlist form */
.waitlist { width: 100%; max-width: 30rem; }

.field {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.field:focus-within { border-color: var(--mint); }

.field input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field input[type="email"]::placeholder { color: var(--ink-faint); }
.field input[type="email"]:focus-visible { outline: none; }

button {
  flex: none;
  padding: 12px 20px;
  background: var(--mint);
  color: var(--ground);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.6; cursor: progress; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.consent { margin: 14px 0 0; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-faint); }
.status { min-height: 1.5em; margin: 10px 0 0; font-size: 0.9375rem; }
.status.ok { color: var(--mint); }
.status.err { color: var(--error); }

/* Footer */
footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--ink-faint); }
footer a:hover { color: var(--ink); }

/* Small screens */
@media (max-width: 480px) {
  .lockup { gap: 10px; }
  .mark { width: 32px; height: 32px; }
  .wordmark { font-size: 26px; }
  .divider { height: 28px; }
  .arabic { font-size: 22px; }
  .field { flex-direction: column; }
  button { width: 100%; }
  footer { justify-content: center; text-align: center; }
}

/* Respect reduced motion: show the finished fan, no movement */
@media (prefers-reduced-motion: reduce) {
  .fan-line { animation: none; stroke-dashoffset: 0; }
  .pulse { animation: none; }
  button { transition: none; }
}
