/* Ram Sajivan Savitri Devi Law College
   Mobile-first design system. Desktop layout lives in responsive.css. */

:root {
  --navy: #124b82;
  --navy-deep: #082d50;
  --royal: #1769aa;
  --white: #ffffff;
  --bg: #f4f7fb;
  --gold: #c9a45c;
  --gold-deep: #8d6b2f;
  --ink: #263548;
  --muted: #4d6074;
  --line: rgba(18, 75, 130, 0.14);
  --shadow: 0 16px 40px rgba(8, 45, 80, 0.08);
  --shadow-soft: 0 8px 24px rgba(8, 45, 80, 0.06);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Nirmala UI", "Mangal", "Segoe UI", sans-serif;
  --radius: 16px;
  --max: 1140px;
  --header: 4.6rem;
  --topbar: 2.5rem;
  --space: clamp(3.2rem, 6vw, 5.5rem);
  --focus: 0 0 0 3px rgba(201, 164, 92, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--royal);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  background: var(--gold);
  color: var(--navy-deep);
  padding: 0.6rem 1rem;
  z-index: 100;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.narrow {
  width: min(74ch, 100%);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy-deep);
  margin: 0 0 0.6rem;
}

h1 {
  font-size: clamp(2.35rem, 8vw, 4.6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 68ch;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gold-rule {
  display: block;
  width: 4.5rem;
  height: 2px;
  margin: 0.85rem 0 1.2rem;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section {
  padding: var(--space) 0;
}

.section-alt {
  background:
    radial-gradient(ellipse at top left, rgba(23, 105, 170, 0.06), transparent 46%),
    var(--bg);
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 70ch;
}

.placeholder-note,
.draft-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0 0 1.4rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(201, 164, 92, 0.45);
  border-left: 4px solid var(--gold);
  background: #fffaf1;
  color: var(--ink);
  border-radius: 10px;
  font-size: 0.98rem;
}

.badge {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(201, 164, 92, 0.18);
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--navy);
  color: var(--white);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}

.btn:hover {
  background: var(--navy-deep);
  color: var(--white);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-deep);
}

.btn-gold:hover {
  background: #d4b36d;
  color: var(--navy-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-ghost:hover {
  background: var(--white);
  color: var(--navy-deep);
}

.btn-line {
  background: transparent;
  color: var(--navy);
  border-color: rgba(18, 75, 130, 0.35);
}

.btn-line:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold), var(--royal));
  z-index: 80;
  pointer-events: none;
}

.topbar {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.86rem;
}

.topbar a {
  color: inherit;
  text-decoration: none;
}

.topbar a:hover {
  color: var(--gold);
}

.topbar-inner,
.topbar-contacts,
.topbar-links {
  display: flex;
  gap: 0.85rem 1.1rem;
  align-items: center;
}

.topbar-inner {
  min-height: var(--topbar);
  justify-content: space-between;
  padding: 0.35rem 0;
  flex-wrap: wrap;
}

.topbar-contacts,
.topbar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.feature-icon .icon {
  width: 36px;
  height: 36px;
  stroke: var(--navy);
}

.topbar svg {
  width: 14px;
  height: 14px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.8;
  flex: none;
}

.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand picture {
  display: block;
  flex: none;
  width: 52px;
  height: 52px;
}

.brand img {
  display: block;
  width: 52px;
  height: 52px;
  flex: none;
}

.brand-en {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy-deep);
}

.brand-hi {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.nav-toggle {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy-deep);
  position: relative;
  content: "";
}

.nav-toggle-bars::before {
  position: absolute;
  top: -6px;
}

.nav-toggle-bars::after {
  position: absolute;
  top: 6px;
}

.site-nav {
  position: fixed;
  top: var(--nav-top, 7.2rem);
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--white);
  padding: 0.5rem 1rem 2rem;
  visibility: hidden;
  overflow: auto;
  z-index: 39;
  clip-path: inset(0 0 0 100%);
}

.site-nav.is-open {
  visibility: visible;
  clip-path: inset(0 0 0 0);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link,
.submenu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy-deep);
  text-decoration: none;
  font-weight: 600;
}

.nav-link[aria-current="page"] {
  color: var(--navy);
  box-shadow: inset 3px 0 0 var(--gold);
  padding-left: 0.7rem;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.sub-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
}

.sub-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 0.4rem 0.8rem;
  display: none;
}

.has-sub.is-open .submenu {
  display: block;
}

.site-nav .btn {
  width: 100%;
  margin-top: 1rem;
}

.hero {
  position: relative;
  min-height: 32rem;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
  background: var(--navy-deep);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 45, 80, 0.25) 0%, rgba(8, 45, 80, 0.78) 72%),
    radial-gradient(circle at 80% 20%, rgba(23, 105, 170, 0.35), transparent 42%);
}

.hero-shapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-shapes span {
  position: absolute;
  border: 1px solid rgba(201, 164, 92, 0.45);
  border-radius: 50%;
}

.hero-shapes span:nth-child(1) { width: 140px; height: 140px; right: -30px; top: 8%; }
.hero-shapes span:nth-child(2) { width: 70px; height: 70px; right: 4%; bottom: 18%; border-radius: 8px; transform: rotate(18deg); }
.hero-shapes span:nth-child(3) { width: 220px; height: 220px; left: -140px; bottom: -90px; }

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 2.4rem;
}

.hero h1,
.hero .eyebrow,
.page-hero h1 {
  color: var(--white);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
}

