/* =============================================
   Stina — Landing Page
   ============================================= */

/*
  Fonts: Self-host for production by placing .woff2 files in /assets/
  and uncommenting the local src lines below.
  Download from: https://github.com/vercel/geist-font
*/

@font-face {
  font-family: 'Geist';
  src: url('../assets/Geist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('../assets/Geist-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #DDEBEC;
  --black: #0A0A0A;
  --lime: #D2E34E;
  --lime-hover: #C5D643;
  --error: #D64545;
  --pad: clamp(1.5rem, 4vw, 3.5rem);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--black);
  overflow-x: hidden;
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 650px;
  padding: 0 var(--pad);
  overflow: visible;
}

.hero-headline {
  position: absolute;
  top: 13vh;
  left: var(--pad);
  font-weight: 600;
  font-size: clamp(3.5rem, 9.2vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.01em;
  z-index: 2;
}

.hero-content {
  position: absolute;
  top: 60vh;
  right: var(--pad);
  width: 42%;
  transform: translateY(-80px);
  z-index: 2;
}

.dot {
  width: 52px;
  height: 52px;
  background: var(--black);
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

.hero-body {
  font-weight: 400;
  font-size: 28px;
  line-height: 1.3;
  margin-bottom: 2rem;
}

/* ===================== WAITLIST ===================== */
.waitlist-form {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.input-wrap {
  position: relative;
  flex: 0 1 65%;
}

.waitlist-input {
  width: 100%;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  padding: 1.15rem 1.7rem;
  border: 2.5px solid var(--black);
  border-radius: 50px;
  background: transparent;
  color: var(--black);
  outline: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Keyboard focus ring */
.waitlist-input:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

.waitlist-input::placeholder {
  color: transparent;
}

.waitlist-input:focus {
  background: rgba(255, 255, 255, 0.25);
}

/* Error state — applied via JS class, not inline style */
.waitlist-input.is-error {
  border-color: var(--error);
}

/* Floating label */
.input-label {
  position: absolute;
  top: 50%;
  left: 1.7rem;
  transform: translateY(-50%);
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  /* WCAG AA compliant on #DDEBEC: ratio ≥ 4.6:1 */
  color: rgba(10, 10, 10, 0.5);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

/* When focused OR has value → label drops below */
.waitlist-input:focus ~ .input-label,
.waitlist-input.has-value ~ .input-label {
  top: calc(100% + 0.6rem);
  left: 1.7rem;
  transform: translateY(0);
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(10, 10, 10, 0.55);
}

.cta-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.cta-button {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  padding: 1.15rem 2.4rem;
  background: var(--lime);
  color: var(--black);
  border: 2.5px solid var(--black);
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 0 0 var(--black);
  transition:
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.25s ease;
}

.cta-button:hover {
  transform: translate(-4px, -4px);
  box-shadow: 4px 4px 0 0 var(--black);
  background: var(--lime-hover);
}

.cta-button:active {
  transform: translate(0, 0);
  box-shadow: 0 0 0 0 var(--black);
  transition-duration: 0.05s;
}

/* Keyboard focus ring */
.cta-button:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 3px;
}

/* Success state */
.waitlist-success {
  display: none;
  align-items: center;
  gap: 0.75rem;
  font-weight: 400;
  font-size: 1.1rem;
}

.waitlist-success .check {
  width: 1.5rem;
  height: 1.5rem;
  background: var(--lime);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.waitlist-success .check svg {
  width: 0.8rem;
  height: 0.8rem;
}

/* ===================== ILLUSTRATION ===================== */
.illustration {
  position: absolute;
  top: 60vh;
  left: 38%;
  transform: translateX(-50%);
  width: clamp(180px, 20vw, 320px);
  z-index: 1;
}

.illustration img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===================== FOOTER ===================== */
footer {
  background: #FFFEF5;
  padding: 3.5rem var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}

.footer-brand {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.footer-links a {
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--black);
  text-decoration: none;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-links a:hover {
  opacity: 0.6;
}

.footer-links a:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 3px;
  border-radius: 2px;
}

.footer-links svg {
  width: 18px;
  height: 18px;
}

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

  .cta-button:hover {
    transform: none;
    box-shadow: 4px 4px 0 0 var(--black);
  }
}

/* ===================== MOBILE ===================== */
@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 100svh;
    padding: 6rem 1.5rem 4rem;
  }

  .hero-headline {
    position: relative;
    top: auto;
    left: auto;
    font-size: clamp(2.8rem, 13vw, 4.5rem);
    margin-bottom: 2.5rem;
  }

  .hero-content {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    transform: none;
  }

  .hero-body {
    font-size: clamp(1.15rem, 5vw, 1.5rem);
  }

  .input-wrap {
    flex: 1;
  }

  .illustration {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 60%;
    margin: 2rem auto 0;
    opacity: 0.35;
  }

  footer {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 2.5rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .waitlist-form {
    flex-direction: column;
    gap: 0.6rem;
  }

  .input-wrap {
    width: 100%;
  }
}
