/* Saptaparni School (invented school; Autonomics AI portfolio piece). Phone-first, no framework. */
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: optional; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Regular-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Italic-latin.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
/* Kannada glyphs only: the browser fetches this file only when Kannada text is on screen. */
@font-face { font-family: "Noto Sans Kannada"; src: url("../fonts/NotoSansKannada-kannada-500.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0C80-0CFF, U+200C-200D, U+25CC; }

:root {
  --paper: #fbf5ed;
  --paper-2: #f2e9db;
  --ink: #1f2a22;
  --ink-2: #3a463d;
  --muted: #5c645b;
  --line: #d9ccb6;
  --accent: #a3401c;
  --accent-ink: #fff8ef;
  --green: #34503a;
  --display: "Instrument Serif", "Noto Sans Kannada", "Iowan Old Style", Georgia, serif;
  --ui: Archivo, "Noto Sans Kannada", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
  --gutter: max(20px, env(safe-area-inset-left));
  --max: 1240px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--ui); font-size: 1.0625rem; line-height: 1.55; background: var(--paper); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.04; letter-spacing: -0.01em; margin: 0 0 16px; text-wrap: balance; }
h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 16px; max-width: 62ch; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
button, input, select { font: inherit; color: inherit; }
input, select { font-size: max(16px, 1em); }
:lang(kn) h1, :lang(kn) h2 { font-family: "Noto Sans Kannada", var(--display); font-weight: 600; letter-spacing: 0; line-height: 1.25; }

.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 16px; background: var(--ink); color: var(--paper); text-decoration: none; transform: translateY(-200%); }
.skip-link:focus, .skip-link:focus-visible { transform: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; font-stretch: 110%; color: var(--accent); margin: 0 0 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--line); }
@media (min-width: 900px) { .section { padding: 104px 0; } }
.lead { font-size: 1.1875rem; color: var(--ink-2); }

/* Header */
.site-header { position: relative; z-index: 20; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; text-decoration: none; line-height: 1.05; }
.wordmark b { font-weight: 700; font-stretch: 120%; letter-spacing: 0.2em; font-size: 0.95rem; }
.wordmark span { font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.site-nav { display: none; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; text-decoration: none; font-size: 0.9375rem; }
.site-nav a[aria-current="page"] { text-decoration: underline; }
.header-right { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; border: 1px solid var(--ink); }
.lang a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 10px; font-size: 0.8125rem; font-weight: 600; text-decoration: none; }
.lang a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.menu { position: relative; }
.menu summary { list-style: none; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--line); cursor: pointer; font-size: 0.875rem; font-weight: 600; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--ink); color: var(--paper); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(86vw, 320px); background: var(--paper); border: 1px solid var(--ink); padding: 8px 0; z-index: 30; }
.menu-panel a { display: flex; align-items: center; min-height: 48px; padding: 0 20px; text-decoration: none; }
.menu-panel a + a { border-top: 1px solid var(--line); }
@media (min-width: 1080px) { .site-nav { display: flex; gap: 2px; } .menu { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: 0.9375rem; cursor: pointer; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: var(--paper); color: var(--ink); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Hero: the campus map is the hero. Pins are real links. */
.hero { position: relative; padding: 24px 0 8px; }
.hero-copy { padding: 0 var(--gutter); }
.hero h1 { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5.6rem); margin-bottom: 12px; }
.hero .lead { max-width: 34ch; }
.map { position: relative; margin: 8px 0 0; }
.map img { width: 100%; height: auto; }
.pin { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; text-decoration: none; min-width: 44px; min-height: 44px; justify-content: center; }
.pin i { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-style: normal; font-weight: 700; font-size: 0.875rem; outline: 2px solid var(--paper); font-variant-numeric: tabular-nums; }
.pin span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pin:hover i, .pin:focus-visible i { background: var(--ink); }
.places { list-style: none; margin: 8px var(--gutter) 0; padding: 0; border-top: 1px solid var(--ink); counter-reset: none; }
.places a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.places b { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.places small { color: var(--muted); font-size: 0.8125rem; }
.hero .actions { padding: 20px var(--gutter) 0; }

@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: minmax(300px, 1fr) 2fr; align-items: center; min-height: calc(100svh - var(--header-h)); padding: 24px 0; gap: 0; }
  .hero-copy { padding: 0 0 0 max(32px, var(--gutter)); align-self: center; }
  .hero .actions { padding: 24px 0 0; }
  .map { margin: 0 -2vw 0 0; }
  .pin span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; display: inline-block; background: var(--paper); border: 1px solid var(--line); padding: 3px 8px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
  .pin { transform: translate(-15px, -50%); justify-content: flex-start; }
  .places { display: none; }
}

/* Generic blocks */
.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }
.rule-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.rule-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rule-list li span { display: block; font-size: 0.875rem; color: var(--muted); }
.rule-list time, .rule-list .num { font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.fact { padding: 18px 12px 18px 0; border-bottom: 1px solid var(--line); }
.fact b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums; }
.fact span { font-size: 0.875rem; color: var(--muted); }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.note { font-size: 0.875rem; color: var(--muted); }

