/* ==========================================================================
   SARANGADHAR — THE RECORD SYSTEM
   Site-wide layer (was home-index.css, front-page only). Loads after main.css.
   pages.css composes the interior pages from these parts.

   The page is composed as a set of clinical record cards — ruled, tabbed,
   filed. Brand Guidelines Vol.01 is unchanged: every colour and face below
   is drawn from main.css tokens. What changes is composition and material.

   Deliberate departures from the incumbent home page:
     - card radius drops 18–40px -> 4px (filed stock, not app chrome)
     - depth is offset + soft blur; no zero-blur block shadow, no colour halo
     - eyebrow copy moves into the card tab; nothing floats above a heading
     - the 3-up icon/heading/text grid is replaced by a varied ledger
     - one authored motion (the record seating) instead of a global reveal
   ========================================================================== */

:root{
  --rc-face:var(--paper-2);
  --rc-rule:rgba(27,43,35,.16);
  --rc-rule-soft:rgba(27,43,35,.08);
  --rc-label:var(--river-deep);          /* 5.5:1 on paper — teal is too light for text */
  --rc-r:4px;
  --rc-lift:0 1px 2px rgba(27,43,35,.06), 0 10px 28px rgba(0,75,41,.10);
  --rc-lift-hi:0 2px 4px rgba(27,43,35,.08), 0 22px 52px rgba(0,75,41,.14);
}
.home-index{background:var(--paper)}

/* ----- The card itself -------------------------------------------------- */
.rc{
  position:relative;
  background:var(--rc-face);
  border:1px solid var(--rc-rule);
  border-radius:var(--rc-r);
  box-shadow:var(--rc-lift);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* Tab: carries the section's own label. Replaces the banned kicker-above-heading. */
.rc-tab{
  align-self:flex-start;
  display:inline-flex;
  align-items:center;
  gap:.5em;
  margin:0;
  padding:.5rem 1.1rem .45rem;
  background:var(--green);
  color:#fff;
  font-family:var(--ff-title);
  font-weight:600;
  font-size:.7rem;
  letter-spacing:.13em;
  text-transform:uppercase;
  border-radius:0 0 var(--rc-r) 0;
}
.rc-tab.is-teal{background:var(--river-deep)}
.rc-tab.is-marigold{background:var(--marigold);color:var(--ink)}

.rc-body{padding:clamp(1.4rem,2.6vw,2.4rem);display:flex;flex-direction:column;gap:1rem}
.rc-body > :last-child{margin-bottom:0}

/* Ruled field rows — the record's data, not a stat display. */
.rc-fields{
  display:grid;
  border-top:1px solid var(--rc-rule);
  margin-top:auto;
}
.rc-field{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:1rem;
  padding:.72rem clamp(1.4rem,2.6vw,2.4rem);
  border-bottom:1px solid var(--rc-rule-soft);
}
.rc-field:last-child{border-bottom:0}
.rc-field .k{
  font-family:var(--ff-title);
  font-size:.68rem;
  font-weight:600;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--rc-label);
  flex:0 0 auto;
}
.rc-field .v{
  font-family:var(--ff-title);
  font-weight:600;
  font-size:1rem;
  color:var(--forest);
  text-align:right;
  font-variant-numeric:tabular-nums;
}

/* Photograph inside a record — real evidence, never a placeholder tile. */
.rc-photo{position:relative;margin:0;background:var(--paper-3);aspect-ratio:4/3;overflow:hidden}
.rc-photo img{width:100%;height:100%;object-fit:cover;display:block}
.rc-photo figcaption{
  position:absolute;left:0;bottom:0;right:0;
  padding:.6rem .9rem;
  /* Solid behind the text band, ramping out only above it. A pure gradient
     leaves the top of the glyphs at ~2.6:1 over light photography. */
  background:linear-gradient(to top, rgba(0,76,41,.94) 0%, rgba(0,76,41,.94) 78%, rgba(0,76,41,0) 100%);
  color:#fff;
  font-family:var(--ff-title);
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
}

/* ==========================================================================
   1. RECORD HEAD (hero)
   ========================================================================== */
.rc-head{padding-block:clamp(3rem,7vw,6rem)}
.rc-head-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:clamp(2rem,4vw,3.5rem);
  align-items:start;
}
@media (min-width:960px){
  .rc-head-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:clamp(2.5rem,5vw,5rem)}
}

