/* Iti Shrutam landing page. Values follow docs/brand/direction.md. */

@font-face {
  font-family: "Gotu";
  src: url("fonts/gotu.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tiro Devanagari Sanskrit";
  src: url("fonts/tiro-devanagari-sanskrit.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tiro Kannada";
  src: url("fonts/tiro-kannada.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --indigo: #22314F;
  --paper: #FFFFFF;
  --ink: #2A1C10;
  --gold: #CDAE62;
  --madder: #93402F;
  --cover: #4A2420;
  --linen: #F3ECDD;
  --mist: #B9C0CF;
  --umber: #6B5A48;
  --rule: #E4DCCF;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --s10: 128px;

  --heading: "Gotu", Georgia, serif;
  --text: "EB Garamond", Georgia, serif;
  --sanskrit: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", serif;
  --kannada: "Tiro Kannada", "Noto Serif Kannada", serif;

  --gutter: var(--s4);
  --section: var(--s8);
  --focus: var(--ink);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-synthesis: none;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 20px;
  line-height: 1.6;
  font-kerning: normal;
  overflow-x: clip;
}

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

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 400;
}

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

ul[role="list"] {
  list-style: none;
  padding: 0;
}

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

.wrap {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  top: var(--s2);
  left: var(--s4);
  z-index: 1;
  padding: var(--s2) var(--s4);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* Text links on white */

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--madder);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.link:hover {
  color: var(--ink);
}

.link:active {
  color: var(--umber);
}

/* Buttons, on indigo and cover grounds */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s4);
  border: 1px solid var(--gold);
  font-family: var(--text);
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--gold);
  color: var(--indigo);
}

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

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

.btn--secondary {
  background: transparent;
  color: var(--gold);
}

.btn--secondary:hover {
  color: var(--linen);
  border-color: var(--linen);
}

.btn--secondary:active {
  color: var(--mist);
  border-color: var(--mist);
}

/* Header */

.site-header {
  --focus: var(--linen);
  background: var(--indigo);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding-block: var(--s4);
}

.site-header__logo {
  display: block;
}

.site-header__logo img {
  width: auto;
  height: 40px;
}

.site-header__nav {
  display: flex;
  align-items: center;
  margin-right: calc(-1 * var(--s3));
}

.site-header__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--s3);
  color: var(--gold);
  font-size: 16px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.site-header__link:hover {
  color: var(--linen);
}

.site-header__link:active {
  color: var(--mist);
}

/* Hero */

.hero {
  --focus: var(--linen);
  background: var(--indigo);
  color: var(--linen);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: var(--s5) var(--section);
  text-align: center;
}

.niche {
  position: relative;
  height: clamp(200px, 32vh, 280px);
  height: clamp(200px, 32svh, 280px);
  aspect-ratio: 160 / 212;
}

.niche__frame,
.niche__lotus {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.niche__lotus {
  animation: lotus-in 2400ms cubic-bezier(0.2, 0.6, 0.2, 1) 400ms both;
}

@keyframes lotus-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .niche__lotus {
    animation: none;
  }
}

.hero__title {
  max-width: 1000px;
  margin-top: var(--s6);
  color: var(--gold);
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero__lede {
  max-width: 34em;
  margin-top: var(--s4);
  color: var(--linen);
  text-wrap: balance;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s3);
  margin-top: var(--s6);
}

/* Section titles */

.section-title {
  max-width: 900px;
  margin-inline: auto;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.1;
  text-align: center;
  text-wrap: balance;
}

.section-title--on-dark {
  color: var(--gold);
}

.section-lede {
  max-width: 32em;
  margin: var(--s4) auto 0;
  text-align: center;
  text-wrap: balance;
}

/* How an episode works: the verse as a manuscript leaf */

.episode {
  padding-block: var(--section);
}

.leaf {
  max-width: 996px;
  margin: var(--s7) auto 0;
  padding: var(--s1);
  border: 1px solid var(--ink);
}

.leaf__inner {
  border: 1px solid var(--ink);
  padding: var(--s6) var(--s5);
  text-align: center;
}

.leaf__parts {
  display: grid;
  gap: var(--s6);
}

.leaf__part + .leaf__part {
  padding-top: var(--s6);
  border-top: 1px solid var(--rule);
}

.leaf__title {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
}

