/* ─────────────────────────────────────────────
   KSE Mineral — stylesheet
   Palette: Navy #1C2B3A · Gold #C8962A · Warm Off-White #F7F4EF
───────────────────────────────────────────── */

:root {
  --bg:          #F7F4EF;
  --navy:        #1C2B3A;
  --navy-2:      #243447;
  --gold:        #C8962A;
  --gold-hover:  #B8851F;
  --charcoal:    #2D2D2D;
  --gray:        #6B7280;
  --light-gray:  #E5E7EB;
  --white:       #FFFFFF;
  --footer-bg:   #111D27;

  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 20px rgba(0,0,0,0.07);
  --shadow-lg:   0 12px 40px rgba(0,0,0,0.12);
  --transition:  0.25s ease;
  --max:         1200px;
  --pad-section: 96px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; }

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

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}
.section-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 14px;
}
.section-header p {
  color: var(--gray);
  font-size: 1.0rem;
  line-height: 1.75;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.925rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
}
.btn-gold:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,150,42,0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.55);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}
.btn-full {
  width: 100%;
  justify-content: center;
  padding: 15px 28px;
}

/* ─── Nav ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 22px 0;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}
.nav.scrolled {
  background: rgba(28, 43, 58, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px 0;
  box-shadow: 0 4px 28px rgba(0,0,0,0.22);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 40px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links li a {
  color: var(--white);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  opacity: 0.82;
  transition: opacity var(--transition);
}
.nav-links li a:hover { opacity: 1; }
.nav-cta {
  background: var(--gold);
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: var(--radius);
  opacity: 1 !important;
  font-weight: 600 !important;
  transition: background var(--transition), transform var(--transition) !important;
}
.nav-cta:hover {
  background: var(--gold-hover) !important;
  transform: translateY(-1px);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Hero ─── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: transform 10s ease;
}
.hero:hover .hero-bg { transform: scale(1.0); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(28,43,58,0.88) 0%,
    rgba(28,43,58,0.62) 60%,
    rgba(28,43,58,0.45) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.hero-content h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 22px;
}
.hero-content h1 span { color: var(--gold); }
.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.78);
  max-width: 500px;
  margin-bottom: 36px;
  line-height: 1.75;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scroll-arrow {
  width: 22px;
  height: 22px;
  border-right: 2px solid rgba(255,255,255,0.5);
  border-bottom: 2px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0,0); opacity: 0.5; }
  50%       { transform: rotate(45deg) translate(5px,5px); opacity: 1; }
}

/* ─── Stats ─── */
.stats {
  background: var(--navy);
  padding: 56px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  text-align: center;
  padding: 16px 12px;
  position: relative;
}
.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0; top: 15%; height: 70%;
  width: 1px;
  background: rgba(255,255,255,0.1);
}
.stat-num {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.stat-unit { color: var(--gold); }
.stat-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
  font-weight: 500;
}

/* ─── Products ─── */
.products { background: var(--bg); }
.product-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 9px 24px;
  border: 2px solid var(--light-gray);
  background: var(--white);
  color: var(--gray);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.product-card-img {
  height: 200px;
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.07); }
.product-card-body { padding: 22px 24px; }
.product-card-tag {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 7px;
}
.product-card-body h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.3;
}
.product-card-body p {
  font-size: 0.855rem;
  color: var(--gray);
  line-height: 1.65;
  margin-bottom: 18px;
}
.btn-inquire {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--gold);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.01em;
  transition: gap var(--transition), color var(--transition);
}
.btn-inquire:hover { gap: 9px; color: var(--gold-hover); }
.btn-inquire::after { content: '→'; }

/* ─── About ─── */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-text h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 18px;
}
.about-text p {
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 14px;
  font-size: 0.97rem;
}
.about-features {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.about-features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--charcoal);
  line-height: 1.5;
}
.feature-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.feature-check svg {
  width: 11px;
  height: 11px;
  stroke: var(--white);
}
.about-image { position: relative; }
.about-image img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.about-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--navy);
  padding: 20px 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.badge-num {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.badge-label {
  display: block;
  font-size: 0.775rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  margin-top: 4px;
}

/* ─── Why KSE ─── */
.why-kse { background: var(--bg); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.why-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.why-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.why-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.why-card p {
  font-size: 0.855rem;
  color: var(--gray);
  line-height: 1.7;
}

/* ─── Contact ─── */
.contact { background: var(--navy); }
.contact .section-tag { color: var(--gold); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}
.contact-info h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}
.contact-info > p {
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  margin-bottom: 36px;
  font-size: 0.97rem;
}
.contact-details { display: flex; flex-direction: column; gap: 18px; }
.contact-item {
  display: flex;
  gap: 14px;
  align-items: center;
  color: rgba(255,255,255,0.78);
  font-size: 0.9rem;
}
.contact-item a {
  color: rgba(255,255,255,0.78);
  transition: color var(--transition);
}
.contact-item a:hover { color: var(--gold); }
.contact-icon {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Form ─── */
.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}
.req { color: var(--gold); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--charcoal);
  background: var(--bg);
  transition: border-color var(--transition), background var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #b0b8c4; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: var(--white);
}
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #ef4444;
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 18px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius);
  color: #065f46;
  font-size: 0.875rem;
  font-weight: 500;
}
.form-success.visible { display: flex; }
.form-success svg { flex-shrink: 0; stroke: #059669; }

/* ─── Footer ─── */
.footer {
  background: var(--footer-bg);
  padding: 72px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 52px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-brand img {
  height: 36px;
  margin-bottom: 18px;
  opacity: 0.9;
}
.footer-brand p {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.8;
  max-width: 260px;
}
.footer-col h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li,
.footer-col ul li a {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.4);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--gold); }
.footer-col p,
.footer-col a {
  display: block;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}

/* ─── Scroll Reveal ─── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { gap: 48px; }
}

@media (max-width: 768px) {
  :root { --pad-section: 64px; }

  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--navy);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 36px;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { font-size: 1.15rem; opacity: 1; }
  .nav-cta { padding: 12px 32px !important; font-size: 1rem !important; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-image img { height: 360px; }
  .about-badge { bottom: -12px; left: 12px; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(even)::after { display: none; }
  .stat-item:nth-child(2) { border-right: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .why-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 22px; }
}
