/* ============================================================
   Shree Capital — single-screen app shell.

   The page never scrolls. The chrome (top bar, header, footer)
   is fixed height and every nav item swaps a full-height .view
   in place. Anything that would still overrun its screen is
   shrunk to fit by the JS fit guard, which sets --fit on the
   view; the view box is sized 1/--fit and zoomed back by --fit
   so the rendered result exactly fills the available space.
   ============================================================ */

html, body {
  height: 100%;
  overflow: hidden;
}
html { scroll-behavior: auto; scroll-padding-top: 0 }

/* flex, not grid: the top bar is display:none on small screens and
   a hidden grid item would shift every row below it */
body.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overscroll-behavior: none;
}
.topbar, .header, .appfoot { flex: 0 0 auto }

/* no scrolling means nothing to reveal on scroll */
.reveal { opacity: 1; transform: none }

/* ---------------- chrome ---------------- */
.topbar { font-size: .74rem }
.topbar__inner { min-height: 32px }

.header__inner { padding: .4rem 0 }
.brand__logo, .header.is-stuck .brand__logo { width: 54px; height: 54px }
.brand__text strong { font-size: 1.24rem }
.brand__sub { font-size: .6rem; letter-spacing: .15em }
.brand__tag { font-size: .72rem; margin-top: .15rem }

/* one-row nav: links then the call-to-action buttons */
.nav { flex-direction: row; align-items: center; gap: .9rem }
.nav__cta { order: 1; gap: .45rem }
.nav__cta .btn { white-space: nowrap }
.nav__link { padding: .42rem .6rem; font-size: .8rem }
.nav__link::after { left: .6rem; right: .6rem; bottom: .12rem }

.appfoot {
  background: var(--green-900);
  color: #8fa89a;
  font-size: .7rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.appfoot__inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; padding: .45rem 0;
}
.appfoot p { margin: 0 }
.appfoot__disc { text-align: right }
/* CC BY requires the credit to stay visible, so it survives on mobile
   even when the rest of the disclaimer is dropped */
.appfoot__credit a { text-decoration: underline; color: #a9c3b4 }
.appfoot__credit a:hover { color: var(--gold-400) }
.appfoot__wa { color: #a9c3b4; text-decoration: underline }
.appfoot__wa:hover { color: var(--gold-400) }

/* ---------------- view machinery ---------------- */
.views { position: relative; overflow: hidden; flex: 1 1 auto; min-height: 0 }

.view {
  position: absolute;
  top: 0; left: 0;
  width: calc(100% / var(--fit, 1));
  height: calc(100% / var(--fit, 1));
  zoom: var(--fit, 1);
  overflow: hidden;
  display: none;
  background: var(--white);
}
.view.is-active { display: block; animation: viewIn .32s var(--ease) both }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }

.view--cream { background: var(--cream) }
.view--dark { background: var(--green-900); color: #e8f0ea }

.view__inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-block: clamp(.7rem, 1.8vh, 1.4rem);
}
.view__inner--flush { padding: 0 }

.viewhead { flex: none; text-align: center; margin-bottom: clamp(.5rem, 1.2vh, .9rem) }
.viewhead .eyebrow { font-size: .65rem; letter-spacing: .2em; margin-bottom: .2rem }
.viewhead .h2 { font-size: clamp(1.15rem, 2.7vh, 2.1rem); margin: 0 }

.view__body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center }
.view__body > .tabs__panels { flex: 1; min-height: 0 }
.view__body > .tabs__nav { flex: none }
/* centre a panel's content in whatever room the screen leaves,
   rather than stranding it at the top of a tall desktop view */