.rc-filed{
  display:flex;
  align-items:center;
  gap:.75rem;
  padding-bottom:1rem;
  margin-bottom:1.6rem;
  border-bottom:1px solid var(--rc-rule);
  font-family:var(--ff-title);
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--rc-label);
}
.rc-filed::after{content:"";flex:1;height:1px;background:var(--rc-rule-soft)}

.rc-head h1{margin:0 0 1.1rem;max-width:16ch}
.rc-head .lead{max-width:56ch;margin-bottom:1.9rem}

.rc-actions{display:flex;flex-wrap:wrap;gap:.85rem;margin-bottom:2.2rem}

/* Hero record fields — ruled rows, deliberately not the big-number stat template. */
.rc-head-fields{
  border:1px solid var(--rc-rule);
  border-radius:var(--rc-r);
  background:var(--rc-face);
  box-shadow:var(--rc-lift);
  max-width:34rem;
}
.rc-head-fields .rc-field{padding-inline:1.3rem}

/* The filed record: photograph + caption + fields, seated in the stack. */
.rc-specimen{position:relative}
.rc-specimen .rc{position:relative;z-index:2}
/* Two sheets behind, suggesting a stack. Offset + blur, never a block shadow. */
.rc-specimen::before,
.rc-specimen::after{
  content:"";
  position:absolute;
  inset:0;
  border:1px solid var(--rc-rule-soft);
  border-radius:var(--rc-r);
  background:var(--paper-3);
  box-shadow:0 1px 2px rgba(27,43,35,.05);
}
.rc-specimen::before{transform:translate(10px,10px);z-index:1}
.rc-specimen::after{transform:translate(20px,20px);z-index:0}

/* ==========================================================================
   2. STANDING LINE (trust strip)
   ========================================================================== */
.rc-standing{
  border-block:1px solid var(--rc-rule);
  background:var(--paper-3);
  padding-block:1.1rem;
}
.rc-standing ul{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem clamp(1.2rem,3vw,2.6rem);
  align-items:center;
  justify-content:center;
}
.rc-standing li{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  font-family:var(--ff-title);
  font-size:.76rem;
  font-weight:600;
  letter-spacing:.06em;
  color:var(--forest);
}
.rc-standing svg{width:17px;height:17px;color:var(--green);flex:0 0 auto}

/* ==========================================================================
   3. THE LEDGER (principles — replaces the 3-up icon grid)
   Varied spans, ruled rows, no icon-above-heading, no decorative numbering.
   ========================================================================== */
.rc-section{padding-block:clamp(3.5rem,7vw,6.5rem)}
.rc-section h2{max-width:20ch;margin:0 0 1rem}
.rc-section .lead{max-width:62ch}
.rc-section-head{margin-bottom:clamp(2rem,4vw,3rem)}
.rc-section-head.with-action{
  display:flex;justify-content:space-between;align-items:flex-end;
  gap:2rem;flex-wrap:wrap;
}

.rc-ledger{
  display:grid;
  grid-template-columns:1fr;
  border:1px solid var(--rc-rule);
  border-radius:var(--rc-r);
  background:var(--rc-face);
  box-shadow:var(--rc-lift);
  overflow:hidden;
}
@media (min-width:720px){ .rc-ledger{grid-template-columns:1fr 1fr} }

.rc-entry{
  padding:clamp(1.5rem,3vw,2.3rem);
  border-bottom:1px solid var(--rc-rule-soft);
  border-right:1px solid var(--rc-rule-soft);
  display:flex;
  flex-direction:column;
  gap:.55rem;
}
.rc-entry h3{
  font-size:1.18rem;
  letter-spacing:-.01em;
  display:flex;
  align-items:center;
  gap:.6rem;
}
.rc-entry h3 svg{width:19px;height:19px;color:var(--green);flex:0 0 auto}
.rc-entry p{margin:0;color:var(--ink-soft);font-size:.97rem;line-height:1.65}
/* Vary the weight of entries so this reads as a ledger, not a uniform grid. */
@media (min-width:720px){
  .rc-entry:nth-child(1),
  .rc-entry:nth-child(6){background:rgba(0,104,56,.035)}
  .rc-entry:nth-child(2n){border-right:0}
  .rc-entry:nth-last-child(-n+2){border-bottom:0}
}
@media (max-width:719px){
  .rc-entry{border-right:0}
  .rc-entry:last-child{border-bottom:0}
}

