/* ============================================
   Readawn Website - Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --olive-50: #f4f6f4;
  --olive-100: #e6ebe6;
  --olive-200: #cdd7cd;
  --olive-300: #a8b8a8;
  --olive-400: #7d927d;
  --olive-500: #5a735a;
  --olive-600: #4a5d4a;
  --olive-700: #3d4d3d;
  --olive-800: #333f33;
  --olive-900: #2b352b;
  --olive-950: #161c16;

  --gold-50: #fdfbf3;
  --gold-100: #faf5e1;
  --gold-200: #f4e9c3;
  --gold-300: #ebd89c;
  --gold-400: #e0c36d;
  --gold-500: #d4af37;
  --gold-600: #c49a2c;
  --gold-700: #a37a25;

  --cream-50: #fdfcfa;
  --cream-100: #faf8f3;
  --cream-200: #f5f2eb;
  --cream-300: #ede8dc;
  --cream-400: #e2dac8;
  --cream-500: #d4c9b0;

  /* Semantic */
  --text-primary: var(--olive-900);
  --text-secondary: var(--olive-500);
  --text-tertiary: var(--olive-400);
  --text-inverse: var(--cream-100);
  --bg-primary: var(--cream-100);
  --bg-secondary: var(--cream-200);
  --bg-tertiary: var(--cream-300);
  --border-color: var(--cream-400);
  --accent: var(--gold-500);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;
  --space-5xl: 120px;

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

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(43, 53, 43, 0.06);
  --shadow-md: 0 4px 12px rgba(43, 53, 43, 0.08);
  --shadow-lg: 0 8px 30px rgba(43, 53, 43, 0.12);
  --shadow-xl: 0 16px 50px rgba(43, 53, 43, 0.16);

  /* Layout */
  --max-width: 1120px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--olive-600);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--olive-500);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.text-accent {
  color: var(--accent);
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-5xl) 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-3xl);
}

.section-header p {
  margin-top: var(--space-md);
  font-size: 1.125rem;
}

.gold-line {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: var(--space-md) auto 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(250, 248, 243, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-300);
  z-index: 100;
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo img {
  width: 36px;
  height: 36px;
}

.nav-logo span {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  background: var(--olive-600);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--olive-500);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

/* --- Hero Section --- */
.hero {
  padding-top: calc(var(--nav-height) + var(--space-4xl));
  padding-bottom: var(--space-5xl);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

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

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 16px;
  background: var(--gold-100);
  border: 1px solid var(--gold-200);
  border-radius: var(--radius-2xl);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold-700);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-lg);
}

.hero h1 {
  margin-bottom: var(--space-lg);
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: var(--space-xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  height: 52px;
  transition: transform 0.2s, opacity 0.2s;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge img {
  height: 52px;
  width: auto;
}

/* Google Play badge has built-in padding, compensate */
.store-badge-google {
  height: 52px;
}

.store-badge-google img {
  height: 76px;
  margin: -12px -16px;
}

/* Phone mockup */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  position: relative;
  width: 280px;
  height: 560px;
  background: var(--olive-900);
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(43, 53, 43, 0.1);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--cream-100);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-screen-placeholder {
  text-align: center;
  background: #faf8f3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.phone-screen-placeholder .placeholder-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
}

.phone-screen-placeholder .splash-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #2b352b;
  letter-spacing: 2px;
}

.phone-screen-placeholder .splash-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: #7d927d;
  margin-top: 6px;
  letter-spacing: 1px;
}

/* --- Features Section --- */
.features {
  background: var(--bg-secondary);
}

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

.feature-card {
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}


.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--olive-600);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
  color: var(--text-inverse);
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: 0.9375rem;
}

/* --- How It Works --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--olive-600);
  color: var(--text-inverse);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.step h3 {
  margin-bottom: var(--space-sm);
}

.step p {
  font-size: 0.9375rem;
  max-width: 280px;
  margin: 0 auto;
}

/* Connector line between steps */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(50% + 40px);
  width: calc(100% - 80px);
  height: 2px;
  background: var(--cream-400);
}

/* --- Widgets Showcase --- */
.widgets {
  background: var(--bg-secondary);
}

.widgets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}

.widget-card {
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
}


.widget-emoji {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.widget-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
}

.widget-card p {
  font-size: 0.8125rem;
  margin-top: var(--space-xs);
}

/* --- Languages --- */
.languages-list {
  text-align: center;
  font-size: 1.0625rem;
  line-height: 2;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto;
}

/* --- CTA / Download Section --- */
.cta {
  background: var(--olive-600);
  color: var(--text-inverse);
  text-align: center;
}

.cta h2 {
  color: var(--cream-100);
}

.cta p {
  color: var(--olive-200);
  font-size: 1.125rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.cta-qr-row {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.qr-code {
  width: 160px;
  height: 160px;
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-code-placeholder {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: center;
}

.qr-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cream-200);
  letter-spacing: 0.5px;
}

.cta-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  color: var(--olive-300);
  font-size: 0.875rem;
}

.cta-divider::before,
.cta-divider::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--olive-400);
}

