/* =================================================================
   Vijnaneshwara Pratishthana Trust — v5 mockup
   Shared stylesheet (doubles as the rebuild spec for Elementor)
   Static look-and-feel reference. Black/white + one forest green.
   ================================================================= */

/* -----------------------------------------------------------------
   1. DESIGN TOKENS  (swap fonts/colours here in one place)
   ----------------------------------------------------------------- */
:root {
  /* Type families — display is used at LARGE sizes only, never body */
  --font-display: "Antic Didone", Georgia, serif;
  --font-body: "Libre Franklin", system-ui, -apple-system, Arial, sans-serif;

  /* Colour: black ink on white, one restrained forest-green accent */
  --ink:   #141210;   /* near-black text */
  --white: #FFFFFF;   /* page / panel white */
  --green: #1F3D2F;   /* deep forest green — links, hairlines, drop cap, marks */
  --ink-60: #57534e;  /* muted captions/roles (still AA on white) */
  --hair:  #d9d6d1;   /* hairline rules on the white panel */

  /* Fluid type scale */
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --step-1:  clamp(1.25rem, 1.18rem + 0.35vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.45rem + 0.75vw, 2.1rem);
  --step-3:  clamp(2.1rem, 1.8rem + 1.5vw, 3.1rem);
  --step-4:  clamp(2.8rem, 2.2rem + 3vw, 4.6rem);

  /* Reading measure */
  --measure: 62ch;

  /* Panel geometry */
  --panel-max: 66rem;       /* ~62–68rem */
  --panel-pad: clamp(1.5rem, 1rem + 6vw, 6.5rem);  /* shrinks on mobile */
}

/* -----------------------------------------------------------------
   2. RESET / BASE
   ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  /* BACKGROUND IMAGE: dark inscribed-stone, fixed, full-bleed.
     Drop the real photograph in at  assets/img/stone_bg.png  and it renders.
     The layered CSS gradients below stay as a fallback/tint behind it
     (a missing file simply leaves the simulated stone texture showing). */
  background-color: #2b2926;
  background-image:
    url("assets/img/stone_bg.png"),
    radial-gradient(120% 90% at 30% 8%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(140% 120% at 80% 100%, rgba(0,0,0,0.55), transparent 55%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.018) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #3a3733 0%, #29262300 40%, #1b1917 100%);
  background-attachment: fixed;   /* the ground stays still as content scrolls */
  background-size: cover;
  background-position: center;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration: none; }

/* Visible focus everywhere */
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* Skip link */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--green); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* -----------------------------------------------------------------
   3. LAYOUT — fixed stone ground + central floating white panel
   ----------------------------------------------------------------- */
.shell {
  /* lets ~8–12% of the stone ground show as a border ring around the panel */
  padding: clamp(0.6rem, 0.4rem + 2vw, 2.75rem);
}
.panel {
  background: var(--white);
  max-width: var(--panel-max);
  margin: 0 auto;
  padding: var(--panel-pad);
}

/* -----------------------------------------------------------------
   4. HEADER + DROPDOWN NAV  (CSS-only :hover / :focus-within)
   ----------------------------------------------------------------- */
/* Full-width sticky top bar: nav at left, logo + text at right */
.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  border-bottom: 1px solid var(--hair);
  display: flex;
  flex-direction: row;           /* brand (1st child) → left, nav (2nd) → right */
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding: 0.6rem clamp(1rem, 4vw, 3rem);
}
/* Logo at left, trust name + place stacked to its right, centred as a unit */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
}
.brand-logo {
  width: auto;
  height: clamp(2.5rem, 2rem + 1.5vw, 3.4rem);  /* spans both text lines, bar-height */
  flex: none;
}
.brand-text { display: block; }
.brand .brand-name,
.brand .brand-sub { display: block; }   /* force the two spans onto their own lines */
.brand .brand-name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.brand .brand-sub {
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-top: 0.3rem;
}

/* Nav */
.nav { margin-top: 0; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul {
  display: flex; flex-wrap: wrap; gap: 1rem 1.6rem;
  align-items: center;
  justify-content: flex-start;   /* nav sits at the left of the bar */
}
.nav a, .nav .group-label {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--green); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

.nav .has-children { position: relative; }
.nav .submenu {
  display: none;
  position: absolute; left: 0; top: 100%;
  min-width: 16rem;
  background: var(--white);
  border: 1px solid var(--hair);
  padding: 0.75rem 0;
  z-index: 50;
}
.nav .has-children:hover .submenu,
.nav .has-children:focus-within .submenu { display: block; }
.nav .submenu li { display: block; }
.nav .submenu a {
  display: block; padding: 0.5rem 1.25rem; letter-spacing: 0.1em;
}
.nav .submenu a:hover { color: var(--green); }

/* Mobile nav toggle (expandable) — hidden checkbox pattern */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

/* -----------------------------------------------------------------
   5. TYPOGRAPHY — hierarchy from scale, space, small-caps, one accent
   ----------------------------------------------------------------- */
.kicker {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--green);
  margin: 0 0 1rem;
}
/* Forest-green "start" tick above every kicker — card-like definition without
   the box; one accent, no fills. Applies to page headers and section kickers. */
