/* ============================================================
   Feiper Cocina : Oaxacan cooking without vegetable oil
   Palette drawn from Oaxaca: barro negro clay, masa cream,
   terracotta comal, cochineal red, cempasuchil marigold.
   ============================================================ */

:root {
  --ink: #26160f;
  --ink-soft: #40281a;
  --masa: #f8f1e3;
  --masa-deep: #efe2ca;
  --clay: #b04a22;
  --cochineal: #8c2c28;
  --marigold: #e0992f;
  --leaf: #5d6b3f;
  --paper: #fffaf0;
  --line: rgba(38, 22, 15, 0.14);
  --shadow: 0 18px 44px rgba(38, 22, 15, 0.16);
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 264px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--masa);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--cochineal); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; }

.kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
}

/* ---------- Sidebar navigation ---------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(178deg, #26160f 0%, #33190f 62%, #3d1c10 100%);
  color: var(--masa);
  display: flex;
  flex-direction: column;
  padding: 2.4rem 1.9rem 1.8rem;
  z-index: 60;
  transition: transform 0.34s ease;
}

.sidebar-brand {
  text-decoration: none;
  color: var(--masa);
  display: block;
  margin-bottom: 0.5rem;
}

.sidebar-brand .brand-mark {
  font-size: 1.9rem;
  display: block;
  margin-bottom: 0.55rem;
}

.sidebar-brand .brand-name {
  font-family: var(--font-display);
  font-size: 1.42rem;
  letter-spacing: 0.015em;
  display: block;
}

.sidebar-tagline {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(248, 241, 227, 0.55);
  margin-bottom: 2.6rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-nav a {
  color: rgba(248, 241, 227, 0.82);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-nav a:hover {
  color: var(--marigold);
  background: rgba(224, 153, 47, 0.09);
  border-left-color: var(--marigold);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(248, 241, 227, 0.16);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-foot a {
  color: rgba(248, 241, 227, 0.5);
  text-decoration: none;
  font-size: 0.83rem;
}

.sidebar-foot a:hover { color: var(--marigold); }

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 80;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--ink);
  color: var(--masa);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(38, 22, 15, 0.35);
}

.sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .sidebar-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .sidebar-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .sidebar-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(38, 22, 15, 0.5);
  z-index: 50;
  border: none;
  cursor: pointer;
}

body.nav-open .scrim { display: block; }

.page { margin-left: var(--sidebar-w); }

/* ---------- Hero, full bleed ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--paper);
  background:
    linear-gradient(rgba(24, 12, 7, 0.58), rgba(24, 12, 7, 0.34) 45%, rgba(24, 12, 7, 0.72)),
    url("https://images.unsplash.com/photo-1584208632869-05fa2b2a5934?w=1600&q=80&auto=format&fit=crop") center / cover no-repeat;
}

.hero-inner {
  max-width: 760px;
  padding: 6rem 2rem;
}

.hero .kicker { color: var(--marigold); margin-bottom: 1.2rem; }

.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 500;
  margin-bottom: 1.3rem;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  color: var(--marigold);
}

.hero p.lede {
  font-size: 1.16rem;
  line-height: 1.6;
  color: rgba(255, 250, 240, 0.88);
  max-width: 560px;
  margin: 0 auto 2.2rem;
}

.btn-hero {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--marigold);
  padding: 1rem 2.3rem;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-hero:hover {
  background: #eeb054;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 250, 240, 0.65);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------- Shared section shell ---------- */

.section { padding: 5.5rem 2rem; }

.section-inner { max-width: 980px; margin: 0 auto; }

.section-head { max-width: 620px; margin-bottom: 3.2rem; }

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  margin: 0.6rem 0 0.9rem;
}

.section-head p { color: var(--ink-soft); }

/* ---------- Principles, vertical timeline ---------- */

.principles { background: var(--masa-deep); }

.timeline {
  list-style: none;
  position: relative;
  padding-left: 2.4rem;
  max-width: 700px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(var(--clay), var(--marigold));
  border-radius: 2px;
}

.timeline li { position: relative; padding: 0 0 2.6rem 0.6rem; }

.timeline li:last-child { padding-bottom: 0.4rem; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -2.05rem;
  top: 0.42em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--marigold);
  border: 3px solid var(--masa-deep);
  box-shadow: 0 0 0 2px var(--clay);
}

.timeline .tl-word {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.55rem;
  color: var(--cochineal);
  display: block;
}

.timeline .tl-title {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
  display: block;
  margin: 0.2rem 0 0.5rem;
}

.timeline p { color: var(--ink-soft); max-width: 560px; }

/* ---------- Recipes, accordion ---------- */

.acc-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 1.1rem;
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.acc-item.open {
  border-color: rgba(176, 74, 34, 0.45);
  box-shadow: var(--shadow);
}

.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.3rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.35rem 1.6rem;
  font-family: inherit;
  color: inherit;
}

.acc-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--clay);
  min-width: 2.2rem;
}

.acc-titles { flex: 1; }

.acc-titles h3 { font-size: 1.35rem; margin-bottom: 0.15rem; }

.acc-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf);
}

.acc-chev {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--clay);
  border-bottom: 2px solid var(--clay);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.acc-item.open .acc-chev { transform: rotate(225deg); }

.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s ease;
}

.acc-item.open .acc-body { grid-template-rows: 1fr; }

