/* Bombay print: a three-ink city poster on off-white paper.
   Day print: paper, station indigo, night ink, marigold.
   Night print: indigo-black paper, marigold, lighter inks, lit windows. */

/* ---------- Fonts ---------- */

/* Latin carries the width axis, so the name can be set condensed like a
   signboard. Devanagari uses the lighter weight-only file at its natural width.
   Both faces declare the same stretch range: Chrome uses a face only when its
   range matches the other faces of the family, so without it Marathi falls
   back to the system font. */
@font-face {
  font-family: "Anek";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 125%;
  src: url("/fonts/anek-devanagari-latin-standard-normal.b8i7amwq.woff2") format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Anek";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 125%;
  src: url("/fonts/anek-devanagari-devanagari-wght-normal.2qesunlw.woff2") format("woff2-variations");
  unicode-range:
    U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF,
    U+11B00-11B09;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  --paper: #f5f4ef;
  --indigo: #1d2468;
  --ink: #10143f;
  --marigold: #f2a71b;

  --bg: var(--paper);
  --text: var(--ink);
  --soft: #343b78;
  --rule: var(--indigo);
  --masthead-rule: var(--indigo);

  --board: var(--marigold);
  --on-board: var(--ink);
  --board-line: var(--indigo);

  --band: var(--indigo);
  --on-band: var(--paper);
  --band-soft: #cdd0ee;
  --band-label: var(--marigold);

  --primary: var(--indigo);
  --on-primary: var(--paper);
  --primary-icon: var(--marigold);
  --primary-hover: var(--ink);
  --secondary: var(--indigo);
  --tint: #fbe7bc;
  --band-tint: #2a3280;

  --footer: var(--ink);
  --on-footer: var(--paper);
  --footer-soft: #c5c8e6;

  --focus: var(--indigo);
  --backdrop: rgb(16 20 63 / 0.86);
  --map-filter: none;

  --art-sky: var(--indigo);
  --art-ink: var(--ink);
  --art-face: var(--paper);
  --art-win: var(--ink);
  --art-arch: var(--ink);
  --art-sun: var(--marigold);

  --font: "Anek", "Mukta", "Noto Sans Devanagari", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: 16px;
  --gutter-right: max(var(--gutter), env(safe-area-inset-right));
  --gutter-left: max(var(--gutter), env(safe-area-inset-left));
}

/* Night print. The poster keeps its indigo sky (it now reads as a lit panel on
   darker paper), the building is moonlit and its windows glow marigold. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0e2a;
    --text: #efede6;
    --soft: #bec2e4;
    --rule: #7f89db;
    --masthead-rule: #2a3280;
    --board-line: var(--ink);
    --band: #171c52;
    --on-band: #efede6;
    --band-soft: #bec2e4;
    --primary: var(--marigold);
    --on-primary: var(--ink);
    --primary-icon: var(--ink);
    --primary-hover: #f7bd4f;
    --secondary: #efede6;
    --tint: #1c2257;
    --band-tint: #232a6b;
    --footer: #060818;
    --on-footer: #efede6;
    --footer-soft: #bec2e4;
    --focus: var(--marigold);
    --backdrop: rgb(3 4 16 / 0.78);
    --map-filter: invert(0.9) hue-rotate(180deg) saturate(0.6) brightness(0.92);
    --art-sky: #1a2063;
    --art-ink: #080a22;
    --art-face: #dcd9ea;
    --art-win: #f2b33d;
    --art-arch: #080a22;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0e2a;
  --text: #efede6;
  --soft: #bec2e4;
  --rule: #7f89db;
  --masthead-rule: #2a3280;
  --board-line: var(--ink);
  --band: #171c52;
  --on-band: #efede6;
  --band-soft: #bec2e4;
  --primary: var(--marigold);
  --on-primary: var(--ink);
  --primary-icon: var(--ink);
  --primary-hover: #f7bd4f;
  --secondary: #efede6;
  --tint: #1c2257;
  --band-tint: #232a6b;
  --footer: #060818;
  --on-footer: #efede6;
  --footer-soft: #bec2e4;
  --focus: var(--marigold);
  --backdrop: rgb(3 4 16 / 0.78);
  --map-filter: invert(0.9) hue-rotate(180deg) saturate(0.6) brightness(0.92);
  --art-sky: #1a2063;
  --art-ink: #080a22;
  --art-face: #dcd9ea;
  --art-win: #f2b33d;
  --art-arch: #080a22;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.1875rem;
  line-height: 1.55;
  caret-color: var(--marigold);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}

:lang(mr) body,
body:lang(mr) {
  font-size: 1.25rem;
  line-height: 1.65;
}

h1,
h2,
h3,
p,
dl,
dd,
ul,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
dd,
address {
  text-wrap: pretty;
}

address {
  font-style: normal;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--marigold);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.office-band,
.footer,
.facts,
.notice-head {
  --focus: var(--marigold);
}

/* No page scrolling behind the open notice. */
html:has(dialog[open]) {
  overflow: hidden;
}

