/* Design System Variables */

:root {
  /* Colors - minimalist black/white/gray palette */
  --color-black: #000000;
  --color-gray-900: #111111;
  --color-gray-800: #1f1f1f;
  --color-gray-700: #374151;
  --color-gray-600: #4b5563;
  --color-gray-500: #6b7280;
  --color-gray-400: #9ca3af;
  --color-gray-300: #d1d5db;
  --color-gray-200: #e5e7eb;
  --color-gray-100: #f3f4f6;
  --color-gray-50: #f9fafb;
  --color-white: #ffffff;

  /* Semantic colors */
  --color-text: var(--color-black);
  --color-text-secondary: var(--color-gray-600);
  --color-text-muted: var(--color-gray-500);
  --color-background: var(--color-white);
  --color-surface: var(--color-gray-50);
  --color-border: var(--color-gray-200);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width: 42rem;
  --max-width-wide: 72rem;

  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* Base Reset */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
}

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

/* Typography */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  margin: 0 0 var(--space-6);
}

h2 {
  font-size: var(--text-3xl);
  margin: var(--space-12) 0 var(--space-4);
}

h3 {
  font-size: var(--text-xl);
  margin: var(--space-8) 0 var(--space-3);
}

p {
  margin: 0 0 var(--space-5);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.7;
}

/* Site Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.site-header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo:hover {
  opacity: 1;
}

.site-logo-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

.site-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.site-nav a {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-nav a:hover {
  color: var(--color-text);
  opacity: 1;
}

.site-nav a.active {
  color: var(--color-text);
}

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

.header-badge {
  display: block;
  transition: opacity var(--transition-fast);
}

.header-badge:hover {
  opacity: 0.8;
}

.header-badge img {
  display: block;
  height: 38px;
  width: auto;
}

/* Container */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Page Layout */

.page-content {
  padding: var(--space-16) 0 var(--space-24);
}

/* Blog Header */

.blog-header {
  padding: var(--space-20) 0 var(--space-12);
  text-align: center;
}

.blog-header h1 {
  margin-bottom: var(--space-4);
}

.blog-header .tagline {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin: 0 auto;
  max-width: 480px;
}

/* Category Back Link */

.category-back-link {
  margin-top: var(--space-8);
  text-align: center;
}

.category-back-link a {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  text-decoration: none;
}

.category-back-link a:hover {
  color: var(--color-text);
  opacity: 1;
}

/* Blog Filters */

.blog-filters {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.blog-search {
  position: relative;
  width: 100%;
  max-width: 320px;
}



.category-header {
  text-align: center;
  margin-bottom: var(--space-4);
}

.category-header p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin: 0;
}

.search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.blog-search input {
  width: 100%;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-10);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-background);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
}

.blog-search input:focus {
  outline: none;
  border-color: var(--color-gray-400);
}

.blog-search input::placeholder {
  color: var(--color-text-muted);
}

.no-results {
  display: none;
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-8) 0;
}

/* Post List */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-5);
}

a.post-preview {
  display: block;
  background: var(--color-background);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  transition: all var(--transition-slow);
  text-decoration: none;
  cursor: pointer;
}

a.post-preview:hover {
  border-color: var(--color-gray-400);
  transform: scale(1.01);
  opacity: 1;
}

.post-preview h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
}

.post-preview > p {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.6;
}

.post-meta,
.post-preview .post-meta {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin: 0;
}


/* Blog Post Content */

.blog-post {
  padding: var(--space-8) 0 var(--space-16);
}

.blog-post header {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}

.blog-post h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.blog-post .post-meta {
  margin: 0;
}

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

.post-author {
  display: block;
  flex-shrink: 0;
}

.post-author:hover {
  opacity: 0.7;
}

.post-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.post-byline-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.post-author-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.post-author-name:hover {
  text-decoration: underline;
}

.post-byline-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.post-byline-separator {
  color: var(--color-text-muted);
}

.post-byline-detail {
  color: var(--color-text-muted);
}

.blog-post h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

.blog-post h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}

/* Recipe dietary labels (chips) */
.dietary-labels {
  display: flex;
  gap: var(--space-2);
}

.dietary-labels span {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-gray-300);
  border-radius: 9999px;
}