.acc-body-in { overflow: hidden; }

.acc-content {
  padding: 0 1.6rem 1.8rem;
  border-top: 1px dashed var(--line);
}

.recipe-photo {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 14px;
  margin: 1.5rem 0 1.2rem;
}

.recipe-desc { color: var(--ink-soft); max-width: 640px; margin-bottom: 1.2rem; }

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}

.recipe-meta span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--cochineal);
  background: rgba(140, 44, 40, 0.08);
  border: 1px solid rgba(140, 44, 40, 0.22);
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
}

.recipe-cols {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 2.2rem;
}

.recipe-cols h4 {
  font-size: 1.12rem;
  color: var(--clay);
  margin-bottom: 0.7rem;
}

.recipe-cols ul { list-style: none; }

.recipe-cols ul li {
  padding: 0.42rem 0 0.42rem 1.3rem;
  position: relative;
  border-bottom: 1px dotted var(--line);
  font-size: 0.97rem;
}

.recipe-cols ul li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.95em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--marigold);
}

.recipe-cols ol {
  list-style: none;
  counter-reset: step;
}

.recipe-cols ol li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1rem 2.6rem;
  font-size: 0.99rem;
}

.recipe-cols ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--marigold);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- About, two columns + quote ---------- */

.about { background: var(--ink); color: var(--masa); }

.about .kicker { color: var(--marigold); }

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3.4rem;
  align-items: center;
}

.about-grid h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin: 0.6rem 0 1.1rem; }

.about-grid p { color: rgba(248, 241, 227, 0.82); margin-bottom: 1rem; }

.quote-box {
  background: rgba(248, 241, 227, 0.06);
  border: 1px solid rgba(224, 153, 47, 0.4);
  border-radius: 18px;
  padding: 2.4rem 2.2rem;
  position: relative;
}

.quote-box::before {
  content: "\201C";
  font-family: var(--font-display);
  font-size: 4.6rem;
  line-height: 1;
  color: var(--marigold);
  display: block;
  margin-bottom: 0.4rem;
}

.quote-box blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.45rem;
  line-height: 1.4;
  color: var(--masa);
}

.quote-box cite {
  display: block;
  margin-top: 1.2rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(248, 241, 227, 0.55);
}

/* ---------- Footer ---------- */

.site-footer {
  background: #1c100a;
  color: rgba(248, 241, 227, 0.75);
  padding: 4rem 2rem 2.4rem;
}

.footer-grid {
  max-width: 980px;
  margin: 0 auto 2.6rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.6rem;
}

.footer-grid h4 {
  color: var(--marigold);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--masa);
  margin-bottom: 0.6rem;
}

.footer-grid p { font-size: 0.93rem; }

.footer-grid ul { list-style: none; }

.footer-grid ul li { margin-bottom: 0.45rem; }

.footer-grid a {
  color: rgba(248, 241, 227, 0.75);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-grid a:hover { color: var(--marigold); }

.footer-legal {
  max-width: 980px;
  margin: 0 auto;
  border-top: 1px solid rgba(248, 241, 227, 0.14);
  padding-top: 1.6rem;
  font-size: 0.83rem;
  color: rgba(248, 241, 227, 0.5);
  line-height: 1.7;
}

/* ---------- Legal pages ---------- */

.legal-top {
  background: var(--ink);
  padding: 1.2rem 2rem;
}

.legal-top a {
  color: var(--masa);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.legal-top a:hover { color: var(--marigold); }

.legal-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

.legal-wrap h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-bottom: 0.5rem;
}

.legal-updated {
  font-size: 0.88rem;
  color: var(--clay);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2.4rem;
}

.legal-wrap h2 {
  font-size: 1.45rem;
  margin: 2.2rem 0 0.8rem;
  color: var(--cochineal);
}

.legal-wrap p, .legal-wrap li { color: var(--ink-soft); margin-bottom: 0.9rem; }

.legal-wrap ul { padding-left: 1.4rem; }

.company-contact-box {
  margin-top: 3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--marigold);
  border-radius: 12px;
  padding: 1.8rem 2rem;
}

.company-contact-box h3 {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
  color: var(--ink);
}

.company-contact-box p { margin-bottom: 0.25rem; font-size: 0.95rem; }

/* ---------- Scroll reveal (JS adds .is-vis) ---------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js [data-reveal].is-vis {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .acc-body { transition: none; }
}

/* ---------- Breakpoints: 1100 / 760 / 440 ---------- */

@media (max-width: 1100px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 30px 0 60px rgba(38, 22, 15, 0.35); }
  .sidebar-toggle { display: block; }
  .page { margin-left: 0; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .section { padding: 4rem 1.4rem; }
  .recipe-cols { grid-template-columns: 1fr; gap: 1.6rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .recipe-photo { height: 230px; }
  .hero-inner { padding: 6rem 1.4rem; }
}

@media (max-width: 440px) {
  .section { padding: 3.2rem 1.1rem; }
  .acc-head { padding: 1.1rem 1.1rem; gap: 0.85rem; }
  .acc-content { padding: 0 1.1rem 1.4rem; }
  .acc-titles h3 { font-size: 1.15rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .quote-box { padding: 1.8rem 1.5rem; }
  .recipe-photo { height: 190px; }
  .timeline { padding-left: 2rem; }
}