.kicker::before {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--green);
  margin-bottom: 1.1rem;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; color: var(--ink); }
h1 { font-size: var(--step-4); line-height: 1.04; letter-spacing: 0.005em; margin: 0 0 1.5rem; }
h2 { font-size: var(--step-3); line-height: 1.1; margin: 2.5rem 0 1rem; }
h3 { font-size: var(--step-2); line-height: 1.15; margin: 2rem 0 0.75rem; }

p { max-width: var(--measure); margin: 0 0 1.3rem; }
.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 54ch;
  color: var(--ink);
  font-weight: 300;
}

/* Drop cap — narrative page opener, Antic Didone, forest green */
.dropcap::first-letter {
  font-family: var(--font-display);
  color: var(--green);
  float: left;
  font-size: 4.6em;
  line-height: 0.78;
  padding: 0.05em 0.12em 0 0;
}

/* Pulled-out verse — forest-green left hairline */
.verse {
  margin: 2.5rem 0;
  padding: 0.4rem 0 0.4rem 1.6rem;
  border-left: 2px solid var(--green);
  max-width: 56ch;
}
.verse p { margin: 0 0 0.6rem; }
.verse .sanskrit {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.4;
  color: var(--ink);
}
.verse .gloss { font-style: italic; color: var(--ink-60); }
.verse .source {
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-60);
}

/* Home page grouped sections — clear heading + content + one CTA.
   First letter of every section opens with a drop cap (see .dropcap). */
.home-sec { padding: clamp(2rem, 1rem + 3vw, 3.5rem) 0; }
.home-sec > .kicker { margin-bottom: 0.75rem; }
.home-sec > h2 { margin-top: 0; margin-bottom: 1.5rem; }

/* Single call-to-action, on its own line, centred under the section */
.cta-row { max-width: none; text-align: center; margin-top: 2.5rem; margin-bottom: 0; }

/* Cards variant (index-cards.html): each section becomes a hairline-ruled
   block — 1px border, no rounded corners, no shadow (within the design rules). */
.cards-layout .rule { display: none; }              /* borders replace the dividers */

/* Ticked variant (index.html): the green section-tick defines each section,
   so the horizontal dividers are dropped to keep the page calm. */
.ticked-layout .rule { display: none; }
.cards-layout .home-sec {
  border: 1px solid var(--hair);
  padding: clamp(1.75rem, 1rem + 3vw, 3rem);
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.cards-layout .home-sec:first-of-type { margin-top: clamp(2rem, 1rem + 4vw, 4rem); }

/* Section divider hairline */
.rule { border: 0; border-top: 1px solid var(--hair); margin: 3rem 0; }
.rule-strong { border-top: 2px solid var(--ink); margin: 0 0 2rem; }

/* -----------------------------------------------------------------
   6. IMAGE PLACEHOLDERS  (no images sourced for the mockup)
   ----------------------------------------------------------------- */
figure { margin: 2.5rem 0; }
.imgph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: #ece9e4;
  border: 1px solid var(--hair);
  color: var(--ink-60);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1.5rem;
  min-height: 22rem;
}
.imgph.tall { min-height: 30rem; }
.imgph.portrait { min-height: 26rem; max-width: 22rem; }
/* Real supplied photographs (full colour) sit in the same figures */
.photo {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--hair);
}
.photo.portrait { max-width: 22rem; }
figcaption {
  font-size: var(--step--1);
  color: var(--ink-60);
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}

/* -----------------------------------------------------------------
   7. REFERENCE LISTS — dense, journal-like, hairline column rules
   ----------------------------------------------------------------- */
.directory {
  columns: 2;
  column-gap: 3rem;
  column-rule: 1px solid var(--hair);
  margin: 1.5rem 0;
}
.dir-group { break-inside: avoid; margin: 0 0 2rem; }
.dir-group .cat {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--green);
  border-bottom: 1px solid var(--hair);
  padding-bottom: 0.4rem;
  margin: 0 0 1rem;
}
.entry { margin: 0 0 1.1rem; }
.entry .name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.2;
  color: var(--ink);
}
.entry .role {
  font-size: var(--step--1);
  color: var(--ink-60);
  margin-top: 0.15rem;
  line-height: 1.4;
}