.tabs__panels > .panel.is-active {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tabs__panels > .panel > .tabs--sub { flex: 1; min-height: 0; display: flex; flex-direction: column }
.tabs--sub > .tabs__panels { flex: 1; min-height: 0 }

/* the whole view animates in, so panels must not - their fade-in
   starts at translateY(10px), which the fit guard would measure as
   10px of overflow and shrink the view to compensate */
.view .panel { animation: none }

/* ---------------- compact tabs ---------------- */
.tabs__nav { margin-bottom: .7rem; padding-bottom: .5rem; gap: .4rem; justify-content: center }
.tab { padding: .38rem .85rem; font-size: .78rem }
.tabs--sub .tabs__nav { border-bottom: 0; margin-bottom: .55rem; padding-bottom: 0 }
.tabs--sub .tab { font-size: .74rem; padding: .3rem .75rem }
.view--dark .tabs__nav { border-bottom-color: rgba(255, 255, 255, .14) }
.view--dark .tab { background: rgba(255, 255, 255, .08); color: #dbe7de; border-color: rgba(255, 255, 255, .16) }
.view--dark .tab.is-active { background: var(--gold-500); color: #fff; border-color: var(--gold-500) }

/* ---------------- home ----------------
   Mehrangarh Fort sits behind all three slides. The scrim stays dark
   on the left, where the headline is, and clears towards the right so
   the fort reads. Photo: Vyacheslav Argenberg, CC BY 4.0 - credited
   in the footer. */
#home .hero {
  background-color: var(--green-900);
  background-image: url("../img/jodhpur-fort.jpg");
  background-size: cover;
  background-position: 50% 32%;
  background-repeat: no-repeat;
}
#home .slide::before { display: none }
#home .slide::after {
  background: linear-gradient(100deg,
    rgba(6, 39, 25, .93) 0%,
    rgba(6, 39, 25, .84) 26%,
    rgba(6, 39, 25, .46) 56%,
    rgba(6, 39, 25, .12) 84%,
    rgba(6, 39, 25, .02) 100%);
}
#home .slide h1, #home .slide .slide__h { text-shadow: 0 2px 16px rgba(0, 0, 0, .55) }
#home .slide__lead { text-shadow: 0 1px 10px rgba(0, 0, 0, .5) }
/* narrow screens get a separate, tighter crop: the wide panorama
   leaves only a sliver of rock face once cover-cropped to portrait */
@media (max-width: 900px) {
  #home .hero { background-image: url("../img/jodhpur-fort-sm.jpg") }
}

/* the hero may flex, but never collapse - if the cards below need
   more room the fit guard shrinks the whole view instead */
#home .hero { flex: 1 1 auto; min-height: 210px; position: relative; overflow: hidden }
#home .hero__slides { position: absolute; inset: 0; min-height: 0 }
#home .slide, #home .slide.is-active { position: absolute; inset: 0; display: grid; align-items: center }
#home .slide__inner { padding: 0; max-width: 620px; animation: none }
#home .slide h1, #home .slide .slide__h { font-size: clamp(1.35rem, 4vh, 2.9rem); margin-bottom: .5rem }
#home .slide__lead { font-size: clamp(.8rem, 1.7vh, 1rem); margin-bottom: .9rem }
#home .slide__eyebrow { font-size: .68rem; margin-bottom: .45rem }
#home .hero__dots { bottom: .7rem; left: 50%; transform: translateX(-50%) }
#home .hero__arrow { top: 50%; transform: translateY(-50%); width: 36px; height: 36px }
#home .hero__arrow:hover { transform: translateY(-50%) scale(1.07) }

.homelow { flex: none; padding-block: clamp(.6rem, 1.6vh, 1.1rem) }
#home .hero__trust {
  grid-template-columns: repeat(4, 1fr);
  padding: 0 0 clamp(.5rem, 1.4vh, .9rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(.6rem, 1.5vh, 1rem);
}
#home .hero__trust li { color: var(--ink); font-size: .76rem; border-right-color: var(--line) }
#home .hero__trust .ico { width: 20px; height: 20px; color: var(--gold-600) }

#home .quick__grid { grid-template-columns: repeat(5, 1fr); gap: .7rem }
#home .qcard { padding: .85rem .9rem; box-shadow: var(--shadow-sm); align-items: center; text-align: center }
#home .qcard__icon { width: 40px; height: 40px; margin-bottom: .5rem }
#home .qcard__icon .ico { width: 20px; height: 20px }
#home .qcard h3 { font-size: .88rem; margin-bottom: .25rem }
#home .qcard__rate { margin: 0; justify-content: center; font-size: .7rem }
#home .qcard__rate strong { font-size: 1.3rem }

/* ---------------- about ---------------- */
#about .about__grid { grid-template-columns: 1.25fr .75fr; gap: 1.4rem; align-items: center }
#about .about__grid p { font-size: .88rem; margin-bottom: .6rem }
#about .ticks { gap: .38rem; margin: .7rem 0 0 }
#about .ticks li { font-size: .85rem }
#about .about__media img { max-height: 30vh; object-fit: cover }
#about .about__badge { padding: .5rem .9rem; right: .4rem; bottom: -.7rem }
#about .about__badge strong { font-size: .95rem }
#about .about__badge span { font-size: .62rem }

.why__grid { grid-template-columns: repeat(3, 1fr); gap: .7rem }
.why__grid li { padding: .9rem .95rem }
.why__grid .ico { width: 26px; height: 26px; margin-bottom: .45rem }
.why__grid h4 { font-size: .92rem; margin-bottom: .25rem }
.why__grid p { font-size: .78rem }

/* ---------------- vision ---------------- */
.vm__card--solo { max-width: 900px; margin: 0 auto; height: 100% }
#vision .vm__icon { width: 44px; height: 44px; margin-bottom: .6rem }
#vision .vm__icon .ico { width: 22px; height: 22px }
#vision .vm__card h3 { font-size: clamp(1.05rem, 2.4vh, 1.4rem) }
#vision .vm__quote { font-size: clamp(.95rem, 2.2vh, 1.35rem) }
#vision .vm__mission { margin-top: .6rem; gap: .45rem }
#vision .vm__mission li { font-size: clamp(.8rem, 1.75vh, .95rem) }
#vision .values li { padding: .85rem .9rem }
#vision .values .ico { width: 26px; height: 26px; margin-bottom: .45rem }
#vision .values h4 { font-size: .9rem }
#vision .values p { font-size: .76rem }

/* ---------------- products ----------------
   the old nav dropdown is now a screen of buttons; each one opens
   the product's own screen, which carries a link back here */
.prodmenu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}
.prodmenu a {
  display: flex;
  align-items: center;
  gap: .9rem;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-400);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.prodmenu a:hover, .prodmenu a:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--gold-500);
}
.prodmenu__icon {
  display: grid; place-items: center;
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--gold-400);
  color: var(--green-800);
}
.prodmenu__icon .ico { width: 21px; height: 21px }
.prodmenu__body { display: flex; flex-direction: column; min-width: 0; flex: 1 }
.prodmenu__body strong { font-size: .92rem; color: var(--green-800); line-height: 1.25 }
.prodmenu__body small { font-size: .76rem; color: var(--ink-soft); margin-top: .12rem }
.prodmenu__rate {
  flex: none;
  font-family: var(--head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-600);
}
.prodmenu__rate--plain { font-size: .78rem; font-family: var(--body); color: var(--ink-soft) }

