/* ═══════════════════════════════════════════════════════════════
   DINEIN MALTA — Landing Site Design System
   Exact mapping from Flutter AppColors / AppTheme / AppTypography
   ═══════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,700;0,800;0,900;1,800;1,900&family=Inter:wght@400;500;600;700;900&display=swap');

/* ─── CSS Custom Properties (Design Tokens) ─── */
:root {
  /* Primary Palette */
  --primary: #E1C28E;
  --on-primary: #402D06;
  --primary-container: #A88D5D;
  --brand-gold: #8B7A3D;

  /* Secondary Palette */
  --secondary: #A1D494;
  --on-secondary: #0A3909;
  --secondary-container: #23501E;

  /* Tertiary Palette */
  --tertiary: #B9C6E9;
  --on-tertiary: #23304B;

  /* Error */
  --error: #FFB4AB;

  /* Background & Surface */
  --background: #121416;
  --on-background: #E2E2E5;
  --surface: #121416;
  --on-surface: #E2E2E5;
  --surface-variant: #333537;
  --on-surface-variant: #D0C5B6;

  /* Surface Container Hierarchy */
  --surface-container-lowest: #0C0E10;
  --surface-container-low: #1A1C1E;
  --surface-container: #1E2022;
  --surface-container-high: #282A2C;
  --surface-container-highest: #333537;

  /* Outline */
  --outline: #998F82;
  --outline-variant: #4D463B;

  /* Inverse */
  --inverse-surface: #E2E2E5;
  --inverse-on-surface: #2F3133;

  /* Semantic */
  --success: #A1D494;
  --warning: #FEE191;
  --info: #B9C6E9;

  /* Utility */
  --white-5: rgba(255,255,255,0.05);
  --white-10: rgba(255,255,255,0.10);
  --white-20: rgba(255,255,255,0.20);
  --white-40: rgba(255,255,255,0.40);
  --glass-overlay: rgba(18,20,22,0.60);
  --ghost-border: rgba(77,70,59,0.15);

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-xxl: 40px;
  --radius-3xl: 48px;
  --radius-full: 999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Typography */
  --font-headline: 'Public Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Shadows */
  --shadow-clay: inset 2px 2px 4px rgba(255,255,255,0.05),
                 inset -4px -4px 8px rgba(0,0,0,0.20),
                 0 10px 20px rgba(0,0,0,0.30);
  --shadow-clay-hover: inset 4px 4px 8px rgba(255,255,255,0.08),
                       inset -6px -6px 12px rgba(0,0,0,0.30),
                       0 15px 30px rgba(0,0,0,0.40);
  --shadow-ambient: 0 12px 32px rgba(0,0,0,0.30);
  --shadow-elevated: 0 30px 60px rgba(0,0,0,0.40);
}

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

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

body {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-surface);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--on-surface);
}

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

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.1;
  color: var(--on-surface);
}

h1 { font-size: clamp(36px, 6vw, 60px); }
h2 { font-size: clamp(28px, 4vw, 48px); }
h3 { font-size: clamp(22px, 3vw, 30px); }
h4 { font-size: 24px; }
h5 { font-size: 20px; }
h6 { font-size: 18px; }

p {
  color: var(--on-surface-variant);
  line-height: 1.7;
}

.text-small {
  font-size: 14px;
}

.text-xs {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.text-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* ─── Brand Mark ─── */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.brand-text {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.3px;
  line-height: 1;
}

.brand-text .dine { color: var(--brand-gold); }
.brand-text .in   { color: #fff; }

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

.section-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.section-title {
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: 18px;
  max-width: 600px;
  color: var(--on-surface-variant);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 18px 32px;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1;
}

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

.btn-outline {
  background: var(--white-5);
  color: var(--on-surface);
  border: 1px solid var(--white-10);
}
.btn-outline:hover {
  background: var(--white-10);
  transform: translateY(-2px);
  color: var(--on-surface);
}

.btn-sm {
  padding: 12px 24px;
  font-size: 12px;
}

/* ─── Cards ─── */
.card {
  background: var(--surface-container-low);
  border-radius: var(--radius-xxl);
  border: 1px solid var(--white-5);
  padding: var(--space-8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  border-color: var(--white-10);
  transform: translateY(-4px);
  box-shadow: var(--shadow-ambient);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--white-5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  font-size: 24px;
}

.card h3 {
  font-size: 20px;
  margin-bottom: var(--space-3);
}

.card p {
  font-size: 14px;
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background: var(--glass-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--white-5);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface-variant);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--on-surface);
}

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

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--on-surface);
  font-size: 24px;
  cursor: pointer;
  padding: var(--space-2);
}

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(225,194,142,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(161,212,148,0.05) 0%, transparent 70%);
  pointer-events: none;
}

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

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  background: var(--white-5);
  border: 1px solid var(--white-10);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-8);
  letter-spacing: 0.5px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
  animation: pulse 2s ease-in-out infinite;
}

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

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