.hero .eyebrow,
.page-hero .eyebrow {
  color: #f0dfb4;
}

.hero .lede {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.12rem;
}

.hero-affiliation {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(201, 164, 92, 0.55);
  border-radius: 999px;
  background: rgba(8, 45, 80, 0.72);
  color: #f3e6c8;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.page-hero {
  position: relative;
  padding: 2.6rem 0 2.2rem;
  /* JPEG first. image-set() is dropped whole where it is unsupported, so the JPEG layer remains. */
  background:
    linear-gradient(120deg, rgba(8, 45, 80, 0.94), rgba(18, 75, 130, 0.88)),
    url("../images/hero-campus.jpg") center/cover no-repeat;
  background:
    linear-gradient(120deg, rgba(8, 45, 80, 0.94), rgba(18, 75, 130, 0.88)),
    image-set(
      url("../images/hero-campus.webp") type("image/webp"),
      url("../images/hero-campus.jpg") type("image/jpeg")
    ) center/cover no-repeat;
  color: var(--white);
  overflow: hidden;
}

.page-hero .lede {
  color: rgba(255, 255, 255, 0.88);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb a {
  color: var(--gold);
  text-decoration: none;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.45rem;
  color: rgba(255, 255, 255, 0.55);
}

.breadcrumb [aria-current="page"] {
  color: var(--white);
}

.split {
  display: grid;
  gap: 1.6rem;
}

.frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.frame figcaption,
.caption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.card-grid,
.icon-grid,
.notice-list,
.gallery-grid,
.faq-list,
.programme-grid {
  display: grid;
  gap: 1rem;
}

.card,
.icon-card,
.notice-card,
.programme-card,
.faq-item,
.info-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.card,
.programme-card,
.notice-card,
.info-panel {
  padding: 1.15rem 1.15rem 1.2rem;
}

.icon-card {
  padding: 1.2rem;
}

.icon-card svg,
.feature-icon {
  width: 36px;
  height: 36px;
  stroke: var(--navy);
  fill: none;
  stroke-width: 1.6;
  margin-bottom: 0.7rem;
}

.card h3,
.icon-card h3,
.programme-card h3,
.notice-card h3 {
  margin-bottom: 0.35rem;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-row {
  display: grid;
  gap: 0.8rem;
}

.fact {
  padding: 1rem;
  border-top: 2px solid var(--gold);
  background: var(--white);
  border-radius: 12px;
}

.fact strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--navy-deep);
  font-weight: 600;
}

.principal {
  display: grid;
  gap: 1.2rem;
  align-items: center;
}

.portrait {
  width: min(220px, 60%);
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, #1769aa, #082d50 70%);
  color: var(--gold);
  border: 3px solid var(--gold);
  box-shadow: var(--shadow);
}

.portrait svg {
  width: 42%;
  height: 42%;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.4;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-btn,
.chip {
  min-height: 40px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy-deep);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn[aria-pressed="true"] {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.gallery-grid {
  grid-template-columns: 1fr;
}

.gallery-item {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
}

.gallery-item span {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-bar {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 0.3rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(18, 75, 130, 0.28);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.field-error {
  min-height: 1.2em;
  margin: 0.25rem 0 0;
  color: #8d2b2b;
  font-size: 0.9rem;
}

.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 500;
}

.check input {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  margin-top: 0.25rem;
}

.enquiry-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.enquiry-result[hidden] {
  display: none;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
  word-break: break-word;
}

dl {
  margin: 0.4rem 0 1rem;
}

dt {
  font-weight: 700;
  color: var(--navy-deep);
}

dd {
  margin: 0 0 0.55rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--navy-deep);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
}

.faq-item {
  padding: 0;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-weight: 700;
  color: var(--navy-deep);
}

.faq-item p {
  margin: 0;
  padding: 0 1.1rem 1rem;
}

.map-link {
  display: inline-flex;
  margin-top: 0.4rem;
}

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.86);
  padding: 3rem 0 1.2rem;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-grid {
  display: grid;
  gap: 1.6rem;
}

.site-footer h2,
.site-footer h3 {
  color: var(--white);
  font-size: 1.35rem;
}

.site-footer .brand-hi,
.footer-note {
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  justify-content: space-between;
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
}

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  z-index: 30;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.lightbox {
  width: min(960px, calc(100% - 1.5rem));
  max-height: calc(100svh - 2rem);
  border: 0;
  padding: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(8, 45, 80, 0.86);
}

.lightbox-figure {
  margin: 0;
  background: var(--navy-deep);
  border-radius: 12px;
  overflow: hidden;
}

.lightbox img {
  width: 100%;
  max-height: 75svh;
  object-fit: contain;
  background: #041526;
}

.lightbox figcaption {
  color: var(--white);
  padding: 0.8rem 1rem 1rem;
}

.lightbox-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.lightbox-controls button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--white);
  color: var(--navy-deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.empty-state {
  padding: 1.2rem;
  border: 1px dashed rgba(18, 75, 130, 0.35);
  border-radius: var(--radius);
  background: var(--white);
}

.prose h2,
.prose h3 {
  margin-top: 1.6rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.7rem;
}

.contact-list a {
  font-weight: 700;
  text-decoration: none;
}

address {
  font-style: normal;
}

.nav-overlay {
  position: fixed;
  top: var(--nav-top, 7.2rem);
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(8, 45, 80, 0.4);
  opacity: 0;
  visibility: hidden;
  z-index: 35;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

body.nav-lock {
  overflow: hidden;
}
