/* 
  Theme: Premium Dark Minimalist 
  Font: Inter
*/

:root {
  /* Colors */
  --bg-body: #050505;
  --bg-surface: #121212;
  --bg-surface-Highlight: #1E1E1E;

  --text-main: #EDEDED;
  --text-muted: #A1A1AA;
  --text-subtle: #52525B;

  --accent: #2DD4BF;
  /* Teal 400 */
  --accent-glow: rgba(45, 212, 191, 0.4);
  --accent-dark: #14B8A6;

  --border-subtle: #27272A;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Components */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font-family: inherit;
}

/* Layout */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Navbar */
.navbar {
  padding: var(--space-md) 0;
}

.logo {
  height: 64px;
  width: auto;
  border-radius: 14px;
}

/* Hero Section */
.hero-section {
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--space-lg) 0;
}

.hero-container {
  display: grid;
  gap: var(--space-xl);
  /* Mobile default: Stacked */
  grid-template-columns: 1fr;
}

/* Hero Content */
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  /* Left align on mobile usually looks cleaner for long text, but centering can work too. Let's stick to left for "premium" feel. */
  max-width: 540px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
  background: linear-gradient(to bottom right, #fff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subhead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  /* Reduced bottom margin to fit excerpt */
  font-weight: 400;
}

/* Book Excerpt */
.book-excerpt {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin-bottom: var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;

  font-family: 'Times New Roman', serif;
  /* Classic book feel */
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-main);
  letter-spacing: 0.01em;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  transform: translateX(0);
  transition: transform 0.3s ease;
}

.book-excerpt:hover {
  transform: translateX(5px);
}

.excerpt-icon {
  font-style: normal;
  font-size: 1.2rem;
  opacity: 0.8;
}

/* CTA Section */
.cta-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.testflight-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 1.125rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.testflight-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.testflight-btn:active {
  transform: translateY(0);
}

/* Android Waitlist */
.android-waitlist {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.android-label {
  font-size: 0.875rem;
  color: var(--text-subtle);
}

.android-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.android-btn {
  background: var(--bg-surface-Highlight);
  color: var(--text-main);
}

.android-btn:hover {
  background: var(--border-subtle);
}

@media (min-width: 640px) {
  .android-form {
    flex-direction: row;
  }

  .android-form .email-input {
    flex: 1;
    width: auto;
  }

  .android-btn {
    width: auto;
  }
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.email-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  width: 100%;
}

.email-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.1);
}

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

.submit-btn {
  background: var(--text-main);
  color: var(--bg-body);
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.submit-btn.success {
  background: var(--accent);
  color: #000;
}

/* Platform Options */
.platform-selector {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.platform-label {
  font-size: 0.875rem;
  color: var(--text-subtle);
}

.platform-options {
  display: flex;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.radio-label {
  position: relative;
  cursor: pointer;
}

.radio-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-custom {
  display: block;
  padding: 6px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.radio-label input:checked+.radio-custom {
  background: var(--bg-surface-Highlight);
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Social Proof */
.social-proof p {
  font-size: 0.875rem;
  color: var(--text-subtle);
  border-left: 2px solid var(--border-subtle);
  padding-left: var(--space-sm);
}

/* Hero Visual (Book) */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-lg) 0;
}

.book-cover {
  width: 300px;
  height: auto;
  border-radius: 4px;
  /* Books have sharp corners usually, maybe slight radius */
  box-shadow:
    -2px 0 2px #111,
    /* spine */
    5px 5px 20px rgba(0, 0, 0, 0.5);
  /* deep shadow */
  position: relative;
  z-index: 2;
  transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
  transition: transform 0.5s ease;
}

.hero-visual:hover .book-cover {
  transform: perspective(1000px) rotateY(-10deg) rotateX(2deg) translateY(-5px);
}

.book-glow {
  position: absolute;
  width: 380px;
  height: 500px;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 60%);
  filter: blur(40px);
  z-index: 1;
  opacity: 0.5;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.book-reflection {
  /* Only needed if we want a floor reflection, but keeping simple for now */
}

/* Footer */
.site-footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.site-footer p {
  font-size: 0.875rem;
  color: var(--text-subtle);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-subtle);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Responsive Breakpoints */

/* Tablet & Up */
@media (min-width: 640px) {
  .input-group {
    flex-direction: row;
  }

  .email-input {
    width: 300px;
  }

  .submit-btn {
    width: auto;
  }
}

/* Desktop */
@media (min-width: 960px) {
  .hero-container {
    grid-template-columns: 1.2fr 1fr;
    /* Text takes slightly more space */
    align-items: center;
    gap: var(--space-xl);
  }

  .hero-visual {
    padding: 0;
    justify-content: flex-end;
  }

  .book-cover {
    width: 420px;
  }
}

/* ==========================================
   Founding Members Section
   ========================================== */

.founding-section {
  padding: var(--space-xl) 0;
  background: linear-gradient(180deg, var(--bg-body) 0%, rgba(45, 212, 191, 0.03) 50%, var(--bg-body) 100%);
  text-align: center;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--space-lg);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.spots-num {
  font-weight: 700;
  color: #f87171;
}

.founding-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xs);
  background: linear-gradient(to right, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.founding-subhead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.perks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.perk-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: left;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.perk-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.3);
}

.perk-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.perk-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: var(--space-xs);
}