/* Recipe intro and meta */
.recipe-intro {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.recipe-info-box {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  border: 1px solid var(--color-gray-400);
  border-radius: var(--radius-2xl);
  padding: var(--space-6) var(--space-8) var(--space-6) var(--space-6);
  margin-bottom: var(--space-6);
}

.recipe-hero {
  width: 120px;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.recipe-info-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.recipe-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.recipe-meta-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.recipe-meta-item strong {
  font-weight: 600;
}

.dietary-labels {
  margin-bottom: 0;
}

/* Recipe images */
.recipe-post img:not(.post-author-avatar):not(.about-app-badges img) {
  max-width: min(400px, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-400);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.recipe-post .about-app-badges img {
  max-width: none;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.blog-post p {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.blog-post a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.blog-post a:hover {
  opacity: 0.7;
}

.blog-post ul,
.blog-post ol {
  margin: 0 0 var(--space-6);
  padding-left: var(--space-6);
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.blog-post li {
  margin-bottom: var(--space-3);
}

.blog-post blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  font-style: italic;
  color: var(--color-text-secondary);
}

.blog-post blockquote p {
  margin: 0;
}

.blog-post code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.9em;
  background: var(--color-surface);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

.blog-post pre {
  background: var(--color-gray-900);
  color: var(--color-white);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  overflow-x: auto;
  margin: var(--space-8) 0;
}

.blog-post pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.blog-post table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-8) 0;
  font-size: var(--text-base);
}

.blog-post th,
.blog-post td {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.blog-post th {
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
}

.blog-post tr:last-child td {
  border-bottom: none;
}

/* Post Sources */

.post-sources {
  margin-top: var(--space-10);
  padding: var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
}

.post-sources h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-top: 0;
  margin-bottom: var(--space-3);
}

.post-sources ol {
  margin: 0;
  padding-left: var(--space-5);
}

.post-sources li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.post-sources li:last-child {
  margin-bottom: 0;
}

.post-sources a {
  color: var(--color-primary);
  text-decoration: none;
}

.post-sources a:hover {
  text-decoration: underline;
}

.post-sources .post-sources-disclaimer {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-5) 0;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
  line-height: 1.5;
}

/* Post Navigation */

.post-nav {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.post-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.post-nav a:hover {
  background: var(--color-gray-100);
  opacity: 1;
}

.blog-nav {
  display: flex;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.blog-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

/* Tagline */

.tagline {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
}


/* App Promo */

.app-promo {
  margin-top: var(--space-12);
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
}

.app-promo p {
  font-size: var(--text-sm);
  margin: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-12) 0 var(--space-8);
  margin-top: var(--space-20);
}

.site-footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.footer-columns {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

.footer-brand {
  max-width: 300px;
}

.footer-nav {
  display: flex;
  gap: var(--space-16);
}

.footer-brand p.footer-brand-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.app-badges {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.app-badge {
  display: block;
  transition: opacity var(--transition-fast);
}

.app-badge:hover {
  opacity: 0.8;
}

.app-badge img {
  display: block;
}

.footer-column h4 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-5);
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: var(--space-2);
}

.footer-column a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-column a:hover {
  color: var(--color-text);
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.footer-bottom p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .footer-columns {
    flex-direction: column;
    gap: var(--space-8);
  }

  .footer-nav {
    gap: var(--space-8);
  }
}

/* Responsive */

@media (max-width: 768px) {
  :root {
    --text-6xl: 2.5rem;
    --text-5xl: 2.25rem;
    --text-4xl: 1.875rem;
    --text-3xl: 1.5rem;
  }

  .site-header-inner {
    padding: var(--space-3) var(--space-4);
  }

  .site-logo {
    line-height: 1.1;
  }

  .site-logo-icon {
    width: 28px;
    height: 28px;
  }

  .site-nav {
    position: static;
    transform: none;
    gap: var(--space-6);
    margin-right: var(--space-2);
  }

  .header-badges {
    display: none;
  }

  .container,
  .container-wide {
    padding: 0 var(--space-4);
  }

  .post-preview {
    padding: var(--space-5);
  }

  .blog-post p,
  .blog-post ul,
  .blog-post ol {
    font-size: var(--text-base);
  }

  .blog-header {
    padding: var(--space-12) 0 var(--space-8);
  }

  .page-content {
    padding: var(--space-10) 0 var(--space-16);
  }

  .waitlist-input-group {
    flex-direction: column;
  }

  .waitlist-input-group button {
    width: 100%;
  }
}

/* Utility Classes */

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

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

/* Minimal Header & Footer (for utility pages) */

.minimal-header {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.minimal-header .container {
  display: flex;
  justify-content: center;
}

.minimal-footer {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  margin-top: auto;
}

.minimal-footer p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* Reset Password Page */

.reset-password-page {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

.reset-password-page h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-6);
}

.reset-state {
  margin-top: var(--space-4);
}

.form-intro {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.reset-form {
  text-align: left;
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-group input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-gray-400);
}

.form-hint {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.form-error {
  color: #dc2626;
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.btn-primary {
  width: 100%;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--color-white);
  background: var(--color-black);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.85;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-message {
  padding: var(--space-5);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-lg);
  color: #dc2626;
}

.error-message p {
  margin: 0;
}

.success-message {
  padding: var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
}

.success-icon {
  width: 48px;
  height: 48px;
  color: #16a34a;
  margin: 0 auto var(--space-4);
}

.success-message h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xl);
}

.success-message p {
  color: var(--color-text-secondary);
  margin: 0;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }

/* Legal Grid */

.legal-grid {
  display: flex;
  gap: var(--space-6);
}

.legal-grid a.post-preview {
  flex: 1;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.legal-icon {
  width: 64px;
  height: 64px;
  color: var(--color-gray-400);
  margin-bottom: var(--space-5);
  transition: color var(--transition-base);
}

.legal-grid a.post-preview:hover .legal-icon {
  color: var(--color-text);
}

.legal-grid .post-preview h2 {
  margin-bottom: var(--space-2);
}

.legal-grid .post-preview p {
  margin: 0;
}

/* Legal Page Content */

.legal-page .post-meta {
  margin-bottom: var(--space-6);
}

.legal-page a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.legal-page a:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .legal-grid {
    flex-direction: column;
  }

  .legal-grid a.post-preview {
    aspect-ratio: auto;
    padding: var(--space-8);
  }
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--color-background);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  font-size: var(--text-2xl);
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-text);
}