/* ==========================================================================
   4. THE FILE (story split)
   ========================================================================== */
.rc-file{
  display:grid;
  grid-template-columns:1fr;
  gap:clamp(2rem,4vw,3.5rem);
  align-items:center;
}
@media (min-width:900px){
  .rc-file{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}
}
.rc-file .rc-photo{aspect-ratio:3/4}
.rc-file h2{max-width:18ch}
.rc-file-fields{
  margin-top:1.8rem;
  border:1px solid var(--rc-rule);
  border-radius:var(--rc-r);
  background:var(--rc-face);
}
.rc-file-fields .rc-field{padding-inline:1.3rem}
.rc-file-fields .v{font-size:.95rem;text-align:right}

/* ==========================================================================
   5. MARGIN NOTE (pull quote)
   ========================================================================== */
.rc-note{
  background:var(--forest);
  color:#e8efe9;
  padding-block:clamp(3rem,6vw,5rem);
}
.rc-note blockquote{
  margin:0;
  max-width:24ch;
  border-left:1px solid rgba(255,255,255,.32);   /* hairline only — never a colour bar */
  padding-left:clamp(1.2rem,3vw,2.2rem);
}
@media (min-width:900px){
  .rc-note blockquote{max-width:none;padding-right:clamp(2rem,8vw,8rem)}
}
.rc-note .q{
  font-family:var(--ff-serif);
  font-weight:500;
  font-size:clamp(1.6rem,5vw,3.4rem);
  line-height:1.22;
  letter-spacing:-.015em;
  text-wrap:balance;
  color:#fff;
  margin:0 0 1.2rem;
}
.rc-note .src{
  font-family:var(--ff-title);
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--tulsi);
}

/* ==========================================================================
   6. CARD SETS (services, products)
   ========================================================================== */
.rc-set{display:grid;grid-template-columns:1fr;gap:clamp(1.1rem,2vw,1.6rem)}
@media (min-width:640px){ .rc-set{grid-template-columns:repeat(2,1fr)} }
@media (min-width:1020px){ .rc-set{grid-template-columns:repeat(3,1fr)} }
.rc-set .rc{height:100%}
.rc-set .rc-body{gap:.55rem;padding-block:1.2rem}
.rc-set .rc-body h3{font-size:1.12rem}
.rc-set .rc-body p{margin:0;font-size:.95rem;color:var(--ink-soft);line-height:1.6}
.rc-set .rc:hover{box-shadow:var(--rc-lift-hi)}
.rc-set .rc:focus-within{outline:2px solid var(--green);outline-offset:3px}

/* ==========================================================================
   7. THE PROTOCOL (approach steps — numerals earned, the sequence is real)
   ========================================================================== */
