:root {
  --cream: #f6efe0;
  --parchment: #fbf7ee;
  --charcoal: #2a2521;
  --charcoal-soft: #5b524b;
  --line: #e2d5bf;

  --terracotta-100: #f3dccf;
  --terracotta-500: #b4532f;
  --terracotta-600: #983f22;

  --olive-100: #e4e8d2;
  --olive-600: #55622f;
  --olive-700: #434e24;

  --crust-100: #ebdcc6;
  --crust-500: #8b5a2b;
  --crust-700: #5e3b1b;

  --success-100: #e3efd9;
  --success-700: #3d6b2a;
  --warning-100: #f8e9c4;
  --warning-700: #7a5608;
  --error-100: #f6dcd6;
  --error-700: #9b2c1b;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(42, 37, 33, 0.08);
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--terracotta-600);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--terracotta-500);
}

:focus-visible {
  outline: 3px solid var(--olive-600);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0;
  color: var(--charcoal);
  font-weight: 700;
}

h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem);
}

h2 {
  font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem);
}

h3 {
  font-size: 1.375rem;
  font-weight: 600;
}

p {
  margin: 0;
}

.container {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--charcoal);
  color: var(--parchment);
  border-radius: 8px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive-700);
  margin-bottom: 16px;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--parchment);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-head p {
  margin-top: 16px;
  color: var(--charcoal-soft);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--terracotta-500);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(180, 83, 47, 0.25);
}

.btn-primary:hover {
  background: var(--terracotta-600);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--olive-700);
  border-color: var(--olive-600);
}

.btn-ghost:hover {
  background: var(--olive-600);
  color: #ffffff;
}

.btn-small {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.9375rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 20px rgba(42, 37, 33, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--charcoal);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
}

.brand:hover {
  color: var(--terracotta-600);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta-500);
  color: #ffffff;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  position: relative;
  font-weight: 600;
  font-size: 0.975rem;
  color: var(--charcoal);
  text-decoration: none;
  padding: 6px 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--terracotta-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover {
  color: var(--terracotta-600);
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.header-search {
  position: relative;
  width: 240px;
}

.header-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--parchment);
  font: 400 1rem/1.5 var(--font-body);
  color: var(--charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input::placeholder {
  color: var(--charcoal-soft);
}

.header-search input:focus {
  outline: none;
  border-color: var(--olive-600);
  box-shadow: 0 0 0 3px var(--olive-100);
}

.header-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--charcoal-soft);
  pointer-events: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--parchment);
  color: var(--charcoal);
  cursor: pointer;
  place-items: center;
}

/* Hero */

.hero {
  padding: 80px 0 96px;
  background:
    radial-gradient(circle at 10% 10%, var(--terracotta-100) 0, transparent 40%),
    radial-gradient(circle at 90% 80%, var(--olive-100) 0, transparent 35%),
    var(--cream);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 64px;
}

.lead {
  margin-top: 24px;
  font-size: 1.1875rem;
  color: var(--charcoal-soft);
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.hero-media {
  position: relative;
  margin: 0;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(94, 59, 27, 0.25);
  animation: rise-in 0.9s ease both;
}

.hero-badge {
  position: absolute;
  left: -20px;
  bottom: 32px;
  padding: 16px 20px;
  background: var(--parchment);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  line-height: 1.3;
}

.hero-badge strong {
  display: block;
  font-size: 1.5rem;
  color: var(--terracotta-600);
}

.hero-badge span {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--charcoal-soft);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Recipe grid */

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.recipe-card {
  display: flex;
  flex-direction: column;
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(42, 37, 33, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.recipe-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--crust-100);
}

.recipe-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.recipe-card:hover .recipe-media img {
  transform: scale(1.05);
}

.recipe-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 24px;
}

.recipe-category {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--crust-500);
}

.recipe-card p {
  color: var(--charcoal-soft);
  font-size: 0.9375rem;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--crust-100);
  color: var(--crust-700);
}

.difficulty-easy {
  background: var(--success-100);
  color: var(--success-700);
}

.difficulty-medium {
  background: var(--warning-100);
  color: var(--warning-700);
}

.difficulty-advanced {
  background: var(--error-100);
  color: var(--error-700);
}

.recipe-card .btn {
  margin-top: 16px;
  width: 100%;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--charcoal-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Dough guide */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.steps li {
  position: relative;
  padding: 32px 28px 28px;
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--olive-600);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.steps p {
  margin-top: 8px;
  color: var(--charcoal-soft);
  font-size: 0.975rem;
}

.bake-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}

.bake-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--crust-700);
  color: #fbf7ee;
}

.bake-card h3 {
  color: #fbf7ee;
}

.bake-card ul {
  margin: 16px 0 0;
  padding-left: 20px;
  color: #efe4d0;
}

.bake-card li + li {
  margin-top: 8px;
}

.bake-card.alt {
  background: var(--olive-700);
}

