/*
 * Haripath — Material Design 3 theme
 * Colour scheme generated from a teal seed (close to the original MDL teal/blue theme).
 * Used together with Material Web components (@material/web).
 */

:root {
  color-scheme: light dark;

  /* ---------- Light scheme ---------- */
  --md-sys-color-primary: #006a60;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #74f8e5;
  --md-sys-color-on-primary-container: #00201c;
  --md-sys-color-secondary: #4a635f;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #cce8e2;
  --md-sys-color-on-secondary-container: #05201c;
  --md-sys-color-tertiary: #456179;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #cce5ff;
  --md-sys-color-on-tertiary-container: #001e31;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-background: #f8faf8;
  --md-sys-color-on-background: #191c1b;
  --md-sys-color-surface: #f8faf8;
  --md-sys-color-on-surface: #191c1b;
  --md-sys-color-surface-variant: #dae5e1;
  --md-sys-color-on-surface-variant: #3f4947;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f2f4f2;
  --md-sys-color-surface-container: #eceeec;
  --md-sys-color-surface-container-high: #e6e9e7;
  --md-sys-color-surface-container-highest: #e1e3e1;
  --md-sys-color-outline: #6f7977;
  --md-sys-color-outline-variant: #bec9c6;
  --md-sys-color-shadow: #000000;
  --md-sys-color-scrim: #000000;
  --md-sys-color-inverse-surface: #2d3130;
  --md-sys-color-inverse-on-surface: #eff1ef;
  --md-sys-color-inverse-primary: #53dbc9;

  /* ---------- Typography ---------- */
  --md-ref-typeface-brand: 'Roboto', 'Noto Sans Devanagari', system-ui, sans-serif;
  --md-ref-typeface-plain: 'Roboto', 'Noto Sans Devanagari', system-ui, sans-serif;

  /* ---------- Shape ---------- */
  --hp-radius-card: 16px;
  --hp-content-width: 860px;
  --hp-app-bar-height: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --md-sys-color-primary: #53dbc9;
    --md-sys-color-on-primary: #003731;
    --md-sys-color-primary-container: #005048;
    --md-sys-color-on-primary-container: #74f8e5;
    --md-sys-color-secondary: #b1ccc6;
    --md-sys-color-on-secondary: #1c3531;
    --md-sys-color-secondary-container: #334b47;
    --md-sys-color-on-secondary-container: #cce8e2;
    --md-sys-color-tertiary: #adcae5;
    --md-sys-color-on-tertiary: #153349;
    --md-sys-color-tertiary-container: #2d4961;
    --md-sys-color-on-tertiary-container: #cce5ff;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-on-error: #690005;
    --md-sys-color-background: #101413;
    --md-sys-color-on-background: #e0e3e1;
    --md-sys-color-surface: #101413;
    --md-sys-color-on-surface: #e0e3e1;
    --md-sys-color-surface-variant: #3f4947;
    --md-sys-color-on-surface-variant: #bec9c6;
    --md-sys-color-surface-container-lowest: #0b0f0e;
    --md-sys-color-surface-container-low: #191c1b;
    --md-sys-color-surface-container: #1d201f;
    --md-sys-color-surface-container-high: #272b2a;
    --md-sys-color-surface-container-highest: #323534;
    --md-sys-color-outline: #899390;
    --md-sys-color-outline-variant: #3f4947;
    --md-sys-color-inverse-surface: #e0e3e1;
    --md-sys-color-inverse-on-surface: #2d3130;
    --md-sys-color-inverse-primary: #006a60;
  }
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: var(--md-ref-typeface-plain);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--md-sys-color-primary); }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; }

/* Hide Material Web elements until the library has loaded to avoid a flash of raw markup */
md-text-button:not(:defined),
md-filled-tonal-button:not(:defined),
md-icon-button:not(:defined),
md-list:not(:defined) {
  visibility: hidden;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  z-index: 100;
}
.skip-link:focus { top: 8px; }

/* ---------- Top app bar (M3 small top app bar) ---------- */
.top-app-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--hp-app-bar-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 0 8px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  transition: background-color 200ms linear, box-shadow 200ms linear;
}
.top-app-bar.is-scrolled {
  background: var(--md-sys-color-surface-container);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.15), 0 1px 3px 1px rgb(0 0 0 / 0.08);
}

.top-app-bar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  padding: 0 8px;
}
.top-app-bar__brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.top-app-bar__title {
  margin: 0;
  font: 400 22px/28px var(--md-ref-typeface-brand);
  letter-spacing: 0;
}

.top-app-bar__spacer { flex: 1; }

.top-app-bar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-app-bar__nav md-text-button[aria-current="page"] {
  --md-text-button-label-text-color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
  border-radius: 20px;
}

.play-badge-link {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}
.play-badge-link img { display: block; height: auto; }
.top-app-bar__nav .play-badge-link img { width: 150px; }

.top-app-bar__menu { display: none; }

@media (max-width: 839px) {
  .top-app-bar__nav { display: none; }
  .top-app-bar__menu { display: inline-flex; }
}

/* ---------- Navigation drawer (modal, M3) ---------- */
.nav-drawer {
  margin: 0;
  padding: 12px;
  height: 100%;
  max-height: none;
  width: min(360px, 85vw);
  border: none;
  border-radius: 0 16px 16px 0;
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
}
.nav-drawer::backdrop { background: rgb(0 0 0 / 0.32); }
.nav-drawer[open] { animation: drawer-in 250ms cubic-bezier(0.2, 0, 0, 1); }
@keyframes drawer-in { from { transform: translateX(-100%); } }

