:root {
  --cream: #f6efe2;
  --parchment: #efe4cf;
  --paper: #fbf7ef;
  --charcoal: #2a2521;
  --charcoal-soft: #5c534b;
  --terracotta-700: #8f3b22;
  --terracotta-600: #a94a2c;
  --terracotta-500: #c8643f;
  --terracotta-100: #f4dccd;
  --olive-700: #3f4e24;
  --olive-600: #55652f;
  --olive-100: #e3e8d3;
  --crust-700: #5e3b1f;
  --crust-500: #9a6a3c;
  --crust-100: #ebdcc6;
  --success-700: #2f6b3a;
  --success-100: #dcefe0;
  --warning-700: #8a5a00;
  --warning-100: #faefcf;
  --error-700: #9b2c2c;
  --error-100: #f8dede;
  --line: rgba(42, 37, 33, 0.14);
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-soft: 0 12px 32px rgba(60, 40, 20, 0.1);
  --shadow-lift: 0 20px 44px rgba(60, 40, 20, 0.18);
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

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

a {
  color: inherit;
}

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

p {
  margin: 0;
}

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

.container {
  width: min(1160px, 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: -64px;
  background: var(--charcoal);
  color: var(--cream);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.2s ease;
}

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

/* 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-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--terracotta-600);
  color: #fffaf2;
  box-shadow: 0 8px 20px rgba(169, 74, 44, 0.3);
}

.btn-primary:hover {
  background: var(--terracotta-700);
}

.btn-outline {
  background: transparent;
  color: #fffaf2;
  border-color: rgba(255, 250, 242, 0.8);
}

.btn-outline:hover {
  background: #fffaf2;
  color: var(--charcoal);
}

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

.btn-ghost:hover {
  background: var(--olive-700);
  border-color: var(--olive-700);
  color: #fffaf2;
}

.btn-small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 15px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 239, 226, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(60, 40, 20, 0.08);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--charcoal);
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--terracotta-600);
  display: grid;
  place-items: center;
  color: #fffaf2;
  flex-shrink: 0;
}

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

.main-nav a {
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--charcoal-soft);
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

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

.main-nav a:hover,
.main-nav a[aria-current='true'] {
  color: var(--charcoal);
}

.main-nav a:hover::after,
.main-nav a[aria-current='true']::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--charcoal);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
  background: var(--parchment);
  border-color: var(--crust-500);
}

.menu-toggle {
  display: none;
}

/* Hero */

.hero {
  position: relative;
  min-height: min(92vh, 760px);
  display: flex;
  align-items: center;
  color: #fffaf2;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 18s ease-out forwards;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(31, 24, 19, 0.88) 0%, rgba(31, 24, 19, 0.6) 55%, rgba(31, 24, 19, 0.35) 100%);
}

.hero-content {
  padding-block: 96px;
  max-width: 680px;
}

.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--crust-100);
  margin-bottom: 16px;
}

.hero h1 {
  color: #fffaf2;
  font-size: clamp(40px, 6vw, 68px);
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 20px;
  line-height: 1.5;
  color: #f3e9d8;
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero .btn-primary {
  background: var(--terracotta-500);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.hero .btn-primary:hover {
  background: var(--terracotta-600);
}

@keyframes heroZoom {
  to {
    transform: scale(1);
  }
}

/* Sections */

.section {
  padding-block: 112px;
}

.section-alt {
  background: var(--parchment);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(32px, 4vw, 44px);
  margin-top: 8px;
  max-width: 640px;
}

.section-intro {
  color: var(--charcoal-soft);
  max-width: 460px;
}

.section-title {
  font-size: clamp(32px, 4vw, 44px);
  margin-top: 8px;
}

.eyebrow-dark {
  color: var(--olive-700);
}

/* Search */

.search {
  position: relative;
  width: min(360px, 100%);
}

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

.search input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px 12px 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
  font-size: 16px;
  color: var(--charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search input::placeholder {
  color: #7a7068;
}

.search input:focus {
  outline: none;
  border-color: var(--olive-600);
  box-shadow: 0 0 0 4px rgba(85, 101, 47, 0.18);
}

/* Recipe grid */

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

.recipe-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

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

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

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

.recipe-card:hover .recipe-photo img {
  transform: scale(1.06);
}

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

.recipe-body h3 {
  font-size: 24px;
}

.recipe-body p {
  color: var(--charcoal-soft);
  font-size: 16px;
}

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

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

.chip-difficulty[data-level='Easy'] {
  background: var(--success-100);
  color: var(--success-700);
}

.chip-difficulty[data-level='Medium'] {
  background: var(--warning-100);
  color: var(--warning-700);
}

.chip-difficulty[data-level='Advanced'] {
  background: var(--error-100);
  color: var(--error-700);
}

.recipe-card .btn {
  width: 100%;
}

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

/* Dough steps */

.dough-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.dough-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  aspect-ratio: 4 / 5;
}

.dough-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dough-steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  gap: 8px;
}

.dough-steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.dough-steps li:first-child {
  border-top: 1px solid var(--line);
}

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--terracotta-600);
  color: var(--terracotta-700);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  display: grid;
  place-items: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dough-steps li:hover .step-num {
  background: var(--terracotta-600);
  color: #fffaf2;
}

.dough-steps h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.dough-steps p {
  color: var(--charcoal-soft);
}

/* Heritage */

.heritage {
  text-align: center;
}

.heritage-lead {
  max-width: 720px;
  margin: 0 auto 64px;
  font-size: 20px;
  color: var(--charcoal-soft);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  text-align: left;
}

