/* ==========================================================================
   THATTUKADA (തട്ടുകട) • REFERENCE-PERFECT DARK GREEN DESIGN
   Exclusive Palette: #224A28, #27542E, #2C5F34, and #449351
   ========================================================================== */

:root {
  /* Strict User Green Palette */
  --green-darkest: #224A28; /* Primary Dark Green - Cards & Base surfaces */
  --green-mid-dark: #27542E; /* Medium Dark Green - Hairline borders & pill fills */
  --green-mid: #2C5F34;      /* Medium Green - Active states & borders */
  --green-accent: #449351;   /* Vibrant Highlight - Emphasized italics, eyebrows, CTAs */

  /* Deep Atmospheric Dark Green Backdrops (Derived from #224A28) */
  --bg-deep: #09130c;
  --bg-card: #0d1e12;
  --bg-card-hover: #132b1a;

  /* Borders */
  --border-subtle: rgba(68, 147, 81, 0.20);
  --border-card: rgba(68, 147, 81, 0.28);
  --border-accent: #449351;

  /* Typography Colors */
  --text-primary: #f5f8f5;
  --text-secondary: #a9c6b0;
  --text-muted: #7d9e85;
  --text-dim: #54715b;

  /* Fonts */
  --font-serif: 'Playfair Display', 'Noto Serif Malayalam', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-malayalam: 'Noto Serif Malayalam', 'Noto Sans Malayalam', Georgia, serif;

  /* Transitions */
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

/* Background Canvas & Ambient Glow (Image 3 Reference Glow) */
#rain-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

#rain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.92;
  z-index: 2;
}

.ambient-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 650px;
  height: 480px;
  background: radial-gradient(circle, rgba(68, 147, 81, 0.16) 0%, rgba(44, 95, 52, 0.08) 45%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
  z-index: 1;
}

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 28px;
}

.text-container {
  max-width: 820px;
}

/* ==========================================================================
   NAVIGATION BAR (Perfect Alignment & Logo Image)
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 16px 0;
  background: #09130c;
  border-bottom: 1px solid rgba(68, 147, 81, 0.16);
  transition: padding var(--transition), background var(--transition);
}

.navbar.scrolled {
  padding: 12px 0;
  background: #09130c;
  border-bottom-color: var(--border-subtle);
}

/* 3-Column True Center Grid Alignment (Contained & Cohesive) */
.nav-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Brand: Logo Image + തട്ടുകട / Thattukada */
.brand-logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-card);
  background: var(--green-darkest);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition), transform var(--transition);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-logo:hover .brand-logo-badge {
  border-color: var(--green-accent);
  transform: scale(1.04);
}

.malayalam-brand {
  font-family: var(--font-malayalam);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-accent);
  line-height: 1;
}

.brand-divider {
  color: var(--border-medium);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1;
  margin: 0 1px;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
}

/* Center Navigation Links (Mathematically Centered) */
.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  text-transform: uppercase;
  line-height: 1;
  padding: 6px 0;
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
}

/* Right Nav Action Pills */
.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  box-sizing: border-box;
  transition: all var(--transition);
}

/* Ambience Toggle Pill */
.btn-ambience {
  background: rgba(34, 74, 40, 0.45);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
}

.btn-ambience:hover {
  border-color: var(--green-accent);
  color: var(--text-primary);
}

.btn-ambience.active {
  background: var(--green-mid);
  border-color: var(--green-accent);
  color: #fff;
}

.audio-icon {
  flex-shrink: 0;
}

/* Nav Join Discord Pill */
.btn-join-nav {
  border: 1.5px solid var(--green-accent);
  color: var(--green-accent);
  background: rgba(68, 147, 81, 0.08);
}

.btn-join-nav:hover {
  background: var(--green-accent);
  color: #ffffff;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 0;
}

.mobile-toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--text-primary);
}

/* ==========================================================================
   HERO SECTION (Image 3 Reference)
   ========================================================================== */
.hero-section {
  padding: 130px 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6.2vw, 5.2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 28px;
}

/* Reference Italic Highlights */
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--green-accent); /* Replaces reference gold with #449351 */
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 680px;
  margin-bottom: 40px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Primary Hero Button: [Join the Discord Server] */
.btn-hero-primary {
  padding: 13px 28px;
  font-size: 0.92rem;
  border: 1px solid var(--green-accent);
  color: var(--green-accent);
  background: rgba(34, 74, 40, 0.25);
  box-shadow: 0 4px 18px rgba(68, 147, 81, 0.15);
}

.btn-hero-primary:hover {
  background: var(--green-accent);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(68, 147, 81, 0.35);
}

