/* Mataji's Ultimate Site
   The 1996 palette, kept: lavender "Jai Mataji" tile, maroon type, green rules. */

:root {
  --lavender: #dcdcf7;
  --ticker-bg: #b9bbe8;
  --maroon: #800000;
  --maroon-deep: #550000;
  --green: #008000;
  --red: #d40000;
  --paper: rgba(255, 253, 248, 0.93);
  --line: rgba(128, 0, 0, 0.18);
  --measure: 46rem;
  --font: Arial, Helvetica, "Helvetica Neue", sans-serif;
  --mono: "Courier New", Courier, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--lavender) url("../bg1.jpg");
  color: var(--maroon);
  font: 1.0625rem/1.6 var(--font);
}

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

a {
  color: #0000b0;
  text-underline-offset: 0.15em;
}
a:visited {
  color: #5a007a;
}
a:hover {
  color: var(--red);
}
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--green);
  margin: 1.5rem 0;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 10;
  background: #fff;
  padding: 0.5rem 0.75rem;
}

/* ---- Ticker (was TickerTape.class) ---- */
.ticker {
  background: var(--ticker-bg);
  color: red;
  font: bold 1rem/1.9 var(--mono);
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.ticker-track {
  display: inline-flex;
  animation: ticker 70s linear infinite;
}
.ticker-track span {
  padding-right: 4rem;
  white-space: pre;
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track {
  animation-play-state: paused;
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ---- Blink (was <blink>) ---- */
.blink {
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.new {
  color: var(--red);
  font-weight: bold;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Masthead ---- */
.masthead {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem 1rem 0;
  /* A full-width paper band, so the title is not fighting the tiled background. */
  background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--maroon);
  min-width: 0;
}
.brand:visited {
  color: var(--maroon);
}
.brand img {
  width: 3.25rem;
  height: 4.25rem;
  object-fit: cover;
  object-position: top;
  border-radius: 50% 50% 0.5rem 0.5rem;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(85, 0, 0, 0.35);
  flex: none;
}
.brand-text {
  display: grid;
  line-height: 1.2;
}
.brand-name {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: bold;
}
.brand-sub {
  font-size: 0.95rem;
  color: var(--maroon-deep);
  opacity: 0.85;
}
.masthead-tools {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

button,
.button {
  font: inherit;
  font-weight: bold;
  color: #fff;
  background: var(--maroon);
  border: 1px solid var(--maroon-deep);
  border-radius: 0.4rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover,
.button:hover {
  background: var(--maroon-deep);
  color: #fff;
}
.button:visited {
  color: #fff;
}
.chant,
.nav-toggle,
button.quiet {
  background: #fff;
  color: var(--maroon);
  border-color: var(--line);
  font-size: 0.9rem;
}
.chant:hover,
.nav-toggle:hover,
button.quiet:hover {
  background: #fff;
  color: var(--maroon-deep);
  border-color: var(--maroon);
}
.chant-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.35em 0 0.35em 0.6em;
  border-color: transparent transparent transparent currentColor;
  margin-right: 0.45em;
}
.chant[aria-pressed="true"] .chant-icon {
  width: 0.6em;
  height: 0.7em;
  border-width: 0 0.2em;
  border-color: currentColor;
  vertical-align: -0.05em;
}

.site-nav {
  grid-column: 1 / -1;
  border-top: 1px solid var(--green);
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
}
.site-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  color: var(--maroon);
  font-weight: bold;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 0.3rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--ticker-bg);
  color: var(--maroon-deep);
}
/* Wide screens: the short row, with the rest behind "Menu". */
.site-nav li.more {
  display: none;
}
.site-nav.open li.more {
  display: block;
}

@media (max-width: 44rem) {
  .chant-label {
    position: absolute;
    left: -999px;
  }
  .chant-icon {
    margin-right: 0;
  }
  .site-nav li {
    display: none;
    width: 100%;
  }
  .site-nav.open li,
  .site-nav.open li.more {
    display: block;
  }
  .site-nav:not(.open) {
    border-top: 0;
  }
  .site-nav ul {
    padding: 0;
  }
  .site-nav.open ul {
    padding: 0.25rem 0;
  }
}

/* ---- Page ---- */
.page {
  max-width: var(--measure);
  margin: 1.25rem auto;
  padding: clamp(1.1rem, 4vw, 2.25rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  box-shadow: 0 2px 14px rgba(60, 40, 120, 0.12);
}
.page-wide {
  max-width: 60rem;
}
@media (max-width: 48rem) {
  .page {
    margin: 1rem 0.75rem;
  }
}

h1 {
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  text-align: center;
  color: var(--maroon);
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 2rem 0 0.5rem;
  color: var(--maroon-deep);
}
h2 a {
  color: inherit;
}
.page > :first-child {
  margin-top: 0;
}
.page > :last-child {
  margin-bottom: 0;
}
.center {
  text-align: center;
}
.lead {
  font-weight: bold;
}
.shout {
  text-align: center;
  font-weight: bold;
  color: var(--red);
}
.divider {
  display: block;
  margin: 0.5rem auto 1.5rem;
  width: min(472px, 100%);
}
.note {
  font-size: 0.92rem;
  background: #fff7e0;
  border-left: 4px solid #d9a400;
  padding: 0.6rem 0.9rem;
  color: #5a3d00;
  border-radius: 0 0.3rem 0.3rem 0;
}
.unavailable {
  color: #6b5a5a;
}
.unavailable small {
  font-style: italic;
}

/* Lists with the original spinning-star bullet */
ul.bul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
ul.bul > li {
  padding-left: 1.75rem;
  background: url("../bul.gif") no-repeat 0 0.35em;
  margin: 0.85rem 0;
  overflow-wrap: anywhere;
}
ul.bul ul {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0;
}
ul.bul ul li {
  margin: 0.2rem 0;
}

/* ---- Splash (index.htm) ---- */
.splash .page {
  max-width: 40rem;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.splash-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}
.splash-side {
  display: grid;
  gap: 2.5rem;
  justify-items: center;
  font-size: 0.9rem;
}
.splash-portrait img {
  display: block;
  width: min(250px, 52vw);
  border: 4px solid #fff;
  box-shadow: 0 4px 18px rgba(85, 0, 0, 0.35);
}
.splash-enter {
  margin-top: 1.25rem;
  font-size: 1.1rem;
  padding: 0.65rem 1.6rem;
}
.splash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.splash .page {
  flex: 1;
  display: grid;
  align-content: center;
  width: 100%;
}
.splash .site-footer {
  width: 100%;
  margin-top: 0;
}
.splash .site-footer hr {
  display: none;
}
@media (max-width: 30rem) {
  .splash-side {
    gap: 1rem;
    font-size: 0.75rem;
  }
  .splash-side img {
    width: 3rem;
  }
}

/* ---- Home menu (index1.htm) ---- */
.home-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}
.home-top .portrait {
  width: 145px;
}
.home-mid {
  min-width: 0;
}
.home-news {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-weight: bold;
  display: grid;
  gap: 0.6rem;
}
@media (max-width: 40rem) {
  .home-top {
    grid-template-columns: 1fr 1fr;
  }
  .home-top .home-mid {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .home-top .portrait {
    width: 100%;
    max-width: 145px;
    justify-self: center;
  }
}
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin: 1.5rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid var(--green);
  border-bottom: 1px solid var(--green);
}
.search {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 0.25rem 2rem;
}
.menu li {
  padding: 0.6rem 0 0.6rem 1.75rem;
  background: url("../bul.gif") no-repeat 0 0.95em;
  font-weight: bold;
}
.menu li > a {
  font-size: 1.1rem;
}
.menu li p {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

/* ---- Forms ---- */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  font: inherit;
  color: #2a0000;
  background: #fff;
  border: 1px solid #a08a8a;
  border-radius: 0.3rem;
  padding: 0.5rem 0.6rem;
  width: 100%;
  max-width: 100%;
}
textarea {
  min-height: 7rem;
  resize: vertical;
}
.form {
  display: grid;
  gap: 1rem;
  max-width: 32rem;
  margin: 1.5rem auto 0;
}
.form label {
  display: grid;
  gap: 0.3rem;
  font-weight: bold;
}
.form .actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.updates {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-weight: bold;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
}
.updates-row {
  display: flex;
  gap: 0.4rem;
  width: min(100%, 26rem);
}
.deadlink {
  text-align: center;
  margin-top: 2rem;
}
.deadlink img {
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* ---- Branches, founder ---- */
.branch {
  display: flow-root;
  margin-bottom: 1rem;
  font-weight: bold;
}
.branch img,
.float-img {
  float: right;
  margin: 0.25rem 0 0.75rem 1.25rem;
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(85, 0, 0, 0.3);
}
.branch:nth-of-type(even) img {
  float: left;
  margin: 0.25rem 1.25rem 0.75rem 0;
}
@media (max-width: 34rem) {
  .branch img,
  .branch:nth-of-type(even) img,
  .float-img {
    float: none;
    display: block;
    margin: 0 auto 1rem;
  }
}
.prose-bold p,
.prose-bold li {
  font-weight: bold;
}

/* ---- Link pages ---- */
.deity {
  display: block;
  margin: 0 auto 1rem;
  width: min(640px, 100%);
  border-radius: 0.4rem;
  mix-blend-mode: multiply;
}
.link-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.link-head img {
  width: 3.25rem;
}
.link-head h1 {
  margin: 0;
}
.links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}
.links li {
  margin: 1.1rem 0;
  overflow-wrap: anywhere;
}

/* ---- Gallery ---- */
.gallery {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 1.25rem 1rem;
  text-align: center;
  font-weight: bold;
  font-size: 0.95rem;
  align-items: end;
}
.gallery.large {
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}
.gallery a {
  display: block;
  text-decoration: none;
}
.gallery img {
  display: block;
  margin: 0 auto 0.4rem;
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(85, 0, 0, 0.3);
  transition: transform 0.15s ease;
}
.gallery a:hover img {
  transform: scale(1.03);
}
.pager {
  text-align: center;
  font-weight: bold;
}
.pager a,
.pager span {
  display: inline-block;
  padding: 0.1rem 0.6rem;
}
.poster img {
  display: block;
  margin: 1rem auto 0;
  border: 4px solid #fff;
  box-shadow: 0 2px 12px rgba(85, 0, 0, 0.35);
}

.lightbox {
  border: 0;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fffdf8;
  color: var(--maroon);
  max-width: min(96vw, 60rem);
  max-height: 96vh;
  text-align: center;
}
.lightbox::backdrop {
  background: rgba(30, 10, 40, 0.8);
}
.lightbox img {
  display: block;
  margin: 0.5rem auto;
  max-height: 78vh;
  width: auto;
}
.lightbox-caption {
  margin: 0.25rem 0 0;
  font-weight: bold;
}
.lightbox form {
  text-align: right;
}

/* ---- Arti (12 scanned tiles that make one page) ---- */
.arti-scan {
  display: grid;
  grid-template-columns: 204fr 236fr 189fr;
  max-width: 629px;
  margin: 1.5rem auto 0;
  background: #fff;
}
.arti-scan img {
  display: block;
  width: 100%;
}
audio {
  width: min(100%, 28rem);
  display: block;
  margin: 0.5rem auto;
}
.listen {
  text-align: center;
  margin: 1.25rem 0;
  font-weight: bold;
}

.arti-list audio {
  margin: 0.4rem 0;
}
.arti-list a {
  font-weight: normal;
}
.names {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  background: #fff;
}
.names img {
  display: block;
  width: 100%;
}
.words {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.25rem;
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.words dt {
  font-weight: bold;
  color: var(--maroon-deep);
}
.words dd {
  margin: 0;
}
@media (max-width: 30rem) {
  .words {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
  .words dd {
    margin-bottom: 0.6rem;
  }
}

/* ---- Hanuman Chalisa ---- */
.verse {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0.5rem 1.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}
.verse p {
  margin: 0;
}
.translit {
  font-weight: bold;
  font-style: italic;
  color: var(--maroon-deep);
}
@media (max-width: 36rem) {
  .verse {
    grid-template-columns: 1fr;
  }
}

/* ---- What's New ---- */
.timeline h2 {
  margin-top: 1.5rem;
}

/* ---- Search ---- */
.results {
  list-style: none;
  padding: 0;
}
.results li {
  margin: 1rem 0;
}
.results p {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

/* ---- Footer ---- */
.site-footer {
  max-width: 60rem;
  margin: 2rem auto 0;
  padding: 1.25rem 1rem 2rem;
  background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
  text-align: center;
  font-size: 0.9rem;
}
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 1.1rem;
}
.footer-nav a {
  color: var(--maroon);
  font-weight: bold;
}
.colophon {
  font-weight: bold;
  font-size: 0.85rem;
  margin: 0;
}
.colophon-now {
  font-weight: normal;
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ticker {
    white-space: normal;
    padding: 0.3rem 1rem;
    line-height: 1.5;
  }
  .ticker-track {
    animation: none;
    display: block;
  }
  .ticker-track span {
    white-space: normal;
    padding: 0;
  }
  .ticker-track span[aria-hidden] {
    display: none;
  }
  .blink {
    animation: none;
  }
  .gallery img {
    transition: none;
  }
}

@media print {
  .ticker,
  .masthead-tools,
  .site-nav,
  .footer-nav,
  .updates {
    display: none;
  }
  body {
    background: #fff;
  }
  .page {
    border: 0;
    box-shadow: none;
  }
}
