:root {
  --bg: #f7eee4;
  --bg-deep: #efdfd0;
  --bg-end: #f9f0e8;
  --surface: rgba(255, 249, 242, 0.78);
  --surface-solid: #fff9f3;
  --surface-alt: #f5e6da;
  --surface-soft: rgba(255, 250, 245, 0.74);
  --text: #241916;
  --muted: #69544d;
  --line: rgba(86, 51, 39, 0.15);
  --accent: #aa4f2d;
  --accent-strong: #7f2d2f;
  --gold: #d49a4e;
  --header-bg: rgba(253, 246, 239, 0.88);
  --nav-bg: rgba(255, 250, 245, 0.7);
  --nav-active: rgba(255, 243, 231, 0.95);
  --toggle-bg: rgba(255, 250, 245, 0.74);
  --toggle-inner: rgba(241, 227, 214, 0.72);
  --button-secondary-bg: rgba(255, 250, 245, 0.72);
  --panel-bg: linear-gradient(180deg, rgba(255, 250, 245, 0.92), rgba(248, 239, 232, 0.9));
  --panel-glow: radial-gradient(circle, rgba(212, 154, 78, 0.24), transparent 70%);
  --section-warm-bg: linear-gradient(180deg, rgba(240, 223, 208, 0.36), rgba(247, 238, 228, 0.1));
  --quote-bg: linear-gradient(135deg, rgba(127, 45, 47, 0.95), rgba(170, 79, 45, 0.94));
  --radial-one: rgba(212, 154, 78, 0.25);
  --radial-two: rgba(170, 79, 45, 0.18);
  --orb-one: rgba(116, 45, 55, 0.12);
  --orb-two: rgba(212, 154, 78, 0.12);
  --shadow: 0 24px 60px rgba(62, 31, 23, 0.12);
  --radius-xl: 2rem;
  --radius-lg: 1.5rem;
  --radius-md: 1.1rem;
  --max-width: 1160px;
}

body[data-theme="dark"] {
  --bg: #171312;
  --bg-deep: #201816;
  --bg-end: #120f0e;
  --surface: rgba(39, 31, 29, 0.82);
  --surface-solid: #1d1716;
  --surface-alt: #2a211f;
  --surface-soft: rgba(33, 27, 25, 0.84);
  --text: #f7efe7;
  --muted: #ccb9ac;
  --line: rgba(245, 227, 209, 0.14);
  --accent: #d27148;
  --accent-strong: #f09a70;
  --gold: #d8a45b;
  --header-bg: rgba(20, 16, 15, 0.88);
  --nav-bg: rgba(35, 28, 26, 0.82);
  --nav-active: rgba(68, 52, 48, 0.92);
  --toggle-bg: rgba(33, 27, 25, 0.84);
  --toggle-inner: rgba(67, 52, 48, 0.8);
  --button-secondary-bg: rgba(35, 28, 26, 0.88);
  --panel-bg: linear-gradient(180deg, rgba(35, 28, 26, 0.96), rgba(26, 21, 20, 0.94));
  --panel-glow: radial-gradient(circle, rgba(216, 164, 91, 0.18), transparent 72%);
  --section-warm-bg: linear-gradient(180deg, rgba(87, 60, 50, 0.28), rgba(23, 18, 17, 0.06));
  --quote-bg: linear-gradient(135deg, rgba(84, 42, 54, 0.96), rgba(126, 71, 52, 0.92));
  --radial-one: rgba(216, 164, 91, 0.14);
  --radial-two: rgba(210, 113, 72, 0.12);
  --orb-one: rgba(240, 154, 112, 0.1);
  --orb-two: rgba(216, 164, 91, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

html {
  scroll-behavior: smooth;
}

html[data-js="true"] body {
  visibility: hidden;
}

html[data-js="true"] body[data-i18n-ready="true"] {
  visibility: visible;
}

html[lang="pa"] body {
  font-family: "Noto Serif Gurmukhi", "Anek Gurmukhi", "Kohinoor Gurmukhi", "Raavi", serif;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif Gurmukhi", Georgia, serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, var(--radial-one), transparent 26%),
    radial-gradient(circle at 90% 12%, var(--radial-two), transparent 24%),
    linear-gradient(180deg, var(--surface-solid) 0%, var(--bg) 50%, var(--bg-end) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.85;
}

body::before {
  top: 7rem;
  right: -4rem;
  width: 14rem;
  height: 14rem;
  background: var(--orb-one);
}

body::after {
  left: -5rem;
  bottom: 10rem;
  width: 16rem;
  height: 16rem;
  background: var(--orb-two);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.narrow {
  max-width: 40rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff8f1;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: var(--shadow);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-tag {
  color: var(--muted);
  font-size: 0.88rem;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--nav-bg);
}

.site-nav a {
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.96rem;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--nav-active);
  transform: translateY(-1px);
}

.language-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.35rem 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--toggle-bg);
}

.language-prompt,
.theme-prompt {
  color: var(--muted);
  font-size: 0.88rem;
}

.language-buttons,
.theme-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.16rem;
  border-radius: 999px;
  background: var(--toggle-inner);
}