.viewhead--detail { position: relative }
.backlink {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: .35rem;
  transition: color .2s, gap .2s;
}
.backlink:hover { color: var(--gold-600); gap: .45rem }
.backlink .ico { width: 15px; height: 15px }

/* ---------------- product detail ---------------- */
.panel__grid { grid-template-columns: 1.35fr .65fr; gap: 1.3rem; align-items: start }
.panel__grid > div > p { font-size: .88rem; margin-bottom: .5rem }
.panel__grid .ticks { gap: .38rem; margin: .5rem 0 .9rem }
.panel__grid .ticks li { font-size: .85rem }
.spec { padding: .9rem }
.spec dl { gap: .45rem }
.spec dl > div { font-size: .78rem; padding-bottom: .45rem }
.spec__label { margin-bottom: .55rem }

.proc__grid { grid-template-columns: 1.1fr .9fr; gap: 1.4rem; align-items: start }
.proc__title { font-family: var(--head); font-size: 1.05rem; color: var(--green-800); margin: 0 0 .5rem }
.steps { gap: .55rem; margin-top: 0 }
.steps span { width: 32px; height: 32px; font-size: .92rem }
.steps h4 { font-size: .9rem }
.steps p { font-size: .78rem }
.docs { padding: 1rem 1.1rem }
.docs h3 { font-size: 1.05rem; margin-bottom: .7rem }
.docs ul { gap: .48rem }
.docs li { font-size: .82rem; padding-bottom: .48rem }
.docs .ico { width: 19px; height: 19px }
.docs__note { font-size: .72rem; margin-top: .7rem }

