:root {
  --ink: #171615;
  --paper: #f8f4ea;
  --paper-deep: #eee2cf;
  --charcoal: #111719;
  --night: #10232b;
  --teal: #0d6f72;
  --teal-dark: #084b4f;
  --saffron: #f4a92d;
  --marigold: #d96f22;
  --copper: #9b4e24;
  --white: #fffaf0;
  --muted: #696158;
  --line: rgba(23, 22, 21, 0.14);
  --shadow: 0 20px 55px rgba(17, 23, 25, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 6vw;
  color: var(--white);
  background: rgba(17, 23, 25, 0.38);
  border-bottom: 1px solid rgba(255, 250, 240, 0.16);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 2px solid var(--saffron);
  border-radius: 50%;
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 4px;
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: var(--white);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  height: 3px;
  border-radius: 999px;
  background: var(--teal);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(255, 250, 240, 0.9);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 250, 240, 0.12);
  color: var(--white);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.1);
  color: var(--white);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.hero {
  position: relative;
  display: grid;
  min-height: 88svh;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  z-index: -2;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 12, 12, 0.84), rgba(10, 12, 12, 0.46) 45%, rgba(10, 12, 12, 0.1)),
    linear-gradient(0deg, rgba(10, 12, 12, 0.88), rgba(10, 12, 12, 0.08) 45%, rgba(10, 12, 12, 0.24));
}

.hero-content {
  align-self: end;
  max-width: 760px;
  padding: 126px 6vw 118px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--saffron);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.8rem;
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.75rem;
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 250, 240, 0.9);
  font-size: 1.16rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
.download-link,
.pack-link,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button {
  padding: 12px 18px;
}

.button-primary {
  background: var(--saffron);
  color: #21160a;
  box-shadow: 0 10px 34px rgba(244, 169, 45, 0.28);
}

.button-secondary {
  border: 1px solid rgba(255, 250, 240, 0.34);
  background: rgba(255, 250, 240, 0.12);
  color: var(--white);
}

.button-secondary.light {
  border-color: var(--line);
  background: var(--white);
  color: var(--night);
}

.button:hover,
.download-link:hover,
.pack-link:hover,
.copy-button:hover,
.seva-button:hover {
  transform: translateY(-1px);
}

.button-icon,
.seva-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
}

.hero-ribbon {
  position: absolute;
  left: 6vw;
  right: 6vw;
  bottom: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 250, 240, 0.2);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.13);
  backdrop-filter: blur(10px);
}

.hero-ribbon span {
  min-width: 0;
  padding: 13px 16px;
  color: rgba(255, 250, 240, 0.94);
  background: rgba(17, 23, 25, 0.35);
  font-weight: 800;
  text-align: center;
}

.section {
  padding: 84px 0;
}

.section-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.aarti-section {
  background: var(--paper);
}

.aarti-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
}

.aarti-copy {
  display: grid;
  align-content: center;
  min-height: 360px;
  padding: 38px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(17, 23, 25, 0.08);
}

.aarti-copy h2 {
  color: var(--night);
}

.aarti-copy p {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
}

.aarti-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.aarti-card {
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 360px;
  padding: 28px;
  border-radius: 8px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(16, 35, 43, 0.98), rgba(8, 75, 79, 0.94)),
    radial-gradient(circle at top right, rgba(244, 169, 45, 0.34), transparent 34%);
  box-shadow: var(--shadow);
}

.aarti-card pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255, 250, 240, 0.92);
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  line-height: 1.75;
}

.darshan-section {
  background: var(--charcoal);
  color: var(--white);
}

.darshan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 40px;
  align-items: center;
}

.darshan-visual {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.darshan-visual img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
}

.lamp {
  position: absolute;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50% 50% 44% 44%;
  background: radial-gradient(circle at 50% 18%, #ffe8a8, #c97118 42%, #442313 76%);
  box-shadow: 0 0 36px rgba(244, 169, 45, 0.65);
}

.lamp-left {
  left: 24px;
}

.lamp-right {
  right: 24px;
}

.flame {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 17px;
  height: 31px;
  border-radius: 50% 50% 50% 0;
  background: radial-gradient(circle at 45% 70%, #fff7bc 0 22%, #ffb234 48%, #ec5e22 72%);
  transform: translateX(-50%) rotate(-45deg);
  animation: flicker 1.5s infinite ease-in-out;
}

.wick {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 4px;
  height: 12px;
  background: #21160a;
  border-radius: 999px;
  transform: translateX(-50%);
}

@keyframes flicker {
  0%,
  100% {
    transform: translateX(-50%) rotate(-45deg) scale(1);
  }
  50% {
    transform: translateX(-48%) rotate(-40deg) scale(0.92, 1.08);
  }
}

.offering-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.offering-petal {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 18px;
  border-radius: 80% 20% 80% 20%;
  background: var(--marigold);
  opacity: 0.92;
  animation: petalFall 2.4s ease-in forwards;
}

@keyframes petalFall {
  to {
    transform: translate3d(var(--drift), 520px, 0) rotate(280deg);
    opacity: 0;
  }
}

.darshan-panel {
  padding: 32px;
  border: 1px solid rgba(255, 250, 240, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.07);
}

.section-copy {
  margin: 18px 0 0;
  color: rgba(255, 250, 240, 0.74);
  font-size: 1rem;
}

.darshan-status {
  display: grid;
  gap: 4px;
  margin: 26px 0;
  padding: 18px;
  border-left: 4px solid var(--saffron);
  background: rgba(255, 250, 240, 0.08);
  border-radius: 8px;
}

.status-label {
  color: rgba(255, 250, 240, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seva-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.seva-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 250, 240, 0.2);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.08);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.seva-button:focus-visible,
.button:focus-visible,
.download-link:focus-visible,
.pack-link:focus-visible,
.copy-button:focus-visible,
.filter-tab:focus-visible {
  outline: 3px solid rgba(244, 169, 45, 0.55);
  outline-offset: 2px;
}

.mantra-meter {
  margin-top: 24px;
}

.meter-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 250, 240, 0.84);
  font-size: 0.95rem;
  font-weight: 800;
}

