/* ============================================
   SIRAJ DAIRY FARM — Base Styles
   Reset, Typography, Global Utilities
   ============================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-cream);
}
::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ── Selection ── */
::selection {
  background-color: var(--color-gold);
  color: var(--color-primary-dark);
}

/* ── Links ── */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover {
  color: var(--color-gold);
}

/* ── Images ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Lists ── */
ul, ol {
  list-style: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

.display-font {
  font-family: var(--font-display);
}

.accent-font {
  font-family: var(--font-accent);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

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

strong, b {
  font-weight: var(--fw-semibold);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--section-px);
}

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

.container-lg {
  max-width: var(--container-2xl);
}

/* ── Section ── */
.section {
  padding: var(--section-py) 0;
  position: relative;
}

.section-dark {
  background: var(--gradient-primary-dark);
  color: var(--color-text-on-dark);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark p {
  color: var(--color-text-on-dark);
}

.section-dark p {
  color: rgba(240, 237, 232, 0.8);
}

.section-cream {
  background-color: var(--color-cream);
}

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

.section-green-light {
  background-color: var(--color-light-green);
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-accent);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--color-gold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.section-label::before,
.section-label::after {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--gradient-gold);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  line-height: var(--lh-tight);
}

.section-dark .section-title {
  color: #FFFFFF;
}

.section-subtitle {
  font-size: var(--fs-body-lg);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
}

.section-dark .section-subtitle {
  color: rgba(240, 237, 232, 0.75);
}

/* ── Gold Decorative Line ── */
.gold-line {
  width: 60px;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  margin: var(--space-lg) auto;
}

.gold-line-left {
  margin-left: 0;
}

/* ── Grid Utilities ── */
.grid {
  display: grid;
  gap: var(--space-xl);
}

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

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ── Flex Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ── Text Utilities ── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-gold { color: var(--color-gold); }
.text-green { color: var(--color-primary); }
.text-white { color: #FFFFFF; }
.text-uppercase { text-transform: uppercase; }
.text-sm { font-size: var(--fs-small); }

/* ── Spacing Utilities ── */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ── Visibility ── */
.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;
}

/* ── Page Loader ── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-max);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-gold);
  animation: pulse 1.5s ease infinite;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .section-header {
    margin-bottom: var(--space-2xl);
  }
  
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}