.lang-button,
.theme-button {
  min-width: 2.65rem;
  padding: 0.42rem 0.65rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.lang-button:hover,
.lang-button:focus-visible,
.theme-button:hover,
.theme-button:focus-visible {
  transform: translateY(-1px);
}

.lang-button.is-active,
.theme-button.is-active {
  color: #fffaf4;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 20px rgba(127, 45, 47, 0.18);
}

.hero,
.page-hero,
.section {
  padding: clamp(3.25rem, 7vw, 5.8rem) 0;
}

.hero-grid,
.page-hero-grid,
.section-head,
.cta-panel,
.footer-grid {
  display: grid;
  gap: 1.5rem 2rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  align-items: end;
}

.page-hero-grid {
  grid-template-columns: minmax(0, 1fr);
}

.section-head,
.cta-panel,
.footer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.page-hero-centered .container {
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(170, 79, 45, 0.16);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(255, 243, 231, 0.75);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.display,
.section-title {
  margin: 0;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.display {
  max-width: 12ch;
  font-size: clamp(2.9rem, 8vw, 6rem);
}

.section-title {
  max-width: 14ch;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.page-title {
  max-width: 16ch;
}

.lead,
.section-copy,
.card-copy,
.panel-copy,
.card-meta,
.footer-note,
.quote-credit {
  color: var(--muted);
}

.lead {
  max-width: 42rem;
  margin: 1.1rem 0 0;
  font-size: clamp(1.05rem, 2.5vw, 1.22rem);
}

.section-copy,
.cta-copy-wrap {
  max-width: 36rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.actions-centered {
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  color: #fffaf4;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: var(--shadow);
}

.button-secondary {
  background: var(--button-secondary-bg);
  border-color: var(--line);
}

.hero-panel,
.feature-card,
.collection-card,
.entry-card,
.quote-panel,
.cta-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.hero-panel,
.feature-card,
.collection-card,
.entry-card {
  padding: 1.5rem;
}

.quote-panel,
.cta-panel {
  padding: 1.8rem;
}

.letter-panel {
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.letter-title {
  max-width: none;
}

.letter-body {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.04rem, 2.2vw, 1.16rem);
  line-height: 1.95;
}

.letter-signoff {
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.letter-name,
.letter-meta {
  margin: 0;
}

.letter-name {
  font-weight: 700;
}

.letter-meta {
  margin-top: 0.2rem;
  color: var(--muted);
}

html[lang="pa"] body[data-title-key="pageTitleAbout"] .lead {
  font-size: clamp(1.14rem, 2.8vw, 1.34rem);
}

html[lang="pa"] body[data-title-key="pageTitleAbout"] .letter-body {
  font-size: clamp(1.14rem, 2.5vw, 1.3rem);
  line-height: 2.02;
}

.hero-panel::before,
.feature-card::before,
.collection-card::before,
.entry-card::before,
.quote-panel::before,
.cta-panel::before {
  content: "";
  position: absolute;
  inset: auto auto -3rem -3rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: var(--panel-glow);
  pointer-events: none;
}

.panel-kicker,
.card-kicker,
.card-number {
  margin: 0 0 0.8rem;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-title,
.collection-card h3,
.entry-card h3 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.1;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.chip-row li {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.92rem;
}

.feature-grid,
.collection-grid,
.entry-grid {
  display: grid;
  gap: 1.2rem;
}

.feature-grid,
.collection-grid,
.entry-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card-tall {
  transform: translateY(1.2rem);
}

.card-copy {
  margin: 0;
}

.card-meta {
  margin: auto 0 0;
  font-size: 0.95rem;
}

.collection-card,
.entry-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.text-link,
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.section-warm {
  background: var(--section-warm-bg);
}

.quote-section {
  padding: 0 0 clamp(3rem, 6vw, 5rem);
}

.quote-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: var(--quote-bg);
}

.quote-panel .eyebrow,
.quote-panel .quote-text,
.quote-panel .quote-credit {
  color: #fff7ef;
}

.quote-panel .eyebrow {
  border-color: rgba(255, 247, 239, 0.22);
  background: rgba(255, 247, 239, 0.08);
}

.quote-text {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.3rem);
  line-height: 1.04;
}

.footer-grid {
  padding: 1.2rem 0 2rem;
  align-items: center;
}

.footer-title {
  margin: 0;
  font-weight: 700;
}

.footer-note {
  margin: 0.35rem 0 0;
}

.site-footer {
  padding-top: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 720ms ease forwards;
  animation-delay: var(--delay, 0s);
}

section[id],
main[id] {
  scroll-margin-top: 7rem;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .header-row,
  .section-head,
  .cta-panel,
  .footer-grid,
  .hero-grid,
  .quote-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-tools {
    justify-content: flex-start;
  }

  .section-title,
  .display,
  .quote-text {
    max-width: none;
  }

  .feature-grid,
  .collection-grid,
  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card-tall {
    transform: none;
  }
}

@media (max-width: 720px) {
  body::before,
  body::after {
    width: 10rem;
    height: 10rem;
  }

  .header-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand lang theme"
      "nav nav nav";
    gap: 0.75rem;
    padding: 0.72rem 0;
    align-items: center;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
  }

  .header-tools {
    display: contents;
  }

  .brand-mark {
    width: 2.55rem;
    height: 2.55rem;
    font-size: 1.2rem;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-tag {
    font-size: 0.78rem;
  }

  .header-tools,
  .actions {
    width: 100%;
  }

  .site-nav {
    grid-area: nav;
    grid-column: 1 / -1;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.2rem;
    padding: 0.2rem;
    border-radius: 999px;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 0.52rem 0.75rem;
    font-size: 0.92rem;
    text-align: center;
  }

  .language-toggle,
  .theme-toggle {
    justify-self: end;
    align-self: center;
    width: auto;
    gap: 0;
    padding: 0.18rem;
    border-radius: 999px;
  }

  .language-toggle {
    grid-area: lang;
  }

  .theme-toggle {
    grid-area: theme;
  }

  .language-prompt,
  .theme-prompt {
    display: none;
  }

  .language-buttons,
  .theme-buttons {
    padding: 0.18rem;
  }

  .lang-button,
  .theme-button {
    min-width: 2.45rem;
    padding: 0.42rem 0.58rem;
  }

  .feature-grid,
  .collection-grid,
  .entry-grid {
    grid-template-columns: 1fr;
  }

  .actions .button {
    width: 100%;
  }

  .hero-panel,
  .feature-card,
  .collection-card,
  .entry-card,
  .quote-panel,
  .cta-panel {
    border-radius: 1.5rem;
  }
}

@media (max-width: 480px) {
  .brand-tag {
    display: none;
  }

  .header-row {
    column-gap: 0.35rem;
  }

  .site-nav a {
    padding: 0.48rem 0.68rem;
    font-size: 0.89rem;
  }

  .language-buttons,
  .theme-buttons {
    gap: 0.15rem;
    padding: 0.15rem;
  }

  .lang-button,
  .theme-button {
    min-width: 2.25rem;
    padding: 0.38rem 0.52rem;
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .lang-button,
  .button,
  .site-nav a {
    animation: none;
    transition: none;
    transform: none;
    opacity: 1;
  }
}
