/* Astro Arpita Nath — indigo palette drawn from the batik blues of the
   founder's portrait: deep indigo, washed chambray and off-white. */

:root {
  --color-bg: #f6f8fc;
  --color-surface: #ffffff;
  --color-text: #16202e;
  --color-muted: #5b6878;
  --color-primary: #1a3763;
  --color-primary-hover: #102647;
  --color-border: #dde3ec;
  --color-accent: #4a6fa5;
  --color-accent-strong: #2f5488;
  /* Gold is kept purely for the Kundli button outline. */
  --color-gold: #d4af37;
  --color-gold-bright: #e8c65a;
  --color-tint: #e9eff8;
  --color-tint-light: #f4f8fd;
  --color-tint-border: #cfdcec;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(16, 36, 63, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* No italic type anywhere on the public site. */
address,
blockquote,
cite,
dfn,
em,
i,
var {
  font-style: normal;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.site-main {
  padding: var(--space-xl) 0;
}

body.page-home .site-main {
  padding-top: var(--space-md);
  padding-bottom: var(--space-lg);
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.25rem;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 1.05rem;
  padding-left: var(--space-md);
}

.site-logo__icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.site-logo__text {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  -webkit-tap-highlight-color: transparent;
}

.site-nav a:hover {
  color: var(--color-primary);
}

/* Header search (HinduCalculator-style) */
.site-nav__search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.site-nav__search-btn:hover,
.site-nav__search-btn:focus-visible {
  color: var(--color-primary);
  background: var(--color-bg);
}

.site-search[hidden] {
  display: none;
}

.site-search {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh var(--space-md) var(--space-md);
  overscroll-behavior: contain;
}

.site-search__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 25, 0.5);
}

.site-search__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.site-search__box {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.site-search__icon {
  flex: none;
  color: var(--color-muted);
}

.site-search__input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  font: inherit;
  font-size: 1.1rem;
  color: var(--color-text);
  background: transparent;
}