.wrap {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 var(--gutter-right) 0 var(--gutter-left);
}

.icon {
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
}

svg.icon:not([fill="none"]) {
  fill: currentColor;
}

/* The SK mark: a small indigo plate with marigold letters. */
.mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  padding-top: 4px;
  background: var(--indigo);
  color: var(--marigold);
  font-weight: 800;
  font-size: 1.375rem;
  font-stretch: 85%;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 2px var(--marigold);
  border: 3px solid var(--indigo);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.75rem;
  padding: 0.25rem 1.625rem 0;
  border: 3px solid transparent;
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background-color 160ms ease,
    border-color 160ms ease;
}

.btn:lang(mr) {
  font-weight: 600;
}

.btn .icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: -0.25rem;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.btn-primary .icon {
  color: var(--primary-icon);
}

.btn-secondary {
  background: var(--bg);
  border-color: var(--secondary);
  color: var(--secondary);
}

/* On the indigo band and the footer. */
.btn-sun {
  background: var(--marigold);
  border-color: var(--marigold);
  color: var(--ink);
}

.btn-line {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
  }
  .btn-secondary:hover {
    background: var(--tint);
  }
  .btn-sun:hover {
    background: #f7bd4f;
    border-color: #f7bd4f;
  }
  .btn-line:hover {
    background: var(--band-tint);
  }
  .languages a:not([aria-current]):hover,
  .theme-toggle:hover {
    background: var(--tint);
  }
  .contact-phone a:hover,
  .footer-phone a:hover,
  .footer-lang:hover {
    text-decoration-thickness: 3px;
  }
}

/* The tap highlight is off, so links that are not buttons show a press. */
.languages a:not([aria-current]):active {
  background: var(--tint);
}
.brand:active,
.contact-phone a:active,
.footer-phone a:active,
.footer-lang:active {
  opacity: 0.72;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: fixed;
  top: max(0.5rem, env(safe-area-inset-top));
  left: var(--gutter-left);
  z-index: 11;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}

.skip-link:lang(mr) {
  font-weight: 600;
}

/* Hidden until a keyboard user tabs to it. */
.skip-link:not(:focus) {
  clip-path: inset(50%);
}

/* The skip link focuses main (tabindex -1); a ring round the whole page helps no one. */
main:focus-visible {
  outline: none;
}

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 4px solid var(--masthead-rule);
  padding-top: env(safe-area-inset-top);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 48px;
  text-decoration: none;
}

.brand-name {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.2;
}

.tools {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

/* English and मराठी sit side by side as one two-part sign; the current one is filled. */
.languages {
  display: flex;
  border: 2px solid var(--rule);
}

.languages a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.875rem 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  color: var(--text);
  transition: background-color 160ms ease;
}

.languages a:lang(mr) {
  font-size: 1.1875rem;
  padding-top: 0.375rem;
}