.hero h1 .gold {
  color: var(--primary);
}

.hero-desc {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: var(--space-10);
  max-width: 500px;
}

.hero-ctas {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-12);
}

.stat-item {
  text-align: left;
}

.stat-number {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 30px;
  color: var(--on-surface);
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--on-surface-variant);
  letter-spacing: 0.5px;
  margin-top: var(--space-1);
}

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

.hero-phone-mockup {
  position: relative;
  width: 280px;
  height: 560px;
  background: var(--surface-container);
  border-radius: var(--radius-xxl);
  border: 2px solid var(--white-10);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-phone-mockup .phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-xxl) - 2px);
}

.hero-phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: var(--surface-container-lowest);
  border-radius: 0 0 20px 20px;
  z-index: 2;
}

.hero-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225,194,142,0.12) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
}

/* ─── Features ─── */
.features {
  background: var(--surface-container-lowest);
}

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

/* ─── How it Works ─── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}

.step {
  text-align: center;
  position: relative;
  padding: var(--space-6);
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.step h4 {
  font-size: 18px;
  margin-bottom: var(--space-2);
}

.step p {
  font-size: 14px;
}

.step-connector {
  position: absolute;
  top: 70px;
  right: -20px;
  color: var(--outline);
  font-size: 20px;
  opacity: 0.4;
}

/* ─── Venue CTA ─── */
.venue-cta {
  background: var(--surface-container-lowest);
}

.venue-cta-box {
  background: linear-gradient(135deg, var(--surface-container) 0%, var(--surface-container-high) 100%);
  border-radius: var(--radius-xxl);
  border: 1px solid var(--white-10);
  padding: var(--space-16) var(--space-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.venue-cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(225,194,142,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.venue-cta-box h2 {
  margin-bottom: var(--space-4);
  position: relative;
}

.venue-cta-box p {
  font-size: 18px;
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--white-5);
  padding: var(--space-12) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand p {
  font-size: 14px;
  margin-top: var(--space-4);
  max-width: 300px;
}

.footer-col h6 {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-5);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-3);
}

.footer-col a {
  font-size: 14px;
  color: var(--on-surface-variant);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--on-surface);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--white-5);
}

.footer-bottom p {
  font-size: 12px;
  color: var(--outline);
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--white-5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-surface-variant);
  font-size: 16px;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--white-10);
  color: var(--on-surface);
}

/* ─── Legal Pages ─── */
.legal-page {
  padding-top: 120px;
  padding-bottom: var(--space-24);
}

.legal-page h1 {
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: var(--space-2);
}

.legal-meta {
  font-size: 14px;
  color: var(--outline);
  margin-bottom: var(--space-12);
}

.legal-content {
  max-width: 800px;
}

.legal-content h2 {
  font-size: 24px;
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  color: var(--primary);
}

.legal-content h3 {
  font-size: 20px;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.legal-content p {
  margin-bottom: var(--space-4);
  font-size: 15px;
  line-height: 1.8;
}

.legal-content ul, .legal-content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.legal-content li {
  margin-bottom: var(--space-2);
  font-size: 15px;
  line-height: 1.7;
  color: var(--on-surface-variant);
}

.legal-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stagger children */
.animate-in.visible:nth-child(1) { transition-delay: 0s; }
.animate-in.visible:nth-child(2) { transition-delay: 0.1s; }
.animate-in.visible:nth-child(3) { transition-delay: 0.2s; }
.animate-in.visible:nth-child(4) { transition-delay: 0.3s; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

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

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

  .hero-visual {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

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

  .step-connector {
    display: none;
  }

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

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

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

  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .nav-cta .btn {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: var(--space-16);
  }

  .hero-stats {
    gap: var(--space-8);
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .venue-cta-box {
    padding: var(--space-12) var(--space-6);
  }

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

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

/* ─── Mobile Nav Drawer ─── */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav a {
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 800;
  color: var(--on-surface);
}

.mobile-nav-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  color: var(--on-surface);
  font-size: 28px;
  cursor: pointer;
  padding: var(--space-2);
}

/* ─── Download badges ─── */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 24px;
  background: var(--white-5);
  border: 1px solid var(--white-10);
  border-radius: var(--radius-lg);
  color: var(--on-surface);
  text-decoration: none;
  transition: all 0.3s ease;
}

.store-badge:hover {
  background: var(--white-10);
  transform: translateY(-2px);
  color: var(--on-surface);
}

.store-badge-icon {
  font-size: 28px;
  line-height: 1;
}

.store-badge-text {
  text-align: left;
}

.store-badge-text span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.store-badge-text strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  margin-top: 2px;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
