/* Dhruva Classes, sample site. One file, never minified: a minifier folds
   animation-timeline into the animation shorthand and the scroll bars stop drawing. */

/* 1. Fonts. Latin subsets; the rupee sign lives in latin-ext, so it ships as its own glyph file. */
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-rupee.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+20B9; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-var.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-rupee.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; unicode-range: U+20B9; }

/* 2. Tokens */
:root {
  --paper: #F6F3EE;
  --ink: #1B1C1F;
  --slate: #2B2F35;
  --chalk: #F6F3EE;
  --plum: #4B2A4F;
  --tint: #E6DDE7;
  --ink-2: #55575D;
  --chalk-2: #C9CBCF;
  --line: #DDD7CE;
  --ph: #D9D4CC;
  /* Paper grain and chalk dust: one fractal noise, dark on paper, light on the boards */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.4 -.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
  --dust: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
  --lamp: radial-gradient(120% 80% at 20% 0%, #353A41 0%, var(--slate) 62%);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r: 8px;
  --pill: 999px;
  --tap: 48px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: 16px;
  --col-gap: 24px;
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 3. Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper) var(--grain);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 4px; }
.board :focus-visible { outline-color: var(--chalk); }

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 50; background: var(--ink); color: var(--chalk); padding: var(--s3) var(--s4); border-radius: var(--r); }
.skip:focus { top: var(--s4); }

/* 4. Type scale. Newsreader carries the H1s, the H2s, the fee and the chart numbers; Public Sans the rest. */
h1, .display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.lede { font-size: 1.1875rem; line-height: 1.45; color: var(--ink-2); max-width: 32ch; }
.small { font-size: .875rem; line-height: 1.45; color: var(--ink-2); }
.fee { font-family: var(--serif); font-weight: 400; font-size: clamp(2.75rem, 2rem + 3vw, 3.75rem); line-height: 1; letter-spacing: -0.02em; }
.num { font-family: var(--serif); font-weight: 400; }

/* 5. Buttons and chips: pills, 48px tall */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 var(--s5);
  border-radius: var(--pill); border: 1.5px solid transparent;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary { background: var(--plum); color: var(--chalk); }