/* Plain numbered/ordered theme & program lists */
.stack { max-width: var(--measure); }
.stack li { margin: 0 0 0.9rem; }
.stack.lined li {
  list-style: none;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 0.9rem;
}
.stack.lined { padding: 0; }

/* Program entries with date + detail */
.program { border-bottom: 1px solid var(--hair); padding: 1.25rem 0; max-width: var(--measure); }
.program .when {
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.4rem;
}
.program .what { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.25; }
.program .who { color: var(--ink-60); margin-top: 0.4rem; }

/* -----------------------------------------------------------------
   8. CONTACT FORM (placeholder — no backend)
   ----------------------------------------------------------------- */
.form { max-width: 38rem; margin-top: 1.5rem; }
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--ink);
  background: var(--white);
  border-radius: 0;
}
.field textarea { min-height: 9rem; resize: vertical; }
.btn {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--green);
  color: #fff;
  border: 0;
  padding: 0.85rem 2rem;
  cursor: pointer;
}
.btn:hover { background: #16301f; }

/* Inline "onward" call-to-action — a restrained ghost button (outline, not a fill) */
.btn-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  border: 1px solid var(--green);
  padding: 0.6rem 1.4rem;
}
.btn-link::after { content: " \2192"; }   /* trailing arrow */
.btn-link:hover, .btn-link:focus-visible { background: var(--green); color: #fff; }

.contact-meta { margin-top: 0.5rem; }
.contact-meta dt {
  font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; color: var(--green); margin-top: 1rem;
}
.contact-meta dd { margin: 0.2rem 0 0; }

/* -----------------------------------------------------------------
   9. FOOTER
   ----------------------------------------------------------------- */
.site-foot {
  border-top: 1px solid var(--hair);
  margin-top: clamp(3rem, 2rem + 5vw, 6rem);
  padding-top: 2rem;
  font-size: var(--step--1);
  color: var(--ink-60);
}
.site-foot .foot-name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.site-foot .foot-place { letter-spacing: 0.14em; text-transform: uppercase; }
.site-foot nav a { display: inline-block; margin: 0.75rem 1.25rem 0 0; color: var(--ink-60); }
.site-foot nav a:hover { color: var(--green); }

/* helpers */
.spacious > * + * { margin-top: 1.6rem; }
.note { font-size: var(--step--1); color: var(--ink-60); font-style: italic; }
.anchor-offset { scroll-margin-top: 2rem; }

/* -----------------------------------------------------------------
   10. SCROLL-REVEAL  (JS adds .reveal-in; subtle, reduced-motion safe)
   ----------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.reveal-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  body { background-attachment: scroll; }
}

/* -----------------------------------------------------------------
   11. RESPONSIVE
   ----------------------------------------------------------------- */
@media (max-width: 860px) {
  .directory { columns: 1; column-rule: 0; }

  /* Collapse nav into an expandable list */
  .nav-toggle-label {
    display: inline-block;
    font-size: var(--step--1); letter-spacing: 0.16em; text-transform: uppercase;
    font-weight: 600; border: 1px solid var(--ink); padding: 0.5rem 1rem; cursor: pointer;
  }
  /* Off-canvas sidebar drawer: slides in from the right, links listed vertically */
  .nav { position: static; }
  .nav > ul {
    display: flex; flex-direction: column; gap: 0.25rem;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(82vw, 20rem);
    background: var(--white);
    border-left: 1px solid var(--hair);
    padding: 5rem clamp(1.25rem, 5vw, 2rem) 2rem;
    overflow-y: auto;
    z-index: 90;
    transform: translateX(100%);          /* hidden off-screen by default */
    box-shadow: 0 0 0 100vmax rgba(20,18,16,0); /* backdrop tint, transparent when closed */
    transition: transform 0.32s ease, box-shadow 0.32s ease;
  }
  .nav-toggle:checked ~ ul {
    transform: translateX(0);             /* slide in */
    box-shadow: 0 0 0 100vmax rgba(20,18,16,0.5);
  }
  @media (prefers-reduced-motion: reduce) {
    .nav > ul { transition: none; }
  }
  /* The Menu button stays on top of the drawer to toggle it shut */
  .nav-toggle-label { position: relative; z-index: 95; }

  .nav .has-children { position: static; }
  .nav .submenu {
    display: block; position: static; border: 0; padding: 0.25rem 0 0.75rem 1rem;
    min-width: 0;
  }
  .nav > ul > li { border-bottom: 1px solid var(--hair); padding: 0.7rem 0; }
  .nav > ul > li:last-child { border-bottom: 0; }
  .nav .group-label { display: block; color: var(--green); }
}