.languages a + a {
  border-left: 2px solid var(--rule);
}

.languages a[aria-current] {
  background: var(--rule);
  color: var(--bg);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--rule);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background-color 160ms ease;
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle .icon {
  width: 1.375rem;
  height: 1.375rem;
}

.theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: block;
  }
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.no-js .theme-toggle,
.no-js [data-open-notice] {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "text poster"
    "facts facts";
  column-gap: 3rem;
}

.hero-text {
  grid-area: text;
  display: flex;
  flex-direction: column;
}

/* The poster keeps the whole drawing in view at any size; the sky colour and
   the ground band extend it to the sides and the top. */
.poster {
  position: relative;
  grid-area: poster;
  overflow: hidden;
  background: var(--art-sky);
}

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: calc(100% * 50 / 610);
  background: linear-gradient(var(--art-sun) 0 10%, var(--art-ink) 10% 100%);
}

.poster-art {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

/* The name board: a marigold plate with an indigo inner frame. */
.board {
  padding: 0.625rem;
  background: var(--board);
  color: var(--on-board);
}

.board-inner {
  border: 3px solid var(--board-line);
  padding: 1.75rem 2.25rem 1.5rem;
}

.hero h1 {
  font-size: clamp(2.75rem, 1.4rem + 4.2vw, 6rem);
  font-weight: 700;
  font-stretch: 80%;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero h1:lang(mr) {
  font-size: clamp(2.5rem, 1.4rem + 3.4vw, 4.75rem);
  line-height: 1.2;
  letter-spacing: 0;
}

/* Each word rises out of its own clipping box (site.ts). */
.hero h1 .w {
  display: inline-block;
  overflow: clip;
  padding-block: 0.1em 0.04em;
  margin-block: -0.1em -0.04em;
  vertical-align: top;
}

.hero h1:lang(mr) .w {
  padding-block: 0.12em 0.16em;
  margin-block: -0.12em -0.16em;
}

.hero h1 .w > span {
  display: inline-block;
}

.hero-rule {
  height: 3px;
  margin: 1rem 0 0.875rem;
  background: var(--board-line);
  transform-origin: left center;
}

.name-alt {
  font-size: clamp(1.75rem, 1.1rem + 1.9vw, 2.875rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--indigo);
}

.name-alt:lang(en) {
  font-stretch: 82%;
  letter-spacing: -0.005em;
}

.hero-title {
  margin-top: 1.875rem;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-title:lang(mr) {
  font-weight: 600;
  line-height: 1.35;
}

.lede {
  max-width: 34ch;
  margin-top: 0.5rem;
  font-size: 1.3125rem;
  line-height: 1.5;
  color: var(--soft);
}

.lede:lang(mr) {
  font-size: 1.375rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2rem;
}

/* The facts strip, set like a bus route board: marigold labels, paper values. */
.facts {
  grid-area: facts;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2.5rem;
  background: var(--band);
  color: var(--on-band);
  border-top: 6px solid var(--marigold);
}

.facts > div {
  padding: 1.125rem 1.75rem 1rem;
}

.facts > div + div {
  border-left: 2px solid var(--marigold);
}

.facts dt {
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--band-label);
}

.facts dt:lang(mr) {
  font-size: 1.125rem;
}

.facts dd {
  margin-top: 0.125rem;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: lining-nums tabular-nums;
}

.facts dd:lang(mr) {
  font-weight: 500;
}

/* The starting pose for the entrance (site.ts plays it). If the script never
   arrives, everything shows after 3 seconds anyway. */
.intro .hero .w > span {
  translate: 0 110%;
}

.intro .hero [data-reveal] {
  opacity: 0;
}

.intro .hero-rule {
  scale: 0 1;
}

.intro:not(.motion) .hero .w > span,
.intro:not(.motion) .hero [data-reveal],
.intro:not(.motion) .hero-rule {
  animation: show 0s 3s forwards;
}

@keyframes show {
  to {
    translate: none;
    scale: none;
    opacity: 1;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 5.5rem 0;
}

.section h2 {
  font-size: clamp(2.25rem, 1.6rem + 2vw, 3.5rem);
  font-weight: 700;
  font-stretch: 82%;
  line-height: 1;
  letter-spacing: -0.01em;
}

.section h2:lang(mr) {
  font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem);
  line-height: 1.25;
  letter-spacing: 0;
}

/* ---------- Practice areas: a route board of five lines ---------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 6px solid var(--rule);
}

.areas {
  padding: 0;
  list-style: none;
}

.area {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 17rem) minmax(0, 1fr);
  align-items: center;
  gap: 0 2rem;
  padding: 1.5rem 0;
  border-bottom: 2px solid var(--rule);
}

.pict {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  --art-face: var(--paper);
  --art-ink: var(--ink);
}

.area h3 {
  font-size: 1.875rem;
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1.1;
}

.area h3:lang(mr) {
  font-size: 1.625rem;
  line-height: 1.35;
}

.area p {
  max-width: 40rem;
  color: var(--soft);
}

/* ---------- Office and contact: the indigo band ---------- */

.office-band {
  background: var(--band);
  color: var(--on-band);
}

.office {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 3rem;
  align-items: stretch;
}

.contact {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 6px solid var(--marigold);
}

.contact dt {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--band-label);
}

.contact dt:lang(mr) {
  font-size: 1.125rem;
}

.contact address {
  max-width: 30ch;
  font-size: 1.375rem;
  line-height: 1.45;
}

.contact-phone a {
  display: inline-block;
  padding: 0.25rem 0;
  font-size: 2rem;
  font-weight: 700;
  font-stretch: 90%;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-color: var(--marigold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  font-variant-numeric: lining-nums tabular-nums;
}

.office-actions {
  display: grid;
  gap: 0.75rem;
  max-width: 26rem;
  margin-top: 2rem;
}

.office-actions .btn {
  justify-content: flex-start;
}

.map {
  min-height: 26rem;
  border: 6px solid var(--marigold);
  background: var(--bg);
}

.map:focus-within {
  outline: 3px solid var(--on-band);
  outline-offset: 3px;
}

.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 25rem;
  border: 0;
  filter: var(--map-filter);
}

/* ---------- Enrolment details: a second marigold board ---------- */

.enrolment h2 {
  margin-bottom: 2rem;
}

.credentials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

.credentials > div {
  padding: 1.5rem 2rem 1.375rem;
}

.credentials > div:nth-child(even) {
  border-left: 3px solid var(--board-line);
}

.credentials > div:nth-child(n + 3) {
  border-top: 3px solid var(--board-line);
}

.credentials dt {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--indigo);
}

