/* =============================================
   CSS Reset
   ============================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
html { scroll-behavior: smooth; }

/* =============================================
   Brand Tokens
   ============================================= */
:root {
  --green:          #2D6A4F;
  --green-light:    #52B788;
  --green-pale:     #D8F3DC;
  --ocean:          #1A6B8A;
  --cream:          #F5F0E8;
  --cream-dark:     #EDE7DB;
  --charcoal:       #1E2A23;
  --charcoal-mid:   #3A4A3F;
  --muted:          #7A8C80;
  --white:          #FFFFFF;

  /* legacy aliases for legal pages */
  --color-primary:   #2D6A4F;
  --color-secondary: #1A6B8A;
  --color-accent:    #E67E22;
  --color-bg:        #FFFFFF;
  --color-surface:   #F5F0E8;
  --color-text:      #1E2A23;
}

/* =============================================
   Base
   ============================================= */
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--charcoal);
  line-height: 1.6;
  background: var(--cream);
  overflow-x: hidden;
}

/* =============================================
   Utilities
   ============================================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wordmark {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  font-style: normal;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =============================================
   Navigation
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(245,240,232,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(45,106,79,0.08);
  display: flex;
  align-items: center;
  z-index: 100;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo image in nav — small square crop */
.nav-logo-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img {
  height: 36px;
  width: 36px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.nav-cta {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 0.55rem 1.3rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--charcoal);
  transform: translateY(-1px);
}

/* =============================================
   Hero — green background like your ad mockup
   ============================================= */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 7rem 5rem 4rem;
  gap: 3rem;
  background: var(--green);
  position: relative;
  overflow: hidden;
}

/* Subtle grain texture overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* Radial light bloom top-right */
.hero::after {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82,183,136,0.25) 0%, transparent 65%);
  pointer-events: none;
}

.hero-left {
  position: relative;
  z-index: 1;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.12);
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s forwards;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-light);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Headline — cream on green, matching your ad */
.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--cream);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--green-light);
}

.hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(245,240,232,0.75);
  max-width: 440px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.3s forwards;
}

/* =============================================
   Waitlist Form — on green bg
   ============================================= */
.waitlist-form {
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}

.form-row {
  display: flex;
  border-radius: 100px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  max-width: 460px;
  transition: box-shadow 0.2s;
  backdrop-filter: blur(8px);
}

.form-row:focus-within {
  box-shadow: 0 0 0 3px rgba(82,183,136,0.3);
  border-color: var(--green-light);
}

.form-row input[type="email"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.9rem 1.25rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--white);
  background: transparent;
}

.form-row input[type="email"]::placeholder { color: rgba(255,255,255,0.45); }

.form-row button {
  background: var(--cream);
  color: var(--green);
  border: none;
  padding: 0.9rem 1.4rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.form-row button:hover {
  background: var(--white);
  color: var(--charcoal);
}

/* Bottom CTA dark form */
.form-row-dark {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  max-width: 440px;
  margin: 2rem auto 0;
}

.form-row-dark input[type="email"] { color: var(--white); }
.form-row-dark input[type="email"]::placeholder { color: rgba(255,255,255,0.4); }
.form-row-dark button { background: var(--green); color: var(--white); }
.form-row-dark button:hover { background: var(--green-light); color: var(--white); }
.form-row-dark:focus-within { box-shadow: 0 0 0 3px rgba(82,183,136,0.25); }

.form-note {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: rgba(245,240,232,0.5);
  padding-left: 0.25rem;
}

.success-msg {
  display: none;
  align-items: center;
  gap: 0.5rem;
  color: var(--green-light);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.75rem;
}

.success-msg.show { display: flex; }
.success-msg-dark  { justify-content: center; color: var(--green-light); }

/* Waitlist count */
.waitlist-count {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.5s forwards;
}

.avatars { display: flex; }

.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: var(--green-light);
  margin-right: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--white);
}