/* ---------------- rates ---------------- */
#rates .tablewrap { overflow: visible }
#rates .table { min-width: 0; font-size: .84rem }
#rates .table thead th { padding: .55rem .7rem; font-size: .66rem }
#rates .table td { padding: .5rem .7rem }
#rates .note { margin-top: .7rem; font-size: .72rem }

.acc { gap: .4rem }
.acc__q { padding: .6rem .85rem; font-size: .86rem }
.acc__a p { padding: 0 .85rem .75rem; font-size: .82rem }

/* ---------------- calculators ---------------- */
#calculators .calc { grid-template-columns: 1.05fr .95fr; gap: 1.3rem }
#calculators .calc__inputs { gap: .6rem; align-content: start }
#calculators .field label { font-size: .74rem }
#calculators .field__row input { padding: .42rem .5rem; font-size: .9rem }
#calculators .field--inline select { padding: .42rem .6rem; font-size: .84rem }
#calculators .range { margin-top: .1rem }
#calculators .calc__result { position: static; padding: 1rem; align-self: start }
#calculators .calc__label { font-size: .68rem }
#calculators .calc__big { font-size: clamp(1.5rem, 4vh, 2.5rem); margin-bottom: .7rem }
#calculators .calc__legend { gap: .35rem; font-size: .78rem; margin-bottom: .8rem }

/* ---------------- contact ---------------- */
#contact .contact__grid { grid-template-columns: 1fr .9fr; gap: 1.4rem; align-items: stretch }
#contact .contact__list { gap: .7rem; margin: 0 0 .9rem }
#contact .contact__list .ico { width: 32px; height: 32px; padding: 7px }
#contact .contact__list strong { font-size: .86rem }
#contact .contact__list p { font-size: .82rem }
.contact__cta { display: flex; gap: .5rem; flex-wrap: wrap }
#contact .map { height: 100%; min-height: 180px }

.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem }
#contact .formcard { padding: 1rem 1.1rem; max-width: 760px; margin: 0 auto; width: 100% }
#contact .formcard .field label { font-size: .76rem }
#contact .formcard .field input, #contact .formcard .field select { padding: .45rem .6rem; font-size: .85rem }
#contact .formcard__actions { margin-top: .7rem }
#contact .formcard__fine { font-size: .68rem }

/* ---------------- floating whatsapp ----------------
   icon only: nothing scrolls out from under it, so a wide pill
   would permanently cover whatever sits in that corner */
.wafloat { bottom: 2.6rem; right: 1rem; padding: .6rem; border-radius: 50% }
.wafloat span { display: none }
.wafloat .ico { width: 20px; height: 20px }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 1200px) {
  .nav__cta .btn--ghost { display: none }
}

@media (max-width: 1000px) {
  .topbar { display: none }
}

@media (max-width: 900px) {
  .nav { flex-direction: column; align-items: stretch; gap: 0 }
  .nav__cta { order: 1; margin-top: 1rem; flex-direction: column }
  .nav__cta .btn--ghost { display: inline-flex }
  .nav__list { margin-top: 2.4rem }
  .nav__link { font-size: .84rem; padding: .7rem .6rem }

  /* portrait screens put the text over the whole photo, so the scrim
     runs top-to-bottom instead of left-to-right */
  #home .hero { background-position: 50% 42% }
  #home .slide::after {
    background: linear-gradient(180deg,
      rgba(6, 39, 25, .74) 0%,
      rgba(6, 39, 25, .50) 42%,
      rgba(6, 39, 25, .84) 100%);
  }

  #home .hero__trust { grid-template-columns: repeat(2, 1fr); gap: .5rem }
  #home .hero__trust li:nth-child(2) { border-right: 0 }
  /* flex, so the trailing row of two centres instead of hugging left */
  #home .quick__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem }
  #home .qcard { flex: 0 1 calc(33.333% - .37rem) }

  #about .about__grid { grid-template-columns: 1fr }
  #about .about__media { display: none }
  .why__grid { grid-template-columns: repeat(2, 1fr) }

  .panel__grid, .proc__grid, #calculators .calc, #contact .contact__grid {
    grid-template-columns: 1fr;
  }
  .prodmenu { grid-template-columns: repeat(2, 1fr) }
  #contact .map { min-height: 130px }
  #calculators .calc__result { align-self: stretch }
}

