/* ==========================================================================
   Karthigai Deepam - style.css
   Ground-up modern CSS. No framework. Warm festival palette.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Palette - warm festival */
  --saffron:        #E85D04;
  --saffron-dark:   #B84703;
  --saffron-soft:   #FFE9D1;
  --gold:           #C9922A;
  --gold-light:     #E8A93A;
  --gold-soft:      #FBF3DC;
  --maroon:         #6E1616;
  --maroon-dark:    #4A0F0F;
  --cream:          #FFF9EF;
  --cream-alt:      #F7EFDD;
  --ink:            #2C1810;
  --ink-soft:       #5A4534;
  --ink-mute:       #8A7864;
  --border:         #E8DFCF;
  --border-strong:  #D4C4A8;

  /* Type */
  --font-serif: "Playfair Display", "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --wrap:       1120px;
  --prose:      720px;
  --radius:     10px;
  --radius-lg:  18px;
  --shadow-sm:  0 1px 2px rgba(74, 15, 15, 0.06);
  --shadow-md:  0 4px 16px rgba(74, 15, 15, 0.08);
  --shadow-lg:  0 12px 40px rgba(74, 15, 15, 0.12);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--saffron-dark); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--maroon); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; border-radius: 2px; }
hr { border: 0; height: 1px; background: var(--border); margin: 2.5rem 0; }
::selection { background: var(--saffron); color: white; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  color: var(--maroon);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-top: 0.2em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2.5em; padding-top: 0; position: relative; }
h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  border-radius: 2px;
  margin-bottom: 0.5em;
}
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); color: var(--saffron-dark); margin-top: 1.8em; }
p  { margin: 0 0 1.1em; }

.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose em { color: var(--maroon-dark); font-style: italic; }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.prose { max-width: var(--prose); margin: 0 auto; }
main { padding: 32px 0 64px; }
@media (min-width: 720px) { main { padding: 48px 0 96px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 249, 239, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-logo { display: flex; align-items: center; text-decoration: none; }
.site-logo img { height: 48px; width: auto; }
@media (min-width: 720px) { .site-logo img { height: 60px; } }
.site-logo:hover { text-decoration: none; }

/* ---------- Nav ---------- */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--maroon);
  border: 1px solid var(--border);
  background: white;
  transition: background 0.2s var(--ease);
}
.nav-toggle-label:hover { background: var(--gold-soft); }
.nav-toggle-label svg { width: 22px; height: 22px; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  align-items: center;
}
.site-nav a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: all 0.2s var(--ease);
}
.site-nav a:hover {
  background: var(--gold-soft);
  color: var(--maroon);
  text-decoration: none;
}
.site-nav li.active a {
  color: var(--saffron-dark);
  background: var(--saffron-soft);
  font-weight: 600;
}
.site-nav .facebook-link {
  padding: 8px;
  color: var(--maroon);
}
.site-nav .facebook-link svg { width: 22px; height: 22px; }

/* Mobile nav */
@media (max-width: 819px) {
  .nav-toggle-label { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s var(--ease);
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 16px;
    align-items: stretch;
  }
  .site-nav a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
  }
  .nav-toggle:checked ~ .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.88rem;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--saffron-dark); }
.breadcrumb .sep { margin: 0 6px; color: var(--border-strong); }

/* ---------- Callout / date box ---------- */
.callout {
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--saffron-soft) 100%);
  border-left: 4px solid var(--saffron);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 24px 0 32px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }
.callout strong { color: var(--maroon); }

/* Special hero callout for homepage */
.date-hero {
  background: linear-gradient(135deg, #FFF3D9 0%, #FFE1B8 55%, #FFCFA0 100%);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-lg);
  padding: 28px 28px;
  margin: 20px 0 36px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.date-hero::after {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(232,169,58,0.35) 0%, transparent 70%);
  pointer-events: none;
}
.date-hero .label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--saffron-dark);
  font-weight: 600;
  margin-bottom: 6px;
}
.date-hero .date {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--maroon);
  line-height: 1.15;
  margin-bottom: 8px;
}
.date-hero .meta {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Recipe blocks (recipes.php) ---------- */
.recipe {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}
.recipe h2 { margin-top: 0; }
.recipe h2::before { display: none; }
.recipe .recipe-meta {
  font-size: 0.9rem;
  color: var(--ink-mute);
  padding: 8px 12px;
  background: var(--cream-alt);
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 12px;
}

/* ---------- Related links card grid ---------- */
.explore-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 24px 0 12px;
}
@media (min-width: 640px) { .explore-grid { grid-template-columns: 1fr 1fr; } }
.explore-card {
  display: block;
  padding: 18px 22px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s var(--ease);
  text-decoration: none;
  color: inherit;
}
.explore-card:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.explore-card .card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--maroon);
  font-weight: 700;
  margin-bottom: 4px;
}
.explore-card .card-desc {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- Continue-reading link ---------- */
.continue {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}
.continue a { color: var(--saffron-dark); font-weight: 600; }
.continue a::after { content: " →"; transition: transform 0.2s var(--ease); display: inline-block; }
.continue a:hover::after { transform: translateX(3px); }

/* ---------- Ad slot ---------- */
.ad-slot {
  margin: 32px auto;
  text-align: center;
  min-height: 90px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--maroon-dark);
  color: #E8D5C0;
  padding: 40px 0 28px;
  margin-top: 60px;
}
.site-footer a { color: var(--gold-light); }
.site-footer a:hover { color: white; }
.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  margin-bottom: 24px;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: white;
  font-weight: 700;
  margin-bottom: 6px;
}
.footer-tagline {
  font-size: 0.92rem;
  color: #D4B896;
  margin: 0;
}
.footer-heading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 10px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: 6px; font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #C4A488;
}

/* ---------- Utility ---------- */
.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;
}
.hide-mobile { display: none; }
@media (min-width: 820px) { .hide-mobile { display: inline-flex; } .hide-desktop { display: none; } }

/* Print - clean ---------- */
@media print {
  .site-header, .site-footer, .ad-slot, .continue { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}
