/* =========================================
   BHARAT DARSHAN - STYLESHEET
   Theme: Indian heritage, cream, red & saffron
   ========================================= */

:root {
  --cream: #fffaf0;
  --paper: #fffdf8;
  --red: #8f1d1d;
  --red-dark: #641414;
  --red-soft: #b83a2f;
  --saffron: #e69a25;
  --gold: #d7a64a;
  --ink: #292321;
  --muted: #756b63;
  --line: #eadfd0;
  --shadow: 0 14px 38px rgba(75, 35, 20, 0.09);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", "Noto Sans Devanagari", sans-serif;
  line-height: 1.65;
}

body,
button,
input,
select {
  font-family: "DM Sans", "Noto Sans Devanagari", sans-serif;
}

button,
input,
select {
  font-size: inherit;
}

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

button,
select {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(230, 154, 37, 0.55);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header and navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 76px;
  padding: 0 clamp(18px, 6vw, 84px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 253, 248, 0.96);
  border-bottom: 1px solid rgba(143, 29, 29, 0.09);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--red);
  font-family: "Playfair Display", serif;
  font-size: 1.42rem;
  font-weight: 700;
  white-space: nowrap;
}

.brand strong {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  background: var(--red);
  font-family: sans-serif;
  font-size: 1.15rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 34px);
}

.main-nav > a {
  color: #51453e;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.main-nav > a:hover {
  color: var(--red);
}

.language-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.language-control select {
  max-width: 112px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--red);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--red);
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 440px;
  padding: 76px clamp(22px, 9vw, 130px) 84px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 204, 113, 0.25), transparent 26%),
    linear-gradient(118deg, #741717 0%, #9d2920 56%, #bd542b 100%);
  color: #fffaf0;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--saffron);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.5;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd78d;
}

.hero h1,
.section-heading h2,
.section-title-row h2,
.about-inner h2 {
  margin: 0;
  font-family: "Playfair Display", "Noto Sans Devanagari", serif;
  font-weight: 700;
  line-height: 1.14;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(2.55rem, 6vw, 5rem);
  letter-spacing: -0.035em;
}

.hero-description {
  max-width: 620px;
  margin: 20px 0 28px;
  color: rgba(255, 250, 240, 0.88);
  font-size: clamp(1rem, 1.5vw, 1.13rem);
}

.search-form {
  display: flex;
  width: min(100%, 650px);
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 13px;
  background: white;
  box-shadow: 0 12px 30px rgba(48, 9, 9, 0.2);
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-form input::placeholder {
  color: #94877e;
}

.search-form button {
  padding: 12px 25px;
  border: 0;
  border-radius: 9px;
  background: var(--saffron);
  color: #381b0c;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-form button:hover {
  background: #f3b54d;
  transform: translateY(-1px);
}

.search-hint {
  min-height: 22px;
  margin: 9px 0 0 4px;
  color: #ffe7c0;
  font-size: 0.85rem;
}

.hero-decoration {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 auto;
  width: 42%;
  pointer-events: none;
  opacity: 0.17;
}

.mandala {
  position: absolute;
  color: #ffe1a4;
  line-height: 1;
  user-select: none;
}

.mandala-one {
  top: 15%;
  right: 12%;
  font-size: clamp(150px, 24vw, 340px);
}

.mandala-two {
  right: 55%;
  bottom: 8%;
  font-size: clamp(70px, 10vw, 150px);
}

.mandala-three {
  top: 12%;
  right: 62%;
  font-size: clamp(55px, 8vw, 110px);
}

/* Intro */

.intro-section {
  padding: 68px 22px 32px;
  text-align: center;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto;
}

.section-heading h2,
.section-title-row h2,
.about-inner h2 {
  color: var(--red-dark);
  font-size: clamp(1.8rem, 3.5vw, 2.65rem);
}

.section-heading > p:last-child {
  margin: 13px 0 0;
  color: var(--muted);
}

/* Directories */

.directory-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 48px) 65px;
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-title-row .eyebrow {
  margin-bottom: 7px;
}

.item-count {
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid #ecd9bd;
  border-radius: 999px;
  background: #fff4df;
  color: #895019;
  font-size: 0.83rem;
  font-weight: 700;
}

.state-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.state-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 4px 14px rgba(75, 35, 20, 0.035);
  color: var(--ink);
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.state-card:hover {
  transform: translateY(-3px);
  border-color: #d9a66b;
  box-shadow: var(--shadow);
}

