/* ==========================================================================
   Aurora Edge — styles
   Layers, bottom to top:
     .backdrop      CSS gradient (also the no-WebGL fallback)
     #react-bg      WebGL2 shader canvas
     .scrim         legibility gradient between the shader and the content
     main / footer  page content
     .grain         fixed film grain
     .nav           fixed navigation
     .progress      scroll progress hairline
   ========================================================================== */

:root {
  --bg: #050505;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --text-faint: #8a8a93;
  --accent: #ff7400;
  --accent-2: #ff5a00;
  --accent-ink: #0a0704;
  --glow: rgba(255, 116, 0, 0.22);
  --radius-sm: 12px;
  --max: 1180px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.14s;
  --dur: 0.24s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

/* --------------------------------------------------------------- layers -- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 116, 0, 0.16), transparent 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(124, 58, 237, 0.12), transparent 65%),
    var(--bg);
}

#react-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
}

#react-bg[data-ready='true'] { opacity: 1; }

/* Holds the shader back where type sits, and hands the long sections below
   the fold a solid ground to sit on. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(75% 70% at 22% 46%, rgba(5, 4, 3, 0.44), rgba(5, 5, 5, 0) 72%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.12) 0%, rgba(5, 5, 5, 0.3) 48%, rgba(5, 5, 5, 0.78) 86%, #050505 100%);
}

/* A pre-rendered noise tile, not an SVG feTurbulence. The inline SVG filter
   version cost 6x the frame time in a software renderer: the page went 2.7 to
   17.3 fps just by hiding it. A tiled PNG is one static texture. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("grain.png");
  background-size: 96px 96px;
  background-repeat: repeat;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 70;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  will-change: transform;
}

main,
.footer { position: relative; z-index: 2; }

/* ----------------------------------------------------------- skip link -- */

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 90;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease);
}

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

/* ---------------------------------------------------------------- nav --- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease);
}

.nav.is-scrolled { background: rgba(5, 5, 5, 0.88); }

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 0.98rem;
}

.nav__mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--glow);
}

.nav__name em {
  font-style: normal;
  color: var(--text-faint);
  font-weight: 500;
}

.nav__pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.7rem 0.32rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ------------------------------------------------------------ utility --- */

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
  animation: dot-pulse 2.4s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin: 0 0 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}

/* Apple-style glass: a blurred, saturated backdrop under a mostly-transparent
   neutral pane, a specular sheen, a full inner rim ring and the accent pooling
   as light at the bottom edge rather than as paint. The tint is 7-16% so the
   shader reads through the material; the blur is what makes it a material and
   not just a transparent box. One 139x48 element — if the compositor ever
   misbehaves over the canvas, delete the two backdrop-filter lines below and
   the alpha layers still hold the look together. */
.btn--solid {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 150% at 20% -45%,
      rgba(255, 255, 255, 0.4),
      rgba(255, 255, 255, 0) 56%),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.2),
      rgba(255, 255, 255, 0.06) 52%,
      rgba(255, 255, 255, 0.1)),
    linear-gradient(180deg, rgba(255, 116, 0, 0.11), rgba(255, 90, 0, 0.06));
  border-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -14px 22px -16px rgba(255, 120, 0, 0.6),
    inset 0 0 26px rgba(255, 255, 255, 0.05),
    0 10px 30px -12px rgba(255, 90, 0, 0.45),
    0 2px 10px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.btn--solid:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.44);
  background:
    radial-gradient(120% 150% at 22% -40%,
      rgba(255, 255, 255, 0.42),
      rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0.05) 52%,
      rgba(255, 255, 255, 0.09)),
    linear-gradient(180deg, rgba(255, 116, 0, 0.19), rgba(255, 90, 0, 0.11));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -14px 24px -14px rgba(255, 130, 10, 0.7),
    inset 0 0 30px rgba(255, 255, 255, 0.07),
    0 16px 38px -14px rgba(255, 90, 0, 0.55),
    0 2px 12px rgba(0, 0, 0, 0.45);
}

.btn--solid:active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 3px 12px rgba(0, 0, 0, 0.35),
    inset 0 0 18px rgba(255, 120, 0, 0.2),
    0 4px 14px -8px rgba(255, 90, 0, 0.4);
}

