/* ============================================================
   LOKAVIDU — main.css
   Colors: bg #F9F3EB | text #131412 | gold #C7A358
           warm-mid #E8DDD0 | muted #6B6560
   Fonts: Libre Baskerville (headings) | Source Sans 3 (body)
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --color-bg:       #F9F3EB;
  --color-text:     #131412;
  --color-gold:     #C7A358;
  --color-warm-mid: #E8DDD0;
  --color-muted:    #6B6560;
  --font-heading:   'Libre Baskerville', Georgia, serif;
  --font-body:      'Source Sans 3', system-ui, sans-serif;
  --max-prose:      780px;
  --max-layout:     1140px;
  --nav-height:     68px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Base --- */
html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.7;
}

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

a {
  color: var(--color-gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

/* --- Typography Scale --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: 2.5rem;  margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; margin-top: 2.5rem; }
h3 { font-size: 1.3rem;  margin-bottom: 0.5rem;  margin-top: 1.75rem; }
h4 { font-size: 1.05rem; margin-bottom: 0.4rem;  margin-top: 1.25rem; }

p { margin-bottom: 1.1rem; }

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-warm-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: var(--nav-height);
}

.nav-logo img {
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
  line-height: 1;
  padding: 0.25rem;
}

/* ============================================================
   HERO — homepage (520px)
   ============================================================ */
.hero {
  position: relative;
  height: 520px;
  margin-top: var(--nav-height);
  overflow: hidden;
}

.hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(19, 20, 18, 0.80) 0%,
    rgba(19, 20, 18, 0.45) 50%,
    rgba(19, 20, 18, 0.15) 100%
  );
  z-index: 1;
}

.hero-text {
  position: absolute;
  bottom: 15%;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-text h1 {
  color: #F9F3EB;
  font-size: 3.5rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.hero-sub {
  color: var(--color-warm-mid);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-bottom: 0;
}

/* ============================================================
   HERO INNER — inner pages (400px)
   ============================================================ */
.hero-inner {
  position: relative;
  height: 400px;
  margin-top: var(--nav-height);
  overflow: hidden;
}

.hero-inner > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(19, 20, 18, 0.52);
  z-index: 1;
}

.hero-inner-text {
  position: absolute;
  bottom: 12%;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-inner-text h1 {
  color: #F9F3EB;
  font-size: 2.25rem;
  margin-bottom: 0;
}

.hero-inner-text .section-label {
  color: var(--color-warm-mid);
  margin-bottom: 0.5rem;
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.section {
  padding: 4rem 1.5rem;
}

.section-inner {
  max-width: var(--max-layout);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  margin-top: 0;
}

.section-header p {
  color: var(--color-muted);
  max-width: 60ch;
  margin-bottom: 0;
}

.section-alt {
  background: var(--color-warm-mid);
}

/* ============================================================
   ARTICLE / PROSE CONTENT
   ============================================================ */
.article-content {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.article-content h2 {
  border-top: 1px solid var(--color-warm-mid);
  padding-top: 2.25rem;
}

.article-content h2:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.lead {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--color-muted);
  border-left: 3px solid var(--color-gold);
  padding-left: 1.25rem;
  margin-bottom: 2.5rem;
}

.section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

/* Inline figure inside articles */
.inline-fig {
  margin: 2.5rem 0;
}

.inline-fig img {
  width: 100%;
}

.inline-fig figcaption {
  font-size: 0.82rem;
  color: var(--color-muted);
  font-style: italic;
  margin-top: 0.5rem;
  padding-left: 0.25rem;
}

/* ============================================================
   CARD GRID — 3 col (Start Here, Monks)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background: #fff;
  border: 1px solid var(--color-warm-mid);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(19, 20, 18, 0.10);
  text-decoration: none;
}

.card-img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-warm-mid);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.card-body p {
  font-size: 0.92rem;
  color: var(--color-muted);
  flex: 1;
  margin-bottom: 1.1rem;
}

.card-link {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-gold);
  align-self: flex-start;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.card-link:hover {
  border-bottom-color: var(--color-gold);
}

/* ============================================================
   JOURNAL GRID — 2 col
   ============================================================ */
.journal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* Badge overlays */
.card-badge-wrap {
  position: relative;
}

.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  z-index: 2;
}

.card-badge-monk {
  background: var(--color-gold);
  color: var(--color-text);
}

.card-badge-soon {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ============================================================
   GLOSSARY PILLS (homepage teaser)
   ============================================================ */
.glossary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.5rem 0 1.75rem;
}

.pill {
  display: inline-block;
  padding: 0.35rem 1rem;
  border: 1px solid var(--color-gold);
  color: var(--color-text);
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: background 0.2s, color 0.2s;
}

.pill:hover {
  background: var(--color-gold);
  color: var(--color-bg);
  text-decoration: none;
}

.cta-browse {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
  transition: color 0.2s;
}

/* ============================================================
   GLOSSARY DL ENTRIES
   ============================================================ */
.glossary-dl {
  margin-top: 2rem;
}

.glossary-dl dt {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-gold);
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-warm-mid);
}