.perk-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.perk-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.founding-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.founding-cta p {
  font-size: 0.875rem;
  color: var(--text-subtle);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.cta-btn::after {
  content: '→';
  transition: transform 0.2s ease;
}

.cta-btn:hover::after {
  transform: translateX(4px);
}

@media (min-width: 640px) {
  .perks-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .perk-card:last-child {
    grid-column: 1 / -1;
    max-width: 400px;
    justify-self: center;
  }
}

@media (min-width: 960px) {
  .perks-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .perk-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  .perk-card {
    text-align: center;
  }

  .founding-cta {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-md);
  }
}

/* ==========================================
   Screenshot Gallery
   ========================================== */

.screenshots-section {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-subtle);
}

.section-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-lg);
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Gallery Container - Mobile: horizontal scroll */
.screenshots-gallery {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: var(--space-md) var(--space-xs);
  margin: 0 calc(-1 * var(--space-md));
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.screenshots-gallery::-webkit-scrollbar {
  display: none;
}

/* Phone Frame */
.phone-frame {
  position: relative;
  flex-shrink: 0;
  width: 280px;
  background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  scroll-snap-align: center;
  transition: transform 0.4s ease;
}

.phone-frame:hover {
  transform: perspective(800px) rotateY(-5deg) rotateX(3deg) translateY(-8px);
}

/* Phone Notch */
.phone-notch {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #000;
  border-radius: 12px;
  z-index: 10;
}

/* Phone Glow Effect */
.phone-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
  opacity: 0;
  filter: blur(30px);
  z-index: -1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.phone-frame:hover .phone-glow {
  opacity: 0.6;
}

/* Phone Screen */
.phone-screen {
  width: 100%;
  border-radius: 24px;
  display: block;
}

/* Carousel Dots - Mobile only */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-md);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

.dot:hover:not(.active) {
  background: var(--text-subtle);
}

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in:nth-child(1) { transition-delay: 0s; }
.fade-in:nth-child(2) { transition-delay: 0.15s; }
.fade-in:nth-child(3) { transition-delay: 0.3s; }

/* Tablet: Larger frames */
@media (min-width: 640px) {
  .phone-frame {
    width: 300px;
  }

  .screenshots-gallery {
    justify-content: flex-start;
  }
}

/* Desktop: Grid layout */
@media (min-width: 960px) {
  .screenshots-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    overflow-x: visible;
    margin: 0;
    padding: var(--space-md) 0;
    justify-items: center;
  }

  .phone-frame {
    width: 100%;
    max-width: 320px;
  }

  /* Middle card elevated */
  .phone-frame:nth-child(2) {
    transform: translateY(-20px);
  }

  .phone-frame:nth-child(2):hover {
    transform: perspective(800px) rotateY(-5deg) rotateX(3deg) translateY(-28px);
  }

  /* Hide dots on desktop */
  .carousel-dots {
    display: none;
  }
}