/* ============================================
   Oman Fertilizer - Company Website Styles
   Brand: Green + Tan, professional & modern
   ============================================ */

:root {
  /* Brand colors from logo */
  --green: #2d5a3d;
  --green-light: #3d7a52;
  --green-dark: #1e3d2a;
  --tan: #c4a574;
  --tan-light: #e0d0b8;
  --tan-dark: #8b7355;
  /* Neutrals */
  --white: #fefefe;
  --off-white: #f8f6f2;
  --gray-100: #e8e6e1;
  --gray-300: #9a958c;
  --gray-600: #4a4844;
  --gray-800: #2a2926;
  --black: #1a1917;
  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  /* Spacing & layout */
  --container: min(92%, 1140px);
  --section-padding: clamp(3rem, 6vw, 5rem);
  --header-height: 72px;
  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.25s ease;
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--off-white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-dark); }
address { font-style: normal; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius);
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--tan); outline-offset: 2px; }

/* Container */
.container { width: var(--container); margin-inline: auto; }

/* ========== Header ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(254, 254, 254, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo { display: flex; align-items: center; }
.logo img { height: 44px; width: auto; }
.logo .logo-text { white-space: nowrap; }

.nav-list {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  font-weight: 500;
  color: var(--gray-800);
  padding: 0.5rem 0;
}
.nav-list a:hover { color: var(--green); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gray-800);
  border-radius: 1px;
  transition: var(--transition);
}

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 2rem) 1.5rem 4rem;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, var(--green-light) 100%);
  background-image: 
    linear-gradient(135deg, rgba(30,61,42,0.92) 0%, rgba(45,90,61,0.9) 50%, rgba(61,122,82,0.88) 100%),
    url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=1920&q=80');
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, transparent 40%, rgba(0,0,0,0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  color: var(--white);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--tan-light);
  margin: 0 0 2rem;
  font-weight: 300;
  opacity: 0.95;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--tan); outline-offset: 2px; }

.btn-primary {
  background: var(--tan);
  color: var(--black);
  border-color: var(--tan);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(196,165,116,0.4); }

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-secondary:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--tan-light);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--tan-light), transparent);
  border-radius: 2px;
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.5; transform: scaleY(0.6); }
}

/* ========== Sections ========== */
.section {
  padding: var(--section-padding) 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  color: var(--green-dark);
  margin: 0 0 0.5rem;
}
.section-title--center { text-align: center; }
.section-title--light { color: var(--white); }
.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray-600);
  margin: 0 0 2.5rem;
  max-width: 560px;
}
.section-title--center + .section-subtitle,
.section-title--light + .section-subtitle--light { margin-inline: auto; text-align: center; }
.section-subtitle--light { color: var(--tan-light); }

/* ========== About ========== */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-image-wrap img { width: 100%; object-fit: cover; }
.about-content .section-title { margin-bottom: 1rem; }
.about-lead { font-size: 1.15rem; color: var(--gray-800); margin-bottom: 1rem; }
.about-content p { margin: 0 0 1rem; color: var(--gray-600); }
.about-content p:last-of-type { margin-bottom: 0; }

/* ========== Products ========== */
.products { background: var(--off-white); }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.product-card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-image img { transform: scale(1.05); }

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.75rem;
  background: var(--green);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
}

.product-card-body { padding: 1.5rem; }
.product-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--green-dark);
  margin: 0 0 0.5rem;
}
.product-desc { color: var(--gray-600); margin: 0 0 1rem; font-size: 0.95rem; }
.product-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
  transition: color var(--transition);
}
.product-toggle:hover { color: var(--green-dark); }
.product-toggle::after {
  content: '';
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition);
}
.product-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); }
.product-detail {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  color: var(--gray-600);
  font-size: 0.95rem;
}
.product-detail[hidden] { display: none; }

/* ========== Contact ========== */
.contact {
  position: relative;
  padding: var(--section-padding) 0;
  color: var(--white);
}
.contact-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  z-index: 0;
}
.contact .container { position: relative; z-index: 1; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: background var(--transition), border-color var(--transition);
}
.contact-card:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}

.contact-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--tan-light);
}
.contact-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--white);
}
.contact-card address,
.contact-card a {
  color: var(--tan-light);
  font-size: 1rem;
  line-height: 1.6;
}
.contact-card a:hover { color: var(--white); text-decoration: underline; }

/* ========== Footer ========== */
.footer {
  background: var(--gray-800);
  color: var(--gray-300);
  padding: 1.5rem 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-logo { display: flex; align-items: center; }
.footer-logo img { height: 36px; width: auto; opacity: 0.9; }
.footer-logo .logo-text { opacity: 0.9; }
.footer-copy { margin: 0; font-size: 0.9rem; }

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-image-wrap { order: -1; max-height: 320px; }
  .about-image-wrap img { height: 100%; object-fit: cover; }
}

@media (max-width: 768px) {
  .nav-list {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }
  .nav-list.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-list li { border-bottom: 1px solid var(--gray-100); }
  .nav-list a { display: block; padding: 1rem; }
  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .hero-cta { flex-direction: column; }
  .btn { width: 100%; max-width: 280px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
}