.site-search__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.5rem -0.5rem -0.5rem 0;
  border: none;
  background: transparent;
  color: var(--color-muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.site-search__close:hover {
  color: var(--color-primary);
}

.site-search__results {
  list-style: none;
  margin: 0;
  padding: var(--space-xs);
  max-height: 55vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.site-search__result-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 3rem;
  padding: var(--space-sm);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.site-search__result-link:hover,
.site-search__result-link.is-active {
  background: var(--color-bg);
}

.site-search__result-icon {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 2px;
  box-sizing: border-box;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.site-search__result-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.site-search__result-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.site-search__result-desc {
  font-size: 0.82rem;
  color: var(--color-muted);
}

.site-search__empty {
  padding: var(--space-md);
  color: var(--color-muted);
  font-size: 0.9rem;
  text-align: center;
}

body.site-search-open {
  overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Hamburger menu (desktop + mobile)                                   */
/* ------------------------------------------------------------------ */

.site-menu-wrap {
  position: relative;
  display: inline-flex;
}

.site-nav__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.site-nav__menu-btn:hover,
.site-nav__menu-btn:focus-visible {
  color: var(--color-primary);
  background: var(--color-bg);
}

.site-menu[hidden] {
  display: none;
}

.site-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 60;
  min-width: 16rem;
  max-height: calc(100vh - 4.5rem);
  max-height: calc(100svh - 4.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.4rem;
  background: #f3f7fd;
  border: 1px solid #d7e2f1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-menu > *,
.site-menu__group > *,
.site-submenu > * {
  flex-shrink: 0;
}

.site-menu .site-menu__item {
  display: block;
  min-height: 0;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  -webkit-tap-highlight-color: transparent;
}

.site-menu .site-menu__item:hover,
.site-menu .site-menu__item:focus-visible {
  color: var(--color-primary);
  background: #e4ecf8;
}

.site-menu__group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-menu .site-menu__parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.85rem;
  background: none;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius);
}

.site-menu .site-menu__parent:focus {
  outline: none;
}

.site-menu .site-menu__parent:hover,
.site-menu .site-menu__parent:focus-visible {
  color: var(--color-primary);
  background: #e4ecf8;
}

.site-menu .site-menu__parent:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.site-menu__chev {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -0.15rem;
  opacity: 0.7;
}

.site-menu__parent[aria-expanded="true"] .site-menu__chev {
  transform: rotate(-135deg);
  margin-top: 0.12rem;
}

.site-submenu[hidden] {
  display: none;
}

.site-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0.15rem 0 0.35rem 0.55rem;
  padding: 0.15rem 0 0.15rem 0.75rem;
  border-left: 2px solid #c9d8ec;
  list-style: none;
}

.site-menu .site-submenu__item {
  position: relative;
  display: block;
  min-height: 0;
  padding: 0.4rem 0.55rem 0.4rem 0.95rem;
  border-radius: var(--radius);
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.25;
  -webkit-tap-highlight-color: transparent;
}

.site-menu .site-submenu__item::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 50%;
  width: 0.35rem;
  height: 0.35rem;
  margin-top: -0.175rem;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.55;
}

.site-menu .site-submenu__item:hover,
.site-menu .site-submenu__item:focus-visible {
  color: var(--color-primary);
  background: #e4ecf8;
}

.site-menu .site-submenu__item:hover::before,
.site-menu .site-submenu__item:focus-visible::before {
  opacity: 1;
}

/* Members-only categories are open to browse; the crown flags the paid ones. */
.site-menu .site-submenu__item--members {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-submenu__crown {
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
  margin-left: auto;
  object-fit: contain;
}

/* Category heading inside the Articles submenu — also a link to the
   category listing, so it sits between a label and a menu item. */
.site-menu .site-submenu__head {
  display: block;
  margin: 0.35rem 0 0.1rem;
  padding: 0.3rem 0.6rem 0.15rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-muted);
  text-decoration: none;
}

.site-menu .site-submenu__head:first-child {
  margin-top: 0;
}

.site-menu .site-submenu__head--link:hover,
.site-menu .site-submenu__head--link:focus-visible {
  color: var(--color-primary);
}

/* ------------------------------------------------------------------ */
/* Typography & content                                                */
/* ------------------------------------------------------------------ */

.page-title {
  margin: 0 0 var(--space-xs);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* About page profile header — same pattern as hinducalculator.com/astrologer/ */
.about-head {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  margin: 0.5rem 0 1.5rem;
  flex-wrap: wrap;
}

.about-head__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-gold);
  flex: none;
  background: var(--color-tint-light);
}

.about-head__intro {
  min-width: 0;
}

.about-head__name {
  margin: 0 0 0.25rem;
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

.about-head__role {
  margin: 0 0 0.5rem;
  color: var(--color-muted);
  font-weight: 600;
}

.about-head__links {
  margin: 0;
  font-size: 0.9rem;
}

.about-head__links a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.about-head__links a:hover,
.about-head__links a:focus {
  text-decoration: underline;
}

.about-head__links span {
  margin: 0 0.4rem;
  color: #8a97a8;
}

.article-meta {
  margin: 0 0 var(--space-lg);
  font-size: 0.85rem;
  color: var(--color-muted);
}

.article-nav {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-muted);
}

.page-content {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.page-content h2 {
  margin: var(--space-xl) 0 var(--space-xs);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
}

.page-content h3 {
  margin: var(--space-lg) 0 var(--space-xs);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-text);
}

.page-content ul {
  padding-left: 1.25rem;
}

/* Category / article cards are not bullet lists — keep them flush with the
   notice and hero so left and right insets match. */
