/* =========================================================
   Rambla Cocina — Uruguayan recipes, no vegetable oil
   ========================================================= */

:root {
  --ink: #241811;
  --ink-soft: #4a382c;
  --cream: #f8f1e4;
  --cream-deep: #efe4cd;
  --paper: #fffdf8;
  --ember: #bd5b2c;
  --ember-deep: #93401d;
  --river: #2c4a58;
  --gold: #b78a34;
  --line: rgba(36, 24, 17, 0.14);
  --line-soft: rgba(36, 24, 17, 0.08);
  --shadow: 0 24px 48px -24px rgba(36, 24, 17, 0.35);
  --shadow-soft: 0 12px 28px -16px rgba(36, 24, 17, 0.28);

  --font-display: "Sorts Mill Goudy", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --nav-height: 84px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.01em;
}

em { font-style: italic; }

a { color: inherit; text-decoration: none; }

.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember-deep);
  margin: 0 0 14px;
}
.kicker.center { display: block; text-align: center; }

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}

section h2 {
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  text-align: center;
  max-width: 720px;
  margin: 0 auto 18px;
  line-height: 1.18;
}

.section-lede {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
  color: var(--ink-soft);
  font-size: 17px;
}

/* ---------- reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none; opacity: 1; transform: none; }
}

/* =========================================================
   Header / Nav — fixed navbar, solidifies on scroll
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, height 0.35s ease;
}
.site-header.is-solid {
  background: rgba(248, 241, 228, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px -18px rgba(36, 24, 17, 0.4);
  height: 72px;
}

.header-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
}
.site-header:not(.is-solid) .brand { color: var(--paper); }
.brand-mark { font-size: 24px; line-height: 1; }
.brand-name em { color: var(--ember); font-style: italic; }
.site-header:not(.is-solid) .brand-name em { color: #f0c48a; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 38px;
}
.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
}
.site-header:not(.is-solid) .main-nav a { color: rgba(255,250,240,0.92); }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1.5px;
  background: currentColor;
  transition: right 0.3s ease;
}
.main-nav a:hover::after { right: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.site-header:not(.is-solid) .nav-toggle span { background: var(--paper); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Hero — split layout
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
}

.hero-media {
  position: relative;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 100%;
}
.hero-media-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(24, 15, 10, 0.55) 0%, rgba(24, 15, 10, 0.15) 55%, rgba(24, 15, 10, 0.05) 100%),
    linear-gradient(0deg, rgba(24, 15, 10, 0.55) 0%, rgba(24, 15, 10, 0) 30%);
}

.hero-copy {
  background: var(--ink);
  background-image: radial-gradient(circle at 85% 15%, rgba(189, 91, 44, 0.28), transparent 55%);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(36px, 6vw, 88px);
}
.hero-copy .kicker { color: #f0c48a; }
.hero-copy h1 {
  color: var(--paper);
  font-size: clamp(2.6rem, 4.6vw, 4.1rem);
  line-height: 1.1;
  margin-bottom: 24px;
}
.hero-copy h1 em { color: #f0c48a; font-style: italic; }
.hero-lede {
  color: rgba(248, 241, 228, 0.82);
  font-size: 18px;
  max-width: 460px;
  margin: 0 0 36px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 16px 32px;
  background: var(--ember);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
  transition: background 0.3s ease, transform 0.3s ease;
}
.btn-primary:hover { background: var(--ember-deep); transform: translateY(-2px); }

/* =========================================================
   Principles — 3 cards
   ========================================================= */
.principles {
  padding: 118px 0 108px;
  background: var(--cream);
}

.principle-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.principle-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 42px 34px;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.principle-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.principle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--cream-deep);
  color: var(--ember);
  margin-bottom: 22px;
}
.principle-icon svg { width: 26px; height: 26px; }

.principle-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}
.principle-card p {
  color: var(--ink-soft);
  font-size: 15.5px;
  margin: 0;
}

/* =========================================================
   Recipes — grid of expandable cards
   ========================================================= */
.recipes {
  padding: 108px 0 128px;
  background: var(--cream-deep);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(189, 91, 44, 0.08), transparent 45%),
    radial-gradient(circle at 92% 92%, rgba(44, 74, 88, 0.08), transparent 45%);
}

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

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

.recipe-card-trigger {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.recipe-card-media {
  position: relative;
  display: block;
  height: 220px;
  overflow: hidden;
}
.recipe-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.recipe-card-trigger:hover .recipe-card-media img { transform: scale(1.06); }

.recipe-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(36, 24, 17, 0.82);
  color: var(--paper);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 2px;
}

.recipe-card-body {
  display: block;
  padding: 26px 28px 24px;
}

.recipe-title {
  display: block;
  font-family: var(--font-display);
  font-size: 25px;
  color: var(--ink);
  margin-bottom: 4px;
}
.recipe-sub {
  display: block;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--river);
}
.recipe-meta span::before { content: "\2022"; margin-right: 8px; color: var(--ember); }
.recipe-meta span:first-child::before { content: none; }