.cta-stores {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* --- Footer --- */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--cream-300);
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-logo img {
  width: 28px;
  height: 28px;
}

.footer-logo span {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

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

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* --- Legal / Static Pages --- */
.legal-page {
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-5xl);
}

.legal-page .container {
  max-width: 760px;
}

.legal-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--cream-300);
}

.legal-header h1 {
  margin-bottom: var(--space-sm);
}

.legal-header .legal-date {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.legal-content h2 {
  font-size: 1.375rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.legal-content h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-content p {
  font-family: 'Literata', Georgia, serif;
  margin-bottom: var(--space-md);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.legal-content ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.legal-content li {
  font-family: 'Literata', Georgia, serif;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-xs);
}

.legal-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-md);
  font-family: 'Literata', Georgia, serif;
  font-size: 0.9375rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--cream-300);
  line-height: 1.6;
}

.legal-table th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--cream-100);
}

.legal-table td {
  color: var(--text-secondary);
}

/* --- Contact Page --- */
.contact-page {
  padding-top: calc(var(--nav-height) + var(--space-4xl));
  padding-bottom: var(--space-5xl);
  min-height: 100vh;
}

.contact-page .container {
  max-width: 640px;
  text-align: center;
}

.contact-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-lg);
  opacity: 0.8;
}

.contact-page h1 {
  margin-bottom: var(--space-md);
}

.contact-page > .container > p {
  font-size: 1.125rem;
  margin-bottom: var(--space-2xl);
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  text-align: left;
}

.contact-card {
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.contact-card-icon {
  width: 44px;
  height: 44px;
  background: var(--olive-600);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-inverse);
}

.contact-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.contact-card p {
  font-size: 0.875rem;
  margin-bottom: var(--space-xs);
}

.contact-card a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Verify Email Page --- */
.verify-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  text-align: center;
  background: linear-gradient(180deg, var(--cream-100) 0%, var(--cream-200) 100%);
}

.verify-card {
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-2xl);
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.verify-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-lg);
}

.verify-card h1 {
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
}

.verify-card p {
  font-size: 1rem;
  margin-bottom: var(--space-lg);
}

.verify-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--cream-300);
  border-top-color: var(--olive-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: var(--space-lg) auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.verify-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  display: block;
}

.verify-success .verify-icon { color: var(--olive-500); }
.verify-error .verify-icon { color: #b54a4a; }

.verify-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 32px;
  background: var(--olive-600);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  margin-top: var(--space-md);
}

.verify-btn:hover {
  background: var(--olive-500);
  color: var(--text-inverse);
}

/* State visibility */
.verify-state { display: none; }
.verify-state.active { display: block; }

/* --- Cookie Consent --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--olive-900);
  color: var(--cream-200);
  padding: var(--space-md) var(--space-lg);
  z-index: 200;
  display: none;
}

.cookie-banner.visible {
  display: block;
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.cookie-inner p {
  font-size: 0.875rem;
  color: var(--cream-300);
  line-height: 1.5;
  margin: 0;
}

.cookie-inner a {
  color: var(--cream-100);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.cookie-btn {
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.cookie-btn-accept {
  background: var(--cream-100);
  color: var(--olive-900);
}

.cookie-btn-reject {
  background: transparent;
  color: var(--cream-300);
  border: 1px solid var(--olive-500);
}

/* --- Responsive --- */
@media (max-width: 1200px) {
  .widgets-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

  .widgets-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-2xl));
    padding-bottom: var(--space-3xl);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-2xl);
  }

  .hero-content {
    max-width: 100%;
  }

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

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .phone-mockup {
    width: 220px;
    height: 440px;
    border-radius: 32px;
    padding: 10px;
  }

  .phone-screen {
    border-radius: 24px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .step:not(:last-child)::after {
    display: none;
  }

  .widgets-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section {
    padding: var(--space-4xl) 0;
  }

  .section-header {
    margin-bottom: var(--space-2xl);
  }

  /* Legal pages mobile */
  .legal-page {
    padding-top: calc(var(--nav-height) + var(--space-xl));
    padding-bottom: var(--space-3xl);
  }

  .legal-content h2 {
    font-size: 1.25rem;
    margin-top: var(--space-xl);
  }

  /* Contact page mobile */
  .contact-page {
    padding-top: calc(var(--nav-height) + var(--space-2xl));
    padding-bottom: var(--space-3xl);
  }

  /* CTA section mobile */
  .cta-qr-row {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .hero h1 {
    font-size: 1.75rem;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .store-badge {
    height: 44px;
  }

  .store-badge img {
    height: 44px;
  }

  .store-badge-google {
    justify-content: center;
    overflow: hidden;
  }

  .store-badge-google img {
    height: 76px;
    margin: -16px;
  }

  .widgets-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .widget-card {
    padding: var(--space-md);
  }

  .qr-code {
    width: 140px;
    height: 140px;
  }

  .nav-cta span {
    display: none;
  }

  .verify-card {
    padding: var(--space-xl) var(--space-md);
  }

  .contact-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cookie-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }
}