.avatar.av2 { background: var(--ocean); }
.avatar.av3 { background: #40916C; }

.count-text { font-size: 0.82rem; color: rgba(245,240,232,0.6); }
.count-text strong { color: var(--cream); font-weight: 500; }

/* =============================================
   iPhone 15 Pro Mockup
   ============================================= */
.hero-right {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.8s 0.35s forwards;
}

.iphone-scene {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Soft glow beneath phone */
.phone-glow {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(82,183,136,0.35) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

/* iPhone frame */
.iphone-frame {
  position: relative;
  width: 270px;
  height: 556px;
  border-radius: 52px;
  background: linear-gradient(145deg, #4a4a4a 0%, #1a1a1a 40%, #2d2d2d 100%);
  box-shadow:
    /* outer titanium edge */ 0 0 0 1px rgba(255,255,255,0.15),
    /* inner shadow */        inset 0 0 0 1px rgba(0,0,0,0.6),
    /* depth shadow */        0 50px 100px rgba(0,0,0,0.5),
    0 20px 40px rgba(0,0,0,0.35);
  transform: rotate(3deg);
  transition: transform 0.4s ease;
}

.iphone-frame:hover {
  transform: rotate(1deg) scale(1.02);
}

/* Titanium sheen highlight */
.iphone-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 52px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.12) 0%,
    transparent 40%,
    rgba(255,255,255,0.04) 100%
  );
  pointer-events: none;
  z-index: 10;
}

/* Side buttons — left side */
.btn-silent {
  position: absolute;
  left: -3px;
  top: 100px;
  width: 3px;
  height: 32px;
  background: linear-gradient(to right, #555, #888, #555);
  border-radius: 2px 0 0 2px;
}

.btn-vol-up {
  position: absolute;
  left: -3px;
  top: 148px;
  width: 3px;
  height: 56px;
  background: linear-gradient(to right, #555, #888, #555);
  border-radius: 2px 0 0 2px;
}

.btn-vol-down {
  position: absolute;
  left: -3px;
  top: 216px;
  width: 3px;
  height: 56px;
  background: linear-gradient(to right, #555, #888, #555);
  border-radius: 2px 0 0 2px;
}

/* Power button — right side */
.btn-power {
  position: absolute;
  right: -3px;
  top: 160px;
  width: 3px;
  height: 80px;
  background: linear-gradient(to left, #555, #888, #555);
  border-radius: 0 2px 2px 0;
}

/* Screen inset */
.iphone-screen {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 44px;
  overflow: hidden;
  background: #000;
}

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 26px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}

/* The actual app screenshot */
.app-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 44px;
}

/* =============================================
   Section Shared
   ============================================= */
.section-label {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Fraunces', serif;
  text-align: center;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  max-width: 520px;
  margin: 0 auto 4rem;
  line-height: 1.6;
}

/* =============================================
   Pillars
   ============================================= */
.pillars {
  padding: 6rem 1.5rem;
  background: var(--cream);
}

.pillars-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.pillar-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 100px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  color: var(--charcoal-mid);
  transition: border-color 0.2s, color 0.2s;
  cursor: default;
}

.pillar-chip:hover {
  border-color: var(--green);
  color: var(--green);
}

/* =============================================
   Bottom CTA
   ============================================= */
.bottom-cta {
  background: var(--charcoal);
  padding: 6rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.bottom-cta::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(45,106,79,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.bottom-cta .section-title,
.bottom-cta .section-sub,
.bottom-cta .form-row,
.bottom-cta .success-msg { position: relative; z-index: 1; }

/* =============================================
   Footer
   ============================================= */
.footer {
  background: var(--charcoal);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 3rem 1.5rem;
  text-align: center;
  color: rgba(255,255,255,0.4);
}

.footer-wordmark {
  color: var(--green-light);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: block;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--green-light); }

.footer-copy {
  font-size: 0.82rem;
  margin-top: 1.5rem;
}

/* =============================================
   Legal Pages
   ============================================= */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 7rem 1.5rem 4rem;
}

.legal-page h1 {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.legal-meta {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1.5rem;
}

.legal-meta a { color: var(--green); }

.legal-page h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--charcoal);
}

.legal-page p,
.legal-page li {
  color: #374151;
  line-height: 1.8;
  font-size: 0.95rem;
}

.legal-page ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-page li { margin-bottom: 0.4rem; }

.legal-page a { color: var(--green); }

/* =============================================
   Animations
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(20px) rotate(3deg); }
  to   { opacity: 1; transform: translateX(0) rotate(3deg); }
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 7rem 2rem 4rem;
    text-align: center;
    gap: 3rem;
  }

  .hero-sub    { margin: 0 auto 2.5rem; }
  .waitlist-form { display: flex; flex-direction: column; align-items: center; }
  .form-row    { max-width: 100%; width: 100%; }
  .waitlist-count { justify-content: center; }

  .hero-right  {
    order: -1; /* show phone above text on mobile */
  }

  .iphone-frame {
    transform: rotate(0deg);
    width: 220px;
    height: 454px;
  }

  .iphone-frame:hover { transform: scale(1.02); }

  .nav { padding: 0; }
}

@media (max-width: 480px) {
  .hero { padding: 6rem 1.25rem 3rem; }
  .hero-title { font-size: 2.6rem; }
  .iphone-frame { width: 200px; height: 412px; border-radius: 42px; }
  .iphone-screen { border-radius: 34px; }
  .app-screenshot { border-radius: 34px; }
}
