/* Nyrax public site — nyrax.app
   Tokens mirror the app's dark theme (src/theme/colors.ts). The site commits
   to the dark look on purpose: it matches the icon, the splash screen, and the
   product's high-contrast, zero-noise character.

   Landing layout: oversized display type left; one perspective-tilted
   CSS-drawn device right with floating glass cards (coach message, PR stat)
   beside it; official-style store buttons; three numbered feature cards.
   No images beyond the icon, no JS — `default-src 'none'` holds. */

:root {
  --bg: #0b0a12;
  --card: #17161f;
  --card-2: #201e2e;
  --fg: #f0f4ff;
  --muted: #9a97b3;
  --primary: #1d6bf3;
  --primary-soft: rgba(29, 107, 243, 0.12);
  --primary-fg: #ffffff;
  --ai: #8b6cff;
  --success: #22c55e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --radius: 16px;
  --max: 46rem;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* The tilted back phone bleeds past the viewport on purpose — clip so it
     can never widen the page. */
  overflow-x: clip;
  /* Aurora wash lives on the page background itself: gradients on the body
     canvas have no element boundary, so they can never show a clipped edge
     (a ::before with a finite inset did — its rectangle cut the glow off). */
  background:
    radial-gradient(50rem 32rem at 78% 2rem, rgba(29, 107, 243, 0.11), transparent 60%),
    radial-gradient(38rem 28rem at 4% 36rem, rgba(139, 108, 255, 0.07), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--fg);
  font-family: "Google Sans Flex", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------- header -- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  position: relative;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  border-radius: 9px;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.site-header nav a {
  color: var(--muted);
  transition: color 200ms ease;
}

.site-header nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

/* ------------------------------------------------------------------ text -- */

main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

main.prose {
  max-width: var(--max);
  padding-top: 3rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.5rem;
  scroll-margin-top: 1.5rem;
}

p {
  margin: 0.85rem 0;
}

ol,
ul {
  margin: 0.85rem 0;
  padding-left: 1.35rem;
}

li {
  margin: 0.4rem 0;
}

strong {
  font-weight: 700;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.prose p {
  color: #d7dbea;
}

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

.hero-split {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: center;
  padding: 4.5rem 0 6rem;
  min-height: 34rem;
}

/* Faint dot grid under the hero, Linear-style. The mask uses closest-side so
   the dots always fade to nothing well inside the element — by construction
   there is no boundary for them to be cut off at. */
.hero-split::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(240, 244, 255, 0.14) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(closest-side at 68% 42%, #000, transparent);
  mask-image: radial-gradient(closest-side at 68% 42%, #000, transparent);
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  margin-bottom: 1.75rem;
}

.eyebrow em {
  font-style: normal;
  color: var(--ai);
  font-weight: 800;
}

.pulse {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--success);
  margin-right: 0.45rem;
  vertical-align: 1px;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
  }
}

.hero-copy h1 {
  font-size: clamp(2.7rem, 6.2vw, 4.4rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin: 0;
}

.grad-text {
  background: linear-gradient(92deg, #4d8dff, var(--ai));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Chrome slices descenders on clip:text spans when the line-height is
     tighter than the glyphs — and it honors padding in the clip region ONLY
     for inline-block, not inline (padding on an inline span demonstrably did
     nothing here). So: inline-block + enough bottom padding to cover the
     descender, with negative margin cancelling the layout shift. The headline
     uses one span per word group ("knows your" / "history.") because an
     inline-block cannot wrap internally.  */
  display: inline-block;
  padding: 0.08em 0.02em 0.22em;
  margin: -0.08em -0.02em -0.22em;
}

.lede {
  font-size: clamp(1.08rem, 2.5vw, 1.3rem);
  color: var(--muted);
  line-height: 1.6;
  margin: 1.5rem 0 0;
  max-width: 30em;
}

/* Store buttons — Apple's dark-background guidance: white badge. */
.store-badges {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: #ffffff;
  color: #0a0f1e;
  border-radius: 13px;
  padding: 0.62rem 1.35rem 0.68rem 1.15rem;
  transition: transform 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.8);
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.9);
}

.store-btn svg {
  flex: none;
}

.store-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.store-txt small {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

.store-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 1.1rem 0 0;
}

/* ----------------------------------------------------------------- phone -- */

.hero-device {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 560px;
  padding: 0 1rem;
}

/* Spotlight behind the device stage. closest-side means the glow reaches full
   transparency before the element's own edge — it cannot be clipped. */
.hero-device::before {
  content: "";
  position: absolute;
  inset: -4rem -3rem;
  background:
    radial-gradient(closest-side at 50% 46%, rgba(29, 107, 243, 0.22), transparent),
    radial-gradient(closest-side at 55% 60%, rgba(139, 108, 255, 0.1), transparent);
  z-index: 0;
  pointer-events: none;
}

/* Minimal near-black frame — the device recedes, the screen is the subject. */
.phone {
  position: relative;
  width: 306px;
  border-radius: 54px;
  background: #14131b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 9px;
  flex: none;
}

/* Side buttons. */
.phone::before,
.phone::after {
  content: "";
  position: absolute;
  width: 3px;
  border-radius: 3px;
  background: #34333f;
}

.phone::before {
  right: -4px;
  top: 132px;
  height: 64px;
}

.phone::after {
  left: -4px;
  top: 108px;
  height: 90px;
}

.phone-front {
  z-index: 2;
  transform: perspective(1400px) rotateY(-10deg) rotateX(2deg);
  box-shadow:
    0 60px 100px -30px rgba(0, 0, 0, 0.85),
    0 0 90px -34px rgba(29, 107, 243, 0.4);
  animation: phone-float 9s ease-in-out infinite;
}

@keyframes phone-float {
  0%,
  100% {
    transform: perspective(1400px) rotateY(-10deg) rotateX(2deg) translateY(0);
  }
  50% {
    transform: perspective(1400px) rotateY(-10deg) rotateX(2deg) translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-front,
  .float-card,
  .pulse {
    animation: none;
  }
  .features li:hover {
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

.screen {
  position: relative;
  background: var(--bg);
  border-radius: 45px;
  /* The thick border is the bezel; the metal rim is the .phone gradient
     showing through its 3px padding. */
  border: 8px solid #08070d;
  padding: 0.7rem 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 520px;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow: hidden;
}

/* Diagonal glass glare across the top of the display. */
.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.015) 26%, transparent 42%);
  pointer-events: none;
  z-index: 3;
}

/* Home indicator. */
.screen::after {
  content: "";
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 4px;
  border-radius: 999px;
  background: rgba(240, 244, 255, 0.28);
}

/* Floating glass cards around the device — the depth device (notifications /
   stats hovering beside the phone) without a second phone. */
.float-card {
  position: absolute;
  z-index: 3;
  background: rgba(23, 22, 31, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 0.95rem 1.05rem;
  box-shadow: 0 28px 55px -22px rgba(0, 0, 0, 0.75);
}

.float-chat {
  left: -1.25rem;
  bottom: 6rem;
  width: 15.5rem;
  animation: card-float 10s ease-in-out infinite;
}

.float-stat {
  right: -0.5rem;
  top: 4rem;
  width: 10.5rem;
  animation: card-float 8s ease-in-out 1.2s infinite;
}

@keyframes card-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

.fc-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.32rem;
}

.fc-kicker-ai {
  color: var(--ai);
}

.fc-msg {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #d7dbea;
}

.fc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.6rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--success);
  border-radius: 999px;
  padding: 0.24rem 0.62rem;
  font-size: 0.66rem;
  font-weight: 700;
}