.btn:active { transform: scale(0.985); }

/* --------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 3rem) clamp(1.25rem, 4vw, 3rem) clamp(2rem, 5vh, 3.5rem);
}

.hero__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.hero__title {
  font-size: clamp(3.4rem, 12vw, 9rem);
  line-height: 0.85;
  letter-spacing: -0.045em;
  margin: 0 0 1.6rem;
}

.mask {
  display: block;
  overflow: clip;
  padding: 0 0.04em 0.02em;
}

.line { display: block; }

.line--outline {
  color: transparent;
  -webkit-text-stroke: 2.4px rgba(255, 255, 255, 0.62);
}

.hero__tagline {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.7rem;
}

.hero__lede {
  max-width: 46ch;
  font-size: 1rem;
  color: var(--text-dim);
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__cue {
  align-self: flex-start;
  margin-top: clamp(2rem, 6vh, 3.5rem);
  display: block;
}

.hero__cue span {
  display: block;
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
  position: relative;
}

.hero__cue span::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent);
  transform: translate(-50%, 0);
  animation: cue-fall 1.9s var(--ease) infinite;
}

@keyframes cue-fall {
  0% { transform: translate(-50%, 0); opacity: 1; }
  72%, 100% { transform: translate(-50%, 32px); opacity: 0; }
}

/* Pre-animation states — only while html.intro is present. See index.html:
   the class is added by an inline script and removed by a watchdog, so these
   can never hide the page permanently. */
.intro .nav { opacity: 0; }
.intro .hero .eyebrow,
.intro .hero__tagline,
.intro .hero__lede,
.intro .hero__actions,
.intro .hero__cue { opacity: 0; }
.intro .hero__title .line { transform: translateY(105%); }

/* ------------------------------------------------------------ marquee --- */

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
  will-change: transform;
}

.marquee__row {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  padding: 0 1.1rem;
  margin: 0;
  list-style: none;
  white-space: nowrap;
}

.marquee__row li {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.marquee__row li::after {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
  flex: none;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ----------------------------------------------------- section headings -- */

.section__head {
  max-width: 620px;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.section__title {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  margin: 0 0 0.7rem;
}

.section__lede {
  font-size: 0.98rem;
  color: var(--text-dim);
}

.tools {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 4vw, 3rem);
}

/* --------------------------------------------------------------- tools -- */

.tools__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 22, 27, 0.92), rgba(11, 11, 14, 0.94));
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}

.tool:hover {
  border-color: rgba(255, 116, 0, 0.42);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 116, 0, 0.1);
}

.tool:active { transform: translateY(-1px) scale(0.997); }

.tool__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 0.55rem;
  color: var(--accent);
  background: rgba(255, 116, 0, 0.08);
  border: 1px solid rgba(255, 116, 0, 0.16);
}

.tool__icon svg { width: 21px; height: 21px; }

.tool__title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tool__desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-dim);
  flex: 1;
}

.tool__meta {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.tool__arrow {
  position: absolute;
  top: 1.45rem;
  right: 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.tool__arrow svg {
  width: 12px;
  height: 12px;
}

.tool:hover .tool__arrow,
.tool:focus-visible .tool__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* -------------------------------------------------------------- footer -- */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 3rem;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.8rem;
}

/* ---------------------------------------------------------- responsive -- */

@media (min-width: 640px) {
  .tools__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .hero { padding-top: calc(var(--nav-h) + 5rem); }
}

@media (min-width: 1024px) {
  .tools__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 719px) {
  :root { --nav-h: 56px; }
  .nav { gap: 0.8rem; }
}

/* ------------------------------------------------------- reduced motion -- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .marquee__track { animation: none; }
  .dot { animation: none; }
  .hero__cue span::after { animation: none; }

  .btn,
  .tool,
  .skip { transition-duration: 0.01ms; }
}

/* The outline line is decoration; give it a real colour where the browser
   replaces colours for contrast. */
@media (forced-colors: active) {
  .line--outline {
    color: CanvasText;
    -webkit-text-stroke: 0;
  }
}
