/* =========================================================
   Ramdas Writes — shared styles
   Palette grounded in the site's own world: chai + the kitchen.
   milk / steam surfaces · steeped-tea ink · turmeric + cardamom accents
   Display: Fraunces  ·  Body: Spectral
   Signature: rising steam (breath ↔ steam ↔ ease)
   ========================================================= */

:root {
  --milk:      #F3EADB;  /* chai-with-milk background */
  --steam:     #FBF6EC;  /* lighter card surface */
  --tea:       #3E2C1C;  /* steeped-tea ink (body text) */
  --tea-soft:  #6A5341;  /* muted brown for secondary text */
  --clove:     #241812;  /* near-black brown, deep sections + footer */
  --turmeric:  #C0842A;  /* primary accent — spice gold */
  --turmeric-d:#A66E1E;  /* darker gold for hover */
  --cardamom:  #6F7B4F;  /* secondary accent — herbal green */
  --hair:      #E1D3BC;  /* thin warm hairline */
  --shadow:    18px 30px 60px -40px rgba(36,24,18,.55);

  --measure: 40rem;      /* reading width */
  --wide:    68rem;      /* content width */
  --space:   clamp(3.5rem, 8vw, 7rem); /* vertical section rhythm */
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--milk);
  color: var(--tea);
  font-family: "Spectral", Georgia, serif;
  font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.2rem);
  line-height: 1.72;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--turmeric-d); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--tea); }

/* ---------- headings ---------- */
h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--tea);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 460; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
h4 { font-size: 1.15rem; font-weight: 560; }
p { margin: 0 0 1.1em; }
em { font-style: italic; }
strong { font-weight: 600; }

/* eyebrow / label */
.eyebrow {
  font-family: "Spectral", serif;
  font-variant: small-caps;
  letter-spacing: .22em;
  text-transform: lowercase;
  font-size: .82rem;
  font-weight: 600;
  color: var(--turmeric-d);
  margin: 0 0 1rem;
  display: inline-block;
}
.eyebrow.green { color: var(--cardamom); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: clamp(1.2rem, 5vw, 3rem); }
.reading { max-width: var(--measure); }
section { padding-block: var(--space); }
.center { text-align: center; }
.center .eyebrow, .center .reading { margin-inline: auto; }

/* ---------- header / nav (CSS-only, accessible) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--milk) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}
.nav-bar {
  max-width: var(--wide); margin-inline: auto;
  padding: .75rem clamp(1.2rem, 5vw, 3rem);
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--tea); margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand .name { font-family: "Fraunces", serif; font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; }
.brand:hover { color: var(--tea); }

.menu-toggle, .menu-toggle-label { display: none; }

.nav { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav > li { position: relative; }
.nav > li > a, .nav > li > span {
  display: inline-block; padding: .5rem .8rem; border-radius: 999px;
  font-size: .98rem; color: var(--tea); text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.nav > li > a:hover, .nav > li:hover > span, .nav > li:focus-within > span { background: var(--steam); color: var(--tea); }
.nav > li > a[aria-current="page"] { color: var(--turmeric-d); }

.submenu {
  position: absolute; top: 100%; left: 0; min-width: 15rem;
  background: var(--steam); border: 1px solid var(--hair); border-radius: 14px;
  box-shadow: var(--shadow); padding: .5rem; margin: .4rem 0 0;
  list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav > li:hover > .submenu, .nav > li:focus-within > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: .5rem .75rem; border-radius: 9px; text-decoration: none; color: var(--tea); font-size: .95rem; }
.submenu a:hover { background: var(--milk); color: var(--turmeric-d); }

/* ---------- steam signature ---------- */
.steam { display: block; margin: 0 auto; width: 46px; height: 40px; color: var(--turmeric); opacity: .9; }
.steam path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.divider { display: flex; align-items: center; justify-content: center; gap: 1.1rem; color: var(--hair); padding-block: .5rem; }
.divider::before, .divider::after { content: ""; height: 1px; width: min(9rem, 22vw); background: var(--hair); }

@keyframes rise {
  0%   { stroke-dashoffset: 26; opacity: .35; }
  50%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: .35; }
}
.steam.animate path { stroke-dasharray: 26; animation: rise 4.2s ease-in-out infinite; }
.steam.animate path:nth-child(2) { animation-delay: .7s; }
.steam.animate path:nth-child(3) { animation-delay: 1.4s; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(3.5rem, 9vw, 7rem) var(--space); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-top: .5rem; }
.hero .lede { font-size: clamp(1.15rem, 1.4vw, 1.35rem); color: var(--tea-soft); max-width: 34rem; }
.hero-figure { position: relative; }
.hero-figure img { border-radius: 6px; box-shadow: var(--shadow); margin-inline: auto; max-height: 30rem; width: auto; }
.hero-figure .steam { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); }