.credentials dt:lang(mr) {
  font-size: 1.125rem;
  font-weight: 600;
}

.credentials dd {
  margin-top: 0.25rem;
  font-size: 1.875rem;
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}

.credentials dd:lang(mr) {
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.4;
}

/* ---------- Footer: the court again, as a night skyline ---------- */

.skyline {
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.skyline-art {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(10rem, 7rem + 10vw, 16rem);
  margin-bottom: -1px;
  --art-face: var(--footer);
  --art-ink: var(--footer);
  --art-win: #e59a12;
  --art-arch: #e59a12;
  --art-sun: var(--marigold);
}

.footer-body {
  padding: 3rem 0 3.5rem;
  background: var(--footer);
  color: var(--on-footer);
  border-top: 6px solid var(--marigold);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #2a3280;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-brand .mark {
  border-color: var(--marigold);
  box-shadow: none;
}

.footer-name {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
}

.footer-role {
  display: block;
  color: var(--footer-soft);
}

.footer-phone a {
  display: inline-block;
  padding: 0.25rem 0;
  font-size: 1.75rem;
  font-weight: 700;
  font-stretch: 90%;
  text-decoration: underline;
  text-decoration-color: var(--marigold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.footer-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 2rem 0;
  border-bottom: 2px solid #2a3280;
}

.footer-notice p {
  max-width: 52ch;
  color: var(--footer-soft);
}

.footer-notice .btn {
  min-height: 3.25rem;
  font-size: 1.1875rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  color: var(--footer-soft);
}

.footer-lang {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--on-footer);
  text-decoration: underline;
  text-decoration-color: var(--marigold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

/* ---------- Call and WhatsApp bar on phones ---------- */

/* It slides in once the hero's own buttons have scrolled away (site.ts). */
.dock {
  position: fixed;
  z-index: 10;
  inset: auto 0 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  padding: 0.75rem var(--gutter-right) calc(0.75rem + env(safe-area-inset-bottom, 0px))
    var(--gutter-left);
  background: var(--bg);
  border-top: 4px solid var(--rule);
  transition:
    translate 280ms var(--ease-out),
    visibility 0s;
}

.dock .btn {
  min-height: 3.5rem;
  padding-inline: 0.75rem;
  font-size: 1.1875rem;
}

/* Hidden also takes its links out of the tab order, after the slide. */
.dock-hidden .dock {
  translate: 0 110%;
  visibility: hidden;
  transition-delay: 0s, 280ms;
}

/* ---------- Bar Council notice ---------- */

.notice-static {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  border: 3px solid var(--rule);
}

.notice-static h2 {
  font-size: 1.75rem;
  font-weight: 700;
}

.notice-static p {
  margin-top: 0.75rem;
}

dialog {
  width: 100%;
  max-width: none;
  max-height: 90dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-top: 6px solid var(--marigold);
  background: var(--bg);
  color: var(--text);
  overscroll-behavior: contain;
  transition:
    translate 320ms var(--ease-out),
    opacity 200ms var(--ease-out),
    display 320ms allow-discrete,
    overlay 320ms allow-discrete;
}

dialog:not([open]) {
  translate: 0 2.5rem;
  opacity: 0;
  transition-duration: 200ms;
}

@starting-style {
  dialog[open] {
    translate: 0 2.5rem;
    opacity: 0;
  }
}

dialog::backdrop {
  background: var(--backdrop);
  transition:
    opacity 200ms var(--ease-out),
    display 320ms allow-discrete,
    overlay 320ms allow-discrete;
}

dialog:not([open])::backdrop {
  opacity: 0;
}

@starting-style {
  dialog[open]::backdrop {
    opacity: 0;
  }
}

.notice-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem var(--gutter-right) 1.25rem var(--gutter-left);
  background: var(--marigold);
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
}

.notice-head .mark {
  box-shadow: none;
}

.notice-head h2 {
  font-size: 1.875rem;
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1.1;
}

.notice-head h2:lang(mr) {
  font-size: 1.75rem;
  line-height: 1.3;
}

/* The heading takes focus on open (tabindex -1) so the notice starts at its top. */
.notice-head h2:focus-visible {
  outline: none;
}

.notice-body {
  padding: 1.25rem var(--gutter-right) 0.25rem var(--gutter-left);
}

.notice-body p {
  font-size: 1.125rem;
  line-height: 1.55;
}

.notice-body p:lang(mr),
:lang(mr) .notice-body p {
  font-size: 1.1875rem;
  line-height: 1.65;
}

.notice-body p + p {
  margin-top: 0.875rem;
}

.notice-actions {
  position: sticky;
  bottom: 0;
  padding: 1rem var(--gutter-right) calc(1rem + env(safe-area-inset-bottom, 0px)) var(--gutter-left);
  background: var(--bg);
}

.notice-actions .btn {
  width: 100%;
}

/* ---------- Phones and narrow tablets ---------- */

@media (max-width: 899px) {
  .hero {
    padding-top: 0;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "poster"
      "text"
      "facts";
    padding: 0;
  }

  .poster {
    height: min(100vw * 610 / 640, 30rem);
  }

  /* The board stands on the poster's dark ground band, never on the building. */
  .hero-text {
    position: relative;
    z-index: 2;
    margin-top: calc(-1 * min(100vw * 50 / 640, 30rem * 50 / 610) + 3px);
    padding: 0 var(--gutter-right) 0 var(--gutter-left);
  }

  .board {
    padding: 0.4375rem;
  }

  .board-inner {
    padding: 1rem 1.125rem 0.875rem;
    border-width: 2px;
  }

  .hero-rule {
    height: 2px;
    margin: 0.625rem 0;
  }

  .hero-title {
    margin-top: 1.25rem;
    font-size: 1.4375rem;
  }

  .lede {
    margin-top: 0.25rem;
    font-size: 1.1875rem;
  }

  .lede:lang(mr) {
    font-size: 1.25rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.375rem;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 3.625rem;
    font-size: 1.25rem;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 2.25rem;
  }

  .facts > div {
    padding: 0.875rem var(--gutter-right) 0.75rem var(--gutter-left);
  }

  .facts > div + div {
    border-left: 0;
    border-top: 2px solid var(--marigold);
  }

  .section {
    padding: 3.5rem 0;
  }

  .office {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
  }

  .office-actions {
    max-width: none;
  }

  .map,
  .map iframe {
    min-height: 20rem;
  }

  /* Room for the dock, which shows up to this width. */
  .footer-body {
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 699px) {
  /* Hidden from sight only: it is the home link's name. */
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .masthead-inner {
    min-height: 4.25rem;
  }

  .section-head {
    padding-bottom: 1rem;
  }

  .area {
    grid-template-columns: 3.5rem minmax(0, 1fr);
    grid-template-areas:
      "pict name"
      "pict detail";
    align-items: start;
    gap: 0.25rem 1rem;
    padding: 1.25rem 0;
  }

  .pict {
    grid-area: pict;
    width: 3.5rem;
    height: 3.5rem;
  }

  .area h3 {
    grid-area: name;
    align-self: center;
    font-size: 1.625rem;
  }

  .area h3:lang(mr) {
    font-size: 1.4375rem;
  }

  .area p {
    grid-area: detail;
  }

  .contact address {
    font-size: 1.25rem;
  }

  .contact-phone a {
    font-size: 1.75rem;
  }

  .credentials {
    grid-template-columns: minmax(0, 1fr);
  }

  .credentials > div {
    padding: 1rem 1.125rem 0.875rem;
  }

  .credentials > div:nth-child(even) {
    border-left: 0;
  }

  .credentials > div + div {
    border-top: 2px solid var(--board-line);
  }

  .credentials dd {
    font-size: 1.5rem;
  }

  .credentials dd:lang(mr) {
    font-size: 1.375rem;
  }

  .footer-notice .btn {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .hero-actions {
    flex-wrap: nowrap;
  }

  .board {
    flex: none;
  }

  .poster {
    min-height: 34rem;
  }

  .dock {
    display: none;
  }

  dialog {
    width: calc(100% - 2rem);
    max-width: 40rem;
    max-height: 86dvh;
    margin: auto;
    border: 3px solid var(--masthead-rule);
    border-top: 0;
  }

  @starting-style {
    dialog[open] {
      translate: 0 0.75rem;
      opacity: 0;
    }
  }

  .notice-head,
  .notice-body,
  .notice-actions {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .notice-body {
    padding-top: 1.75rem;
  }

  .notice-actions {
    padding-bottom: 1.75rem;
  }
}

@media (min-width: 900px) and (max-width: 1139px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 26rem;
  }
}

@media (min-width: 1140px) {
  .hero h1 {
    font-size: 6rem;
  }

  .hero h1:lang(mr) {
    font-size: 4.75rem;
  }

  .board-inner {
    padding: 2rem 2.5rem 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog,
  dialog::backdrop,
  .btn,
  .dock,
  .theme-toggle {
    transition: none;
  }
}