.discord-logo {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.btn-hero-primary:hover .discord-logo {
  transform: scale(1.05);
}

/* ==========================================================================
   EDITORIAL SECTION COMMONS (Image 4 & Image 2 Reference)
   ========================================================================== */
.section {
  padding: 100px 0;
  position: relative;
}

/* Eyebrows (Image 4 & Image 2) */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.section-eyebrow.justify-center {
  justify-content: center;
  width: 100%;
}

.eyebrow-icon {
  font-size: 1rem;
  color: var(--green-accent);
}

.eyebrow-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--green-accent);
  color: var(--green-accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.eyebrow-text {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--green-accent);
  text-transform: uppercase;
}

/* Section Headings */
.section-title-editorial {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-title-editorial em {
  font-style: italic;
  color: var(--green-accent);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 48px;
}

.section-subtitle-left {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

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

/* Editorial Body Text (Image 4 Reference) */
.editorial-body p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 22px;
}

.text-highlight {
  color: var(--green-accent);
  font-weight: 600;
}

/* ==========================================================================
   CHANNELS SECTION (Matching Cards)
   ========================================================================== */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.channel-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--green-accent);
  transform: translateY(-2px);
}

.channel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.channel-tag {
  font-family: var(--font-malayalam);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.channel-meta-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--green-accent);
  background: rgba(68, 147, 81, 0.12);
  border: 1px solid rgba(68, 147, 81, 0.25);
  padding: 2px 8px;
  border-radius: 9999px;
}

.channel-name {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.channel-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   INTERACTIVE KATTAN VIBE CHECK
   ========================================================================== */
.interactive-kattan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 44px;
}

.vibe-display-box {
  background: #09130c;
  border: 1px solid var(--border-card);
  border-left: 3px solid var(--green-accent);
  border-radius: 8px;
  padding: 22px 24px;
  margin-bottom: 26px;
}

.vibe-quote {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 14px;
  font-weight: 500;
}

.vibe-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.vibe-badge {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--green-accent);
  background: rgba(68, 147, 81, 0.15);
  padding: 3px 10px;
  border-radius: 9999px;
}

.vibe-active-note {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.kattan-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-brew {
  border: 1px solid var(--green-accent);
  background: var(--green-accent);
  color: #fff;
}

.btn-brew:hover {
  background: #4ea85d;
}

.btn-secondary-outline {
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  background: transparent;
}

.btn-secondary-outline:hover {
  border-color: var(--green-accent);
  color: var(--text-primary);
}

/* ==========================================================================
   GUIDELINES LIST
   ========================================================================== */
.guidelines-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guideline-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 24px 28px;
  transition: border-color var(--transition);
}

.guideline-item:hover {
  border-color: var(--green-accent);
}

.guideline-number {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--green-accent);
  line-height: 1;
  padding-top: 2px;
}

.guideline-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.guideline-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   FAQ ACCORDION (Exact Image 2 Reference Styling)
   ========================================================================== */
.faq-container {
  max-width: 820px;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.accordion-item.active {
  border-color: var(--green-accent);
  background: var(--bg-card);
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition);
}

.accordion-header:hover {
  color: #fff;
}

.accordion-chevron {
  font-size: 1rem;
  color: var(--green-accent);
  transition: transform var(--transition);
  font-weight: bold;
}

.accordion-item.active .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 26px;
}

.accordion-item.active .accordion-body {
  max-height: 300px;
  padding-bottom: 22px;
}

.accordion-body p {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.7;
}

/* ==========================================================================
   FOOTER (Exact Image 1 Reference Styling)
   ========================================================================== */
.site-footer {
  background: var(--bg-deep);
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-subtle);
}

.footer-container {
  display: flex;
  flex-direction: column;
}

.footer-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.footer-left {
  max-width: 440px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.malayalam-brand-footer {
  font-family: var(--font-malayalam);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-accent); /* Green replacement for gold */
}

.footer-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--text-primary);
}

/* Yellow/Gold "Join Server" in Reference replaced with #449351 */
.footer-cta-link {
  color: var(--green-accent);
}

.footer-cta-link:hover {
  color: #fff;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(68, 147, 81, 0.16);
  margin-bottom: 30px;
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-credit {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.credit-author {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  pointer-events: none;
}

.toast {
  background: var(--green-darkest);
  border: 1px solid var(--green-accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

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

@media (max-width: 880px) {
  .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 16px 0;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--bg-deep);
    border-left: 1px solid var(--border-card);
    flex-direction: column;
    padding: 80px 28px;
    gap: 24px;
    transition: right var(--transition);
    z-index: 105;
  }

  .nav-links.open {
    right: 0;
  }

  .mobile-toggle {
    display: flex;
    z-index: 110;
  }

  .btn-join-nav {
    display: none;
  }

  .hero-section {
    padding: 90px 0 70px;
  }

  .channels-grid {
    grid-template-columns: 1fr;
  }

  .interactive-kattan-card {
    padding: 28px 20px;
  }

  .footer-top-row {
    flex-direction: column;
    gap: 24px;
  }

  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