.fc-big {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--success);
  font-variant-numeric: tabular-nums;
}

.fc-sub {
  margin: 0.1rem 0 0;
  font-size: 0.7rem;
  color: var(--muted);
}

/* Status bar — time left, pill island center, signal/battery right. */
.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.15rem 0.5rem 0;
  color: var(--fg);
}

.st-time {
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  width: 3.2rem;
}

.st-island {
  width: 72px;
  height: 20px;
  border-radius: 999px;
  background: #08070d;
  border: 1px solid var(--border);
}

.st-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  width: 3.2rem;
  justify-content: flex-end;
}

/* Week strip — today highlighted, like the app's week pills. */
.daystrip {
  display: flex;
  justify-content: space-between;
  gap: 0.15rem;
  padding: 0.35rem 0.1rem 0;
}

.day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06rem;
  padding: 0.32rem 0;
  border-radius: 10px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #d7dbea;
  font-variant-numeric: tabular-nums;
}

.day small {
  font-size: 0.54rem;
  font-weight: 500;
  color: var(--muted);
}

.day-on {
  background: var(--primary);
  color: var(--primary-fg);
}

.day-on small {
  color: rgba(255, 255, 255, 0.75);
}


.scr-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.75rem 0.8rem;
}

.scr-card-accent {
  border-color: rgba(29, 107, 243, 0.35);
  background: linear-gradient(165deg, rgba(29, 107, 243, 0.16), var(--card) 60%);
}

