/* Samira — pre-launch landing site. Plain CSS, no build step.
   Colors and type come from the approved design (design D):
   Literata for anything you read, Figtree for UI text, a night-sky
   background, and a single violet accent. */

:root {
  --bg-top: #1b1730;
  --bg-mid: #2a2247;
  --bg-bottom: #3a2d57;
  --ink: #f0eeeb;
  --ink-2: #dcd7e6;
  --ink-3: #e6e2ec;
  --italic-ink: #cdcac5;
  --muted-ink: #b9b3c9;
  --accent: #bba3e8;
  --accent-hover: #dccff5;
  --accent-on: #17151a;
  --star-gold: #f3d8a6;
  --input-border: #8e88a0;
  --input-bg: #1f1a31;
  --focus: #bba3e8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 60%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

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

.serif {
  font-family: "Literata", Georgia, serif;
}

/* Layout shell */

.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Header / nav */

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 20px 16px 0;
  min-height: 64px;
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent-hover);
}

/* Main content */

.site-main {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 8px;
}

.definition {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  animation: lane-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.definition-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.definition-head h1 {
  margin: 0;
  font-weight: 500;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.definition-head h1 dfn {
  font-style: normal;
}

.definition-tag {
  margin: 0;
  font-style: italic;
  font-size: 19px;
  line-height: 1;
  color: var(--italic-ink);
}

.definition ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.definition li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: baseline;
}

.definition .num {
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.definition .sense {
  font-size: 17px;
  line-height: 24px;
  color: var(--ink-3);
}

.rule {
  margin-top: 20px;
  width: 100%;
  max-width: 560px;
  height: 12px;
  display: grid;
  grid-template-columns: 1fr 11px 1fr;
  align-items: center;
  gap: 12px;
}

.rule span {
  display: block;
  height: 1px;
  background: rgba(243, 216, 166, 0.3);
}

.rule svg {
  display: block;
}

.tagline {
  margin: 18px 0 0;
  max-width: 560px;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.008em;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
  animation: lane-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s both;
}

.star-wrap {
  position: relative;
  width: 176px;
  height: 176px;
  margin-top: 6px;
  flex: none;
}

.star-glow {
  position: absolute;
  left: -57px;
  top: -57px;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(243, 216, 166, 0.26) 0%,
    rgba(243, 216, 166, 0.08) 42%,
    rgba(243, 216, 166, 0) 68%
  );
  animation: glow-breathe 6s ease-in-out infinite alternate;
}

.star-wrap img {
  position: absolute;
  inset: 0;
  width: 176px;
  height: 176px;
  object-fit: contain;
}

/* Waitlist */

.waitlist {
  position: relative;
  z-index: 1;
  margin-top: -18px;
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  animation: lane-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.24s both;
}

.waitlist-slot {
  min-height: 140px;
  display: flex;
  flex-direction: column;
}

.waitlist-form {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.waitlist-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.waitlist-field span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: var(--ink-2);
}

.waitlist-field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--ink);
  font-family: "Literata", Georgia, serif;
  font-size: 17px;
}

.waitlist-field input::placeholder {
  color: #8e88a0;
}

.waitlist-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-on);
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.waitlist-submit:hover:not(:disabled) {
  background: var(--accent-hover);
}

.waitlist-submit:disabled {
  opacity: 0.65;
  cursor: default;
}

.waitlist-status {
  margin: 0;
  height: 52px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 16px;
  font-family: "Literata", Georgia, serif;
  font-size: 17px;
}

.waitlist-status.is-success {
  background: rgba(187, 163, 232, 0.12);
  border: 1px solid rgba(187, 163, 232, 0.38);
  color: var(--ink);
}

.waitlist-status.is-error {
  background: rgba(232, 163, 163, 0.1);
  border: 1px solid rgba(232, 163, 163, 0.32);
  color: var(--ink-3);
  font-size: 15px;
  text-align: center;
}

.waitlist-status svg {
  flex: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: star-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.waitlist-hint {
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-ink);
  text-align: center;
}

/* No-JS form outcome messages: hidden by default, each shown only when
   the API's 303 redirect lands on its exact fragment (pure CSS, no JS
   needed to read a query string). The #id selector's specificity is what
   lets :target win over the .waitlist-hint base style above. */
.waitlist-fragment-target {
  display: none;
}

#email-error:target,
#try-again:target {
  display: flex;
}

/* Website honeypot: hidden from everyone but bots that fill every field */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* NICU link */

