/* Pegavo Cocina, stylesheet
   Cuban home cooking, editorial content site. No commerce, no tracking beyond gtag in index head.
*/

:root {
  --cream: #FBF3E7;
  --cream-deep: #F2E3CB;
  --mahogany: #3B2418;
  --mahogany-soft: #5B3826;
  --terracotta: #B8481F;
  --terracotta-deep: #8A3416;
  --turquoise: #4C93A0;
  --turquoise-deep: #336E79;
  --hibiscus: #D9486B;
  --line: rgba(59, 36, 24, 0.14);
  --line-strong: rgba(59, 36, 24, 0.28);
  --shadow: 0 18px 40px rgba(59, 36, 24, 0.16);
  --font-display: "Rufina", "Iowan Old Style", "Georgia", serif;
  --font-body: "Nunito Sans", "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

ul, ol {
  padding-left: 1.2em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--mahogany);
  margin: 0 0 0.5em;
  line-height: 1.15;
}

em {
  font-style: italic;
}

.kicker {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin: 0 0 0.9em;
}

.kicker.center {
  text-align: center;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
}

:focus-visible {
  outline: 3px solid var(--hibiscus);
  outline-offset: 3px;
}

/* ---------- Buttons ---------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  background: linear-gradient(135deg, var(--terracotta-deep), var(--mahogany));
  color: var(--cream);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  border: none;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--hibiscus), var(--terracotta-deep));
}

/* ---------- Reveal on scroll (CSS only) ---------- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: fadeInUp 0.9s ease both;
}

@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;
    scroll-behavior: auto !important;
  }
}

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(120deg, var(--terracotta-deep), var(--mahogany) 85%);
  box-shadow: 0 4px 22px rgba(59, 36, 24, 0.25);
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  color: var(--cream);
}

.logo-mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: none;
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}

.logo-text em {
  font-style: italic;
  color: var(--cream);
  opacity: 0.85;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--cream);
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: 0.01em;
  padding: 0.4em 0;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--hibiscus);
  transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-item.has-mega:focus-within .nav-link::after {
  width: 100%;
}

.nav-item {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translate(-50%, 10px);
  min-width: 560px;
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.4rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.nav-item.has-mega:hover .mega-menu,
.nav-item.has-mega:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.mega-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem 1.4rem;
}

.mega-link {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  padding: 0.5em 0.6em;
  border-radius: 8px;
  color: var(--mahogany);
  transition: background 0.2s ease, color 0.2s ease;
}

.mega-link:hover {
  background: var(--cream-deep);
  color: var(--terracotta-deep);
}

.mega-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--turquoise-deep);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 9.5rem 2rem 5rem;
}

.hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 4.4vw, 3.6rem);
  color: var(--mahogany);
}

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

.hero-lede {
  font-size: 1.12rem;
  color: var(--mahogany-soft);
  max-width: 46ch;
  margin: 0 0 1em;
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--turquoise-deep);
  margin: 0 0 1.7em;
}

.hero-figure {
  position: relative;
}

.frame {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--cream);
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 46px;
  height: 46px;
  border: 2px solid var(--turquoise);
  pointer-events: none;
}

.frame::before {
  top: -10px;
  left: -10px;
  border-right: none;
  border-bottom: none;
}

.frame::after {
  bottom: -10px;
  right: -10px;
  border-left: none;
  border-top: none;
}

.frame img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 2px;
}

/* ---------- Principles ---------- */

.principles {
  padding: 0 2rem 4.5rem;
}

.principles-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem 3.4rem;
  padding-top: 2.6rem;
  border-top: 1px solid var(--line);
}

.principle {
  display: flex;
  align-items: center;
  gap: 0.9em;
}

.principle-icon {
  width: 34px;
  height: 34px;
  flex: none;
}

.principle-icon svg {
  width: 100%;
  height: 100%;
}

.principle-icon.c-terracotta { color: var(--terracotta-deep); }
.principle-icon.c-turquoise { color: var(--turquoise-deep); }
.principle-icon.c-hibiscus { color: var(--hibiscus); }

.principle-text {
  display: flex;
  flex-direction: column;
}

.principle-es {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--mahogany);
}

.principle-en {
  font-size: 0.86rem;
  color: var(--mahogany-soft);
  letter-spacing: 0.01em;
}

/* ---------- Divider ---------- */

.divider {
  position: relative;
  height: 1px;
  max-width: 1180px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
}

.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  background: var(--terracotta);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- Recipes ---------- */

.recipes {
  padding: 5.5rem 2rem;
  background: var(--cream-deep);
}

.recipes-head {
  max-width: 720px;
  margin: 0 auto 2.6rem;
  text-align: center;
}

.recipes-head h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.tabs {
  max-width: 1180px;
  margin: 0 auto 2.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.tab-btn {
  background: var(--cream);
  border: 1px solid var(--line-strong);
  color: var(--mahogany-soft);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.75em 1.3em;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.tab-btn:hover {
  transform: translateY(-1px);
  border-color: var(--terracotta-deep);
  color: var(--terracotta-deep);
}

.tab-btn.is-active {
  background: linear-gradient(135deg, var(--terracotta-deep), var(--mahogany));
  border-color: transparent;
  color: var(--cream);
}

.tab-panels {
  max-width: 1180px;
  margin: 0 auto;
}

.recipe-panel {
  display: none;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.recipe-panel.is-active {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
}

.recipe-media img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.recipe-content {
  padding: 2.4rem 2.6rem;
}

.recipe-eyebrow {
  display: inline-block;
  background: var(--turquoise-deep);
  color: var(--cream);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.32em 0.85em;
  border-radius: 999px;
  margin-bottom: 0.9em;
}

.recipe-content h3 {
  font-size: 1.9rem;
  margin-bottom: 0.35em;
}

.recipe-desc {
  color: var(--mahogany-soft);
  margin-bottom: 1.3em;
}

.recipe-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.9em 0;
}

.recipe-meta li {
  font-size: 0.88rem;
  color: var(--mahogany-soft);
}

.recipe-meta strong {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: 0.2em;
}

.recipe-meta .fat-badge strong {
  color: var(--hibiscus);
}

.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2rem;
}

.recipe-grid h4 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mahogany);
  margin-bottom: 0.7em;
}

