/* =========================================================
   SentraEd — Coming Soon
   Minimal Luxury design system
   ========================================================= */

:root {
  --bg: #FFFFFF;
  --bg-secondary: #F8FBFF;
  --text-primary: #111111;
  --text-secondary: #6B7280;
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --shadow-soft: rgba(0, 0, 0, 0.05);
  --border-soft: rgba(17, 17, 17, 0.08);

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;

  --radius: 18px;
  --ease: 0.3s ease;

  --font-heading: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-button: "Space Grotesk", sans-serif;
}

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

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input {
  font-family: inherit;
}

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

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

/* =========================================================
   Page shell
   ========================================================= */

.page {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100svh;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: var(--space-4) clamp(24px, 5vw, 64px);
}

/* =========================================================
   Background decoration
   ========================================================= */

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
}

.glow--top {
  width: 640px;
  height: 640px;
  top: -220px;
  right: -160px;
  background: radial-gradient(circle, rgba(37,99,235,0.10) 0%, rgba(37,99,235,0) 70%);
  animation: drift 24s ease-in-out infinite;
}

.glow--bottom {
  width: 520px;
  height: 520px;
  bottom: -220px;
  left: -140px;
  background: radial-gradient(circle, rgba(37,99,235,0.07) 0%, rgba(37,99,235,0) 70%);
  animation: drift 28s ease-in-out infinite reverse;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-24px, 18px); }
}

.deco {
  position: absolute;
  color: var(--accent);
  opacity: 0.5;
}

.deco--circle-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -140px;
  fill: none;
  stroke: rgba(17,17,17,0.06);
  stroke-width: 1;
}

.deco--circle-2 {
  width: 240px;
  height: 240px;
  bottom: 60px;
  right: -60px;
  fill: none;
  stroke: rgba(37,99,235,0.14);
  stroke-width: 1;
}

.deco--grid {
  width: 150px;
  height: 150px;
  bottom: 40px;
  left: 4%;
  color: rgba(17,17,17,0.08);
  opacity: 1;
}

.deco--blueprint {
  width: 380px;
  height: 380px;
  top: 8%;
  right: 6%;
  fill: none;
  stroke: rgba(37,99,235,0.10);
  stroke-width: 1;
}

.deco--strokes {
  width: 300px;
  height: 300px;
  bottom: -30px;
  right: 22%;
  fill: none;
  stroke: rgba(17,17,17,0.06);
  stroke-width: 1.2;
  display: none;
}

/* =========================================================
   Nav
   ========================================================= */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  animation: fadeUp 0.7s ease both;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__mark {
  height: 50px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav__word {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav__status {
  font-family: var(--font-button);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-transform: uppercase;
  border: 1px solid var(--border-soft);
  padding: 8px 16px;
  border-radius: 999px;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 720px) 1fr;
  align-items: center;
  gap: var(--space-4);
  min-height: 0;
}

.hero__text {
  animation: fadeUp 0.8s ease 0.05s both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-button);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--accent);
  border: 1px solid rgba(37,99,235,0.35);
  background: var(--accent-soft);
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  margin-bottom: var(--space-4);
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.headline {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.headline__accent {
  color: var(--accent);
}

.subhead {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: var(--space-5);
  font-weight: 400;
}

.cta {
  font-family: var(--font-button);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background: var(--bg);
  border: 1px solid rgba(17,17,17,0.16);
  height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), background var(--ease), box-shadow var(--ease), transform var(--ease);
}

.cta svg {
  transition: transform var(--ease);
}

.cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 8px 24px rgba(37,99,235,0.12);
}

.cta:hover svg {
  transform: translateX(3px);
}

.cta:active {
  transform: scale(0.98);
}

/* Illustration */

.hero__art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  animation: fadeUp 0.9s ease 0.1s both;
}

.illustration {
  width: 100%;
  max-width: 520px;
  height: auto;
}

.float-slow {
  animation: floatY 7s ease-in-out infinite;
}

.float-med {
  animation: floatY 5.5s ease-in-out infinite;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.net-lines path {
  stroke-dasharray: 4 5;
  opacity: 0.7;
  animation: dashMove 10s linear infinite;
}

@keyframes dashMove {
  to { stroke-dashoffset: -180; }
}

.pulse-node {
  animation: nodePulse 2.6s ease-in-out infinite;
}

.pulse-node--d1 { animation-delay: 0.6s; }
.pulse-node--d2 { animation-delay: 1.2s; }

@keyframes nodePulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  font-size: 13px;
  color: var(--text-secondary);
  animation: fadeUp 0.7s ease 0.15s both;
}

.footer span:nth-child(2) {
  text-align: center;
  flex: 1;
}

.footer span:last-child {
  text-align: right;
}

/* =========================================================
   Modal
   ========================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(17, 17, 17, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease), visibility var(--ease);
  padding: 24px;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-5);
  box-shadow: 0 24px 60px rgba(17,17,17,0.12);
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition: transform var(--ease), opacity var(--ease);
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.modal__close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.modal__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

#waitlistForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Honeypot: hidden from real users, catches simple bots that
   auto-fill every field. Not display:none — some bots skip those. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.modal__input {
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-secondary);
  padding: 0 16px;
  font-size: 15px;
  color: var(--text-primary);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.modal__input::placeholder {
  color: #9CA3AF;
}

.modal__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
}

.modal__submit {
  height: 48px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-button);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}

.modal__submit:hover {
  background: #1d4fd1;
  box-shadow: 0 10px 24px rgba(37,99,235,0.22);
}

.modal__submit:active {
  transform: scale(0.98);
}

.modal__success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}

.modal__success svg {
  animation: popIn 0.4s ease;
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal__success p {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  color: var(--text-primary);
}

.modal.is-success .modal__body {
  display: none;
}

.modal.is-success .modal__success {
  display: flex;
}

/* =========================================================
   Motion — global fade up
   ========================================================= */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: var(--space-2);
  }

  .hero__text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

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

  .hero__art {
    display: none;
  }

  .deco--blueprint,
  .deco--circle-1 {
    opacity: 0.3;
  }
}

@media (max-width: 640px) {
  body { overflow: auto; }

  .page {
    height: auto;
    min-height: 100svh;
    padding: var(--space-3) 20px var(--space-4);
  }

  .nav__word { font-size: 17px; }
  .nav__status { font-size: 11px; padding: 6px 12px; }

  .headline { font-size: clamp(32px, 10vw, 44px); }

  .subhead { font-size: 15px; }

  .hero {
    padding: var(--space-5) 0;
  }

  .footer {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .footer span { text-align: center !important; }

  .deco--grid,
  .deco--circle-2 {
    opacity: 0.25;
  }
}

@media (max-width: 380px) {
  .badge { font-size: 12px; padding: 7px 14px 7px 10px; }
  .cta { padding: 0 20px; font-size: 14px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