.glossary-dl dt:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.pronunciation {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-left: 0.5rem;
  font-style: normal;
}

.glossary-dl dd {
  margin-left: 1.5rem;
  margin-bottom: 0;
}

.glossary-dl dd p {
  margin-top: 0.6rem;
  margin-bottom: 0.75rem;
}

.usage-note {
  font-size: 0.88rem;
  color: var(--color-muted);
  font-style: italic;
  border-left: 2px solid var(--color-warm-mid);
  padding-left: 0.85rem;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.related-terms {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.related-terms a {
  color: var(--color-gold);
}

/* ============================================================
   NEWSLETTER CTA
   ============================================================ */
.newsletter-cta {
  max-width: 560px;
  margin: 0 auto 4rem;
  padding: 3rem;
  border: 1px solid var(--color-gold);
  background: var(--color-bg);
  text-align: center;
}

.newsletter-cta h3 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.newsletter-cta > p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.cta-form {
  display: flex;
}

.cta-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-warm-mid);
  border-right: none;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  color: var(--color-text);
}

.cta-form input[type="email"]:focus {
  border-color: var(--color-gold);
}

.cta-form button[type="submit"] {
  padding: 0.75rem 1.5rem;
  background: var(--color-gold);
  color: var(--color-text);
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background 0.2s;
}

.cta-form button[type="submit"]:hover {
  background: #b5923f;
}

.success-msg {
  color: var(--color-gold);
  font-size: 0.95rem;
  margin: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-layout);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(249, 243, 235, 0.12);
}

.footer-logo {
  height: 60px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.88rem;
  color: rgba(249, 243, 235, 0.55);
  margin-bottom: 0;
}

.footer-nav h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold);
  margin-bottom: 1rem;
  margin-top: 0;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.55rem;
}

.footer-nav a {
  color: rgba(249, 243, 235, 0.7);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--color-bg);
}

.footer-base {
  max-width: var(--max-layout);
  margin: 1.5rem auto 0;
  text-align: center;
}

.footer-base p {
  font-size: 0.78rem;
  color: rgba(249, 243, 235, 0.35);
  margin: 0;
  letter-spacing: 0.06em;
}

/* ============================================================
   MONK GRID — 3 col
   ============================================================ */
.monk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.monk-card {
  border: 1px solid var(--color-warm-mid);
  background: #fff;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s;
}

.monk-card:hover {
  box-shadow: 0 4px 20px rgba(19, 20, 18, 0.10);
  text-decoration: none;
}

.monk-card.is-coming-soon {
  opacity: 0.65;
  pointer-events: none;
}

.monk-card-img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-warm-mid);
  position: relative;
}

.monk-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.monk-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.monk-card-body h3 {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 0.2rem;
}

.monk-card-sub {
  font-size: 0.8rem;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.6rem;
}

.monk-card-body p {
  font-size: 0.88rem;
  color: var(--color-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.coming-soon {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
  padding: 0.18rem 0.5rem;
  margin-top: auto;
  align-self: flex-start;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   RESPONSIVE — 1024px
   ============================================================ */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .monk-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   RESPONSIVE — 768px
   ============================================================ */
@media (max-width: 768px) {
  html { font-size: 16px; }

  /* Nav */
  .site-nav {
    padding: 0 1rem;
    height: auto;
    min-height: var(--nav-height);
    flex-wrap: wrap;
    align-items: flex-start;
    padding-top: 14px;
  }

  .nav-toggle {
    display: block;
    margin-top: 0;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0.5rem 0 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--color-warm-mid);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 0.55rem 0;
    border-bottom: none;
  }

  /* Hero */
  .hero {
    height: 360px;
  }

  .hero-text h1 {
    font-size: 2.4rem;
  }

  .hero-inner {
    height: 260px;
  }

  .hero-inner-text h1 {
    font-size: 1.65rem;
  }

  /* Grids */
  .card-grid,
  .journal-grid,
  .monk-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  /* Newsletter */
  .newsletter-cta {
    padding: 2rem 1.25rem;
  }

  .cta-form {
    flex-direction: column;
  }

  .cta-form input[type="email"] {
    border-right: 1px solid var(--color-warm-mid);
    border-bottom: none;
  }

  /* Article */
  .article-content {
    padding: 2rem 1rem 1.5rem;
  }
}