.scr-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.scr-kicker-ai {
  color: var(--ai);
}

.scr-big {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.scr-meta {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.66rem;
}

.scr-line {
  margin: 0;
  color: #c9cde0;
  font-size: 0.7rem;
}

.scr-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
  background: var(--primary);
  color: var(--primary-fg);
  border-radius: 11px;
  padding: 0.52rem 0;
  font-weight: 700;
  font-size: 0.74rem;
}

/* Quick-action rows */
.qa-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 0.55rem 0.75rem;
  font-size: 0.7rem;
}

.qa-label {
  color: var(--muted);
}

.qa-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.qa-up {
  color: var(--success);
}

/* Tab bar — active Home pill plus muted icons, like the app's dock. */
.scr-tabbar {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #101728;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.42rem 0.55rem;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.64rem;
  font-weight: 700;
  color: #93a0b8;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
}

.tab-on {
  background: var(--primary);
  color: var(--primary-fg);
}

.tab-ic {
  color: #93a0b8;
  margin: 0 0.55rem;
}

/* --------------------------------------------------------------- feature -- */

.features-sec {
  padding: 1.5rem 0 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  position: relative;
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2rem 1.9rem;
  overflow: hidden;
  transition: border-color 200ms ease, transform 200ms ease;
}

/* Gradient hairline along the card's top edge — lights up on hover. */
.features li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(29, 107, 243, 0.55), rgba(139, 108, 255, 0.45), transparent);
  opacity: 0.45;
  transition: opacity 200ms ease;
}

.features li:hover {
  border-color: rgba(29, 107, 243, 0.4);
  transform: translateY(-3px);
}

.features li:hover::before {
  opacity: 1;
}

.feat-num {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ai);
  margin-bottom: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.features h3 {
  margin: 0 0 0.6rem;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.features p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* ---------------------------------------------------------------- notice -- */

.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
  margin-top: 4.5rem;
}

.notice {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
}

.notice h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

footer {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.footer-note {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: var(--max);
}

/* Long tables/code must scroll inside themselves, never the page. */
main :is(table, pre) {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

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

@media (max-width: 1100px) {
  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2.5rem 0 4rem;
    gap: 3.5rem;
    min-height: 0;
  }

  .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .store-badges {
    justify-content: center;
  }

  .hero-device {
    order: -1;
    min-height: 0;
  }

  /* Just the phone on small screens — the floating cards need side room
     that a phone-width viewport does not have. */
  .float-card {
    display: none;
  }

  .phone-front {
    width: 280px;
    transform: none;
    animation: none;
  }
}
