/* Brulau Baladi. Egyptian home cooking, editorial recipe site. Kitchen layout. */

:root {
  --nile-ink: #14262c;
  --nile-deep: #1d3840;
  --nile-soft: #2f4f57;
  --terracotta: #bd5c34;
  --terracotta-deep: #8f4326;
  --gold: #c8973f;
  --gold-soft: #e0be7c;
  --sand: #f2e6cc;
  --sand-deep: #e3cf9f;
  --cream: #fbf5e8;
  --paper: #ffffff;
  --ink: #29211a;
  --ink-soft: #5a4e40;
  --line: rgba(41, 33, 26, 0.14);

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Figtree", "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1180px;
  --radius: 2px;
  --shadow-soft: 0 18px 40px rgba(20, 38, 44, 0.12);
}

* {
  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;
}

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

ul, ol {
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.14;
  margin: 0 0 0.5em;
  color: var(--nile-ink);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

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

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

.section-head h2 {
  font-size: clamp(2rem, 3.6vw, 2.7rem);
}

.section-lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-top: 0.8em;
}

/* ============ Reveal on scroll ============ */

.reveal {
  animation: reveal-in linear both;
  animation-timeline: view();
  animation-range: entry 0% cover 30%;
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports not (animation-timeline: view()) {
  .reveal {
    animation: none;
    opacity: 1;
  }
}

body.reveal-fallback .reveal {
  opacity: 0;
  transform: translateY(26px);
  animation: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

body.reveal-fallback .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  body.reveal-fallback .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============ Masthead ============ */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 245, 232, 0.94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.nav-left,
.nav-right {
  display: flex;
  gap: 2rem;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav-right {
  justify-content: flex-end;
}

.nav-left a,
.nav-right a {
  position: relative;
  padding: 0.2rem 0;
  color: var(--nile-deep);
  transition: color 0.2s ease;
}

.nav-left a::after,
.nav-right a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-left a:hover,
.nav-right a:hover {
  color: var(--terracotta-deep);
}

.nav-left a:hover::after,
.nav-right a:hover::after {
  transform: scaleX(1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: center;
  white-space: nowrap;
}

.logo-mark {
  font-size: 1.3rem;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.28rem;
  color: var(--nile-ink);
  letter-spacing: 0.01em;
}

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

.burger span {
  display: block;
  height: 2px;
  background: var(--nile-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  display: none;
}

/* ============ Hero ============ */

.hero {
  position: relative;
  height: min(88vh, 780px);
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  animation: kenburns 24s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes kenburns {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.12) translate3d(-1.5%, -1%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-img {
    animation: none;
  }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 38, 44, 0.15) 0%, rgba(20, 38, 44, 0.35) 45%, rgba(15, 27, 31, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 2rem 4.2rem;
  color: var(--cream);
}

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

.hero h1 {
  color: var(--paper);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  max-width: 15ch;
  margin-bottom: 0.5em;
}

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

.hero-sub {
  max-width: 46ch;
  font-size: 1.15rem;
  color: rgba(251, 245, 232, 0.86);
  margin: 0;
}

/* ============ Principles band ============ */

.principles {
  background: var(--nile-ink);
  color: var(--cream);
  padding: 4.2rem 2rem;
}

.principles-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  text-align: center;
}

.principles-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 2.4rem;
}

.principles-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2.8rem;
}

.principle {
  flex: 1 1 0;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.principle-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--paper);
}

.principle-note {
  font-size: 0.96rem;
  color: rgba(251, 245, 232, 0.72);
  line-height: 1.55;
}

.principle-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(251, 245, 232, 0.22);
  margin-top: 0.4rem;
}

/* ============ Recipes ============ */

.recipes-section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 5.5rem 2rem;
}

.recipe-list {
  list-style: none;
  counter-reset: none;
  border-top: 1px solid var(--line);
}

.recipe-item {
  border-bottom: 1px solid var(--line);
}

.recipe-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto 132px 1fr auto;
  align-items: center;
  gap: 1.8rem;
  padding: 2.2rem 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: background 0.2s ease;
}

.recipe-head:hover {
  background: rgba(189, 92, 52, 0.05);
}

.recipe-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--sand-deep);
  line-height: 1;
  min-width: 2.4ch;
}

.recipe-item.is-open .recipe-num {
  color: var(--terracotta);
}

.recipe-thumb {
  width: 132px;
  height: 96px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand);
}

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

.recipe-head:hover .recipe-thumb img {
  transform: scale(1.05);
}

.recipe-heading {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.recipe-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--nile-ink);
}

.recipe-desc {
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 62ch;
}

.recipe-meta {
  display: flex;
  gap: 1.1rem;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  font-weight: 600;
}

.recipe-toggle {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  flex-shrink: 0;
}

.recipe-toggle::before,
.recipe-toggle::after {
  content: "";
  position: absolute;
  background: var(--nile-ink);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.recipe-toggle::before {
  width: 12px;
  height: 1px;
}

.recipe-toggle::after {
  width: 1px;
  height: 12px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.recipe-item.is-open .recipe-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.recipe-item.is-open .recipe-toggle {
  border-color: var(--terracotta);
}

.recipe-details {
  padding: 0 0.5rem 2.8rem;
}

.recipe-details-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--line);
  padding-top: 1.8rem;
}