/* Events */
.events { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.events li { display: grid; grid-template-columns: 76px 1fr; gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.events time { font-family: var(--display); font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.events time small { display: block; font-family: var(--ui); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.events h3 { font-family: var(--ui); font-size: 1.0625rem; font-weight: 700; margin: 0 0 4px; }
.events p { margin: 0; color: var(--ink-2); }

/* Gallery */
.gallery { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 24px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--paper-2); }
.gallery figcaption { font-size: 0.875rem; color: var(--muted); padding-top: 8px; }
@media (min-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; } }

/* Place pages */
.place-hero img { width: 100%; height: auto; }
.place-head { padding: 24px 0 8px; }
.place-head h1 { font-size: clamp(2.6rem, 1.4rem + 5vw, 5.4rem); margin: 0 0 8px; }
.place-nav { display: flex; justify-content: space-between; gap: 12px; padding: 24px 0; border-top: 1px solid var(--line); }
.place-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; }
.locator { position: relative; max-width: 420px; }
.locator .dot { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); outline: 3px solid var(--paper); transform: translate(-50%, -50%); }

/* Page head */
.page-head { padding: 40px 0 28px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.6rem, 1.4rem + 5vw, 5.2rem); margin: 0 0 12px; }
.page-head p { font-size: 1.125rem; color: var(--ink-2); }

/* Steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 0 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--display); font-size: 1.6rem; line-height: 1.1; color: var(--accent); }
.steps li p { margin: 0; }
.steps li b { display: block; }

/* Enquiry flow: one question at a time */
.flow { border: 1px solid var(--ink); background: var(--paper); padding: 20px; max-width: 640px; }
@media (min-width: 700px) { .flow { padding: 32px; } }
.flow-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; min-height: 44px; }
.flow-progress { margin: 0; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.flow-back { min-height: 44px; min-width: 44px; padding: 0 12px; background: transparent; border: 1px solid var(--line); font-size: 0.875rem; }
.flow-back[hidden] { display: none; }
.flow fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.flow legend, .flow .q { display: block; font-family: var(--display); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); line-height: 1.08; padding: 0; margin: 0 0 18px; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choices--dates { grid-template-columns: 1fr 1fr; }
@media (min-width: 560px) { .choices { grid-template-columns: repeat(5, 1fr); } .choices--dates { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; padding: 6px 4px; border: 1px solid var(--line); text-align: center; font-size: 0.9375rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.choice span small { font-size: 0.75rem; color: var(--muted); }
.choice input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choice input:checked + span small { color: #cfd6cd; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.flow-hint { font-size: 0.875rem; color: var(--muted); margin: 12px 0 0; }
.phone-row { display: flex; align-items: stretch; border: 1px solid var(--ink); }
.phone-row span { display: flex; align-items: center; padding: 0 12px; border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.phone-row input { flex: 1; min-width: 0; min-height: 52px; border: 0; padding: 0 12px; background: transparent; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.phone-row:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.field-error { color: var(--accent); font-size: 0.9375rem; margin: 10px 0 0; min-height: 1.5em; }
.flow-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.summary { margin: 16px 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.summary li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.summary li span { color: var(--muted); }
.preview-note { font-size: 0.8125rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; margin: 16px 0 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 16px 0 0; border-top: 1px solid var(--ink); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
caption { text-align: left; font-size: 0.875rem; color: var(--muted); padding: 10px 0; caption-side: bottom; }
th, td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
td.amt, th.amt { text-align: right; white-space: nowrap; }
.disc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.disc-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); text-decoration: none; font-size: 0.875rem; }
.callout { border: 1px solid var(--line); padding: 16px 20px; margin: 24px 0 0; background: var(--paper-2); }
.callout p:last-child { margin: 0; }

/* Parent portal teaser */
.portal { background: var(--green); color: var(--paper); }
.portal .label { color: #e9c9a4; }
.portal a:hover { color: #f4d3ae; }
.portal .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.portal .btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.portal .rule-list { border-top-color: #e9dcc8; }
.portal .rule-list li { border-bottom-color: #5b7560; }
.portal .rule-list li span { color: #d8e0d5; }
.portal-mock { border: 1px solid #e9dcc8; padding: 20px; background: #2b4430; }
.portal-mock dl { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; margin: 12px 0 0; font-variant-numeric: tabular-nums; }
.portal-mock dt { color: #d8e0d5; }
.portal-mock dd { margin: 0; text-align: right; }
.portal-mock .who { font-family: var(--display); font-size: 1.6rem; margin: 0; }

/* Footer + phone bar */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 48px var(--gutter) calc(48px + env(safe-area-inset-bottom)); font-size: 0.875rem; color: var(--muted); }
.site-footer .wrap { padding: 0; display: grid; gap: 16px; }
.site-footer p { margin: 0; }
.site-footer .legal { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer .legal a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.phone-bar { position: sticky; bottom: 0; z-index: 15; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
.phone-bar a { display: flex; align-items: center; justify-content: center; min-height: 52px; background: var(--paper); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
.phone-bar a.primary { background: var(--ink); color: var(--paper); }
@media (min-width: 900px) { .phone-bar { display: none; } }
.block-link { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(300px, 1fr) 2.1fr; }
  .hero h1 { font-size: clamp(2.8rem, 0.6rem + 4vw, 5.2rem); }
  .pin--left { flex-direction: row-reverse; transform: translate(calc(-100% + 15px), -50%); }
  .map img { background: var(--paper); }
}
/* Phone: bigger map (paper margin cropped off-screen), list rows with the note on its own line. */
@media (max-width: 899px) {
  .hero { overflow: hidden; }
  .map { width: 124vw; margin: 8px 0 0 -12vw; }
  .places a { grid-template-columns: 34px 1fr; }
  .places small { grid-column: 2; margin-top: -4px; }
}
.place-hero { max-width: var(--max); margin: 0 auto !important; padding: 0 var(--gutter); }
