/* ==========================================================
   Ramesh Krishnan: yoga teacher site
   EDIT HERE FIRST: change the colors in the two :root blocks
   (light mode, then dark mode). Everything else follows them.
   ========================================================== */

:root {
  --bg: #fffaf3;
  --surface: #fff;
  --ink: #2a1f1a;
  --muted: #6a5a50;
  --line: #eadfd0;
  --brand: #8a2f1d;
  --brand-ink: #fff;
  --accent: #e08a1e;
  --band: #f6ead8;
  --foot: #2a1f1a;
  --foot-ink: #f3e8d8;
}

@media (prefers-color-scheme:dark) {
  :root {
    --bg: #1a1411;
    --surface: #251d18;
    --ink: #f3e8d8;
    --muted: #b9a897;
    --line: #3a2e26;
    --brand: #e08a1e;
    --brand-ink: #1a1411;
    --accent: #e08a1e;
    --band: #221a15;
    --foot: #120e0c;
    --foot-ink: #f3e8d8;
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}

h1, h2, h3 {
  font-family: Georgia,"Palatino Linotype",Palatino,serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

a {
  color: inherit;
}

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

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 22px;
}

/* top bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 16px;
}

.brand {
  font-family: Georgia,serif;
  font-weight: 700;
  font-size: 21px;
  text-decoration: none;
  color: var(--brand);
  white-space: nowrap;
}

.brand small {
  display: block;
  font: 500 11px/1.2 system-ui,sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 15px;
  border-radius: 6px;
}

nav a:hover {
  background: var(--band);
}

nav a.btn {
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  margin-left: 6px;
}

#tog, .burger {
  display: none;
}

@media(max-width:820px) {
  .burger {
    display: block;
    cursor: pointer;
    padding: 10px;
    font-size: 22px;
    line-height: 1;
  }
  nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  #tog:checked~nav {
    display: block;
  }
  nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 22px 16px;
  }
  nav a.btn {
    margin: 6px 0 0;
    text-align: center;
  }
}

/* banner slider */
.slider {
  position: relative;
  background: var(--brand);
  color: var(--brand-ink);
  overflow: hidden;
}

.slide {
  display: none;
  padding: 34px 0 46px;
  text-align: center;
}

.slide.on {
  display: block;
}

.slide h2 {
  font-size: clamp(26px,5vw,42px);
  margin-bottom: 10px;
}

.slide p {
  max-width: 38em;
  margin: 0 auto 16px;
  opacity: .95;
}

.slide .sa {
  font-family: "Noto Serif Devanagari","Kohinoor Devanagari",Georgia,serif;
  font-size: clamp(19px,3.4vw,25px);
  line-height: 1.8;
}

.pill {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--brand-ink);
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.dots button {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--brand-ink);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.dots button[aria-current="true"] {
  background: var(--brand-ink);
}

/* sections */
section {
  padding: 56px 0;
}

.band {
  background: var(--band);
}

h2.title {
  font-size: clamp(28px,4.6vw,38px);
  margin-bottom: 16px;
}

p {
  max-width: 44em;
  margin: 0 0 1em;
}

.photos {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 26px;
}

@media(min-width:720px) {
  .photos {
    /* widths follow the photos' shapes (portrait : landscape) so they line up at about the same height */
    grid-template-columns: 0.704fr 1.333fr;
    align-items: start;
  }
}

.photos figure {
  margin: 0;
}

.photos img {
  display: block;
  width: 100%;
  /* no fixed height: each photo shows at its natural shape, so nothing is ever cropped */
  height: auto;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.photos figcaption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

.cols {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media(min-width:760px) {
  .cols {
    grid-template-columns: repeat(3,1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 10px;
  padding: 22px;
}

.card h3 {
  font-size: 23px;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.limbs {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit,minmax(210px,1fr));
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.limbs li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.limbs .n {
  font: 700 32px/1 Georgia,serif;
  color: var(--accent);
}

.limbs h3 {
  font-size: 23px;
  margin: 6px 0 2px;
}

.limbs .en {
  font-size: 13px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 8px;
  font-weight: 600;
}

.limbs p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

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

ul.cred li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

ul.cred li:first-child {
  border-top: 0;
}

ul.cred b {
  display: block;
}

ul.cred span {
  color: var(--muted);
  font-size: 15px;
}

.note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 18px;
}

.verse {
  text-align: center;
}

.verse .sa {
  font-family: "Noto Serif Devanagari","Kohinoor Devanagari",Georgia,serif;
  font-size: clamp(20px,4vw,27px);
  line-height: 1.8;
  margin: 0 auto 14px;
}

.verse .en {
  color: var(--muted);
  margin: 0 auto;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.links a {
  padding: 10px 18px;
  border: 2px solid var(--brand);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: var(--brand);
}

.links a:hover {
  background: var(--brand);
  color: var(--brand-ink);
}

footer {
  background: var(--foot);
  color: var(--foot-ink);
  padding: 40px 0 30px;
  font-size: 15px;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

footer a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

footer a:hover {
  border-color: currentColor;
}

footer p {
  margin: 0 0 6px;
  opacity: .85;
}

/* contact card: sits above About on small screens; on wide screens it floats down the right side
   (below the banner, never over the top bar) and stays in view as you scroll */
.page-body {
  position: relative;
}

.contact-rail {
  max-width: 1040px;
  margin: 24px auto 0;
  padding: 0 22px;
}

.contact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 10px;
  padding: 22px;
}

.contact h3 {
  font-size: 23px;
  margin-bottom: 8px;
}

.contact p {
  color: var(--muted);
  font-size: 16px;
}

.contact .where {
  margin: 14px 0 0;
  font-size: 14px;
}

.contact .links {
  flex-direction: column;
}

.contact .links a {
  text-align: center;
}

@media (min-width: 1100px) {
  section .wrap {
    padding-right: 330px;
  }

  .contact-rail {
    position: absolute;
    top: 0;
    bottom: 0;
    /* right edge lines up with the right end of the "Join a Class" button */
    left: min(calc(50% + 208px), calc(100% - 312px));
    width: 290px;
    max-width: none;
    margin: 0;
    padding: 56px 0 0;
  }

  .contact {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
  }
}
