/* ========================================
   The Formula - Marketing Site Styles
   ======================================== */

/* ========================================
   CSS Variables (Brand Colors)
   ======================================== */
:root {
  /* Primary (Brand Red) */
  --primary-25: #FFFBFB;
  --primary-50: #FFF7F6;
  --primary-100: #FEEDEC;
  --primary-150: #FCD8D5;
  --primary-200: #F9C2BD;
  --primary-300: #F2ACA6;
  --primary-400: #DB8178;
  --primary-500: #C75757;
  --primary-600: #A94A4A;
  --primary-700: #8A3D3D;
  --primary-800: #6D3131;
  --primary-900: #542626;
  --primary-950: #2B1414;

  /* Warm Neutrals (Sand) */
  --sand-50: #FAF7F4;
  --sand-100: #F3EDE7;
  --sand-200: #E8DDD4;
  --sand-300: #D6C5B9;
  --sand-400: #B8A294;
  --sand-500: #8B7568;
  --sand-900: #2B2320;

  /* Slate Neutrals */
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  /* Secondary Accents */
  --sage-50: #F3F6EF;
  --sage-100: #E4EBDD;
  --sage-500: #A8BF95;
  --sage-700: #5A6842;
  --teal-50: #EFF6F7;
  --teal-100: #DCECEF;
  --teal-500: #5D9DAB;
  --teal-700: #2F6C79;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-2xl: 64px;
  --spacing-3xl: 96px;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate-700);
  background-color: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ========================================
   Container & Layout
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
  background-color: white;
  border-bottom: 1px solid var(--sand-200);
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-100);
  border: 1px solid var(--primary-200);
  overflow: hidden;
  flex-shrink: 0;
}

.logo-image {
  width: 28px;
  height: 28px;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-600);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-align: center;
  font-family: inherit;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-primary {
  background-color: var(--primary-500);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-600);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.btn-primary:disabled {
  background-color: var(--primary-300);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.apple-icon {
  width: 24px;
  height: 24px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding: var(--spacing-3xl) 0 var(--spacing-2xl);
  background: linear-gradient(180deg, var(--primary-25) 0%, var(--primary-100) 100%);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-eyebrow {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--spacing-sm);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--slate-900);
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--slate-600);
  margin-bottom: var(--spacing-xl);
  line-height: 1.8;
}

.hero-cta {
  margin-bottom: 0;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-screenshot {
  width: 100%;
  max-width: 320px;
  border-radius: 44px;
  box-shadow: 0 16px 48px rgba(84, 38, 38, 0.18);
}

@media (max-width: 968px) {
  .hero-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 700px;
    margin: 0 auto;
  }

  .hero-image {
    order: -1;
  }

  .hero-screenshot {
    max-width: 260px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
  }

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

  .hero-subtitle {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}

/* ========================================
   How It Works Section
   ======================================== */
.how-it-works {
  padding: var(--spacing-2xl) 0;
  background-color: white;
}

.steps-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.step-card {
  background-color: var(--sand-50);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-100);
  border: 1px solid var(--primary-200);
  color: var(--primary-700);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
}

.step-title {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
  color: var(--slate-900);
}

.step-text {
  font-size: 0.95rem;
  color: var(--slate-600);
  line-height: 1.7;
}

@media (max-width: 968px) {
  .steps-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .steps-list {
    grid-template-columns: 1fr;
  }
}

.content-block {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--slate-900);
}

.section-title.centered {
  text-align: center;
}

.section-text {
  font-size: 1.2rem;
  color: var(--slate-600);
  line-height: 1.8;
}

.section-text.centered,
.section-intro {
  text-align: center;
}

.section-intro {
  max-width: 700px;
  margin: 0 auto var(--spacing-md);
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .section-text {
    font-size: 1.1rem;
  }
}

/* ========================================
   Features Section
   ======================================== */