.leaf__meta {
  margin-top: var(--s1);
  color: var(--umber);
  font-size: 16px;
  line-height: 1.5;
}

.verse {
  margin-top: var(--s5);
  font-family: var(--sanskrit);
  font-size: 26px;
  line-height: 1.7;
}

.verse__speaker,
.verse__line,
.translit__line {
  display: block;
}

.verse__pada {
  display: inline-block;
}

.verse__speaker {
  color: var(--umber);
}

.translit {
  margin-top: var(--s4);
  color: var(--umber);
  font-size: 16px;
  line-height: 1.5;
  text-wrap: balance;
}

.meaning {
  max-width: 20em;
  margin: var(--s5) auto 0;
  font-family: var(--kannada);
  font-size: 22px;
  line-height: 1.7;
  text-wrap: pretty;
}

.leaf__gist {
  margin-top: var(--s6);
  padding-top: var(--s6);
  border-top: 1px solid var(--rule);
}

.gist {
  max-width: 32em;
  margin: var(--s2) auto 0;
  text-wrap: balance;
}

.episode__more {
  margin-top: var(--s5);
  text-align: center;
}

/* The series, on the cover ground */

.series {
  --focus: var(--linen);
  padding-block: var(--section);
  background: var(--cover);
  color: var(--linen);
}

.now {
  max-width: 640px;
  margin: var(--s7) auto 0;
  padding: var(--s1);
  border: 1px solid var(--gold);
}

.now__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s6) var(--s4);
  border: 1px solid var(--gold);
  text-align: center;
}

.now__label {
  color: var(--mist);
  font-size: 16px;
  line-height: 1.5;
}

.now__title {
  margin-top: var(--s2);
  color: var(--gold);
  font-size: 30px;
  line-height: 1.2;
}

.series__native {
  margin-top: var(--s1);
  color: var(--mist);
  font-family: var(--kannada);
  font-size: 20px;
  line-height: 1.6;
}

.series__detail {
  color: var(--mist);
  font-size: 16px;
  line-height: 1.5;
}

.now__line {
  margin-top: var(--s4);
  color: var(--linen);
}

.now .btn {
  margin-top: var(--s5);
}

.coming__title {
  display: flex;
  align-items: center;
  gap: var(--s4);
  max-width: 996px;
  margin: var(--s8) auto 0;
  color: var(--gold);
  font-size: 22px;
  line-height: 1.3;
  text-align: center;
}

.coming__title::before,
.coming__title::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--gold);
}

.coming {
  display: grid;
  gap: var(--s6) var(--s5);
  max-width: 996px;
  margin: var(--s7) auto 0;
  text-align: center;
}

.coming__name {
  color: var(--linen);
  font-family: var(--heading);
  font-size: 22px;
  line-height: 1.3;
}

/* Footer */

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: var(--s8) var(--s7);
  text-align: center;
}

.site-footer__logo {
  width: auto;
  height: 64px;
}

.site-footer__links {
  display: flex;
  gap: var(--s5);
  margin-top: var(--s6);
}

.site-footer__copy {
  margin-top: var(--s4);
  color: var(--umber);
  font-size: 16px;
  line-height: 1.5;
}

/* Desktop */

@media (min-width: 768px) {
  :root {
    --gutter: var(--s5);
    --section: var(--s9);
  }

  .site-header__inner {
    padding-block: var(--s5);
  }

  .site-header__logo img {
    height: 48px;
  }

  .hero__inner {
    padding-block: var(--s6) var(--section);
  }

  .niche {
    height: clamp(280px, 44vh, 460px);
    height: clamp(280px, 44svh, 460px);
  }

  .hero__title {
    font-size: 64px;
  }

  .hero__actions {
    gap: var(--s4);
  }

  .btn {
    padding: 0 var(--s6);
  }

  .section-title {
    font-size: 44px;
  }

  .leaf__inner {
    padding: var(--s7) 0;
  }

  .leaf__parts {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .leaf__part {
    padding-inline: var(--s7);
  }

  .leaf__part + .leaf__part {
    padding-top: 0;
    border-top: 0;
    border-left: 1px solid var(--rule);
  }

  .leaf__gist {
    margin-inline: var(--s7);
  }

  .now__inner {
    padding: var(--s7);
  }
}

@media (min-width: 960px) {
  .coming {
    grid-template-columns: repeat(3, 1fr);
    row-gap: var(--s7);
  }
}
