/* ---------------------------------------------------------------------------
   CulinaLink — warm editorial landing page
   Palette: espresso ink on warm cream, terracotta accent, paper grain.
--------------------------------------------------------------------------- */

:root {
  --cream:        #f6efe2;
  --cream-deep:   #efe5d3;
  --paper:        #fbf6ec;
  --ink:          #271a10;
  --ink-soft:     #5a4633;
  --ink-faint:    #8a755e;
  --terracotta:   #bf5a2e;
  --terracotta-d: #a44a23;
  --amber:        #d68a3c;
  --line:         #d8cab1;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;

  --gutter: clamp(1.5rem, 5vw, 6rem);
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain overlay ------------------------------------------------------ */
.grain {
  position: fixed;
  inset: -20%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

em { font-style: italic; }

/* Display headings ---------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 380;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-optical-sizing: auto;
}
h1 em, h2 em { color: var(--terracotta); font-weight: 420; }

/* Layout primitives --------------------------------------------------------- */
section { padding-inline: var(--gutter); }
.section-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta-d);
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.section-label::before {
  content: "";
  width: 1.8rem; height: 1px;
  background: var(--terracotta);
  display: inline-block;
}

/* Nav ----------------------------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem var(--gutter);
  position: relative;
  z-index: 2;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.wordmark-mark {
  width: 0.72rem; height: 0.72rem;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(191, 90, 46, 0.16);
}
.nav-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.4rem 0.85rem;
  background: var(--paper);
}

/* Hero ---------------------------------------------------------------------- */
.hero {
  max-width: var(--maxw);
  margin: clamp(3rem, 9vh, 7rem) auto clamp(4rem, 12vh, 9rem);
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.8rem;
}
.hero h1 {
  font-size: clamp(2.9rem, 1.5rem + 7vw, 7rem);
  margin-bottom: 2rem;
  max-width: 16ch;
}
.lede {
  font-family: var(--display);
  font-weight: 320;
  font-size: clamp(1.18rem, 1rem + 0.9vw, 1.7rem);
  line-height: 1.42;
  color: var(--ink-soft);
  max-width: 40ch;
}
.hero-foot { margin-top: 2.6rem; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.status-dot {
  width: 0.6rem; height: 0.6rem;
  border-radius: 50%;
  background: var(--amber);
  position: relative;
}
.status-dot::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(1); opacity: 0.7; }
  70%  { transform: scale(3); opacity: 0; }
  100% { opacity: 0; }
}
.hero-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
  margin-top: 3.4rem;
  transform-origin: left;
}

/* Thesis -------------------------------------------------------------------- */
.thesis {
  max-width: var(--maxw);
  margin: clamp(4rem, 11vh, 8rem) auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.thesis .section-label { grid-column: 1 / -1; }
.thesis h2 { font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem); }
.thesis-body {
  font-size: clamp(1.02rem, 0.97rem + 0.4vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 46ch;
  align-self: end;
}

/* Steps --------------------------------------------------------------------- */
.steps {
  max-width: var(--maxw);
  margin: clamp(4rem, 12vh, 9rem) auto;
}
.step-list {
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: none;
}
.step {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: clamp(1rem, 4vw, 3.5rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num {
  font-family: var(--display);
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.6rem);
  font-weight: 360;
  color: var(--terracotta);
}
.step h3 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.3rem);
  margin-bottom: 0.85rem;
  font-weight: 400;
}
.step p { color: var(--ink-soft); max-width: 48ch; }

/* Features ------------------------------------------------------------------ */
.features {
  max-width: var(--maxw);
  margin: clamp(4rem, 12vh, 9rem) auto;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.feature {
  background: var(--paper);
  padding: clamp(1.6rem, 2.5vw, 2.4rem);
  transition: background 0.4s ease;
}
.feature:hover { background: var(--cream-deep); }
.feature h4 {
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 480;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
}
.feature p { font-size: 0.95rem; color: var(--ink-soft); }

/* Closing ------------------------------------------------------------------- */
.closing {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(5rem, 14vh, 9rem);
  margin-top: clamp(3rem, 8vh, 6rem);
  position: relative;
}
.closing-inner { max-width: var(--maxw); margin: 0 auto; }
.closing .section-label { color: var(--amber); }
.closing .section-label::before { background: var(--amber); }
.closing h2 {
  font-size: clamp(2.1rem, 1.4rem + 3.4vw, 4.2rem);
  color: var(--cream);
  margin-bottom: 1.6rem;
}
.closing h2 em { color: var(--amber); }
.closing-body {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem);
  color: #d8c6ad;
  max-width: 44ch;
}
.closing-body strong { color: var(--cream); font-weight: 600; }

/* Footer -------------------------------------------------------------------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.6rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.footer-mark { font-family: var(--display); font-size: 1.05rem; color: var(--ink); }
.footer-meta { flex: 1; min-width: 220px; }

/* Reveal animation ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .status-dot::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 860px) {
  .thesis { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 0.5rem; }
  .step-num { font-size: 1.4rem; }
  .nav-tag { display: none; }
}