.pillar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.pillar:hover {
  transform: translateY(-4px);
  border-color: var(--olive-600);
}

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

.pillar h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.pillar p {
  color: var(--charcoal-soft);
  font-size: 16px;
}

/* About */

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

.about-copy h2 {
  font-size: clamp(32px, 4vw, 44px);
  margin: 8px 0 24px;
}

.about-copy p + p {
  margin-top: 16px;
}

.about-copy p {
  color: var(--charcoal-soft);
}

.note {
  margin-top: 32px;
  padding: 16px 24px;
  border-left: 4px solid var(--olive-600);
  background: var(--olive-100);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--olive-700);
}

/* Contact */

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

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  font-size: 26px;
  margin-bottom: 24px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 24px;
}

.info-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--terracotta-100);
  color: var(--terracotta-700);
  display: grid;
  place-items: center;
}

.info-list strong {
  display: block;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  margin-bottom: 4px;
}

.info-list a {
  text-decoration: none;
  border-bottom: 1px solid var(--crust-500);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.info-list a:hover {
  color: var(--terracotta-700);
  border-color: var(--terracotta-700);
}

.company-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

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

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

.field {
  display: grid;
  gap: 8px;
}

.newsletter-form input[type='email'],
.newsletter-form input[type='text'],
.newsletter-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #b9ab98;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-form textarea {
  min-height: 112px;
  resize: vertical;
}

.newsletter-form input:focus,
.newsletter-form textarea:focus {
  outline: none;
  border-color: var(--olive-600);
  box-shadow: 0 0 0 4px rgba(85, 101, 47, 0.18);
}

.newsletter-form input[aria-invalid='true'] {
  border-color: var(--error-700);
}

.field-error {
  color: var(--error-700);
  font-size: 14px;
  min-height: 20px;
}

.form-status {
  font-size: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  display: none;
}

.form-status.is-success {
  display: block;
  background: var(--success-100);
  color: var(--success-700);
}

.form-status.is-error {
  display: block;
  background: var(--error-100);
  color: var(--error-700);
}

.hours {
  margin-top: 16px;
  color: var(--charcoal-soft);
  font-size: 16px;
}

/* Recipe modal */

.recipe-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--charcoal);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.recipe-dialog::backdrop {
  background: rgba(31, 24, 19, 0.6);
  backdrop-filter: blur(3px);
}

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

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

.dialog-scroll {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.dialog-photo {
  position: relative;
  aspect-ratio: 16 / 7;
  background: var(--crust-100);
}

.dialog-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 250, 242, 0.95);
  border-color: transparent;
}

.dialog-body {
  padding: 32px 40px 40px;
}

.dialog-body h2 {
  font-size: 34px;
  margin: 8px 0 16px;
}

.dialog-body > p {
  color: var(--charcoal-soft);
}

.dialog-cols {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  margin-top: 32px;
}

.dialog-cols h3 {
  font-size: 22px;
  margin-bottom: 16px;
}

.ingredients {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ingredients li {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  font-size: 16px;
}

.method {
  margin: 0;
  padding-left: 24px;
  display: grid;
  gap: 16px;
  font-size: 16px;
}

.method li::marker {
  color: var(--terracotta-700);
  font-weight: 700;
}

/* Footer */

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

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 250, 242, 0.14);
}

.site-footer .logo {
  color: #fffaf2;
}

.footer-tagline {
  margin-top: 16px;
  max-width: 340px;
  font-size: 16px;
  color: #d6ccbb;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-nav a {
  color: #fffaf2;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-size: 15px;
  color: #d6ccbb;
}

.footer-bottom a {
  color: #fffaf2;
}

/* Legal pages */

.legal-page {
  padding-block: 72px 112px;
}

.legal-page h1 {
  font-size: clamp(36px, 5vw, 52px);
  margin: 8px 0 16px;
}

.legal-page .updated {
  color: var(--charcoal-soft);
  font-size: 16px;
  margin-bottom: 48px;
}

.legal-page article {
  max-width: 760px;
}

.legal-page h2 {
  font-size: 26px;
  margin: 48px 0 16px;
}

.legal-page p,
.legal-page li {
  color: #3d3631;
  font-size: 17px;
}

.legal-page p + p,
.legal-page ul {
  margin-top: 16px;
}

.legal-page ul {
  padding-left: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  color: var(--olive-700);
}

.back-link:hover {
  color: var(--terracotta-700);
}

/* Reveal animation */

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

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

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

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

/* Responsive */

@media (max-width: 1024px) {
  .main-nav {
    gap: 20px;
  }

  .about-grid,
  .dough-layout,
  .contact-grid {
    gap: 40px;
  }
}

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

  .main-nav {
    position: fixed;
    top: var(--header-h);
    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: 0 16px 32px rgba(60, 40, 20, 0.12);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  }

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

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

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

  .dough-layout,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .dough-photo {
    aspect-ratio: 16 / 10;
  }

  .section {
    padding-block: 80px;
  }

  .dialog-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
  }

  .container {
    width: min(100% - 32px, 1160px);
  }

  .hero-content {
    padding-block: 72px;
  }

  .hero-lead {
    font-size: 18px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section {
    padding-block: 64px;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .search {
    width: 100%;
  }

  .card {
    padding: 28px 24px;
  }

  .dialog-body {
    padding: 24px 20px 32px;
  }

  .dough-steps li {
    grid-template-columns: 44px 1fr;
    gap: 16px;
  }

  .step-num {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .footer-nav {
    gap: 16px;
  }
}
