/* ============================================
   AQUADRIVE — CSS Color Variables
   ============================================ */

:root {
  --color-blue-50:   #EDEEF5;
  --color-blue-200:  #C4C7DF;
  --color-blue-400:  #8C92BE;
  --color-blue-500:  #656EA4;
  --color-blue-600:  #4E5688;
  --color-blue-800:  #313666;

  --color-warm-50:   #F4EDED;
  --color-warm-100:  #E8DEDE;
  --color-warm-200:  #E0D5D5;
  --color-warm-500:  #9A8E8E;
  --color-warm-800:  #3D3240;
  --color-warm-850:  #352C43;
  --color-warm-900:  #261F34;
  --color-warm-950:  #1C1828;

  --color-error:      #E66260;
  --color-success:    #52B788;
}

[data-theme="dark"] {
  --background:          #1C1828;
  --surface:             #261F34;
  --border:              #352C43;
  --text-primary:        #F4EDED;
  --text-secondary:      #9A8E9E;
  --interactive-primary: #8C92BE;
  --interactive-hover:   #C4C7DF;
  --interactive-subtle:  #313666;
  --interactive-text:    #1C1828;
}

[data-theme="light"] {
  --background:          #F4EDED;
  --surface:             #FFFFFF;
  --border:              #E0D5D5;
  --text-primary:        #1C1828;
  --text-secondary:      #9A8E8E;
  --interactive-primary: #656EA4;
  --interactive-hover:   #4E5688;
  --interactive-subtle:  #EDEEF5;
  --interactive-text:    #F4EDED;
}

/* ============================================
   BASE
   ============================================ */

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

[hidden] { display: none !important; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  min-height: 100dvh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ============================================
   BACKGROUND GLOW
   ============================================ */

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--top {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(140, 146, 190, 0.15) 0%, transparent 70%);
}

.bg-glow--bottom {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(101, 110, 164, 0.1) 0%, transparent 70%);
}

/* ============================================
   LAYOUT
   ============================================ */

.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */

.header {
  display: flex;
  align-items: center;
  padding: 28px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  color: var(--interactive-primary);
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 48px 0 80px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--interactive-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--interactive-primary);
  width: fit-content;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--interactive-primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-title--accent {
  color: var(--interactive-primary);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
}

/* ============================================
   FEATURES
   ============================================ */

.features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--interactive-subtle);
  color: var(--interactive-primary);
  flex-shrink: 0;
}

/* ============================================
   SIGNUP
   ============================================ */

.signup-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.signup-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.input-wrapper {
  display: flex;
  gap: 8px;
  width: 100%;
}

.email-input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.email-input::placeholder {
  color: var(--text-secondary);
}

.email-input:focus {
  border-color: var(--interactive-primary);
  box-shadow: 0 0 0 3px rgba(140, 146, 190, 0.15);
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--interactive-primary);
  color: var(--interactive-text);
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
}

.submit-btn:hover:not(:disabled) {
  background: var(--interactive-hover);
}

.submit-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submit-btn-arrow {
  flex-shrink: 0;
}

.form-error {
  font-size: 0.825rem;
  color: var(--color-error);
  min-height: 1.2em;
}

.privacy-note {
  font-size: 0.775rem;
  color: var(--text-secondary);
}

/* ============================================
   SUCCESS STATE
   ============================================ */

.success-state {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(82, 183, 136, 0.08);
  border: 1px solid rgba(82, 183, 136, 0.25);
  border-radius: 12px;
}

.success-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(82, 183, 136, 0.15);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.success-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-success);
}

.success-subtitle {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.unsub-link {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.unsub-link:hover {
  color: var(--text-primary);
}

/* ============================================
   PHONE MOCKUP
   ============================================ */

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  width: 240px;
  height: 440px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 40px;
  padding: 16px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  position: relative;
  transform: perspective(800px) rotateY(-8deg) rotateX(2deg);
  transition: transform 0.4s ease;
}

.phone-mockup:hover {
  transform: perspective(800px) rotateY(-4deg) rotateX(1deg) translateY(-4px);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--background);
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.phone-bar {
  width: 60px;
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  margin: 0 auto 4px;
}

.phone-map {
  flex: 1;
  background: var(--surface);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.map-lines {
  position: absolute;
  inset: 0;
}

.map-line {
  position: absolute;
  background: var(--border);
}

.map-line--h  { width: 100%; height: 1px; top: 35%; }
.map-line--h2 { width: 100%; height: 1px; top: 65%; }
.map-line--v  { height: 100%; width: 1px; left: 40%; }
.map-line--v2 { height: 100%; width: 1px; left: 70%; }

.map-pin {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid var(--background);
}

.map-pin--1 {
  background: var(--interactive-primary);
  top: 28%;
  left: 35%;
  box-shadow: 0 2px 8px rgba(140, 146, 190, 0.5);
  animation: pin-bounce 2s ease-in-out infinite;
}

.map-pin--2 {
  background: var(--color-success);
  top: 48%;
  left: 62%;
  box-shadow: 0 2px 8px rgba(82, 183, 136, 0.4);
}

.map-pin--3 {
  background: var(--color-warm-500);
  top: 60%;
  left: 30%;
}

@keyframes pin-bounce {
  0%, 100% { transform: rotate(-45deg) translateY(0); }
  50%       { transform: rotate(-45deg) translateY(-3px); }
}

.phone-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
}

.phone-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--interactive-primary);
  flex-shrink: 0;
}

.phone-card-title {
  height: 8px;
  width: 80px;
  background: var(--border);
  border-radius: 4px;
}

.phone-card-row {
  height: 6px;
  background: var(--border);
  border-radius: 4px;
  opacity: 0.6;
}

.phone-card-row--short {
  width: 60%;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .page-wrapper {
    position: relative;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 0 64px;
  }

  .hero-content {
    gap: 24px;
  }

  .hero-visual {
    position: absolute;
    top: 18px;
    right: 24px;
    z-index: 2;
  }

  .phone-mockup {
    width: 56px;
    height: 100px;
    border-radius: 14px;
    padding: 4px;
    transform: none;
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.25),
      0 0 0 1px rgba(255, 255, 255, 0.04);
  }

  .phone-mockup:hover {
    transform: none;
  }

  .phone-screen {
    border-radius: 10px;
    padding: 3px;
    gap: 3px;
  }

  .phone-bar {
    width: 20px;
    height: 2px;
    margin-bottom: 1px;
  }

  .phone-map {
    border-radius: 6px;
  }

  .map-pin {
    width: 5px;
    height: 5px;
  }

  .phone-card {
    border-radius: 4px;
    padding: 3px 4px;
    gap: 2px;
  }

  .phone-card-dot {
    width: 3px;
    height: 3px;
  }

  .phone-card-title {
    height: 3px;
    width: 28px;
  }

  .phone-card-row {
    height: 2px;
  }

  .signup-section {
    order: -1;
  }

  .input-wrapper {
    flex-direction: column;
  }

  .submit-btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .page-wrapper {
    padding: 0 16px;
  }

  .hero-visual {
    right: 16px;
  }

  .hero-title {
    font-size: 2rem;
  }
}
