/* =========================================================
   Chatak Patak — design tokens
   ========================================================= */
:root{
  --cream:        #FBF3E4;
  --cream-deep:   #F3E6CC;
  --ink:          #2B211A;
  --ink-soft:     #5A4C40;
  --saffron:      #E8A33D;
  --saffron-deep: #C9821E;
  --red:          #A41E22;
  --red-deep:     #7E1519;
  --green:        #2F6A4F;
  --green-deep:   #234F3B;
  --petrol:       #11454D;
  --petrol-deep:  #0B3238;
  --line:         #E3D4B8;
  --white:        #FFFDF8;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 8px 24px -12px rgba(43, 33, 26, 0.35);
  --shadow-pop: 0 14px 40px -16px rgba(43, 33, 26, 0.45);
  --wrap: 1180px;
}

/* This site uses a single fixed light palette regardless of the visitor's
   OS/browser colour-scheme preference — the dark-teal hero below is an
   intentional accent section with its own fixed light text, not a
   site-wide dark mode. */

/* =========================================================
   Reset & base
   ========================================================= */
*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: var(--red); text-decoration: none; }
a:hover{ text-decoration: underline; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 600;
}
h1{ font-size: clamp(2rem, 1.5rem + 2vw, 3.1rem); }
h2{ font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); }
h3{ font-size: 1.25rem; }
p{ margin: 0 0 1em; }
ul,ol{ padding-left: 1.3em; }
.wrap{ max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.skip-link{
  position:absolute; left:-999px; top:0; background:var(--ink); color:var(--cream);
  padding:10px 16px; z-index:200; border-radius: 0 0 8px 0;
}
.skip-link:focus{ left:0; }
:focus-visible{ outline: 3px solid var(--petrol); outline-offset: 2px; }

button{ font-family: inherit; cursor:pointer; }

/* Discrete market/utensil pattern used as a background texture */
.pattern-strip{
  background-image: radial-gradient(var(--saffron) 1.4px, transparent 1.4px),
                     radial-gradient(var(--petrol) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
  opacity: .14;
}

/* =========================================================
   Header
   ========================================================= */
.site-header{
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top:0; z-index: 100;
}
.site-header__inner{
  display:grid;
  grid-template-columns: auto 1fr auto;
  align-items:center;
  column-gap: 20px;
  row-gap: 10px;
  padding: 14px 20px;
}
.brand{ display:flex; align-items:center; gap:10px; color: var(--ink); grid-column: 1; }
.brand:hover{ text-decoration:none; }
.brand__mark{
  display:inline-flex; align-items:center; justify-content:center;
  width:42px; height:42px; border-radius: 10px;
  background: var(--red); color: var(--cream);
  font-family: var(--font-display); font-weight:700; font-size: 1.05rem;
}
.brand__text{ display:flex; flex-direction:column; line-height:1.2; }
.brand__name{ font-family: var(--font-display); font-weight:700; font-size: 1.2rem; }
.brand__tagline{ font-size: .72rem; color: var(--ink-soft); letter-spacing:.02em; }

/* Search always anchored to the top-right corner of the header.
   It stays compact by default and widens slightly on focus, so it
   takes as little space as possible away from the nav links. */
.header-search{
  grid-column: 3; grid-row: 1;
  justify-self:end; flex-shrink:0;
  display:flex; align-items:center;
  background: var(--cream); border:1px solid var(--line); border-radius: 999px;
  padding: 6px 6px 6px 14px; gap:6px;
}
.header-search input{
  border:0; background:transparent; font-family: inherit; font-size:.9rem;
  width: 110px; color: var(--ink);
  transition: width .18s ease;
}
.header-search input:focus{ outline:none; width:190px; }
.header-search button{
  background: var(--red); color: var(--cream); border:0; border-radius:999px;
  width:32px; height:32px; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}

/* Nav sits in its own flexible middle column. It never wraps onto a
   second, uneven line — if the window is too narrow to fit every link,
   it scrolls horizontally instead, with the scrollbar itself hidden. */
.primary-nav{
  grid-column: 2; grid-row: 1; min-width: 0;
  display:flex; gap: 14px; align-items:center;
  flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; -ms-overflow-style:none;
}
.primary-nav::-webkit-scrollbar{ display:none; }
.primary-nav a{ color: var(--ink); font-weight:600; font-size:.94rem; white-space:nowrap; }
.primary-nav a:hover{ color: var(--red); text-decoration:none; }

.nav-toggle{
  display:none; background:none; border:1px solid var(--line); border-radius:8px;
  width:42px; height:38px; position:relative;
  grid-column: 2; justify-self:end;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after{
  content:""; position:absolute; left:10px; right:10px; height:2px; background: var(--ink);
}
.nav-toggle__bar{ top:18px; }
.nav-toggle__bar::before{ top:-7px; }
.nav-toggle__bar::after{ top:7px; }

@media (max-width: 880px){
  .site-header__inner{ grid-template-columns: 1fr auto; }
  .nav-toggle{ display:block; grid-column: 2; grid-row: 1; }
  .header-search{ grid-column: 1 / -1; grid-row: 2; justify-self:stretch; }
  .header-search input, .header-search input:focus{ width:100%; }
  .primary-nav{
    grid-column: 1 / -1; grid-row: 3;
    display:none; flex-direction:column; gap:4px;
    background: var(--white); border-top:1px solid var(--line);
    margin: 0 -20px -14px; padding: 12px 20px;
  }
  .primary-nav.is-open{ display:flex; }
}

/* =========================================================
   Hero / section wrappers
   ========================================================= */
.hero{
  position:relative; overflow:hidden;
  background: linear-gradient(160deg, var(--petrol) 0%, var(--petrol-deep) 100%);
  color: var(--cream);
}
.hero::after{
  content:""; position:absolute; inset:0;
  background-image: radial-gradient(rgba(251,243,228,.16) 1.6px, transparent 1.6px);
  background-size: 22px 22px;
}
.hero__inner{ position:relative; padding: 64px 20px 56px; text-align:center; }
.hero h1{ color: var(--cream); }
.hero__lede{ max-width: 680px; margin: 0 auto 1.6em; color: #EADFC9; font-size: 1.1rem; }
.hero__actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding: 12px 22px; border-radius: 999px; font-weight:700; font-size:.95rem;
  border: 2px solid transparent;
}
.btn--primary{ background: var(--saffron); color: var(--ink); }
.btn--primary:hover{ background: var(--saffron-deep); text-decoration:none; }
.btn--ghost{ border-color: rgba(251,243,228,.6); color: var(--cream); }
.btn--ghost:hover{ background: rgba(251,243,228,.12); text-decoration:none; }
.btn--outline{ border-color: var(--red); color: var(--red); }
.btn--outline:hover{ background: var(--red); color:var(--cream); text-decoration:none; }

.section{ padding: 54px 0; }
.section--alt{ background: var(--cream-deep); }
.section__head{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom: 28px; flex-wrap:wrap; }
.section__head p{ color: var(--ink-soft); margin:0; max-width:60ch; }
.section__link{ font-weight:700; white-space:nowrap; }

.quick-cats{ display:grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap:14px; }
.quick-cat{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius-md);
  padding: 20px 16px; text-align:center; color: var(--ink); font-weight:700;
  box-shadow: var(--shadow-card);
}
.quick-cat:hover{ border-color: var(--saffron); text-decoration:none; }
.quick-cat__icon{ font-size:1.8rem; display:block; margin-bottom:8px; }

/* =========================================================
   Recipe card grid
   ========================================================= */
.recipe-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 22px; }

.recipe-card{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius-md);
  overflow:hidden; display:flex; flex-direction:column;
  box-shadow: var(--shadow-card); transition: transform .15s ease, box-shadow .15s ease;
}
.recipe-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.recipe-card__media{ position:relative; display:block; aspect-ratio: 4/3; background: var(--cream-deep); }
.recipe-card__media img{ width:100%; height:100%; object-fit:cover; }
.recipe-card__body{ padding: 16px 18px 18px; display:flex; flex-direction:column; gap:8px; flex:1; }
.recipe-card__kicker{ font-size:.74rem; text-transform:uppercase; letter-spacing:.06em; color: var(--petrol); font-weight:700; margin:0; }
.recipe-card__title{ margin:0; font-size:1.18rem; }
.recipe-card__title a{ color: var(--ink); }
.recipe-card__title a:hover{ color: var(--red); text-decoration:none; }
.recipe-card__summary{ font-size:.9rem; color: var(--ink-soft); margin:0; flex:1; }
.recipe-card__meta{ list-style:none; margin:4px 0 0; padding:0; display:flex; flex-wrap:wrap; gap:6px; }
.recipe-card__link{ font-weight:700; font-size:.88rem; margin-top:4px; }

