/* ==========================================================================
   Tastemaker Landing Page
   Design system + all styles. No build step required.
   ========================================================================== */

/* --- Design Tokens --- */
:root {
  --color-bg: #2c2a26;
  --color-text: #ece8e1;
  --color-text-secondary: #a09890;
  --color-accent: #c4956a;
  --color-accent-hover: #d4a87d;
  --color-border: #3d3a35;
  --color-surface: #353230;

  --font-content: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;

  --content-width: 640px;
  --page-padding: 24px;

  --line-height-body: 1.75;
  --line-height-tight: 1.3;

  --section-gap: 140px;
}

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ui);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: var(--line-height-body);
}

/* --- Layout --- */
.page-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

section {
  margin-bottom: var(--section-gap);
}

/* --- Typography --- */
h1 {
  font-family: var(--font-content);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

h2 {
  font-family: var(--font-content);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: var(--line-height-tight);
  margin-bottom: 1rem;
}

h3 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

p {
  margin-bottom: 1.25rem;
}

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

em {
  font-style: italic;
}

strong {
  font-weight: 600;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--color-accent);
}

/* --- Header --- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  margin-bottom: 3rem;
}

.wordmark {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: none;
}

.wordmark:hover {
  border-bottom: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-link {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--color-accent);
}

.header-link-secondary {
  color: var(--color-text-secondary);
}

.header-link-secondary:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text-secondary);
}

/* --- Hero --- */
.hero {
  margin-bottom: var(--section-gap);
  padding-top: 4rem;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 1.5rem;
}

.hero .subhead {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: var(--line-height-body);
  max-width: 520px;
}

.hero .cta-link {
  display: inline-block;
  margin-top: 2.5rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent);
}

.hero .cta-link:hover {
  color: var(--color-accent-hover);
  border-bottom-color: var(--color-accent-hover);
}

/* --- Section Dividers --- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--section-gap) 0;
}

/* --- Problem Section --- */
.problem p {
  font-family: var(--font-content);
  font-size: 1.15rem;
  line-height: 1.8;
}

/* --- How It Works --- */
.steps {
  list-style: none;
}

.step {
  margin-bottom: 2.5rem;
}

.step:last-child {
  margin-bottom: 0;
}

.step-number {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

.step-title {
  font-family: var(--font-content);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.step-desc {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* --- Passage Cards (Demonstration) --- */
.demo-intro {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
}

.passage-card {
  background-color: var(--color-surface);
  border-left: 3px solid var(--color-border);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}

.passage-content {
  font-family: var(--font-content);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.passage-attribution {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.passage-labels {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.label-tag {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--color-border);
}

/* --- Analysis Sample --- */
.analysis-sample {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.analysis-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.analysis-text {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.7;
}

/* --- Value Props --- */
.value-prop {
  margin-bottom: 3rem;
}

.value-prop:last-child {
  margin-bottom: 0;
}

.value-prop h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.value-prop p {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- About / Philosophy --- */
.about p {
  font-family: var(--font-content);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* --- Founder Note --- */
.founder-note {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.founder-note p {
  font-family: var(--font-content);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.founder-sig {
  font-family: var(--font-content);
  font-size: 0.95rem;
  font-style: normal;
  color: var(--color-text);
  margin-top: 1rem;
}

/* --- Closing CTA --- */
.closing {
  text-align: left;
  padding-bottom: 6rem;
}

.closing .cta-link {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent);
  margin-bottom: 1rem;
}

.closing .cta-link:hover {
  color: var(--color-accent-hover);
  border-bottom-color: var(--color-accent-hover);
}

.closing .cta-note {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-bottom: 3rem;
}

.closing .tagline {
  font-family: var(--font-content);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-text-secondary);
}

/* --- Animations --- */

/* Scroll-reveal: elements start invisible and translate up */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Staggered children — each child delays slightly */
.reveal-stagger .reveal {
  transition-delay: 0s;
}

.reveal-stagger .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger .reveal:nth-child(4) { transition-delay: 0.3s; }

/* Hero entrance — slower, more dramatic */
.hero-enter {
  opacity: 0;
  transform: translateY(32px);
  animation: heroFadeIn 1.2s ease forwards;
  animation-delay: 0.15s;
}

.hero-enter-sub {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 1s ease forwards;
  animation-delay: 0.5s;
}

.hero-enter-cta {
  opacity: 0;
  animation: heroFadeIn 0.8s ease forwards;
  animation-delay: 0.85s;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Passage card hover effects */
.passage-card {
  transition: border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  cursor: default;
}

.passage-card:hover {
  border-left-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.passage-card:hover .passage-content {
  color: var(--color-text);
}

.passage-content {
  transition: color 0.3s ease;
}

/* Analysis sample — fade up with slight delay after passage cards */
.analysis-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease 0.2s, transform 1s ease 0.2s;
}

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

/* Divider animation — grows from left */
.divider {
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.8s ease;
}

.divider.visible {
  transform: scaleX(1);
}

/* Value prop hover — heading accent color on hover */
.value-prop {
  transition: transform 0.2s ease;
}

.value-prop h2 {
  transition: color 0.3s ease;
}

.value-prop:hover h2 {
  color: var(--color-accent);
}

/* Label tags — subtle hover */
.label-tag {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.passage-card:hover .label-tag {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Step items — subtle slide on hover */
.step {
  transition: transform 0.2s ease;
}

.step:hover {
  transform: translateX(4px);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .analysis-reveal,
  .divider,
  .passage-card,
  .value-prop,
  .step {
    transition: none;
    opacity: 1;
    transform: none;
    clip-path: none;
  }

  .hero-enter,
  .hero-enter-sub,
  .hero-enter-cta {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* --- Responsive --- */
@media (max-width: 680px) {
  :root {
    --section-gap: 100px;
    --page-padding: 20px;
  }

  html {
    font-size: 16px;
  }

  .hero {
    padding-top: 2rem;
  }

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

  h2 {
    font-size: 1.3rem;
  }

  .passage-card {
    padding: 1.25rem 1.5rem;
  }

  .site-header {
    margin-bottom: 2rem;
  }
}

@media (max-width: 400px) {
  html {
    font-size: 15px;
  }

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

  .passage-labels {
    flex-wrap: wrap;
  }
}
