/* ═══════════════════════════════════════════════════════════
   MAIN.CSS — Design System, Global Styles, Navbar, Modal,
              WhatsApp Float, Certifications, Footer
   Ceylon Spice Export — Reusable Website Template
════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --color-primary:        #8B1A1A;
  --color-primary-light:  #a82020;
  --color-secondary:      #C97B2B;
  --color-secondary-light:#dfa040;
  --color-accent:         #2D6A4F;
  --color-earth:          #5C3D2E;
  --color-cream:          #FDF6EC;
  --color-cream-dark:     #f5e8d0;
  --color-dark:           #1A0F0A;
  --color-dark-soft:      #2C1810;
  --color-text:           #3D2314;
  --color-text-light:     #7A5C48;
  --color-white:          #ffffff;

  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-earth) 100%);
  --gradient-gold:    linear-gradient(135deg, var(--color-secondary) 0%, #e8a030 100%);
  --gradient-hero:    linear-gradient(180deg, rgba(26,15,10,.3) 0%, rgba(26,15,10,.7) 100%);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --section-padding:  clamp(4.5rem, 8vw, 8rem);
  --container-max:    1200px;
  --container-pad:    clamp(1.25rem, 5vw, 4rem);

  --radius-sm:  0.5rem;
  --radius-md:  1rem;
  --radius-lg:  1.5rem;
  --radius-xl:  2rem;

  --shadow-sm:   0 2px 8px  rgba(26,15,10,.08);
  --shadow-md:   0 8px 32px rgba(26,15,10,.12);
  --shadow-lg:   0 24px 64px rgba(26,15,10,.18);
  --shadow-glow: 0 0 40px rgba(201,123,43,.3);

  --transition-fast:   150ms cubic-bezier(.4,0,.2,1);
  --transition-normal: 300ms cubic-bezier(.4,0,.2,1);
  --transition-slow:   600ms cubic-bezier(.4,0,.2,1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--color-cream);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--color-cream-dark); }
::-webkit-scrollbar-thumb { background: var(--color-secondary); border-radius: 3px; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-dark);
}
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem);   font-weight: 600; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--color-text-light); }
a  { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Text gradient ─────────────────────────────────────────── */
.text-gradient {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section header ────────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
}

.section-eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}
.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  width: 2rem;
  height: 1px;
  background: var(--color-secondary);
  opacity: .4;
}

.section-heading  { margin-bottom: 1.25rem; }
.section-subheading {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 2rem;
  border-radius: .375rem;
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient-gold);
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(201,123,43,.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,123,43,.5);
}
.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255,255,255,.45);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.8);
}
.btn-full { width: 100%; justify-content: center; }

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ══════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  transition: all var(--transition-normal);
  padding: 1.25rem 0;
}
.navbar.scrolled {
  background: rgba(26,15,10,.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 24px rgba(26,15,10,.3);
  padding: .85rem 0;
  border-bottom: 1px solid rgba(201,123,43,.15);
}
.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-name-group { display: flex; flex-direction: column; }
.nav-business-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
  line-height: 1.1;
}
.nav-tagline {
  font-size: .62rem;
  color: var(--color-secondary);
  letter-spacing: .07em;
  opacity: .9;
  font-weight: 400;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: .125rem;
  margin-left: auto;
}
.nav-link {
  padding: .5rem 1rem;
  color: rgba(255,255,255,.8);
  font-size: .88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: .25rem; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 18px; height: 2px;
  background: var(--color-secondary);
  border-radius: 1px;
  transition: transform var(--transition-normal);
}
.nav-link:hover, .nav-link.active { color: white; }
.nav-link:hover::after, .nav-link.active::after { transform: translateX(-50%) scaleX(1); }