/* Styles */

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.style-card {
  padding: 32px;
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 4px solid var(--terracotta-500);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.style-card:nth-child(2) {
  border-top-color: var(--olive-600);
}

.style-card:nth-child(3) {
  border-top-color: var(--crust-500);
}

.style-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.style-card h3 {
  margin-bottom: 12px;
}

.style-card p {
  color: var(--charcoal-soft);
}

.style-card dl {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 0.9375rem;
}

.style-card dt {
  font-weight: 600;
  color: var(--charcoal);
}

.style-card dd {
  margin: 0;
  color: var(--charcoal-soft);
}

/* Heritage */

.heritage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.heritage-media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.heritage-copy p {
  margin-top: 20px;
  color: var(--charcoal-soft);
}

.pillars {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 20px;
}

.pillars li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
}

.pillar-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--olive-100);
  color: var(--olive-700);
}

.pillars strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--charcoal);
}

.pillars span {
  color: var(--charcoal-soft);
  font-size: 0.975rem;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.contact-card {
  padding: 40px;
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-card h3 {
  margin-bottom: 24px;
}

.info-list {
  display: grid;
  gap: 20px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
}

.info-list dt {
  grid-column: 2;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-700);
}

.info-list dd {
  grid-column: 2;
  margin: 2px 0 0;
  color: var(--charcoal);
}

.info-list svg {
  grid-row: span 2;
  color: var(--terracotta-500);
  margin-top: 2px;
}

.info-list a {
  color: var(--charcoal);
}

.newsletter-form {
  display: grid;
  gap: 16px;
}

.newsletter-form label {
  font-weight: 600;
}

.newsletter-form p {
  color: var(--charcoal-soft);
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.field-row input {
  flex: 1 1 240px;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  font: 400 1rem/1.5 var(--font-body);
  color: var(--charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-row input:focus {
  outline: none;
  border-color: var(--olive-600);
  box-shadow: 0 0 0 3px var(--olive-100);
}

.field-row .btn {
  min-height: 52px;
}

.form-status {
  min-height: 1.5em;
  font-weight: 600;
}

.form-status.is-success {
  color: var(--success-700);
}

.form-status.is-error {
  color: var(--error-700);
}

/* Recipe dialog */

.recipe-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: none;
  border-radius: 24px;
  background: var(--parchment);
  color: var(--charcoal);
  box-shadow: 0 30px 80px rgba(42, 37, 33, 0.35);
  position: relative;
}

.recipe-dialog::backdrop {
  background: rgba(42, 37, 33, 0.55);
  backdrop-filter: blur(3px);
}

.recipe-dialog[open] {
  animation: dialog-in 0.3s ease both;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dialog-content {
  padding: 40px;
}

.dialog-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 24px;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--cream);
  color: var(--charcoal);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color 0.2s ease;
}

.dialog-close:hover {
  background: var(--terracotta-100);
}

.dialog-content h2 {
  font-size: 2rem;
  margin: 12px 0 16px;
}

.dialog-content h3 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
}

.dialog-content .recipe-meta {
  padding-top: 0;
}

.dialog-content ul,
.dialog-content ol {
  margin: 0;
  padding-left: 22px;
  color: var(--charcoal-soft);
}

.dialog-content li + li {
  margin-top: 8px;
}

/* Legal pages */

.page-hero {
  padding: 72px 0 40px;
  background: var(--parchment);
  border-bottom: 1px solid var(--line);
}

.page-hero p {
  margin-top: 16px;
  color: var(--charcoal-soft);
  max-width: 640px;
}

.legal {
  padding: 64px 0 96px;
}

.legal-body {
  max-width: 760px;
}

.legal-body h2 {
  font-size: 1.625rem;
  margin: 40px 0 12px;
}

.legal-body p,
.legal-body li {
  color: var(--charcoal-soft);
}

.legal-body p + p {
  margin-top: 12px;
}

.legal-body ul {
  padding-left: 22px;
}

.updated {
  font-size: 0.9375rem;
  color: var(--olive-700);
}

/* Footer */

.site-footer {
  background: var(--charcoal);
  color: #e9e1d2;
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.site-footer h3 {
  color: #fbf7ee;
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.site-footer p {
  color: #d6cdbd;
  font-size: 0.975rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.site-footer a {
  color: #f3dccf;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #4a423b;
  font-size: 0.9375rem;
  color: #d6cdbd;
}

/* Reveal animation */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive */

@media (max-width: 1024px) {
  .header-search {
    width: 200px;
  }

  .main-nav {
    gap: 20px;
  }

  .heritage-grid,
  .hero-grid {
    gap: 48px;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: grid;
  }

  .header-search {
    display: none;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .site-header.is-open .main-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .main-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a::after {
    display: none;
  }

  .hero-grid,
  .heritage-grid,
  .contact-grid,
  .bake-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 56px 0 72px;
  }

  .hero-badge {
    left: 16px;
  }

  .heritage-media {
    order: -1;
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(1180px, 100% - 32px);
  }

  .header-inner {
    min-height: 72px;
  }

  .brand {
    font-size: 1.0625rem;
  }

  .cta-row .btn {
    width: 100%;
  }

  .contact-card,
  .dialog-content {
    padding: 28px 24px;
  }

  .style-card {
    padding: 28px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js-reveal .reveal {
    opacity: 1;
    transform: none;
  }
}