.btn-primary:hover { background: #3A1F3D; }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-chalk { background: var(--chalk); color: var(--slate); }
.btn-chalk:hover { background: #fff; }
.btn-sm { min-height: 48px; padding: 0 var(--s4); font-size: .9375rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); min-width: var(--tap); padding: 0 var(--s4);
  border-radius: var(--pill); border: 1.5px solid var(--chalk-2);
  color: var(--chalk); font-weight: 600; text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.chip:hover { border-color: var(--chalk); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--chalk); border-color: var(--chalk); color: var(--plum); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { font-variant-numeric: proportional-nums; }

/* 6. Cards and the board */
.board {
  background: var(--dust), var(--lamp); background-color: var(--slate); color: var(--chalk);
  border-radius: var(--r); padding: var(--s6) var(--s5);
  box-shadow: inset 0 0 0 1px rgba(246, 243, 238, .06);
}
.board .small { color: var(--chalk-2); }
.board .label { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--chalk-2); }
.tile { border-top: 1.5px solid var(--ink); padding-top: var(--s3); }

/* Photo frames */
.ph { display: block; background: var(--ph); aspect-ratio: 16 / 10; border-radius: var(--r); width: 100%; align-self: start; overflow: hidden; }
.ph picture { display: block; width: 100%; height: 100%; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph-portrait { aspect-ratio: 4 / 5; }
.ph-map { aspect-ratio: 4 / 3; }

/* Trust row: three flat tiles, ink on paper; the number in the display face */
.trust { padding: var(--s6) 0; }
.trust-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.trust .tile { font-size: .9375rem; font-weight: 600; line-height: 1.3; }
.trust .num { font-size: 1.5rem; line-height: 1; letter-spacing: -0.01em; }

/* Finder: the board. Chips in chalk on slate; one card under them, the fee large. Without
   JavaScript every card shows, grouped by course; with it (html.js) only the chosen one. */
.f-board { display: grid; gap: var(--s5); }
.f-row { display: grid; gap: var(--s3); }
.f-cards, .f-group { display: grid; gap: var(--s5); }
.f-card { border-top: 1px dashed rgba(246, 243, 238, .3); padding-top: var(--s5); display: grid; gap: var(--s3); justify-items: start; scroll-margin: var(--s5) 0 96px; }
.f-card h3 { font-size: 1.25rem; }
.f-card h3 a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; }
.f-meta { color: var(--chalk-2); }
.f-card .fee { margin-top: var(--s2); text-shadow: 0 0 1px rgba(246, 243, 238, .4); }
.per { font-family: var(--sans); font-size: 1rem; letter-spacing: 0; color: var(--chalk-2); }
.f-seats { font-size: .9375rem; color: var(--chalk-2); }
.f-card .btn { margin-top: var(--s2); }
.js .f-row2:not(.is-on), .js .f-card:not(.is-on) { display: none; }
.js .f-cards, .js .f-group { display: block; }
.js .f-card.is-on { border-top: 1px dashed rgba(246, 243, 238, .3); animation: card-in .3s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Results: the chart is inline SVG in viewBox units, so its type scales with it; capped so
   the numbers stay near body size. Pale bar appeared, solid bar qualified. */
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: .9375rem; font-weight: 600; }
.legend li { display: inline-flex; align-items: center; gap: var(--s2); }
.sw { width: 12px; height: 12px; border-radius: 3px; background: var(--ink-2); }
.sw.jee { background: var(--plum); }
.sw.neet { background: var(--slate); }
.chart { max-width: 560px; width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .ghost { fill: #E4E1DC; }
.chart .bar { fill: var(--ink-2); }
.chart .jee .ghost { fill: var(--tint); }
.chart .jee .bar { fill: var(--plum); }
.chart .neet .ghost { fill: #D9DBDE; }
.chart .neet .bar { fill: var(--slate); }
.chart text { text-anchor: middle; }
.chart .n, .chart .d { font-family: var(--serif); font-size: 15px; fill: var(--ink); }
.chart .d { fill: var(--ink-2); }
.chart .fr { stroke: var(--ink-2); stroke-width: 1; }
.chart .base { stroke: var(--ink); stroke-width: 1; }
.chart .yr { font-family: var(--sans); font-size: 12px; font-weight: 600; fill: var(--ink-2); }
.chart-note { margin-top: var(--s4); }

/* Line drawings (why tiles, day track): strokes in currentColor, one plum mark each */
.draw { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.draw .p { stroke: var(--plum); }
.draw .pf { fill: var(--plum); stroke: none; }
.draw .mf { fill: var(--ink); stroke: none; opacity: .28; }
.draw .ck { stroke: var(--chalk); stroke-width: 1.75; }

/* Why here: three drawn tiles, three words under each, three across at every width */
.why { padding: var(--s7) 0; }
.why-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.why-tile { border-top: 1.5px solid var(--ink); padding-top: var(--s4); display: grid; gap: var(--s3); align-content: start; }
.why-tile svg { width: 100%; max-width: 168px; height: auto; }
.why-tile p { font-size: .9375rem; font-weight: 600; line-height: 1.3; }

/* Teachers: two portraits side by side at every width */
.teacher h3 { margin-top: var(--s3); }
.t-sub { font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.t-line { font-size: .9375rem; line-height: 1.45; margin-top: var(--s2); }

/* A day here: five cards on a time track; the phone scrolls it sideways, one card per snap */
.track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: var(--s3);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) var(--s3); scroll-padding-inline: var(--gutter);
}
.stop { position: relative; padding-top: var(--s5); scroll-snap-align: start; }
.stop::before { content: ""; position: absolute; top: 5px; left: 0; right: calc(-1 * var(--s3)); border-top: 1.5px solid var(--ink); }
.stop:last-child::before { right: 0; }
.stop::after { content: ""; position: absolute; top: 0; left: var(--s4); width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); }
.stop-card { height: 100%; display: grid; gap: var(--s3); align-content: start; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); }
.stop svg { width: 40px; height: 40px; }
.stop p { font-size: .9375rem; font-weight: 600; line-height: 1.3; }
.stop .t { font-family: var(--serif); font-weight: 400; font-size: 1.375rem; line-height: 1.2; }

/* Fees: a row per course on the phone, three cards from 720; the number in the display face */
.fee-cards { display: grid; gap: var(--s3); }
.fee-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s2) var(--s4); background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4) var(--s5); }
.fee-card h3 { font-size: .9375rem; }
.fee-card h3 a { display: inline-block; padding: 16px 12px; margin: -16px -12px; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.fee-card .fee { font-size: clamp(2.25rem, 1.8rem + 1.2vw, 2.75rem); }
.fee-card .btn { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 359px) { .fee-card { grid-template-columns: minmax(0, 1fr); } .fee-card .btn { grid-column: 1; grid-row: auto; } }
.fees > .small { margin-top: var(--s4); }
.fees > .small + .small { margin-top: var(--s1); }

/* Find us: map and link, then address, hours and the two buttons, then the door */
.find { display: grid; gap: var(--s5); grid-template-areas: "head" "map" "info" "door"; }
.find > .sec-head { grid-area: head; margin: 0; }
.find-map { grid-area: map; display: grid; gap: var(--s3); justify-items: start; }
.find-link { display: inline-block; padding: 13px 0; margin: -13px 0; font-size: .9375rem; font-weight: 600; text-underline-offset: 3px; }
.find-info { grid-area: info; display: grid; gap: var(--s4); justify-items: start; }
.find-info address { font-style: normal; font-weight: 600; }
.hours dd { color: var(--ink-2); }
.ph-door { grid-area: door; aspect-ratio: 3 / 2; }

/* Course pages. The week: a real table drawn as a grid, a plum cell per class day, the
   Sunday test in slate across the rows; the row head links to the Home finder. */
.week { width: 100%; table-layout: fixed; border-spacing: 3px; font-size: .8125rem; }
.week thead td { width: 36%; }
.week thead th { font-weight: 600; color: var(--ink-2); }
.week tbody th { position: relative; text-align: left; font-weight: 400; line-height: 1.35; color: var(--ink-2); padding: var(--s2) var(--s2) var(--s2) 0; }
.week tbody th a { display: block; font-size: .9375rem; font-weight: 600; color: var(--ink); text-underline-offset: 3px; }
.week tbody th a::after { content: ""; position: absolute; inset: 0; }
.week tbody td { border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.week tbody .on { background: var(--plum); box-shadow: none; }
.week tbody .test { background: var(--slate); color: var(--chalk); text-align: center; font-weight: 600; box-shadow: none; }
.week-in > .small { margin-top: var(--s4); }
.year .stop::after { left: 0; }
.fee-board { justify-items: start; }

/* 7. Top bar */
.top { border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 64px; }
.mark { display: inline-flex; align-items: center; min-height: 48px; font-family: var(--serif); font-size: 1.375rem; line-height: 1; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: none; gap: var(--s5); }
.nav a { text-decoration: none; font-size: .9375rem; font-weight: 600; color: var(--ink-2); padding: var(--s2) 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--plum); }

/* 8. Sticky bar, phone and tablet only */
.sticky {
  position: sticky; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s2);
  padding: var(--s2) var(--gutter) calc(var(--s2) + env(safe-area-inset-bottom));
  background: rgba(246, 243, 238, .96);
  border-top: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .sticky { background: rgba(246, 243, 238, .84); backdrop-filter: blur(8px); }
}
.sticky .btn { padding: 0 var(--s2); }