.state-card:focus-visible {
  outline: 3px solid rgba(230, 154, 37, 0.55);
  outline-offset: 2px;
}

.state-card-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: #fff0dc;
  color: var(--red);
  font-size: 1.1rem;
}

.state-card-name {
  font-weight: 700;
  line-height: 1.35;
}

.state-card-arrow {
  margin-left: auto;
  color: #b28b69;
  font-size: 1.1rem;
}

.loading-message,
.empty-message {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed #d9c8b4;
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

/* State profile area, populated by JavaScript */

.profile-section {
  max-width: 1150px;
  margin: 0 auto 64px;
  padding: 0 clamp(20px, 5vw, 48px);
}

.profile-section[hidden] {
  display: none;
}

.profile-placeholder,
.state-profile {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.profile-placeholder {
  text-align: center;
}

.profile-placeholder h2,
.state-profile h2 {
  margin: 0;
  color: var(--red-dark);
  font-family: "Playfair Display", "Noto Sans Devanagari", serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.2;
}

.profile-placeholder p:last-child {
  color: var(--muted);
}

.state-profile-intro {
  max-width: 780px;
  margin: 12px 0 26px;
  color: var(--muted);
}

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

.profile-fact {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffaf2;
}

.profile-fact h3 {
  margin: 0 0 7px;
  color: var(--red);
  font-size: 1rem;
}

.profile-fact p {
  margin: 0;
  color: #514740;
}

/* Union territories */

.union-section {
  padding-top: 35px;
  border-top: 1px solid var(--line);
}

.ut-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* About */

.about-section {
  padding: 70px 22px;
  background: #f5ead9;
}

.about-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-inner > p:last-child {
  max-width: 700px;
  margin: 17px auto 0;
  color: #68594e;
}

/* Footer */

.site-footer {
  padding: 35px 20px 28px;
  background: #451414;
  color: #f9ead5;
  text-align: center;
}

.footer-brand {
  font-family: "Playfair Display", serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.site-footer p {
  margin: 5px 0 14px;
  color: rgba(249, 234, 213, 0.76);
  font-size: 0.9rem;
}

.site-footer small {
  color: rgba(249, 234, 213, 0.58);
}

/* Responsive layout */

@media (max-width: 900px) {
  .state-grid,
  .ut-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-decoration {
    width: 34%;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 72px;
  }

  .site-header {
    min-height: 68px;
    padding: 0 18px;
  }

  .brand {
    font-size: 1.25rem;
  }

  .brand-mark {
    width: 33px;
    height: 33px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 10px 18px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 12px 20px rgba(55, 30, 15, 0.09);
  }

  .main-nav.is-open {
    display: flex;
    flex-direction: column;
  }

  .main-nav > a {
    padding: 12px 4px;
    border-bottom: 1px solid #f1e8dc;
  }

  .language-control {
    justify-content: space-between;
    margin-top: 12px;
    padding: 12px 4px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hero {
    min-height: 420px;
    padding: 62px 22px 64px;
  }

  .hero h1 {
    max-width: 540px;
    font-size: clamp(2.35rem, 11vw, 3.5rem);
  }

  .hero-description {
    max-width: 520px;
  }

  .hero-decoration {
    width: 45%;
    opacity: 0.11;
  }

  .search-form {
    gap: 4px;
  }

  .search-form input {
    padding: 12px 9px;
    font-size: 0.9rem;
  }

  .search-form button {
    padding: 11px 15px;
  }

  .intro-section {
    padding-top: 54px;
  }

  .directory-section {
    padding: 38px 18px 48px;
  }

  .section-title-row {
    align-items: start;
  }

  .section-title-row h2 {
    font-size: 1.8rem;
  }

  .state-grid,
  .ut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .state-card {
    min-height: 70px;
    gap: 9px;
    padding: 12px 10px;
  }

  .state-card-icon {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  .state-card-name {
    font-size: 0.88rem;
  }

  .state-card-arrow {
    font-size: 0.95rem;
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .about-section {
    padding: 55px 22px;
  }
}

@media (max-width: 360px) {
  .brand {
    font-size: 1.1rem;
  }

  .state-grid,
  .ut-grid {
    grid-template-columns: 1fr;
  }

  .section-title-row {
    flex-direction: column;
    gap: 10px;
  }

  .search-form button {
    padding-inline: 12px;
  }
}

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