.rc-protocol{background:var(--green);color:#eef4ef;padding-block:clamp(3.5rem,7vw,6rem)}
.rc-protocol h2{color:#fff;max-width:16ch}
/* Dark grounds must restate the accent colour: main.css only keys this off
   .bg-green/.bg-forest, so without this the accent renders green-on-green (1:1). */
.rc-protocol .serif-accent,
.rc-protocol h2 em,
.rc-note .serif-accent,
.rc-note em{color:var(--tulsi)}
.rc-protocol .lead{color:rgba(255,255,255,.86);max-width:60ch}
.rc-protocol-steps{
  display:grid;grid-template-columns:1fr;gap:0;
  margin-top:clamp(2rem,4vw,3rem);
  border:1px solid rgba(255,255,255,.24);
  border-radius:var(--rc-r);
  overflow:hidden;
}
@media (min-width:820px){ .rc-protocol-steps{grid-template-columns:repeat(3,1fr)} }
.rc-step{
  padding:clamp(1.5rem,3vw,2.2rem);
  border-bottom:1px solid rgba(255,255,255,.18);
  display:flex;flex-direction:column;gap:.6rem;
}
.rc-step:last-child{border-bottom:0}
@media (min-width:820px){
  .rc-step{border-bottom:0;border-right:1px solid rgba(255,255,255,.18)}
  .rc-step:last-child{border-right:0}
}
.rc-step .n{
  font-family:var(--ff-serif);
  font-weight:600;
  font-size:1.6rem;
  color:var(--tulsi);
  line-height:1;
}
.rc-step h3{color:#fff;font-size:1.15rem}
.rc-step p{margin:0;color:rgba(255,255,255,.84);font-size:.95rem;line-height:1.65}

/* ==========================================================================
   8. ENDORSEMENTS
   ========================================================================== */
.rc-endorse{display:grid;grid-template-columns:1fr;gap:clamp(1.1rem,2vw,1.6rem)}
@media (min-width:820px){ .rc-endorse{grid-template-columns:repeat(3,1fr)} }
/* Filed patient notes: the quote, then attribution as a ruled field. No rating
   is claimed — the client confirmed the words, never a score. */
.rc-endorse .rc-body{gap:.9rem;flex:1}
.rc-endorse blockquote{margin:0;font-size:1.02rem;line-height:1.62;color:var(--ink)}
.rc-endorse .rc-fields .v{font-size:.95rem}

/* ==========================================================================
   9. CLOSING RECORD (CTA)
   ========================================================================== */
.rc-close{padding-block:clamp(3.5rem,7vw,6rem)}
.rc-close-card{
  border:1px solid var(--rc-rule);
  border-radius:var(--rc-r);
  background:var(--rc-face);
  box-shadow:var(--rc-lift);
  overflow:hidden;
}
.rc-close-inner{
  padding:clamp(2rem,5vw,4rem);
  display:grid;grid-template-columns:1fr;gap:1.6rem;align-items:center;
}
@media (min-width:900px){
  .rc-close-inner{grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:3rem}
}
.rc-close h2{max-width:15ch;margin:0 0 .9rem}
.rc-close .lead{max-width:52ch;margin:0}

/* ==========================================================================
   MOTION — one authored moment: the record seating into the stack.
   Everything else is present by default. Honours reduced-motion and the
   Customizer's animation switch (body.no-motion).
   ========================================================================== */
@media (prefers-reduced-motion:no-preference){
  body:not(.no-motion) .rc-specimen .rc{
    animation:rc-seat 900ms cubic-bezier(.16,.84,.34,1) both;
  }
  body:not(.no-motion) .rc-specimen::before{
    animation:rc-seat-sheet 900ms cubic-bezier(.16,.84,.34,1) 80ms both;
  }
  body:not(.no-motion) .rc-specimen::after{
    animation:rc-seat-sheet 900ms cubic-bezier(.16,.84,.34,1) 160ms both;
  }
}
@keyframes rc-seat{
  from{transform:translateY(-14px) rotate(-.8deg);box-shadow:0 1px 2px rgba(27,43,35,.04), 0 30px 70px rgba(0,75,41,.18)}
  to{transform:none;box-shadow:var(--rc-lift)}
}
@keyframes rc-seat-sheet{
  from{opacity:0}
  to{opacity:1}
}

/* Focus visibility — keyboard users get an immediate, non-animated ring. */
a:focus-visible,
button:focus-visible,
summary:focus-visible{
  outline:2px solid var(--green);
  outline-offset:3px;
  border-radius:2px;
}

/* ==========================================================================
   SUPPORTING PARTS
   ========================================================================== */

/* Definition lists carry the record fields; strip the UA margins. */
.rc-fields,
.rc-fields dd,
.rc-fields dt{margin:0}

.rc-section-alt{background:var(--paper-3)}

/* A tab that labels the block beneath it (a ledger or a set), seated on its edge. */
.rc-tab-standalone{
  border-radius:var(--rc-r) var(--rc-r) 0 0;
  position:relative;
  z-index:1;
  margin-bottom:-1px;
}

.rc-welcome .rc-body .lead{margin:0;max-width:70ch}

/* Framed photograph used in the file split and the spotlight. */
.rc-photo-framed{
  border:1px solid var(--rc-rule);
  border-radius:var(--rc-r);
  box-shadow:var(--rc-lift);
}
.rc-photo-framed img{aspect-ratio:3/4;object-fit:cover;width:100%;height:100%}

.rc-file-body h2{margin:0 0 1.1rem}
.rc-file-body p{color:var(--ink-soft)}
.rc-file-more{margin:1.6rem 0 0}
@media (min-width:900px){
  .rc-file-reverse .rc-photo-framed{order:2}
  .rc-file-reverse .rc-file-body{order:1}
}
.rc-file-reverse .rc-photo-framed img{aspect-ratio:4/3}

.rc-file-body .rc-tab-standalone{
  margin:0 0 1.2rem;
  border-radius:var(--rc-r);
  align-self:flex-start;
  display:inline-flex;
}

/* Spotlight feature list — icons as field markers, one stroke weight. */
.rc-feat{display:grid;gap:.7rem;margin:1.4rem 0 1.8rem}
.rc-feat li{display:flex;align-items:flex-start;gap:.7rem;font-size:.97rem;color:var(--ink-soft);line-height:1.55}
.rc-feat svg{width:18px;height:18px;color:var(--green);flex:0 0 auto;margin-top:.25em}

.rc-protocol-cta{margin-top:clamp(2rem,4vw,2.8rem)}
.rc-close-actions{margin:0}

.rc-endorse .mt{display:block}

/* ==========================================================================
   Existing card parts, joined to the record world.
   Site-wide since v1.8.0: /services/, /apothecary/ and the home sets share them.
   ========================================================================== */
.svc-card,
.pcard{
  background:var(--rc-face);
  border:1px solid var(--rc-rule);
  border-radius:var(--rc-r);
  box-shadow:var(--rc-lift);
  overflow:hidden;
  height:100%;
  display:flex;
  flex-direction:column;
  transition:box-shadow .3s var(--ease);
}
.svc-card:hover,
.pcard:hover{box-shadow:var(--rc-lift-hi);transform:none}
.svc-card:focus-within,
.pcard:focus-within{outline:2px solid var(--green);outline-offset:3px}

.svc-media,
.pcard .thumb{
  border-radius:0;
  background:var(--paper-3);
  aspect-ratio:4/3;
  overflow:hidden;
  display:block;
}
.svc-media img,
.pcard .thumb img{width:100%;height:100%;object-fit:cover}

/* The floating icon badge belongs to the old world; the tab carries labels now. */
.svc-ic{display:none}

.svc-body,
.pcard .info{
  padding:clamp(1.1rem,2vw,1.5rem);
  display:flex;
  flex-direction:column;
  gap:.5rem;
  flex:1;
}
.svc-body h3,
.pcard .info h3{font-size:1.12rem;letter-spacing:-.01em;margin:0}
.svc-body .ex,
.pcard .info .ex{margin:0;font-size:.95rem;color:var(--ink-soft);line-height:1.6}

/* Category / kind labels become ruled field labels, not pills. */
.pcard .cat,
.svc-kind{
  display:inline-flex;
  align-items:center;
  gap:.4em;
  background:none;
  padding:0;
  border-radius:0;
  font-family:var(--ff-title);
  font-size:.68rem;
  font-weight:600;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--rc-label);
}

.svc-benes{
  margin-top:auto;
  padding-top:.9rem;
  border-top:1px solid var(--rc-rule-soft);
}
.svc-benes-label{
  display:block;
  margin-bottom:.5rem;
  font-family:var(--ff-title);
  font-size:.66rem;
  font-weight:600;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--rc-label);
}
.svc-benes ul{display:grid;gap:.32rem}
.svc-benes li{display:flex;gap:.5rem;align-items:flex-start;font-size:.9rem;line-height:1.5;color:var(--ink-soft)}
.svc-benes svg{width:15px;height:15px;color:var(--green);flex:0 0 auto;margin-top:.2em}
.svc-benes-more{
  display:inline-block;margin-top:.5rem;
  font-size:.78rem;color:var(--rc-label);font-weight:600;
}

.svc-card .more,
.pcard .foot{
  margin-top:auto;
  padding-top:.9rem;
  border-top:1px solid var(--rc-rule-soft);
}

/* The old ribbon was a floating badge; make it a filed corner mark. */
.pcard .ribbon{
  top:0;right:0;left:auto;
  border-radius:0 0 0 var(--rc-r);
  background:var(--marigold);
  color:var(--ink);
  font-size:.66rem;
  letter-spacing:.12em;
  padding:.35rem .75rem;
}

/* Photos in cards are evidence: no darkening wash over them (v1.8.0). */
.svc-media::after{content:none}
.svc-media{position:relative}
