/* ===================================================================
   MEALFORM — taste.mealform.ai
   Marketing site. Mobile-first, dark theme, no framework.
   =================================================================== */

/* -----------------------------------------------------------------
   DESIGN TOKENS
----------------------------------------------------------------- */
:root {
  /* Background tones */
  --bg-deepest: #0a0a14;
  --bg-base: #0f0f1e;
  --bg-elevated: #1a1a2e;
  --bg-card: #1e1e35;

  /* Primary brand */
  --brand-primary: #6366f1;
  --brand-primary-hover: #818cf8;
  --brand-glow: rgba(99, 102, 241, 0.3);
  --brand-glow-soft: rgba(99, 102, 241, 0.18);

  /* Text */
  --text-primary: #f5f5f8;
  --text-secondary: #a1a1b8;
  --text-tertiary: #6b6b85;

  /* Flavor spectrum */
  --flavor-light: #fbbf24;
  --flavor-herbaceous: #84cc16;
  --flavor-umami: #a855f7;
  --flavor-warm: #f59e0b;
  --flavor-rich: #d97706;
  --flavor-bold: #b45309;
  --flavor-fiery: #dc2626;

  /* Borders / dividers */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-prominent: rgba(255, 255, 255, 0.12);
  --border-input: rgba(255, 255, 255, 0.14);

  /* Spacing scale (8px base) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  /* Layout */
  --container-max: 1200px;
  --content-max: 760px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 200ms ease;

  /* Type stack */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}

/* -----------------------------------------------------------------
   FLAVOR-SPECTRUM GRADIENT (utility)
----------------------------------------------------------------- */
.flavor-gradient,
.flavor-gradient::after {
  background: linear-gradient(
    90deg,
    var(--flavor-light) 0%,
    var(--flavor-herbaceous) 16%,
    var(--flavor-umami) 33%,
    var(--flavor-warm) 50%,
    var(--flavor-rich) 66%,
    var(--flavor-bold) 83%,
    var(--flavor-fiery) 100%
  );
}

/* -----------------------------------------------------------------
   RESET
----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg-deepest);
  color: var(--text-primary);
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

a {
  color: var(--brand-primary-hover);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover,
a:focus-visible {
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* -----------------------------------------------------------------
   LAYOUT PRIMITIVES
----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section {
  position: relative;
  padding: var(--space-6) 0;
}

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

/* -----------------------------------------------------------------
   TYPOGRAPHY
----------------------------------------------------------------- */
.section-heading {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
}

.section-subhead {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
  max-width: var(--content-max);
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-primary-hover);
  margin: 0 0 var(--space-2);
}

.prose {
  max-width: var(--content-max);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.prose p + p {
  margin-top: var(--space-3);
}

.prose em {
  color: var(--text-primary);
  font-style: italic;
}

.prose--centered {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .section-heading {
    font-size: 40px;
  }
  .section-subhead {
    font-size: 20px;
  }
  .prose {
    font-size: 18px;
  }
}

/* -----------------------------------------------------------------
   NAV (sticky, blurred)
----------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 20, 0.7);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base), background var(--transition-base);
}

.nav.is-scrolled {
  background: rgba(10, 10, 20, 0.85);
  border-bottom-color: var(--border-subtle);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 12px var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-brand:hover,
.nav-brand:focus-visible {
  color: var(--text-primary);
}

.nav-logo {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-wordmark {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-prominent);
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .nav-inner {
    padding: 14px var(--space-4);
  }
  .nav-wordmark {
    font-size: 22px;
  }
  .nav-cta {
    font-size: 15px;
    padding: 10px 18px;
  }
}

/* -----------------------------------------------------------------
   CTA BUTTONS
----------------------------------------------------------------- */
.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--brand-primary);
  border-radius: 999px;
  box-shadow: 0 4px 24px var(--brand-glow);
  transition: transform var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}

.cta-primary:hover,
.cta-primary:focus-visible {
  background: var(--brand-primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 32px var(--brand-glow);
}

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

.cta-primary--large {
  padding: 18px 36px;
  font-size: 17px;
}

@media (min-width: 768px) {
  .cta-primary {
    padding: 16px 32px;
    font-size: 17px;
  }
  .cta-primary--large {
    padding: 20px 44px;
    font-size: 18px;
  }
}

/* -----------------------------------------------------------------
   HERO
----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 88vh;
  padding: var(--space-6) 0 var(--space-7);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 25%, rgba(99, 102, 241, 0.22), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.18), transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(99, 102, 241, 0.12), transparent 60%),
    var(--bg-deepest);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
}

.hero-logo {
  position: relative;
  width: 110px;
  height: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-1);
}

.hero-logo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-logo-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 65%);
  filter: blur(8px);
  animation: heroGlow 5s ease-in-out infinite;
  z-index: 0;
}

@keyframes heroGlow {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50%      { opacity: 1;    transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-glow { animation: none; opacity: 0.7; }
  html { scroll-behavior: auto; }
}

.hero-headline {
  font-size: 28px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 880px;
  margin: var(--space-2) 0 0;
  color: var(--text-primary);
}

.hero-subhead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 600px;
  margin: var(--space-2) 0 0;
}

.hero-cta-row {
  margin-top: var(--space-3);
}

.hero-media {
  margin-top: var(--space-5);
  width: 100%;
  max-width: 600px;
}

.hero-image,
.hero-video {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-subtle);
}

@media (min-width: 768px) {
  .hero {
    min-height: 92vh;
    padding: var(--space-7) 0 var(--space-8);
  }
  .hero-logo { width: 170px; height: 170px; }
  .hero-headline { font-size: 56px; }
  .hero-subhead { font-size: 19px; }
  .hero-media { margin-top: var(--space-6); }
}

/* -----------------------------------------------------------------
   SECTION: PROBLEM
----------------------------------------------------------------- */
.section--problem {
  background: var(--bg-base);
}

.section--problem .section-heading {
  max-width: 880px;
}

/* -----------------------------------------------------------------
   SECTION: FEATURES
----------------------------------------------------------------- */
.section--features {
  background: var(--bg-deepest);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.feature-card:hover {
  border-color: var(--border-prominent);
  transform: translateY(-2px);
}

.feature-card .asset-placeholder--feature {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 240px;
}

.feature-title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.feature-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-top: var(--space-5);
  }
  .feature-card {
    padding: var(--space-4);
    gap: var(--space-3);
  }
  .feature-title {
    font-size: 22px;
  }
  .feature-body {
    font-size: 16px;
  }
}