@media (max-width: 620px) {
  .brand__logo, .header.is-stuck .brand__logo { width: 42px; height: 42px }
  .brand__text strong { font-size: 1rem; letter-spacing: .02em }
  .brand__sub { font-size: .52rem; letter-spacing: .08em }
  .brand__tag { display: none }

  .viewhead .h2 { font-size: clamp(1.05rem, 2.5vh, 1.5rem) }
  .tab { font-size: .72rem; padding: .32rem .7rem }
  .tabs--sub .tab { font-size: .68rem; padding: .28rem .6rem }

  #home .hero__trust { font-size: .7rem }
  #home .quick__grid { gap: .55rem }
  #home .qcard { padding: .65rem .55rem }
  #home .qcard h3 { font-size: .76rem }
  #home .qcard__rate strong { font-size: 1.05rem }

  .why__grid li { padding: .7rem .75rem }
  .why__grid h4 { font-size: .82rem }
  .why__grid p { font-size: .72rem }

  .prodmenu { grid-template-columns: 1fr; gap: .5rem }
  .prodmenu a { padding: .6rem .75rem; gap: .65rem }
  .prodmenu__icon { width: 34px; height: 34px }
  .prodmenu__icon .ico { width: 18px; height: 18px }
  .prodmenu__body strong { font-size: .84rem }
  .prodmenu__body small { font-size: .7rem }
  .prodmenu__rate { font-size: .92rem }

  /* seven centred value cards stack far too tall on a phone -
     switch them to compact icon + text rows */
  #vision .values { gap: .4rem }
  #vision .values li {
    flex-basis: 100%;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 .6rem;
    align-items: center;
    text-align: left;
    padding: .5rem .7rem;
  }
  #vision .values .ico { grid-row: 1 / 3; width: 22px; height: 22px; margin: 0 }
  #vision .values h4 { font-size: .82rem; margin: 0 }
  #vision .values p { font-size: .71rem; line-height: 1.35 }

  /* keep the rate cards as a real table - the stacked mobile
     layout from styles.css is far too tall for one screen */
  #rates .table, #rates .table thead, #rates .table tbody,
  #rates .table tr, #rates .table td, #rates .table th {
    display: revert;
  }
  #rates .table { display: table; font-size: .68rem }
  #rates .table thead { display: table-header-group }
  #rates .table tr { display: table-row; padding: 0 }
  #rates .table td, #rates .table th { display: table-cell; padding: .38rem .35rem }
  #rates .table td::before { content: none }
  #rates .table thead th { font-size: .56rem; letter-spacing: .04em; padding: .4rem .35rem }
  #rates .note { font-size: .64rem }

  .formgrid { grid-template-columns: 1fr; gap: .45rem }
  #contact .formcard__actions { grid-template-columns: 1fr 1fr; gap: .5rem }
  #contact .contact__list { gap: .55rem }

  .wafloat { bottom: 2.4rem }

  .appfoot__legal { display: none }
  .appfoot__disc { text-align: center }
  .appfoot__inner { justify-content: center; text-align: center; gap: .1rem .8rem }
}

/* short screens (landscape phones): drop the decoration first */
@media (max-height: 560px) {
  .topbar { display: none }
  .brand__tag { display: none }
  .viewhead .eyebrow { display: none }
  #home .hero__trust { display: none }
}

@supports not (zoom: 1) {
  /* without zoom the fit guard cannot shrink a view, so let an
     over-tall panel scroll rather than clipping it away */
  .view { width: 100%; height: 100%; overflow: auto }
}