.nicu-band {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 20px 16px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.nicu-pill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 6px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 18px;
  border: 1px solid rgba(187, 163, 232, 0.34);
  background: rgba(187, 163, 232, 0.07);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink-2);
  text-align: center;
  text-decoration: none;
}

.nicu-pill .link-part {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.nicu-pill span {
  white-space: nowrap;
}

/* Footer */

.site-footer {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 18px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 7px;
  font-size: 13px;
  color: var(--muted-ink);
}

.footer-star {
  display: none;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 8px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

/* NICU page */

.nicu-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 32px 16px 24px;
}

.nicu-content {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: lane-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.nicu-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.nicu-content h1 {
  margin: 10px 0 0;
  font-size: 30px;
  line-height: 1.2;
  color: var(--ink);
}

.nicu-content > p.lede {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.nicu-card {
  border-radius: 22px;
  border: 1px solid rgba(187, 163, 232, 0.3);
  background: rgba(187, 163, 232, 0.09);
  padding: 18px;
}

.nicu-card h2 {
  margin: 0;
  font-size: 19px;
  color: var(--ink);
}

.nicu-card p {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-3);
}

.nicu-card p.muted {
  color: var(--muted-ink);
}

.nicu-section h2 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--ink);
}

.nicu-section .section-note {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-ink);
}

.nicu-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nicu-links a {
  display: block;
  border-radius: 20px;
  border: 1px solid rgba(240, 238, 235, 0.14);
  background: rgba(240, 238, 235, 0.04);
  padding: 16px;
  text-decoration: none;
}

.nicu-links a:hover {
  border-color: rgba(187, 163, 232, 0.4);
}

.nicu-links h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.nicu-links p {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted-ink);
}

.nicu-links .opens-note {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  /* Reuses --muted-ink (already verified >= 4.5:1 against both the
     darkest and lightest gradient stops, composited through this
     card's translucent background) instead of a one-off color that
     fell just short at the lighter end of the gradient. */
  color: var(--muted-ink);
}

.nicu-section p {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted-ink);
}


.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 2px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  align-self: flex-start;
}

/* Motion */

@keyframes lane-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes star-in {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes twinkle {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

@keyframes glow-breathe {
  from {
    opacity: 0.75;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Short phones: the hero above tends to push the email field just below
   the first screen (e.g. 375x667). Tighten a few gaps — not the type
   scale or star size — so it sits above the fold there. Scoped to narrow
   viewports only; the reviewed desktop and tablet layouts are untouched. */
@media (max-width: 480px) {
  .site-main {
    padding-top: 18px;
  }

  .rule {
    margin-top: 14px;
  }

  .tagline {
    margin-top: 12px;
  }

  .star-wrap {
    margin-top: 2px;
  }

  .waitlist {
    margin-top: -22px;
  }
}

/* Desktop layout, matching design D at wide viewports */

@media (min-width: 900px) {
  .site-header {
    padding: 32px 6vw 0;
    height: 96px;
  }

  .site-nav {
    gap: 4px;
  }

  .site-nav a {
    padding: 0 12px;
  }

  .site-main {
    padding: 8px 24px 0;
  }

  .definition-head h1 {
    font-size: 72px;
  }

  .definition-tag {
    font-size: 22px;
  }

  .definition li {
    grid-template-columns: 30px 1fr;
  }

  .definition .num {
    font-size: 15px;
  }

  .definition .sense {
    font-size: 20px;
    line-height: 28px;
  }

  .rule {
    max-width: 560px;
  }

  .tagline {
    max-width: 900px;
    font-size: 32px;
    letter-spacing: -0.01em;
  }

  .star-wrap {
    width: 216px;
    height: 216px;
  }

  .star-glow {
    left: -72px;
    top: -72px;
    width: 360px;
    height: 360px;
  }

  .star-wrap img {
    width: 216px;
    height: 216px;
  }

  .waitlist {
    margin-top: -30px;
  }

  .waitlist-slot {
    min-height: 78px;
  }

  .waitlist-form {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
  }

  .waitlist-field {
    flex: 1;
    min-width: 0;
  }

  .waitlist-submit {
    flex: none;
    width: auto;
    padding: 0 22px;
  }

  .waitlist-status {
    margin: 26px 0 0;
  }

  .nicu-band {
    padding: 24px 16px 16px;
  }

  .nicu-pill {
    border-radius: 999px;
  }

  .site-footer {
    height: 60px;
    padding: 0 16px;
    gap: 10px;
  }

  .nicu-content h1 {
    font-size: 34px;
  }

  .footer-star {
    display: block;
  }
}