.nav-drawer__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 16px 16px;
}
.nav-drawer__header img { width: 40px; height: 40px; object-fit: contain; }
.nav-drawer__header span {
  flex: 1;
  font: 500 22px/28px var(--md-ref-typeface-brand);
}
.nav-drawer md-list {
  --md-list-container-color: transparent;
}
.nav-drawer md-list-item {
  border-radius: 28px;
  overflow: hidden;
}
.nav-drawer md-list-item[aria-current="page"] {
  background: var(--md-sys-color-secondary-container);
  --md-list-item-label-text-color: var(--md-sys-color-on-secondary-container);
}
.nav-drawer__badge { padding: 16px; }
.nav-drawer__badge img { width: 180px; }

/* ---------- Main content ---------- */
main {
  flex: 1;
  width: 100%;
  padding: 48px 16px;
}

.content {
  max-width: var(--hp-content-width);
  margin: 0 auto;
}

/* Elevated card (M3) */
.card {
  position: relative;
  border-radius: var(--hp-radius-card);
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
  padding: 40px;
  --md-elevation-level: 1;
}
.card md-elevation { border-radius: inherit; }

@media (max-width: 599px) {
  main { padding: 24px 12px; }
  .card { padding: 24px 20px; }
}

.hero { text-align: center; }

.hero__title {
  margin: 0 0 24px;
  font: 400 36px/44px 'Noto Serif Devanagari', var(--md-ref-typeface-brand);
  color: var(--md-sys-color-primary);
}

.hero__body {
  margin: 0;
  font: 400 18px/28px var(--md-ref-typeface-plain);
  color: var(--md-sys-color-on-surface-variant);
}
.hero__body strong { color: var(--md-sys-color-on-surface); font-weight: 500; }

/* Google Play call-to-action band */
.cta-band {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}
.cta-band .play-badge-link img { width: 260px; }

/* ---------- Long-form documents (privacy policy, terms, FAQ) ---------- */
.doc h1 {
  margin: 0 0 24px;
  font: 400 32px/40px var(--md-ref-typeface-brand);
  color: var(--md-sys-color-on-surface);
}
.doc h2 {
  margin: 32px 0 8px;
  font: 500 22px/28px var(--md-ref-typeface-brand);
  color: var(--md-sys-color-primary);
}
.doc h3 {
  margin: 32px 0 8px;
  font: 500 16px/24px var(--md-ref-typeface-brand);
  letter-spacing: 0.15px;
}
.doc p, .doc li {
  font: 400 16px/24px var(--md-ref-typeface-plain);
  letter-spacing: 0.5px;
  color: var(--md-sys-color-on-surface-variant);
}
.doc ul { padding-left: 24px; }

/* ---------- FAQ (M3 expandable list) ---------- */
.faq-intro { margin: 0 0 8px; }
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq {
  border-radius: 12px;
  background: var(--md-sys-color-surface-container);
  transition: background-color 150ms linear;
}
.faq[open] { background: var(--md-sys-color-surface-container-high); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 16px 12px 20px;
  cursor: pointer;
  list-style: none;
  border-radius: 12px;
  font: 500 16px/24px var(--md-ref-typeface-plain);
  letter-spacing: 0.15px;
  color: var(--md-sys-color-on-surface);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 2px solid var(--md-sys-color-on-surface-variant);
  border-bottom: 2px solid var(--md-sys-color-on-surface-variant);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
}
.faq[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq summary:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.faq summary:focus-visible {
  outline: 3px solid var(--md-sys-color-secondary);
  outline-offset: 2px;
}
.faq__answer { padding: 0 20px 16px; }
.faq__answer > :first-child { margin-top: 0; }
.faq__answer > :last-child { margin-bottom: 0; }
.faq-contact {
  margin-top: 40px;
  padding: 24px;
  border-radius: 16px;
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  text-align: center;
}
.doc .faq-contact h2 { margin-top: 0; color: inherit; }
.doc .faq-contact p { color: inherit; margin: 0 0 16px; }
.contact-button {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 24px;
  border-radius: 20px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font: 500 14px/20px var(--md-ref-typeface-plain);
  letter-spacing: 0.1px;
  text-decoration: none;
  transition: box-shadow 150ms linear;
}
.contact-button:hover { box-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 1px 3px 1px rgb(0 0 0 / 0.15); }
.contact-button:focus-visible { outline: 3px solid var(--md-sys-color-secondary); outline-offset: 2px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
  padding: 40px 24px 24px;
}
.site-footer__grid {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}
.site-footer h2 {
  margin: 0 0 12px;
  font: 500 14px/20px var(--md-ref-typeface-brand);
  letter-spacing: 0.1px;
  color: var(--md-sys-color-on-surface);
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li { margin: 0 0 8px; }
.site-footer a {
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  font: 400 14px/20px var(--md-ref-typeface-plain);
  letter-spacing: 0.25px;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
}
.site-footer md-divider { max-width: 1040px; margin: 32px auto 16px; }
.site-footer__copyright {
  max-width: 1040px;
  margin: 0 auto;
  font: 400 12px/16px var(--md-ref-typeface-plain);
  letter-spacing: 0.4px;
}
