/* Cibaia Cuina, Catalan recipe journal */

:root {
  --cream: #f8f2e6;
  --cream-deep: #efe5cf;
  --card: #fffcf4;
  --ink: #29211a;
  --ink-soft: #5f5344;
  --terra: #a5431d;
  --terra-deep: #7a2e12;
  --olive: #55603a;
  --olive-deep: #3d4629;
  --gold: #bf8a2e;
  --line: #ddd0b6;
  --nav-grad: linear-gradient(120deg, #7a2e12 0%, #a5431d 55%, #8a5a1e 100%);
  --hero-grad: linear-gradient(160deg, rgba(41, 24, 12, 0.55) 0%, rgba(122, 46, 18, 0.15) 55%, rgba(41, 24, 12, 0.0) 100%);
  --footer-grad: linear-gradient(150deg, #2c1a0e 0%, #4a2410 60%, #3d4629 100%);
  --font-display: 'Unna', 'Georgia', serif;
  --font-body: 'Commissioner', 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

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

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

.kicker {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

/* ---------- Navbar (fixed top, solid on scroll) ---------- */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  padding: 1.1rem 0;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

.site-nav.scrolled {
  background: var(--nav-grad);
  box-shadow: 0 6px 24px rgba(41, 24, 12, 0.28);
  padding: 0.55rem 0;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.brand-mark { font-size: 1.5rem; line-height: 1; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--terra-deep);
  letter-spacing: 0.01em;
  transition: color 0.35s ease;
}

.brand-name em { font-style: italic; font-weight: 400; color: var(--olive); transition: color 0.35s ease; }

.site-nav.scrolled .brand-name,
.site-nav.scrolled .brand-name em { color: #fdf6e9; }

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

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nav-links a:hover { color: var(--terra); border-bottom-color: var(--gold); }

.site-nav.scrolled .nav-links a { color: #fdf6e9; }
.site-nav.scrolled .nav-links a:hover { color: #ffd98f; border-bottom-color: #ffd98f; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-burger span {
  width: 26px; height: 3px;
  background: var(--terra-deep);
  border-radius: 2px;
  transition: background 0.35s ease;
}

.site-nav.scrolled .nav-burger span { background: #fdf6e9; }

/* ---------- Hero (split) ---------- */

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 9.5rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  color: var(--terra-deep);
  margin-bottom: 1.4rem;
}

.hero-text h1 em { font-style: italic; color: var(--olive); display: block; }

.hero-sub {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 2.2rem;
}

.btn-hero {
  display: inline-block;
  background: var(--terra);
  color: #fdf6e9;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.92rem;
  padding: 1rem 2.2rem;
  border-radius: 3px;
  box-shadow: 0 8px 22px rgba(165, 67, 29, 0.32);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-hero:hover {
  background: var(--terra-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(122, 46, 18, 0.38);
}

.hero-frame {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(41, 24, 12, 0.3);
}

.hero-frame img { width: 100%; height: 520px; object-fit: cover; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-grad);
  pointer-events: none;
}

/* ---------- Sections ---------- */

.section-head {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  color: var(--terra-deep);
}

.section-sub { margin-top: 1rem; color: var(--ink-soft); }

/* ---------- Principles (3 cards) ---------- */

.principles {
  background: var(--cream-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4.5rem 2rem;
}

.principle-row {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.principle-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 5px;
  padding: 2.2rem 1.9rem;
  box-shadow: 0 10px 26px rgba(41, 24, 12, 0.07);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.principle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(41, 24, 12, 0.12);
}

.principle-word {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.principle-card h3 { font-size: 1.45rem; color: var(--terra-deep); margin-bottom: 0.8rem; }

.principle-card p { color: var(--ink-soft); font-size: 1rem; }

/* ---------- Recipes (grid, toggle details) ---------- */

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

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.4rem;
}

.recipe-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(41, 24, 12, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(41, 24, 12, 0.13);
}

.recipe-photo { position: relative; }

.recipe-photo img { width: 100%; height: 260px; object-fit: cover; }

.recipe-tag {
  position: absolute;
  top: 1rem; left: 1rem;
  background: rgba(122, 46, 18, 0.92);
  color: #fdf6e9;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 2px;
}

.recipe-body { padding: 1.8rem 1.9rem 2rem; }

.recipe-body h3 { font-size: 1.75rem; color: var(--terra-deep); margin-bottom: 0.6rem; }

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.9rem;
}

.recipe-meta span { position: relative; }

.recipe-meta span + span::before {
  content: '\00B7';
  position: absolute;
  left: -0.75rem;
  color: var(--gold);
}

.recipe-desc { color: var(--ink-soft); margin-bottom: 1.4rem; }

.recipe-toggle {
  font-family: var(--font-body);
  background: none;
  border: 2px solid var(--terra);
  color: var(--terra);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.7rem 1.6rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.recipe-toggle:hover { background: var(--terra); color: #fdf6e9; }

html.js .recipe-details { display: none; }

html.js .recipe-details.open { display: block; }

.recipe-details {
  margin-top: 1.7rem;
  border-top: 1px dashed var(--line);
  padding-top: 1.6rem;
}

.detail-cols { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.8rem; }

.recipe-details h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--olive-deep);
  margin-bottom: 0.7rem;
}

.recipe-details ul, .recipe-details ol { padding-left: 1.2rem; }

.recipe-details li { margin-bottom: 0.5rem; font-size: 0.97rem; color: var(--ink-soft); }

.recipe-details li::marker { color: var(--gold); font-weight: 600; }

/* ---------- About (centered) ---------- */

.about {
  background: var(--olive-deep);
  padding: 5rem 2rem;
}

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

.about .kicker { color: #d8c184; }

.about h2 { color: #f6eed8; font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-bottom: 1.4rem; }

.about p { color: #d9d4bd; margin-bottom: 1.2rem; font-size: 1.05rem; }

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

.site-footer { background: var(--footer-grad); padding: 3.8rem 2rem 2.6rem; }

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  text-align: center;
}

.footer-brand .brand-name { color: #fdf6e9; font-size: 1.7rem; }

.footer-brand .brand-name em { color: #d8c184; }

.footer-tag {
  font-family: var(--font-display);
  font-style: italic;
  color: #cbb689;
  margin-top: 0.4rem;
}

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.8rem; }

.footer-links a {
  color: #ecdfc2;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.footer-links a:hover { color: #ffd98f; border-bottom-color: #ffd98f; }

.footer-legal p { color: #b7a685; font-size: 0.85rem; line-height: 1.7; }

/* ---------- Reveal ---------- */

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

html.js [data-reveal].revealed { opacity: 1; transform: translateY(0); }

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

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

.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 8.5rem 2rem 4rem;
}

.legal-page h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  color: var(--terra-deep);
  margin-bottom: 0.6rem;
}

.legal-updated {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 2.4rem;
}

.legal-page h2 {
  font-size: 1.5rem;
  color: var(--olive-deep);
  margin: 2.2rem 0 0.8rem;
}

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

.legal-page ul { padding-left: 1.3rem; margin-bottom: 1rem; }

.legal-page a { color: var(--terra); }

.company-contact-box {
  margin-top: 3rem;
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 5px;
  padding: 1.6rem 1.8rem;
}

.company-contact-box h3 {
  font-family: var(--font-display);
  color: var(--terra-deep);
  font-size: 1.25rem;
  margin-bottom: 0.7rem;
}

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

/* ---------- Breakpoints: 1024 / 768 / 480 ---------- */

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding-top: 8rem; gap: 2.4rem; }
  .hero-frame img { height: 400px; }
  .hero-text { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .principle-row { grid-template-columns: 1fr; max-width: 640px; }
  .recipe-grid { grid-template-columns: 1fr; max-width: 680px; margin: 0 auto; }
}

@media (max-width: 768px) {
  .nav-burger { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--nav-grad);
    flex-direction: column;
    gap: 0;
    display: none;
    box-shadow: 0 14px 30px rgba(41, 24, 12, 0.3);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    color: #fdf6e9;
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(253, 246, 233, 0.14);
  }
  .site-nav { background: var(--nav-grad); padding: 0.7rem 0; }
  .brand-name, .brand-name em { color: #fdf6e9; }
  .nav-burger span { background: #fdf6e9; }
  .detail-cols { grid-template-columns: 1fr; }
  .hero { padding: 7rem 1.4rem 3.5rem; }
  .principles, .recipes, .about { padding-left: 1.4rem; padding-right: 1.4rem; }
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .hero-frame img { height: 280px; }
  .hero-text h1 { font-size: 2.2rem; }
  .recipe-photo img { height: 210px; }
  .recipe-body { padding: 1.4rem 1.3rem 1.6rem; }
  .btn-hero { width: 100%; text-align: center; }
  .footer-links { gap: 1rem; }
  .legal-page { padding: 7rem 1.3rem 3rem; }
}