.features {
  padding: var(--spacing-3xl) 0;
  background-color: var(--sand-50);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.feature-card {
  background-color: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background-color: var(--primary-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  color: var(--primary-500);
}

.feature-title {
  font-size: 1.4rem;
  margin-bottom: var(--spacing-sm);
  color: var(--slate-900);
}

.feature-text {
  font-size: 1rem;
  color: var(--slate-600);
  line-height: 1.7;
}

@media (max-width: 968px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Screenshots Section
   ======================================== */
.screenshots {
  padding: var(--spacing-2xl) 0 var(--spacing-3xl);
  background: linear-gradient(180deg, white 0%, var(--primary-25) 100%);
}

.screenshots-scroll {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--spacing-md) var(--spacing-xs) var(--spacing-sm);
  margin-top: var(--spacing-lg);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-200) transparent;
}

.screenshots-scroll::-webkit-scrollbar {
  height: 6px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
  background-color: var(--primary-200);
  border-radius: 3px;
}

.screenshot-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  margin: 0;
}

.screenshot-card img {
  width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  background-color: white;
}

.screenshot-card figcaption {
  margin-top: var(--spacing-sm);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-700);
}

@media (max-width: 768px) {
  .screenshot-card {
    flex: 0 0 200px;
  }
}

/* ========================================
   CTA Section
   ======================================== */
.cta {
  padding: var(--spacing-3xl) 0;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  color: white;
  text-align: center;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.5rem;
  color: white;
  margin-bottom: var(--spacing-md);
}

.cta-text {
  font-size: 1.2rem;
  color: var(--primary-50);
  margin-bottom: var(--spacing-xl);
  line-height: 1.8;
}

.cta .btn-primary {
  background-color: white;
  color: var(--primary-600);
}

.cta .btn-primary:hover {
  background-color: var(--primary-50);
  color: var(--primary-700);
}

@media (max-width: 768px) {
  .cta-title {
    font-size: 2rem;
  }

  .cta-text {
    font-size: 1.1rem;
  }
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: var(--spacing-lg) 0;
  background-color: var(--slate-900);
  color: var(--slate-400);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: var(--spacing-md);
}

.footer-link {
  font-size: 0.9rem;
  color: var(--slate-400);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--primary-300);
}

@media (max-width: 640px) {
  .footer-content {
    flex-direction: column;
    gap: var(--spacing-sm);
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
}

/* ========================================
   Legal Pages
   ======================================== */
.legal-page {
  padding: var(--spacing-2xl) 0 var(--spacing-3xl);
  background-color: white;
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
}

.legal-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-xs);
}

.legal-updated {
  font-size: 0.95rem;
  color: var(--slate-500);
  margin-bottom: var(--spacing-xl);
}

.legal-section {
  margin-bottom: var(--spacing-lg);
}

.legal-section h2 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

.legal-section p {
  color: var(--slate-600);
  line-height: 1.8;
}

.contact-email {
  font-weight: 600;
  color: var(--primary-600);
  transition: color 0.2s ease;
}

.contact-email:hover {
  color: var(--primary-700);
}

@media (max-width: 768px) {
  .legal-title {
    font-size: 2rem;
  }
}

/* ========================================
   Auth Pages (Forgot / Reset Password)
   ======================================== */
.auth-page {
  padding: var(--spacing-2xl) 0 var(--spacing-3xl);
  background-color: white;
  min-height: 60vh;
}

.auth-card {
  max-width: 480px;
  margin: 0 auto;
}

.auth-title {
  font-size: 2rem;
  margin-bottom: var(--spacing-xs);
  color: var(--slate-900);
}

.auth-lead {
  color: var(--slate-600);
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-800);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--slate-900);
  background-color: var(--sand-50);
  border: 1px solid var(--sand-300);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(199, 87, 87, 0.15);
}

.form-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--slate-500);
}

.form-error {
  font-size: 0.9rem;
  color: var(--primary-700);
}

.form-message {
  font-size: 0.95rem;
  line-height: 1.6;
}

.form-message-error {
  color: var(--primary-700);
  background-color: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.auth-submit {
  width: 100%;
  padding: 16px 32px;
  font-size: 1.1rem;
  text-decoration: none;
  box-sizing: border-box;
}

.auth-status:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

[hidden] {
  display: none !important;
}

.auth-status-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-900);
}

.auth-status-text {
  color: var(--slate-600);
  line-height: 1.7;
}

.auth-footer-link {
  margin-top: var(--spacing-lg);
  text-align: center;
  font-size: 0.95rem;
}

.auth-footer-link a {
  color: var(--primary-600);
  font-weight: 600;
}

.auth-footer-link a:hover {
  color: var(--primary-700);
}

@media (max-width: 768px) {
  .auth-title {
    font-size: 1.75rem;
  }
}