.modal-content h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-2xl);
}

.modal-subheadline {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--text-base);
}

/* Waitlist Form */

.waitlist-form {
  margin-top: var(--space-6);
}

.waitlist-input-group {
  display: flex;
  gap: var(--space-2);
}

.waitlist-input-group input[type="email"] {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  background: var(--color-background);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.waitlist-input-group input[type="email"]:focus {
  outline: none;
  border-color: var(--color-gray-400);
}

.waitlist-input-group input[type="email"]::placeholder {
  color: var(--color-text-muted);
}

.waitlist-input-group button {
  padding: var(--space-3) var(--space-5);
  background: var(--color-black);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.waitlist-input-group button:hover:not(:disabled) {
  opacity: 0.85;
}

.waitlist-input-group button:active:not(:disabled) {
  transform: scale(0.98);
}

.waitlist-input-group button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.waitlist-error {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: #ef4444;
}

.waitlist-success {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: #16a34a;
  font-weight: 500;
}

/* About Page */

.about-page {
  text-align: center;
}

.about-page p {
  text-align: left;
}

.about-headshot {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.about-app-promo {
  margin-top: var(--space-10);
  padding: var(--space-6) var(--space-8);
  background: var(--color-background);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-2xl);
}

.about-app-promo p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-5);
}

.about-app-badges {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.about-app-badges img {
  height: 44px;
  width: auto;
}

/* Draft Homepage Styles */

.draft-hero {
  padding: var(--space-20) 0 var(--space-24);
}

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

.draft-hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
}

.draft-hero-text h1 {
  font-size: var(--text-6xl);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 var(--space-6);
}

.draft-hero-description {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--space-8);
  max-width: 500px;
}

.draft-hero-badges {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.draft-hero-badges img {
  height: 48px;
  width: auto;
}

.draft-hero-social-proof {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.draft-hero-social-proof a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.draft-hero-phones {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.draft-hero-phone-back {
  margin-right: -80px;
  transform: rotate(-1.5deg) translateY(20px);
  z-index: 1;
  position: relative;
}

.draft-hero-phone-front {
  transform: rotate(1.5deg);
  z-index: 2;
  position: relative;
}

/* Hero phones are smaller than the interactive phone (280px vs 305px),
   so scale border-radius proportionally to avoid an overly rounded look */
@media (min-width: 769px) {
  .draft-hero-phones .phone-frame {
    border-radius: 46px;
  }

  .draft-hero-phones .phone-screen {
    border-radius: 39px;
  }
}

/* CSS iPhone Frame */
.phone-frame {
  position: relative;
  width: 280px;
  background: #000;
  border-radius: 50px;
  padding: 7px;
  box-shadow:
    0 0 0 2px #555,
    0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Side buttons - left: action button + volume up + volume down */
.phone-frame::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 102px;
  width: 3px;
  height: 120px;
  border-radius: 2px 0 0 2px;
  background:
    linear-gradient(
      to bottom,
      #3a3a3a 0px, #3a3a3a 22px,
      transparent 22px, transparent 34px,
      #3a3a3a 34px, #3a3a3a 70px,
      transparent 70px, transparent 84px,
      #3a3a3a 84px, #3a3a3a 120px
    );
}

/* Side button - right: power button */
.phone-frame::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 145px;
  width: 3px;
  height: 58px;
  background: #3a3a3a;
  border-radius: 0 2px 2px 0;
}

/* Screen area */
.phone-screen {
  position: relative;
  background: #f9fafb;
  border-radius: 42px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
}


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

/* Draft Section Titles */

.draft-section-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  text-align: center;
  margin: 0 0 var(--space-12);
}

.draft-section-title-spaced {
  margin-bottom: var(--space-16);
}

/* Draft Features Section */

.draft-features {
  padding: var(--space-20) 0;
  background: var(--color-surface);
}

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

.draft-feature-card {
  background: var(--color-background);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  text-align: left;
}

.draft-feature-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-xl);
  font-size: 32px;
}