/* -----------------------------------------------------------------
   SECTION: BUILT DIFFERENT (depth)
----------------------------------------------------------------- */
.section--depth {
  background: var(--bg-base);
}

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

.depth-visual {
  display: flex;
  justify-content: center;
}

.depth-visual .asset-placeholder--wheel,
.depth-visual img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
}

.depth-visual .asset-placeholder--wheel {
  border-radius: 16px;
  aspect-ratio: 1 / 1;
}

@media (min-width: 900px) {
  .depth-inner {
    grid-template-columns: 1.3fr 1fr;
    gap: var(--space-6);
  }
  .depth-visual .asset-placeholder--wheel,
  .depth-visual img {
    width: 320px;
    height: 320px;
  }
}

/* -----------------------------------------------------------------
   SECTION: ACCESS (Test Kitchen)
----------------------------------------------------------------- */
.section--access {
  background: var(--bg-deepest);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section--access::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, var(--brand-glow-soft), transparent 60%);
}

.section--access > .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section--access .section-heading,
.section--access .section-subhead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.access-cta-row {
  margin-top: var(--space-4);
}

.access-fallback {
  margin-top: var(--space-3);
  font-size: 14px;
  color: var(--text-tertiary);
}

/* -----------------------------------------------------------------
   FOOTER
----------------------------------------------------------------- */
.footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-5) 0 var(--space-4);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-wordmark {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin: var(--space-1) 0 0;
}

.footer-col--links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col--links a {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-col--links a:hover,
.footer-col--links a:focus-visible {
  color: var(--text-primary);
}

.footer-meta,
.footer-copyright {
  font-size: 14px;
  color: var(--text-tertiary);
  margin: 0;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: var(--space-5);
  }
  .footer-col--meta {
    text-align: right;
    align-items: flex-end;
  }
}

/* -----------------------------------------------------------------
   ASSET PLACEHOLDERS (until real assets arrive)
----------------------------------------------------------------- */
.asset-placeholder {
  background: var(--bg-elevated);
  border: 2px dashed var(--border-prominent);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.45;
  padding: var(--space-3);
}

.asset-placeholder--video {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
}

.asset-placeholder--feature {
  width: 100%;
  aspect-ratio: 3 / 2;
}

.asset-placeholder--wheel {
  width: 240px;
  height: 240px;
}

.placeholder-label {
  display: block;
  max-width: 80%;
}

/* -----------------------------------------------------------------
   SCROLL REVEAL
----------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* -----------------------------------------------------------------
   ACCESS MODAL
----------------------------------------------------------------- */
.access-modal[hidden] {
  display: none;
}

.access-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
}

.access-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: backdropFadeIn 200ms ease-out;
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.access-modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - var(--space-5));
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-prominent);
  border-radius: 24px;
  padding: var(--space-5) var(--space-4) var(--space-4);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: modalSlideUp 300ms var(--ease-out);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .access-modal-backdrop,
  .access-modal-content { animation: none; }
}

.access-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  color: var(--text-tertiary);
  transition: background var(--transition-base), color var(--transition-base);
}

.access-modal-close:hover,
.access-modal-close:focus-visible {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.access-modal-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-1);
  color: var(--text-primary);
  padding-right: var(--space-4);
}

.access-modal-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
}

/* Form fields */
.access-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

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

.form-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-field .required {
  color: var(--brand-primary-hover);
}

.form-field .optional {
  color: var(--text-tertiary);
  font-weight: 400;
}

.form-field input,
.form-field textarea {
  font: inherit;
  font-size: 16px; /* prevents iOS zoom-on-focus */
  color: var(--text-primary);
  background: var(--bg-deepest);
  border: 1px solid var(--border-input);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-glow-soft);
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
}

.form-submit {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--brand-primary);
  border-radius: 12px;
  box-shadow: 0 4px 24px var(--brand-glow);
  transition: background var(--transition-base), transform var(--transition-base);
  margin-top: var(--space-1);
}

.form-submit:hover:not(:disabled),
.form-submit:focus-visible:not(:disabled) {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-submit--ghost {
  background: transparent;
  color: var(--brand-primary-hover);
  box-shadow: none;
  border: 1px solid var(--border-prominent);
}

.form-submit--ghost:hover:not(:disabled),
.form-submit--ghost:focus-visible:not(:disabled) {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.form-fallback {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
  margin: var(--space-1) 0 0;
}

.form-error {
  font-size: 13px;
  color: #fca5a5;
  margin: 4px 0 0;
}

/* Success / error states */
.access-success,
.access-error {
  text-align: center;
  padding: var(--space-2) 0;
}

.access-success h3,
.access-error h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}

.access-success p,
.access-error p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
}

/* -----------------------------------------------------------------
   BODY SCROLL LOCK (when modal is open)
----------------------------------------------------------------- */
body.modal-open {
  overflow: hidden;
}
