/* ==========================================================================
   Naalumanikkattu Website - Base Styles & Global Utilities
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manjari:wght@400;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Kerala Kasavu Gold Top Ribbon */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-palm-800) 0%, var(--color-gold) 35%, var(--color-terracotta) 70%, var(--color-palm-700) 100%);
  z-index: 1000;
}

/* Background Ambient Motif (Gentle organic gradients) */
.bg-ambience {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 10% 15%, rgba(38, 97, 56, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(166, 75, 42, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(247, 239, 235, 0.5) 0%, transparent 80%);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: var(--container-narrow-width);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-earth-900);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-palm-700);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-terracotta);
}

/* Header & Navigation */
.site-header {
  height: var(--header-height);
  position: sticky;
  top: 0;
  background-color: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-palm-800), var(--color-palm-900));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(16, 43, 25, 0.2);
  border: 1px solid var(--color-gold-border);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-earth-900);
  line-height: 1.15;
}

.brand-malayalam {
  font-family: var(--font-malayalam);
  font-size: 0.8rem;
  color: var(--color-terracotta);
  letter-spacing: 0.05em;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-palm-800);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-gold);
  border-radius: var(--radius-pill);
}

/* Badges & Pills */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--color-palm-100);
  color: var(--color-palm-800);
  border: 1px solid rgba(38, 97, 56, 0.2);
}

.badge-pill.badge-terracotta {
  background-color: var(--color-terracotta-light);
  color: var(--color-terracotta);
  border-color: rgba(166, 75, 42, 0.25);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-palm-700);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-palm-800);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(27, 69, 39, 0.25);
}

.btn-primary:hover {
  background-color: var(--color-palm-900);
  color: var(--text-inverse);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 69, 39, 0.35);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--color-earth-800);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--bg-cream-tint);
  border-color: var(--color-terracotta);
  color: var(--color-terracotta);
  transform: translateY(-2px);
}

/* Kasavu Ornamental Divider */
.kasavu-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0;
}

.kasavu-divider::before,
.kasavu-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
}

.kasavu-divider svg {
  color: var(--color-gold);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--color-earth-900);
  color: #DDD4CD;
  padding: 4rem 0 2rem 0;
  position: relative;
  z-index: 1;
  border-top: 3px solid var(--color-gold);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand h4 {
  font-size: 1.5rem;
  color: var(--text-inverse);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: #B5A89E;
  font-size: 0.95rem;
  max-width: 420px;
  margin-top: 0.75rem;
}

.footer-col h5 {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #DDD4CD;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-gold-light);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #DDD4CD;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--color-gold);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: #9C8F85;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: #9C8F85;
}

.footer-bottom-links a:hover {
  color: var(--color-gold);
}

/* Responsive adjustments */
@media (max-width: 868px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
