/* ============================================
   Macro Granule Industries — Stylesheet
   ============================================ */

:root {
  --bg-dark: #14181a;
  --bg-dark-2: #1b2023;
  --surface: #20262a;
  --surface-2: #262d31;
  --border: #2c3438;

  --bg-light: #f6f7f5;
  --bg-light-2: #eef1ec;
  --white: #ffffff;

  --text-light: #f4f6f4;
  --text-muted-on-dark: #aab2ab;
  --text-dark: #191d1a;
  --text-muted: #5b6660;

  --accent: #7cc443;
  --accent-dark: #5da832;
  --accent-light: #a8e07a;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.22);

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--text-dark);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0b0e0a;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #0b0e0a;
  box-shadow: 0 8px 20px rgba(124, 196, 67, 0.35);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(124, 196, 67, 0.42); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: var(--text-light);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(20, 24, 26, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  padding: 18px 0;
}
.site-header.scrolled {
  background: rgba(16, 19, 21, 0.92);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  padding: 12px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-light);
  letter-spacing: 0.2px;
}
.logo-text span { color: var(--accent); }

.nav ul {
  display: flex;
  gap: 34px;
}
.nav a {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-light);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(1100px 700px at 15% 10%, #232a26 0%, var(--bg-dark) 55%);
  overflow: hidden;
  padding-top: 110px;
}
.hero-bg { position: absolute; inset: 0; opacity: 0.5; }
.granule-field circle { fill: var(--accent); opacity: 0.18; }
.hero-tyre {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  height: 480px;
  opacity: 0.9;
}
.hero-content { position: relative; z-index: 2; max-width: 700px; padding-block: 60px; }
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  color: var(--text-light);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 700;
  margin-bottom: 22px;
}
.hero h1 .highlight { color: var(--accent); }
.hero-sub {
  color: var(--text-muted-on-dark);
  font-size: 1.08rem;
  max-width: 560px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Highlights ---------- */
.highlights { background: var(--bg-dark-2); padding: 60px 0; }
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  transition: transform var(--transition), border-color var(--transition);
}
.highlight-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.highlight-card i { color: var(--accent); font-size: 1.6rem; margin-bottom: 16px; }
.highlight-card h3 { color: var(--text-light); font-size: 1.05rem; margin-bottom: 10px; }
.highlight-card p { color: var(--text-muted-on-dark); font-size: 0.92rem; }

/* ---------- Section basics ---------- */
section { padding: 100px 0; }
.center { text-align: center; }
.section-sub {
  max-width: 560px;
  margin: 0 auto 50px;
  color: var(--text-muted);
}
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 18px; }
h2.light { color: var(--text-light); }
.eyebrow.center { display: block; text-align: center; }
.eyebrow.light { color: var(--accent); }

/* ---------- About ---------- */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  align-items: center;
}
.about-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-text p { color: var(--text-muted); margin-bottom: 18px; }
.about-list { margin: 24px 0 32px; display: grid; gap: 12px; }
.about-list li { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text-dark); }
.about-list i { color: var(--accent); }

/* ---------- Products ---------- */
.products { background: var(--bg-light-2); }
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 10px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 30px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.product-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: rgba(124,196,67,0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.product-icon i { color: var(--accent-dark); font-size: 1.5rem; }
.product-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.product-card h3 span { display: block; font-size: 0.82rem; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
.product-card p { color: var(--text-muted); margin-bottom: 18px; font-size: 0.95rem; }
.product-card ul { display: grid; gap: 8px; }
.product-card ul li { font-size: 0.88rem; color: var(--text-dark); padding-left: 20px; position: relative; }
.product-card ul li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--accent-dark);
  position: absolute; left: 0; top: 1px;
  font-size: 0.72rem;
}
.products-note { text-align: center; margin-top: 44px; color: var(--text-muted); }
.products-note a { color: var(--accent-dark); font-weight: 600; }

/* ---------- Sustainability ---------- */
.sustainability { background: linear-gradient(180deg, #ffffff 0%, #eef6e6 100%); }
.sustainability-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.sustainability-text p { color: var(--text-muted); }
.sustainability-points { display: grid; gap: 22px; }
.s-point {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--white);
  padding: 22px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.s-point i { color: var(--accent-dark); font-size: 1.3rem; margin-top: 4px; }
.s-point h4 { font-size: 1rem; margin-bottom: 4px; }
.s-point p { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact { background: var(--bg-dark-2); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-info .eyebrow { margin-bottom: 12px; }
.contact-info h2 { color: var(--text-light); }
.contact-info p { color: var(--text-muted-on-dark); margin-bottom: 30px; }
.contact-details { display: grid; gap: 20px; margin-bottom: 34px; }
.contact-details li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--text-light);
  font-size: 0.95rem;
}
.contact-details i { color: var(--accent); margin-top: 3px; width: 18px; }
.contact-details a { color: var(--text-light); }
.contact-details a:hover { color: var(--accent); }
.contact-cta-row { display: flex; gap: 16px; flex-wrap: wrap; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.contact-form h3 { color: var(--text-light); margin-bottom: 6px; }
.form-hint { color: var(--text-muted-on-dark); font-size: 0.85rem; margin-bottom: 22px; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  color: var(--text-muted-on-dark);
  font-size: 0.85rem;
  margin-bottom: 8px;
  font-weight: 500;
}
.form-row input, .form-row textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row textarea { resize: vertical; }
.form-note { margin-top: 14px; font-size: 0.88rem; color: var(--accent); min-height: 1.2em; }

/* ---------- Footer ---------- */
.site-footer { background: #101314; padding: 70px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 50px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--border);
}
.logo-text.light { color: var(--text-light); }
.footer-brand p { color: var(--text-muted-on-dark); margin-top: 14px; font-size: 0.9rem; max-width: 300px; }
.footer-links h4, .footer-contact h4 {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.footer-links ul { display: grid; gap: 10px; }
.footer-links a { color: var(--text-muted-on-dark); font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-contact p {
  color: var(--text-muted-on-dark);
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
}
.footer-contact i { color: var(--accent); margin-top: 3px; }
.footer-contact a { color: var(--text-muted-on-dark); }
.footer-contact a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding: 24px 0; }
.footer-bottom p { color: #5f6a63; font-size: 0.85rem; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0e0a;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 400;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .highlights-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 420px; margin: 0 auto; }
  .sustainability-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }

  .nav.mobile-open {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #101315;
    padding: 110px 28px 40px;
    overflow-y: auto;
  }
  .nav.mobile-open ul { flex-direction: column; gap: 4px; }
  .nav.mobile-open a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }

  .hero-tyre { width: 320px; height: 320px; right: -120px; opacity: 0.5; }
  .hero { min-height: auto; padding-top: 130px; padding-bottom: 70px; }
}

@media (max-width: 640px) {
  section { padding: 70px 0; }
  .highlights-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; text-align: left; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .contact-cta-row { flex-direction: column; }
  .contact-cta-row .btn { justify-content: center; }
}