/* ---------- mantra pull-quote ---------- */
.mantra {
  background: var(--clove); color: var(--milk);
  text-align: center;
}
.mantra .q {
  font-family: "Fraunces", serif; font-weight: 400; font-style: italic;
  font-size: clamp(1.8rem, 3.8vw, 3rem); line-height: 1.2; letter-spacing: -0.01em;
  max-width: 24ch; margin: 0 auto;
}
.mantra .attr { color: var(--turmeric); font-variant: small-caps; letter-spacing: .18em; font-size: .95rem; margin-top: 1.4rem; }
.mantra .steam { color: var(--turmeric); margin-bottom: 1.5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: "Spectral", serif; font-size: 1rem; font-weight: 600;
  padding: .8rem 1.5rem; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .12s ease, background .16s ease, color .16s ease;
}
.btn-primary { background: var(--turmeric); color: #fff; }
.btn-primary:hover { background: var(--turmeric-d); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--tea); color: var(--tea); }
.btn-ghost:hover { background: var(--tea); color: var(--milk); transform: translateY(-1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.6rem; }
.hero .btn-row { margin-top: 2rem; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; }
.card {
  background: var(--steam); border: 1px solid var(--hair); border-radius: 16px;
  padding: 1.8rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card .eyebrow { margin-bottom: .6rem; }

/* card that links */
a.card { text-decoration: none; color: var(--tea); display: block; transition: transform .14s ease, border-color .16s ease; }
a.card:hover { transform: translateY(-3px); border-color: var(--turmeric); color: var(--tea); }
a.card .go { color: var(--turmeric-d); font-weight: 600; font-size: .95rem; }

/* ---------- audio list (Investigations / Kitchen Aids) ---------- */
.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.track {
  background: var(--steam); border: 1px solid var(--hair); border-left: 4px solid var(--turmeric);
  border-radius: 12px; padding: 1.1rem 1.3rem;
}
.track.green { border-left-color: var(--cardamom); }
.track .t-title { font-family: "Fraunces", serif; font-size: 1.15rem; font-weight: 500; margin-bottom: .1rem; }
.track .t-num { color: var(--tea-soft); font-variant: small-caps; letter-spacing: .1em; font-size: .85rem; }
.track audio { width: 100%; margin-top: .7rem; }
.track .dl { font-size: .85rem; }
.track.pending { border-left-color: var(--hair); color: var(--tea-soft); font-style: italic; }

/* ---------- book shop ---------- */
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem; }
.book { background: var(--steam); border: 1px solid var(--hair); border-radius: 16px; padding: 2rem; text-align: center; box-shadow: var(--shadow); }
.book img { margin: 0 auto 1.4rem; max-height: 15rem; box-shadow: var(--shadow); border-radius: 3px; }
.book .format { font-variant: small-caps; letter-spacing: .12em; color: var(--cardamom); font-weight: 600; }
.price { font-family: "Fraunces", serif; font-size: 1.5rem; margin: .3rem 0 1.2rem; }
.price .was { color: var(--tea-soft); text-decoration: line-through; font-size: 1rem; margin-left: .4rem; }

/* ---------- schedule / detail blocks ---------- */
.panel { background: var(--steam); border: 1px solid var(--hair); border-radius: 16px; padding: clamp(1.5rem, 3vw, 2.4rem); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 1.5rem; }
ul.clean { padding-left: 1.2rem; }
ul.clean li { margin-bottom: .5rem; }
.tag {
  display: inline-block; font-variant: small-caps; letter-spacing: .12em; font-weight: 600;
  font-size: .8rem; padding: .25rem .7rem; border-radius: 999px;
  background: color-mix(in srgb, var(--cardamom) 18%, var(--milk)); color: var(--cardamom);
}
.tag.closed { background: color-mix(in srgb, #9a4a2f 16%, var(--milk)); color: #9a4a2f; }

/* two-column intro (image + text) */
.split { display: grid; grid-template-columns: minmax(0, 200px) 1fr; gap: 2rem; align-items: start; }
.split img { border-radius: 4px; box-shadow: var(--shadow); }

/* banner image atop interior pages */
.page-banner { width: 100%; max-width: var(--wide); margin: 0 auto; padding-inline: clamp(1.2rem, 5vw, 3rem); }
.page-banner img { width: 100%; height: clamp(160px, 28vw, 320px); object-fit: cover; border-radius: 16px; box-shadow: var(--shadow); }

/* note / editorial callout for rebuilt content */
.note {
  border: 1px dashed var(--cardamom); background: color-mix(in srgb, var(--cardamom) 8%, var(--steam));
  border-radius: 12px; padding: 1rem 1.2rem; font-size: .95rem; color: var(--tea-soft);
}

/* video */
.video-frame { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--hair); max-width: 30rem; }
.video-frame video { display: block; width: 100%; }

/* ---------- footer ---------- */
.site-footer { background: var(--clove); color: color-mix(in srgb, var(--milk) 82%, transparent); padding-block: 3.5rem; }
.site-footer a { color: var(--turmeric); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: var(--milk); font-variant: normal; margin-bottom: .8rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .95rem; }
.site-footer .brand .name { color: var(--milk); }
.footer-bottom { border-top: 1px solid rgba(243,234,219,.15); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .85rem; color: rgba(243,234,219,.55); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 18rem; margin-inline: auto; }
  .hero-figure img { max-height: 22rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .split { grid-template-columns: 1fr; }
  .split img { max-width: 180px; }

  /* mobile menu */
  .menu-toggle-label {
    display: inline-flex; margin-left: auto; cursor: pointer;
    font-family: "Spectral", serif; font-weight: 600; font-size: .95rem;
    padding: .5rem .9rem; border: 1px solid var(--hair); border-radius: 999px; background: var(--steam);
  }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(88vw, 22rem);
    flex-direction: column; align-items: stretch; gap: .1rem;
    background: var(--steam); border-left: 1px solid var(--hair);
    padding: 5rem 1.2rem 2rem; overflow-y: auto;
    transform: translateX(100%); transition: transform .24s ease;
    box-shadow: var(--shadow);
  }
  .menu-toggle:checked ~ .nav { transform: translateX(0); }
  .nav > li > a, .nav > li > span { display: block; padding: .7rem .6rem; font-size: 1.05rem; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent; padding: 0 0 .5rem 1rem; margin: 0;
  }
  .submenu a { font-size: 1rem; }
}

/* ---------- accessibility ---------- */
:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--steam); padding: .6rem 1rem; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