/* Value prop card icon colors */
.draft-feature-card:nth-child(1) .draft-feature-icon {
  color: #f43f5e;
  background: #f43f5e15;
}

.draft-feature-card:nth-child(2) .draft-feature-icon {
  color: #3B82F6;
  background: #3B82F615;
}

.draft-feature-card:nth-child(3) .draft-feature-icon {
  color: #6b9e7d;
  background: #6b9e7d15;
}

.draft-feature-card h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 var(--space-3);
}

.draft-feature-card p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.7;
}

/* Draft Testimonials Section */

.draft-testimonials {
  padding: var(--space-20) 0;
  background: var(--color-surface);
}

.draft-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.draft-testimonial-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  transition: transform 0.3s ease;
}

.draft-testimonial-card:hover {
  transform: scale(1.05);
}

.draft-testimonial-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.draft-testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.draft-testimonial-author {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.draft-testimonial-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* Draft Responsive Styles */

@media (max-width: 1024px) {
  .draft-features-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

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

@media (max-width: 768px) {
  .draft-hero {
    padding: var(--space-12) 0 var(--space-16);
  }

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

  .draft-hero-text h1 {
    font-size: var(--text-4xl);
  }

  .draft-hero-description {
    font-size: var(--text-lg);
    max-width: 100%;
  }

  .draft-hero-badges {
    justify-content: center;
  }

  .phone-frame {
    width: 220px;
    border-radius: 39px;
    padding: 6px;
  }

  .phone-frame.draft-hero-phone-back,
  .phone-frame.draft-hero-phone-front {
    width: 170px;
  }

  .draft-hero-phone-back {
    margin-right: -36px;
  }

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

  .draft-section-title {
    font-size: var(--text-3xl);
  }

  .draft-testimonials-grid {
    grid-template-columns: 1fr;
  }

  .draft-features,
  .draft-testimonials {
    padding: var(--space-12) 0;
  }
}

/* Remove footer margin when following draft sections */
.draft-testimonials + .site-footer,
.draft-features + .site-footer,
.draft-interactive + .site-footer {
  margin-top: 0;
}

/* Draft Interactive Feature Section */
.draft-interactive {
  padding: var(--space-20) 0;
}

.draft-interactive-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}

/* Phone mockup container (LEFT side) */
.draft-interactive-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.draft-phone-mockup-interactive {
  position: relative;
}

.draft-phone-mockup-interactive .phone-frame {
  width: 305px;
}

/* Phone screen SVGs - transition support */
.draft-phone-screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.draft-phone-screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* Navigation dots */
.draft-interactive-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
}

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

.draft-dot:hover {
  background: var(--color-gray-400);
}

.draft-dot.active {
  background: var(--color-black);
}

/* Feature boxes container (RIGHT side) */
.draft-interactive-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-top: -30px;
}

/* Individual feature box */
.draft-feature-box {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--color-background);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-2xl);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  font-family: inherit;
}

.draft-feature-box:hover {
  border-color: var(--color-gray-300);
}

.draft-feature-box.active {
  border-color: var(--color-black);
  background: var(--color-surface);
}

/* Feature box icon */
.draft-feature-box-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-xl);
  border: 2px solid transparent;
  font-size: 28px;
}

/* Feature box icon colors */
.draft-feature-box[data-feature="food-list"] .draft-feature-box-icon {
  color: #8B5CF6;
  background: #8B5CF615;
}

.draft-feature-box[data-feature="daily-insights"] .draft-feature-box-icon {
  color: #14B8A6;
  background: #14B8A615;
}

.draft-feature-box[data-feature="ai-insights"] .draft-feature-box-icon {
  color: #3B82F6;
  background: #3B82F615;
}

.draft-feature-box[data-feature="recipes"] .draft-feature-box-icon {
  color: #f59e0b;
  background: #f59e0b15;
}