.meter-track {
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.16);
}

.meter-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--saffron), #74d3c8);
  transition: width 0.2s ease;
}

.rhythm-section {
  background: var(--paper-deep);
}

.rhythm-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.rhythm-grid h2 {
  color: var(--night);
}

.rhythm-item {
  min-height: 168px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.rhythm-item span {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--teal-dark);
  font-weight: 900;
}

.rhythm-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.rhythm-item p {
  margin: 0;
  color: var(--muted);
}

.downloads-section {
  background: var(--paper);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.downloads-section .section-heading h2,
.hymns-section .section-heading h2 {
  color: var(--night);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tab {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--night);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filter-tab.is-active {
  border-color: transparent;
  background: var(--night);
  color: var(--white);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.download-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(17, 23, 25, 0.08);
}

.download-card.is-hidden {
  display: none;
}

.download-card img,
.hymn-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.download-card img {
  object-fit: cover;
}

.hymn-preview {
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(13, 111, 114, 0.94), rgba(17, 23, 25, 0.92)),
    radial-gradient(circle at top right, rgba(244, 169, 45, 0.5), transparent 34%);
  text-align: center;
}

.hymn-preview.aarti-preview {
  background:
    linear-gradient(135deg, rgba(155, 78, 36, 0.94), rgba(17, 23, 25, 0.92)),
    radial-gradient(circle at top right, rgba(244, 169, 45, 0.48), transparent 38%);
}

.hymn-preview span,
.hymn-preview strong {
  display: block;
}

.hymn-preview span {
  color: var(--saffron);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hymn-preview strong {
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  line-height: 1.05;
}

.download-body {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.tag {
  color: var(--copper);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.download-body p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
}

.download-link {
  justify-self: start;
  padding: 10px 13px;
  background: var(--teal-dark);
  color: var(--white);
}

.pack-link {
  justify-content: space-between;
  width: 100%;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 8px;
  background: var(--night);
  color: var(--white);
  box-shadow: var(--shadow);
}

.hymns-section {
  background: var(--white);
}

.narrow {
  max-width: 420px;
  color: var(--muted);
}

.hymn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hymn-card {
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 300px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdf9f0;
}

.hymn-card pre {
  min-height: 116px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #2a2520;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.7;
}

.copy-button {
  justify-self: start;
  min-height: 40px;
  padding: 9px 13px;
  border: 0;
  background: var(--saffron);
  color: #21160a;
  font: inherit;
}

.site-footer {
  padding: 26px 0;
  background: var(--charcoal);
  color: rgba(255, 250, 240, 0.82);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 800;
}

@media (max-width: 980px) {
  h1 {
    font-size: 3.7rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .darshan-layout,
  .aarti-layout,
  .rhythm-grid,
  .download-grid,
  .hymn-grid {
    grid-template-columns: 1fr 1fr;
  }

  .darshan-panel {
    grid-column: 1 / -1;
  }

  .aarti-copy {
    min-height: auto;
  }

  .rhythm-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 12px 20px;
  }

  .brand span:last-child {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 20px;
    right: 20px;
    display: none;
    padding: 10px;
    border: 1px solid rgba(255, 250, 240, 0.18);
    border-radius: 8px;
    background: rgba(17, 23, 25, 0.96);
  }

  .site-header.nav-open .site-nav {
    display: grid;
  }

  .site-nav a {
    padding: 12px;
  }

  .hero {
    min-height: 86svh;
  }

  .hero-content {
    padding: 102px 20px 126px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-ribbon {
    left: 20px;
    right: 20px;
    grid-template-columns: 1fr;
  }

  .hero-ribbon span {
    padding: 9px 12px;
    font-size: 0.88rem;
  }

  .section {
    padding: 62px 0;
  }

  .section-inner {
    width: min(100% - 32px, 1180px);
  }

  .darshan-layout,
  .aarti-layout,
  .rhythm-grid,
  .download-grid,
  .hymn-grid {
    grid-template-columns: 1fr;
  }

  .darshan-visual,
  .darshan-visual img {
    min-height: 330px;
  }

  .darshan-panel {
    padding: 24px;
  }

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

  .download-body p {
    min-height: 0;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .hero-actions {
    display: grid;
  }

  .button,
  .pack-link {
    width: 100%;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .filter-tabs {
    width: 100%;
  }

  .filter-tab {
    flex: 1 1 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