.nav-cta {
  padding: .6rem 1.375rem;
  background: var(--gradient-gold);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,123,43,.4);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: white;
  border-radius: 2px;
  transition: all var(--transition-normal);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem var(--container-pad) 1.5rem;
  background: rgba(26,15,10,.97);
  border-top: 1px solid rgba(201,123,43,.12);
  gap: 0;
}
.mobile-menu.open { display: flex; animation: fadeIn .2s ease; }
.mobile-link {
  padding: .875rem 0;
  color: rgba(255,255,255,.8);
  font-size: 1rem;
  border-bottom: 1px solid rgba(201,123,43,.1);
  transition: color var(--transition-fast);
}
.mobile-link:hover { color: var(--color-secondary); }
.mobile-cta {
  display: block;
  margin-top: 1rem;
  padding: .9rem 2rem;
  background: var(--gradient-gold);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  font-size: .95rem;
}

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}

/* ══════════════════════════════════════════════════════════
   CERTIFICATIONS BAR
══════════════════════════════════════════════════════════ */
.cert-section {
  background: var(--color-dark);
  padding: 2rem 0;
  overflow: hidden;
}
.cert-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.cert-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-secondary);
  white-space: nowrap;
  position: relative;
  padding-right: 2.5rem;
}
.cert-label::after {
  content: '';
  position: absolute;
  right: 0; top: 50%;
  width: 1.75rem; height: 1px;
  background: var(--color-secondary);
  opacity: .4;
}
.cert-badges {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}
.cert-badge {
  padding: .4rem 1.125rem;
  border: 1px solid rgba(201,123,43,.25);
  border-radius: 2rem;
  font-size: .75rem;
  font-weight: 500;
  color: rgba(253,246,236,.65);
  letter-spacing: .05em;
  transition: all var(--transition-normal);
  cursor: default;
}
.cert-badge:hover {
  background: rgba(201,123,43,.12);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

/* ══════════════════════════════════════════════════════════
   PRODUCT MODAL
══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,15,10,.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  position: relative;
  transform: scale(.9) translateY(20px);
  transition: transform var(--transition-normal);
  max-height: 90vh;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}
.modal-close {
  position: absolute;
  top: .875rem; right: .875rem;
  width: 34px; height: 34px;
  background: rgba(26,15,10,.6);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background var(--transition-fast);
}
.modal-close:hover { background: var(--color-primary); }
.modal-image-wrap {
  aspect-ratio: 1;
  overflow: hidden;
}
.modal-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.modal-body {
  padding: 2rem 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .875rem;
}
.modal-category {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-secondary);
}
.modal-body h3 { font-size: 1.5rem; line-height: 1.2; }
.modal-body p  { font-size: .9rem; line-height: 1.65; }
.modal-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--color-text-light);
  font-size: .85rem;
}
.modal-meta i { width: 14px; height: 14px; color: var(--color-secondary); flex-shrink: 0; }
.modal-forms-label {
  font-weight: 600;
  font-size: .8rem;
  color: var(--color-text);
  margin-bottom: .4rem;
}
.modal-forms-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.modal-form-tag {
  padding: .275rem .8rem;
  background: var(--color-cream-dark);
  border-radius: 2rem;
  font-size: .75rem;
  color: var(--color-earth);
  font-weight: 500;
  border: 1px solid rgba(92,61,46,.15);
}

/* ══════════════════════════════════════════════════════════
   WHATSAPP FLOATING BUTTON
══════════════════════════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 56px; height: 56px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  z-index: 1000;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.whatsapp-float:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 8px 30px rgba(37,211,102,.55);
}
.whatsapp-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: waPulse 2.5s ease-out infinite;
  z-index: -1;
}

/* ── Responsive helpers ────────────────────────────────────── */
@media (max-width: 768px) {
  .modal { grid-template-columns: 1fr; }
  .modal-image-wrap { aspect-ratio: 16/9; }
  .cert-label::after { display: none; }
  .cert-label { padding-right: 0; }
}
@media (max-width: 480px) {
  .whatsapp-float { bottom: 1.25rem; right: 1.25rem; width: 50px; height: 50px; }
}