.ingredients ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
}

.ingredients li {
  font-size: 0.95rem;
  padding-left: 1.1em;
  position: relative;
  color: var(--mahogany-soft);
}

.ingredients li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--turquoise);
  border-radius: 50%;
}

.steps {
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps li {
  list-style: none;
  position: relative;
  padding-left: 2.4em;
  margin-bottom: 0.9em;
  font-size: 0.95rem;
  color: var(--mahogany-soft);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.05em;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: var(--cream-deep);
  border: 1px solid var(--line-strong);
  color: var(--terracotta-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- About (quote style) ---------- */

.about {
  padding: 6rem 2rem;
}

.about-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.about-quote {
  margin: 0;
  position: relative;
  padding-top: 1.6rem;
}

.about-quote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-display);
  font-size: 6.5rem;
  line-height: 1;
  color: var(--terracotta);
  opacity: 0.28;
  margin-bottom: -0.6rem;
}

.about-quote p {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--mahogany);
  margin: 0;
}

.about-byline {
  margin-top: 1.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--turquoise-deep);
}

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

.site-footer {
  background: linear-gradient(135deg, var(--mahogany), var(--terracotta-deep) 120%);
  color: var(--cream);
  padding: 4rem 2rem 1.6rem;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr;
  gap: 2.5rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(251, 243, 231, 0.18);
}

.footer-brand .logo-text {
  font-size: 1.3rem;
}

.footer-brand p {
  margin: 0.6em 0 0;
  color: rgba(251, 243, 231, 0.75);
  font-style: italic;
  font-family: var(--font-display);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.footer-nav a {
  font-size: 0.92rem;
  color: rgba(251, 243, 231, 0.85);
  transition: color 0.2s ease;
}

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

.footer-company p {
  margin: 0 0 0.4em;
  font-size: 0.86rem;
  color: rgba(251, 243, 231, 0.72);
}

.footer-company p:first-child {
  color: var(--cream);
  font-weight: 700;
}

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 1.4rem;
  font-size: 0.8rem;
  color: rgba(251, 243, 231, 0.6);
}

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

.legal-hero {
  padding: 9.5rem 2rem 3rem;
  max-width: 820px;
  margin: 0 auto;
}

.legal-hero h1 {
  font-size: clamp(2.1rem, 3.6vw, 2.7rem);
}

.legal-updated {
  color: var(--mahogany-soft);
  font-size: 0.92rem;
}

.legal-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 2.4em;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content p, .legal-content li {
  color: var(--mahogany-soft);
  font-size: 1rem;
}

.legal-content a {
  color: var(--terracotta-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--hibiscus);
  text-underline-offset: 3px;
}

.company-contact-box {
  margin-top: 3rem;
  padding: 1.8rem 2rem;
  background: var(--cream-deep);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}

.company-contact-box h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.company-contact-box p {
  margin: 0 0 0.4em;
  font-size: 0.95rem;
}

/* ---------- Responsive: 1080 / 780 / 460 ---------- */

@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.6rem;
  }

  .hero-copy {
    order: 1;
  }

  .hero-figure {
    order: 2;
  }

  .hero-lede {
    max-width: none;
  }

  .frame img {
    height: 340px;
  }

  .recipe-panel.is-active {
    grid-template-columns: 1fr;
  }

  .recipe-media img {
    min-height: 260px;
  }

  .recipe-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .mega-menu {
    min-width: 460px;
  }
}

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

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--mahogany);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-menu.is-open {
    max-height: 640px;
  }

  .nav-link {
    width: 100%;
    padding: 0.9em 2rem;
  }

  .nav-item.has-mega {
    width: 100%;
  }

  .mega-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(251, 243, 231, 0.05);
    margin: 0 1.2rem 0.6rem;
    width: auto;
    min-width: 0;
    display: none;
  }

  .nav-item.has-mega:hover .mega-menu,
  .nav-item.has-mega:focus-within .mega-menu {
    display: block;
  }

  .mega-inner {
    grid-template-columns: 1fr 1fr;
  }

  .mega-link {
    color: rgba(251, 243, 231, 0.85);
  }

  .mega-link:hover {
    background: rgba(251, 243, 231, 0.08);
    color: var(--cream);
  }

  .hero {
    padding: 8rem 1.4rem 3.5rem;
  }

  .principles-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
  }

  .recipes {
    padding: 4rem 1.4rem;
  }

  .recipe-content {
    padding: 1.9rem 1.6rem;
  }

  .about {
    padding: 4.5rem 1.4rem;
  }

  .about-quote p {
    font-size: 1.25rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .legal-hero, .legal-content {
    padding-left: 1.4rem;
    padding-right: 1.4rem;
  }
}

@media (max-width: 460px) {
  .nav-inner {
    padding: 0.8rem 1.2rem;
  }

  .logo-text {
    font-size: 1.15rem;
  }

  .hero-copy h1 {
    font-size: 2.1rem;
  }

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

  .frame {
    padding: 8px;
  }

  .frame img {
    height: 240px;
  }

  .tabs {
    gap: 0.5rem;
  }

  .tab-btn {
    font-size: 0.82rem;
    padding: 0.6em 1em;
  }

  .recipe-meta {
    gap: 0.5rem 1rem;
  }
}