.recipe-details h3 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  font-family: var(--font-body);
  margin-bottom: 1rem;
}

.recipe-ingredients ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.recipe-ingredients li {
  padding-left: 1.1rem;
  position: relative;
  color: var(--ink);
  font-size: 0.98rem;
}

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

.recipe-steps ol {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.recipe-steps li {
  counter-increment: step;
  padding-left: 2.2rem;
  position: relative;
  font-size: 0.98rem;
}

.recipe-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--nile-ink);
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ About ============ */

.about {
  background: var(--sand);
  padding: 5.5rem 2rem;
}

.about-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 3.2rem;
  align-items: center;
}

.about-col h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  max-width: 16ch;
}

.about-col p {
  color: var(--ink-soft);
  font-size: 1.03rem;
}

.about-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  justify-content: center;
}

.about-divider span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--terracotta);
}

.about-divider span:nth-child(2) {
  width: 1px;
  height: 60px;
  border-radius: 0;
  background: var(--line);
}

/* ============ Footer ============ */

.site-footer {
  background: var(--nile-ink);
  color: rgba(251, 245, 232, 0.78);
  padding: 3.6rem 2rem 2.4rem;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem 3rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand .logo-text {
  color: var(--paper);
}

.footer-brand p {
  flex-basis: 100%;
  margin: 0.6rem 0 0;
  color: rgba(251, 245, 232, 0.62);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  justify-content: flex-end;
  align-content: flex-start;
  font-size: 0.92rem;
}

.footer-links a {
  color: rgba(251, 245, 232, 0.8);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--gold-soft);
}

.footer-legal {
  grid-column: 1 / -1;
  margin: 2.2rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(251, 245, 232, 0.14);
  font-size: 0.82rem;
  color: rgba(251, 245, 232, 0.5);
}

/* ============ Legal pages ============ */

.legal-header {
  padding: 1.3rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 245, 232, 0.94);
}

.legal-header .logo {
  display: inline-flex;
}

.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 4.5rem 2rem 6rem;
}

.legal-page h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 0.3em;
}

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

.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 2.4rem;
}

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

.legal-page ul {
  padding-left: 1.3rem;
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.legal-page a {
  color: var(--terracotta-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

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

.company-contact-box p {
  margin: 0.2em 0;
  color: var(--ink);
  font-size: 0.96rem;
}

.legal-back {
  display: inline-block;
  margin-bottom: 2.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--terracotta-deep);
}

/* ============ Breakpoints: 1120 / 800 / 480 ============ */

@media (max-width: 1120px) {
  .masthead-inner {
    padding: 1rem 1.6rem;
  }

  .recipes-section,
  .about,
  .principles,
  .footer-inner {
    padding-left: 1.6rem;
    padding-right: 1.6rem;
  }

  .recipe-head {
    grid-template-columns: auto 112px 1fr auto;
    gap: 1.4rem;
  }

  .recipe-thumb {
    width: 112px;
    height: 84px;
  }
}

@media (max-width: 800px) {
  .nav-left,
  .nav-right {
    display: none;
  }

  .burger {
    display: flex;
  }

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

  .logo {
    justify-self: center;
  }

  .burger {
    justify-self: end;
  }

  .nav-mobile.is-open {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.6rem 1.6rem 1.4rem;
    border-top: 1px solid var(--line);
  }

  .nav-mobile a {
    padding: 0.7rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--nile-deep);
    border-bottom: 1px solid var(--line);
  }

  .principles-row {
    flex-direction: column;
    gap: 2.2rem;
    align-items: center;
    text-align: center;
  }

  .principle {
    max-width: 420px;
  }

  .principle-divider {
    display: none;
  }

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

  .recipe-thumb {
    display: none;
  }

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

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

  .about-divider {
    flex-direction: row;
    padding: 0.5rem 0;
  }

  .about-divider span:nth-child(2) {
    width: 60px;
    height: 1px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .masthead-inner {
    padding: 0.85rem 1.1rem;
  }

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

  .hero {
    height: min(78vh, 620px);
    min-height: 440px;
  }

  .hero-content {
    padding: 0 1.2rem 2.6rem;
  }

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

  .principles {
    padding: 3rem 1.1rem;
  }

  .recipes-section,
  .about {
    padding: 3.6rem 1.1rem;
  }

  .recipe-head {
    padding: 1.6rem 0.2rem;
    gap: 1rem;
  }

  .recipe-num {
    font-size: 1.9rem;
  }

  .recipe-title {
    font-size: 1.22rem;
  }

  .recipe-meta {
    gap: 0.7rem;
    flex-wrap: wrap;
  }

  .footer-inner {
    padding: 0;
  }

  .legal-page {
    padding: 3rem 1.2rem 4rem;
  }

  .company-contact-box {
    padding: 1.4rem 1.3rem;
  }
}