/* Media placeholder tiles, used until real photography is uploaded */
.media-placeholder{
  position:relative; width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, var(--saffron) 0%, var(--red) 100%);
  overflow:hidden;
}
.media-placeholder__pattern{
  position:absolute; inset:0;
  background-image: radial-gradient(rgba(255,255,255,.35) 2px, transparent 2px);
  background-size: 18px 18px;
}
.media-placeholder__mark{
  position:relative; font-family: var(--font-display); font-weight:700;
  font-size: 2.6rem; color: rgba(255,253,248,.92);
}

/* =========================================================
   Badges
   ========================================================= */
.badge{
  display:inline-flex; align-items:center; gap:5px;
  font-size:.72rem; font-weight:700; letter-spacing:.01em;
  padding: 5px 10px; border-radius: 999px;
  background: var(--cream-deep); color: var(--ink-soft);
  list-style:none;
}
.badge--diet{ position:absolute; top:10px; left:10px; }
.badge--vegetarian{ background: var(--green); color:#fff; }
.badge--non-vegetarian{ background: var(--red); color:#fff; }
.badge--time{ background: #E7EEE9; color: var(--green-deep); }
.badge--method{ background: #E6EEF0; color: var(--petrol-deep); }
.badge--difficulty.badge--easy{ background:#E7EEE9; color:var(--green-deep); }
.badge--difficulty.badge--intermediate{ background:#FBEBCF; color:var(--saffron-deep); }
.badge--difficulty.badge--advanced{ background:#F6DEDE; color:var(--red-deep); }
.badge--spice{ background: #FBEBCF; }

.spice-dots{ display:inline-flex; gap:3px; }
.spice-dot{ width:7px; height:7px; border-radius:50%; background:#D8C6AE; }
.spice-dot.is-filled{ background: var(--red); }

/* =========================================================
   Recipe Finder
   ========================================================= */
.finder{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-card); margin-bottom: 30px;
}
.finder__search{ display:flex; gap:10px; margin-bottom:16px; }
.finder__search input{
  flex:1; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 1rem; background: var(--cream);
}
.finder__grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap:14px;
}
.finder__field label{ display:block; font-size:.76rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color: var(--ink-soft); margin-bottom:5px; }
.finder__field select{
  width:100%; padding: 10px 12px; border-radius: var(--radius-sm); border:1px solid var(--line);
  background: var(--cream); font-family:inherit; font-size:.92rem; color: var(--ink);
}
.finder__actions{ display:flex; justify-content:space-between; align-items:center; margin-top:18px; gap:12px; flex-wrap:wrap; }
.finder__count{ color: var(--ink-soft); font-size:.9rem; }
.btn--clear{
  background:none; border:1px solid var(--line); color: var(--ink-soft); border-radius:999px;
  padding: 9px 18px; font-weight:700; font-size:.88rem;
}
.btn--clear:hover{ border-color: var(--red); color: var(--red); }

.empty-state{
  text-align:center; padding: 54px 20px; color: var(--ink-soft);
  background: var(--white); border:1px dashed var(--line); border-radius: var(--radius-lg);
}
.empty-state h3{ color: var(--ink); }

/* =========================================================
   Breadcrumbs
   ========================================================= */
.breadcrumbs{ padding: 14px 0; }
.breadcrumbs ol{ list-style:none; display:flex; flex-wrap:wrap; gap:6px; padding:0; margin:0; font-size:.85rem; color: var(--ink-soft); }
.breadcrumbs li:not(:last-child)::after{ content:"/"; margin-left:6px; color: var(--line); }
.breadcrumbs a{ color: var(--ink-soft); }

/* =========================================================
   Recipe page
   ========================================================= */
.recipe-hero{ display:grid; grid-template-columns: 1.1fr 1fr; gap: 34px; align-items:center; padding: 10px 0 36px; }
.recipe-hero__media{ aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow:hidden; box-shadow: var(--shadow-pop); }
.recipe-hero__media img{ width:100%; height:100%; object-fit:cover; }
.recipe-hero__kicker{ color: var(--petrol); font-weight:700; text-transform:uppercase; letter-spacing:.05em; font-size:.8rem; }
.recipe-hero__badges{ display:flex; flex-wrap:wrap; gap:8px; margin: 14px 0 18px; }
.recipe-hero__summary{ font-size:1.08rem; color: var(--ink-soft); }

.fact-strip{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap:1px;
  background: var(--line); border:1px solid var(--line); border-radius: var(--radius-md);
  overflow:hidden; margin-bottom: 36px;
}
.fact-strip__item{ background: var(--white); padding: 16px; text-align:center; }
.fact-strip__item span{ display:block; }
.fact-strip__label{ font-size:.7rem; text-transform:uppercase; letter-spacing:.05em; color: var(--ink-soft); margin-bottom:4px; }
.fact-strip__value{ font-weight:700; font-family: var(--font-display); font-size:1.08rem; }

.recipe-body{ display:grid; grid-template-columns: 300px 1fr; gap: 40px; align-items:start; }
.recipe-article h2{ margin-top: 2em; border-top: 1px solid var(--line); padding-top: .8em; }
.recipe-article h2:first-child{ margin-top:0; border-top:0; padding-top:0; }

.sidebar{ position:sticky; top: 90px; display:flex; flex-direction:column; gap:22px; }
.sidebar-card{ background: var(--white); border:1px solid var(--line); border-radius: var(--radius-md); padding:20px; }
.sidebar-card h2{ font-size:1.1rem; margin-bottom:.6em; }
.ingredient-section + .ingredient-section{ margin-top:14px; }
.ingredient-section h3{ font-size:.82rem; text-transform:uppercase; letter-spacing:.04em; color: var(--petrol); margin-bottom:6px; }
.ingredient-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:7px; }
.ingredient-list li{ display:flex; justify-content:space-between; gap:12px; font-size:.92rem; border-bottom: 1px dashed var(--line); padding-bottom:7px; }
.ingredient-list li:last-child{ border-bottom:0; }
.ingredient-list .qty{ font-weight:700; color: var(--ink-soft); white-space:nowrap; }
.equipment-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:6px; font-size:.92rem; }
.equipment-list li::before{ content:"• "; color: var(--saffron-deep); font-weight:700; }

.steps{ list-style:none; padding:0; margin:0; counter-reset: step; }
.steps li{
  counter-increment: step; position:relative; padding: 0 0 26px 54px; margin-bottom: 4px;
  border-left: 2px solid var(--line); margin-left: 19px;
}
.steps li:last-child{ border-left-color: transparent; padding-bottom:0; }
.steps li::before{
  content: counter(step); position:absolute; left:-20px; top:0;
  width:38px; height:38px; border-radius:50%; background: var(--red); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-family: var(--font-display);
}
.step-stage{ display:inline-block; font-size:.7rem; text-transform:uppercase; font-weight:700; letter-spacing:.05em; color: var(--saffron-deep); margin-bottom:4px; }
.steps h3{ margin:0 0 .3em; font-size:1.05rem; }
.steps p{ margin:0; color: var(--ink-soft); }

.callout{ border-radius: var(--radius-md); padding: 18px 20px; margin: 1.4em 0; border: 1px solid var(--line); background: var(--cream-deep); }
.callout--safety{ border-color: #E3B3B3; background: #FBEDED; }
.callout--safety h3{ color: var(--red-deep); }
.callout--tip{ border-color: #BFD9C9; background: #ECF5EF; }
.callout--tip h3{ color: var(--green-deep); }

.related-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap:18px; margin-top: 12px; }
.sources-list{ font-size:.86rem; color: var(--ink-soft); }

@media (max-width: 920px){
  .recipe-hero{ grid-template-columns: 1fr; }
  .recipe-body{ grid-template-columns: 1fr; }
  .sidebar{ position:static; order:2; }
}

/* =========================================================
   Guide / technique page
   ========================================================= */
.guide-article section{ margin-bottom: 2em; }
.guide-article h2{ border-top: 1px solid var(--line); padding-top:.8em; }
.guide-article h2:first-of-type{ border-top:0; padding-top:0; }

/* =========================================================
   Static / prose pages
   ========================================================= */
.prose{ max-width: 760px; }
.prose h2{ margin-top:1.4em; }
.prose ul{ margin-bottom:1em; }

.glossary-grid{ columns: 2; column-gap: 40px; }
@media (max-width: 680px){ .glossary-grid{ columns: 1; } }
.glossary-term{ break-inside: avoid; margin-bottom: 20px; }
.glossary-term dt{ font-weight:700; font-family: var(--font-display); font-size:1.05rem; color: var(--petrol-deep); }
.glossary-term dd{ margin:4px 0 0; color: var(--ink-soft); }

/* =========================================================
   404
   ========================================================= */
.error-page{ text-align:center; padding: 80px 20px; }
.error-page__code{ font-family: var(--font-display); font-size: 5rem; color: var(--saffron-deep); margin:0; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer{ background: var(--petrol); color: #D9E6E3; margin-top: 60px; }
.site-footer__inner{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: 48px 20px 30px; }
.site-footer__brand{ display:flex; flex-direction:column; gap:12px; }
.site-footer__brand p{ color:#B9CCC8; font-size:.9rem; margin:0; }
.site-footer .brand__mark{ background: var(--saffron); color: var(--ink); }
.site-footer__col h2{ color:#fff; font-size:.82rem; text-transform:uppercase; letter-spacing:.05em; margin-bottom:12px; font-family: var(--font-body); }
.site-footer__col{ display:flex; flex-direction:column; gap:8px; }
.site-footer__col a{ color:#C7D8D4; font-size:.92rem; }
.site-footer__col a:hover{ color:#fff; }
.site-footer__bottom{ border-top: 1px solid rgba(255,255,255,.12); padding: 16px 20px; font-size:.82rem; color:#9FB6B1; }

@media (max-width: 780px){
  .site-footer__inner{ grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Forms (contact / corrections)
   ========================================================= */
.form-field{ margin-bottom: 18px; }
.form-field label{ display:block; font-weight:700; margin-bottom:6px; font-size:.92rem; }
.form-field input, .form-field textarea{
  width:100%; padding: 11px 14px; border-radius: var(--radius-sm); border:1px solid var(--line);
  background: var(--white); font-family:inherit; font-size:.95rem; color: var(--ink);
}
.form-field textarea{ min-height: 140px; resize: vertical; }