.page-content ul.link-cards {
  padding: 0;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

.page-content ul.link-cards > li {
  margin: 0;
  padding: 0;
}

.page-content li {
  margin-bottom: 0.35rem;
}

.page-content a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.page-content a:hover,
.page-content a:focus {
  text-decoration: underline;
}

/* Article body images only — every link-card icon keeps its own sizing. */
.page-content img:not([class*="link-card__"]) {
  display: block;
  width: 100%;
  max-width: 700px;
  height: auto;
  margin: var(--space-lg) auto;
  border-radius: var(--radius);
}

.btn-primary {
  display: inline-block;
  margin-top: var(--space-md);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.page-content a.btn-primary,
.page-content a.btn-primary:hover,
.page-content a.btn-primary:focus {
  color: #fff;
  text-decoration: none;
}

/* The Kundli call to action — indigo with a thick gold outline, the one warm
   accent kept in the palette. */
.btn-primary--accent {
  display: block;
  width: 100%;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  border: 4px solid var(--color-gold);
}

.btn-primary--accent:hover,
.btn-primary--accent:focus-visible {
  border-color: var(--color-gold-bright);
}

/* ------------------------------------------------------------------ */
/* Home hero + cards                                                   */
/* ------------------------------------------------------------------ */

.hero {
  margin: var(--space-md) 0 var(--space-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  background: var(--color-tint-light);
  border: 1px solid var(--color-tint-border);
  border-radius: 16px;
}

.hero__mark {
  width: 84px;
  height: 84px;
  margin-bottom: var(--space-sm);
}

.hero__title {
  margin: 0 0 0.25rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

.hero__tagline {
  margin: 0;
  font-size: 1rem;
  color: var(--color-muted);
}

.notice {
  margin: 0 0 var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-tint);
  border: 1px solid var(--color-tint-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
}

.notice__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.notice p {
  margin: 0;
  font-size: 0.95rem;
}

.notice a {
  color: var(--color-primary);
  font-weight: 600;
}

.notice--members {
  border-left-color: var(--color-primary);
}

.notice__crown {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.45rem;
  object-fit: contain;
  vertical-align: -0.2em;
}

.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  padding: 0;
  list-style: none;
}

.link-card {
  display: block;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.link-card--category {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--color-tint-light);
  border-color: var(--color-tint-border);
}

.link-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  object-fit: contain;
  display: block;
  background: transparent;
}

.link-card--category .link-card__title {
  flex: 1;
  min-width: 0;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  text-decoration: none;
}

/* A locked article is listed but does not open: tapping it raises the
   "Members Only" toast instead of navigating. */
div.link-card--locked {
  cursor: pointer;
}

div.link-card--locked:hover,
div.link-card--locked:focus-visible {
  border-color: var(--color-primary);
  transform: none;
}

.link-card__lock,
.link-card__crown {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin-left: auto;
  object-fit: contain;
}

.link-card__lock {
  opacity: 0.75;
}

/* "Members Only" toast raised by tapping a locked category. */
.locked-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* max-content, or shrink-to-fit would cap the pill at half the viewport. */
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(16, 36, 63, 0.32);
  opacity: 0;
  transform: translate(-50%, 0.6rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.locked-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.locked-toast__icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  .locked-toast {
    transition: none;
  }
}

.link-card__title {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary);
}

.link-card--post {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.link-card__post-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  max-width: 38px;
  max-height: 38px;
  object-fit: contain;
}

.link-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.link-card__desc {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.88rem;
  color: var(--color-muted);
  font-weight: 400;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.site-footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-footer__copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
  text-align: center;
}

.site-footer__fine {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--color-muted);
  text-align: center;
  line-height: 1.45;
}

.site-footer__fine a {
  color: var(--color-primary);
  text-decoration: none;
}

.site-footer__fine a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .site-menu {
    min-width: 14rem;
    right: 0;
  }

  .site-header__inner {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .site-logo {
    padding-left: 0;
    gap: 0.5rem;
    min-width: 0;
  }

  .site-logo__text {
    white-space: nowrap;
    font-size: 1.05rem;
  }

  .site-nav {
    gap: 0.1rem;
    flex-shrink: 0;
  }

  .site-nav__search-btn,
  .site-nav__menu-btn {
    width: 2.4rem;
    height: 2.4rem;
  }

  .site-search {
    padding: 6vh var(--space-sm) var(--space-sm);
  }

  .site-search__panel {
    max-width: none;
  }

  .hero {
    padding: var(--space-lg) var(--space-md);
  }

  .hero__title {
    font-size: 1.5rem;
  }

  .page-title {
    font-size: 1.45rem;
  }
}