/* Active state: add a subtle border matching the icon color */
.draft-feature-box.active[data-feature="food-list"] .draft-feature-box-icon {
  border: 2px solid #8B5CF640;
}

.draft-feature-box.active[data-feature="daily-insights"] .draft-feature-box-icon {
  border: 2px solid #14B8A640;
}

.draft-feature-box.active[data-feature="ai-insights"] .draft-feature-box-icon {
  border: 2px solid #3B82F640;
}

.draft-feature-box.active[data-feature="recipes"] .draft-feature-box-icon {
  border: 2px solid #f59e0b40;
}

/* Feature box text */
.draft-feature-box-text h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 var(--space-2);
  color: var(--color-text);
}

.draft-feature-box-text p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Responsive styles for interactive section */
@media (max-width: 768px) {
  .draft-interactive {
    padding: var(--space-12) 0;
  }

  .draft-interactive-content {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  /* Phone goes above features on mobile */
  .draft-interactive-phone {
    order: -1;
  }

  .draft-phone-mockup-interactive .phone-frame {
    width: 260px;
  }

  .draft-feature-box {
    padding: var(--space-4) var(--space-5);
  }

  .draft-feature-box-icon {
    width: 40px;
    height: 40px;
  }

  .draft-feature-box-icon i {
    font-size: 20px;
  }
}

/* Category Sections (recipes + blog) */

.recipe-category-section,
.blog-category-section {
  margin-bottom: var(--space-12);
}

.recipe-category-section:last-child,
.blog-category-section:last-child {
  margin-bottom: 0;
}

.recipe-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--space-3);
}

.recipe-category-header h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}

.see-all-link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
  white-space: nowrap;
}

.see-all-link:hover {
  color: var(--color-text);
}

.recipe-category-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

a.recipe-preview-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--color-background);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-3);
  transition: all var(--transition-slow);
  text-decoration: none;
  cursor: pointer;
}

a.recipe-preview-item:hover {
  border-color: var(--color-gray-400);
  transform: scale(1.01);
}

.recipe-preview-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--color-gray-400);
}

.recipe-preview-text {
  min-width: 0;
}

.recipe-preview-item h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
  line-height: 1.2;
}

.recipe-preview-time {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}

@media (max-width: 600px) {
  .recipe-category-section,
  .blog-category-section {
    margin-bottom: var(--space-10);
  }

  .recipe-category-header h2 {
    font-size: var(--text-xl);
  }

  .recipe-preview-img {
    width: 36px;
    height: 36px;
  }

  .recipe-preview-item h3 {
    font-size: var(--text-base);
  }

  .recipe-info-box {
    display: block;
    border: none;
    padding: 0;
    margin-top: var(--space-6);
  }

  .recipe-hero {
    display: none;
  }

  .recipe-info-details {
    display: block;
  }

  .recipe-meta {
    margin-bottom: var(--space-6);
  }

  .dietary-labels {
    margin-bottom: var(--space-6);
  }
}

/* Recipe Print Button */
.post-byline-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-byline-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.print-recipe-btn {
  flex-shrink: 0;
  padding: 0;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s ease;
}

.print-recipe-btn:hover {
  color: var(--color-text);
}

/* Print Styles */
@media print {
  /* Hide non-essential elements */
  .site-header,
  .site-footer,
  .post-nav,
  .app-promo,
  .post-byline,
  .print-recipe-btn,
  .blog-post img,
  .recipe-post header + p {
    display: none !important;
  }

  /* Reset page margins */
  body {
    margin: 0;
    padding: 0;
  }

  .page-content {
    padding: 0;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  /* Clean typography for print */
  .blog-post {
    font-size: 12pt;
    line-height: 1.5;
  }

  .blog-post h1 {
    font-size: 18pt;
    margin-bottom: 0.5em;
  }

  .recipe-post h1::after {
    content: "histaminetracker.com";
    display: block;
    font-size: 12pt;
    font-weight: normal;
    color: #666;
    margin-top: 0.25em;
  }

  .blog-post h2 {
    font-size: 14pt;
    margin-top: 1.5em;
    page-break-after: avoid;
  }

  .blog-post h3 {
    font-size: 12pt;
    page-break-after: avoid;
  }

  /* Keep ingredients and instructions together */
  .blog-post ul,
  .blog-post ol {
    page-break-inside: avoid;
  }


  /* Links: show URL for reference */
  .blog-post a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }

  /* Internal links: don't show URL */
  .blog-post a[href^="/"]::after {
    content: none;
  }

  .recipe-info-box {
    border: none;
    padding: 0;
  }
}