/* 9. Page shell and sections */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sec { padding: var(--s8) 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s6); }
.stack > * + * { margin-top: var(--s4); }

/* Hero: photo above, type below on paper. Phone: the photo takes the top 60% of the screen. */
.hero { padding: 0 0 var(--s7); border-top: 0; }
.hero-photo { width: 100%; height: 60svh; min-height: 300px; max-height: 560px; background: var(--ph); overflow: hidden; }
.hero-photo picture { display: block; width: 100%; height: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { padding-top: var(--s6); display: flex; flex-direction: column; gap: var(--s4); }
.hero-text .btn-row { margin-top: var(--s2); }
.hero-sub .hero-photo { height: 44svh; min-height: 260px; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.hours { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s5); }
.hours dt { font-weight: 600; }

/* 10. Footer */
.foot { background: var(--slate); color: var(--chalk-2); padding: var(--s7) 0 var(--s8); font-size: .875rem; }
.foot a { color: var(--chalk); }
.foot-in { display: grid; gap: var(--s4); }
.foot-links { display: flex; flex-wrap: wrap; margin: 0 -14px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; }
.foot-sample { color: var(--chalk); max-width: 60ch; }

/* 11. Responsive: 720 and 1024 */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .sec { padding: var(--s9) 0; }
  .pair { gap: var(--s5); }
  .track { grid-auto-columns: 30%; }
  .fee-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fee-card { grid-template-columns: 1fr; justify-items: start; row-gap: var(--s3); padding: var(--s5); }
  .fee-card .btn { grid-column: 1; grid-row: auto; margin-top: var(--s2); }
  .find { grid-template-columns: 3fr 2fr; grid-template-areas: "head head" "map door" "info info"; }
  .ph-door { aspect-ratio: auto; align-self: stretch; min-height: 240px; }
}
@media (min-width: 1024px) {
  .nav { display: flex; }
  .sticky { display: none; }
  /* Photo fills the left 60%, the type sits right on paper */
  .hero { padding: 0; }
  .hero-in { display: grid; grid-template-columns: 3fr 2fr; min-height: min(78vh, 720px); }
  .hero-photo, .hero-sub .hero-photo { height: 100%; max-height: none; min-height: 480px; }
  .hero-text { justify-content: center; padding: var(--s8) var(--s8) var(--s8) var(--s7); }
  /* Head left, the board or the chart right */
  .split { display: grid; grid-template-columns: 4fr 8fr; column-gap: var(--s8); align-items: start; }
  .split > .sec-head { grid-row: 1 / span 2; }
  .split > .chart-note { grid-column: 2; }
  .f-board { padding: var(--s7) var(--s7); }
  .why-tile svg { max-width: 208px; }
  .track { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .find { grid-template-columns: 4fr 5fr 3fr; column-gap: var(--s7); grid-template-rows: auto 1fr; grid-template-areas: "head map door" "info map door"; align-items: start; }
  .find-page { grid-template-rows: auto; grid-template-areas: "head head head" "info map door"; }
  .track.year { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .trust .tile { font-size: 1.0625rem; }
  .trust .num { font-size: 2rem; }
}
@media (min-width: 1280px) {
  :root { --gutter: 40px; }
}

/* 12. Motion. The hero's type settles once on load (CSS only, so it runs without JavaScript);
   the fade-up runs once when a section enters; the chart bars grow on a view timeline inside
   @supports and stand at full height anywhere it is missing. */
.hero-text > * { animation: card-in .4s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: 80ms; }
.hero-text > :nth-child(3) { animation-delay: 160ms; }
.motion .reveal { opacity: 0; transform: translateY(12px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.motion .reveal.in { opacity: 1; transform: none; }

@keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@supports (animation-timeline: view()) {
  .bar {
    transform-origin: bottom;
    transform-box: fill-box;
    animation-name: bar-grow;
    animation-duration: 1ms;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range-start: entry 10%;
    animation-range-end: cover 45%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