.recipe-expand-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ember-deep);
  text-transform: uppercase;
}
.recipe-expand-label svg {
  width: 15px;
  height: 15px;
  transition: transform 0.35s ease;
}
.recipe-card.is-open .recipe-expand-label svg { transform: rotate(180deg); }

.recipe-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  border-top: 1px solid var(--line-soft);
}
.recipe-details.is-open {
  max-height: 1400px;
}

.recipe-desc {
  padding: 24px 28px 4px;
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0;
}

.recipe-columns {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
  padding: 20px 28px 30px;
}

.recipe-ingredients h4,
.recipe-method h4 {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember-deep);
  margin-bottom: 14px;
}

.recipe-ingredients ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.recipe-ingredients li { margin-bottom: 8px; }

.recipe-method ol {
  margin: 0;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.recipe-method li { margin-bottom: 12px; }

/* =========================================================
   About — centered single block
   ========================================================= */
.about {
  padding: 128px 0;
  background: var(--ink);
  background-image: radial-gradient(circle at 50% 0%, rgba(189, 91, 44, 0.16), transparent 60%);
}

.about-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 40px;
  text-align: center;
  color: rgba(248, 241, 228, 0.86);
}
.about-inner .kicker { color: #f0c48a; }
.about-inner h2 {
  color: var(--paper);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  margin-bottom: 30px;
}
.about-inner p { margin: 0 0 20px; font-size: 17px; line-height: 1.75; }

.about-divider {
  display: block;
  width: 64px;
  height: 2px;
  background: var(--ember);
  margin: 34px auto;
}

.about-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 21px;
  color: #f0c48a;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: #180f0a;
  color: rgba(248, 241, 228, 0.75);
  padding: 80px 0 36px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 48px;
  align-items: start;
}

.footer-brand .brand { color: var(--paper); margin-bottom: 14px; }
.footer-brand .brand-name em { color: #f0c48a; }
.footer-brand p { font-size: 14.5px; max-width: 300px; color: rgba(248, 241, 228, 0.65); }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links a {
  font-size: 14.5px;
  color: rgba(248, 241, 228, 0.75);
}
.footer-links a:hover { color: #f0c48a; }

.company-contact-box {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(248, 241, 228, 0.62);
  border-left: 1px solid rgba(248, 241, 228, 0.18);
  padding-left: 24px;
}
.company-contact-box p { margin: 0 0 3px; }
.company-contact-box .company-name {
  color: rgba(248, 241, 228, 0.88);
  font-weight: 600;
  margin-bottom: 6px;
}

.footer-copyright {
  max-width: 1180px;
  margin: 56px auto 0;
  padding: 24px 40px 0;
  border-top: 1px solid rgba(248, 241, 228, 0.12);
  font-size: 12.5px;
  color: rgba(248, 241, 228, 0.45);
}

/* =========================================================
   Legal pages (privacy / terms / disclaimer)
   ========================================================= */
.legal-page {
  padding: calc(var(--nav-height) + 64px) 0 100px;
  background: var(--cream);
  min-height: 100vh;
}
.legal-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 40px;
}
.legal-inner .kicker { display: block; }
.legal-inner h1 {
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  margin-bottom: 8px;
}
.legal-updated {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 48px;
}
.legal-inner h2 {
  text-align: left;
  max-width: none;
  margin: 44px 0 16px;
  font-size: 24px;
}
.legal-inner p, .legal-inner li {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}
.legal-inner ul { padding-left: 22px; }
.legal-inner a { color: var(--ember-deep); text-decoration: underline; }
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ember-deep);
}

/* =========================================================
   Responsive — 1024 / 768 / 480
   ========================================================= */
@media (max-width: 1024px) {
  .header-inner, .section-inner, .footer-inner, .legal-inner { padding-left: 32px; padding-right: 32px; }

  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-media { height: 52vh; }
  .hero-copy { padding: 64px 32px; }

  .principle-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .recipe-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .company-contact-box { grid-column: 1 / -1; border-left: none; padding-left: 0; border-top: 1px solid rgba(248,241,228,0.18); padding-top: 24px; }
}

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

  .main-nav {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .main-nav.is-open { max-height: 320px; }
  .main-nav a {
    width: 100%;
    padding: 16px 32px;
    color: var(--ink) !important;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-toggle { display: flex; }

  .principle-grid { grid-template-columns: 1fr; }
  .recipe-grid { grid-template-columns: 1fr; }
  .recipe-columns { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; }
  .company-contact-box { border-top: 1px solid rgba(248,241,228,0.18); padding-top: 24px; }
}

@media (max-width: 480px) {
  .header-inner, .section-inner, .footer-inner, .legal-inner { padding-left: 20px; padding-right: 20px; }
  body { font-size: 16.5px; }

  .hero-copy { padding: 48px 20px; }
  .hero-copy h1 { font-size: 2.2rem; }

  .principles, .recipes { padding: 76px 0; }
  .about { padding: 88px 0; }

  .principle-card { padding: 30px 24px; }
  .recipe-card-body { padding: 22px 20px 20px; }
  .recipe-columns { padding: 18px 20px 24px; }
  .recipe-desc { padding: 20px 20px 4px; }

  .btn-primary { width: 100%; justify-content: center; }
}
