/* ============================================================
   TARA MINERALS & CHEMICALS PVT. LTD.
   style.css — Design System, Base Styles, Layout, Typography
   Inspired by Lhoist, Carmeuse, Omya industry leaders
   ============================================================ */

/* ============================================================
   0. GOOGLE FONTS IMPORT
   ============================================================ */
/* Google Fonts moved to <link> tags in HTML <head> for non-blocking load.
   Only loading fonts & weights actually used in production CSS:
   - Montserrat 500,600,700,800 (headings, hero)
   - Open Sans 400,500,600,700 (body, nav, buttons)
   - Raleway 600,700 (logo, footer headings)
*/

/* ============================================================
   1. CSS CUSTOM PROPERTIES — DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand Colors */
  --clr-primary:        #003366;
  --clr-primary-dark:   #001f3f;
  --clr-primary-light:  #0055a5;
  --clr-accent:         #E6A817;
  --clr-accent-hover:   #c8901a;
  --clr-cyan:           #00adef;

  /* Neutrals */
  --clr-white:          #FFFFFF;
  --clr-bg-light:       #f6f7f8;
  --clr-bg-lighter:     #fafbfc;
  --clr-text-dark:      #1e1e1e;
  --clr-text-body:      #3a4555;
  --clr-text-muted:     #8a9ab0;
  --clr-border:         rgba(83, 96, 116, 0.12);

  /* Industry accent colors (Lhoist-style) */
  --clr-steel:          #d63600;
  --clr-water:          #0078be;
  --clr-construction:   #6b7c1e;
  --clr-chemical:       #7b4f9e;
  --clr-paper:          #2e7d51;
  --clr-glass:          #0096a0;
  --clr-energy:         #e67e22;
  --clr-food:           #c0392b;

  /* Typography */
  --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs:    0.25rem;
  --space-sm:    0.5rem;
  --space-md:    1rem;
  --space-lg:    1.5rem;
  --space-xl:    2rem;
  --space-2xl:   3rem;
  --space-3xl:   5rem;

  /* Layout */
  --container-max: 1280px;
  --nav-height:    76px;
  --section-py:    3.25rem;

  /* Borders */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================================
   2. CSS RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--clr-text-body);
  background-color: var(--clr-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
  -webkit-user-drag: none;
  touch-action: manipulation;
}

input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; }

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-text-dark);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--clr-text-body);
}

.eyebrow {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--clr-accent);
  margin-bottom: 0.75rem;
}

.text-muted   { color: var(--clr-text-muted); }
.text-center  { text-align: center; }
.text-white   { color: var(--clr-white); }

/* ============================================================
   4. LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section { padding-top: var(--section-py); padding-bottom: var(--section-py); }
.section--light   { background-color: var(--clr-bg-light); }
.section--white   { background-color: var(--clr-white); }
.section--dark    { background-color: var(--clr-primary-dark); }

.section-header {
  margin-bottom: 2rem;
}

.section-header--center {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 2rem;
}

.section-header .section-title { margin-bottom: 0.875rem; }

.section-header .section-desc {
  font-size: 1.0625rem;
  color: var(--clr-text-body);
  max-width: 600px;
}

.section-header--center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    gap var(--transition-fast);
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn:hover   { transform: translateY(-1px); }
.btn:active  { transform: translateY(0); }

/* Gold primary */
.btn--primary {
  background: var(--clr-accent);
  color: var(--clr-white);
  border-color: var(--clr-accent);
}
.btn--primary:hover {
  background: var(--clr-accent-hover);
  border-color: var(--clr-accent-hover);
  box-shadow: 0 6px 20px rgba(230,168,23,0.4);
}

/* White outline (on dark) */
.btn--outline {
  background: transparent;
  color: var(--clr-white);
  border-color: rgba(255,255,255,0.6);
}
.btn--outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--clr-white);
}

/* Dark outline (on light bg) */
.btn--outline-dark {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}
.btn--outline-dark:hover {
  background: var(--clr-primary);
  color: var(--clr-white);
}

/* Text / ghost */
.btn--ghost {
  background: transparent;
  color: var(--clr-accent);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}
.btn--ghost:hover { color: var(--clr-accent-hover); gap: 0.75rem; transform: none; }

/* Sizes — kept for backwards compat, all CTA pills share base size */
.btn--sm  { padding: 0.5rem 1.125rem; font-size: 0.8125rem; }
.btn--sm svg { width: 16px; height: 16px; }
.btn--lg  { padding: 0.7rem 1.5rem; font-size: 1rem; }

/* ============================================================
   6. SCROLL PROGRESS
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--clr-accent);
  z-index: 9999;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

/* ============================================================
   7. BACK TO TOP
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 11rem;
  right: 2rem;
  z-index: 500;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-primary);
  color: var(--clr-white);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  border: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background var(--transition-fast);
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover   { background: var(--clr-accent); box-shadow: 0 6px 20px rgba(230,168,23,0.4); }

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  border: 2px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
  background: #2be06f;
}
.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

/* ============================================================
   8. ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   9. RESPONSIVE BASE
   ============================================================ */
@media (max-width: 768px) {
  :root { --section-py: 3rem; }

  /* Reduce base font size slightly on mobile for better readability */
  html { font-size: 16px; }
}

@media (max-width: 480px) {
  :root { --section-py: 2.25rem; }

  /* Floating CTAs — proper spacing: scroll → assistant → whatsapp */
  #back-to-top {
    bottom: 9.5rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
  .whatsapp-float {
    bottom: 1.25rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }
  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }
}

@media print {
  .header, .hero-particles, #scroll-progress, #back-to-top { display: none; }
  body { color: #000; }
}
