/* ============================================================
   MASMIRE — Global Stylesheet
   Brand: MasMire LTD · B2B product sourcing & manufacturing
   Palette derived from brand logo (#609969 green)
   ============================================================ */

:root {
  /* Brand palette */
  --green: #609969;
  --green-dark: #4c7d56;
  --green-deep: #1e3a2a;
  --ink: #12241a;
  --forest: #0d1f15;
  --paper: #f6f8f6;
  --white: #ffffff;
  --muted: #5c6b61;
  --line: #e3e9e4;
  --gold: #c9a86a;

  /* Type */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Rhythm */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(13, 31, 21, 0.10);
  --shadow-lg: 0 24px 64px rgba(13, 31, 21, 0.16);
  --container: 1160px;
  --gutter: clamp(20px, 4vw, 40px);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- Layout helpers ---------- */
.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section { padding-block: clamp(64px, 9vw, 112px); }
.section--tint { background: var(--paper); }
.section--dark { background: var(--forest); color: #dbe7de; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--green);
  border-radius: 2px;
}
.section--dark .eyebrow { color: #8fc79c; }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(30px, 4.5vw, 46px); margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 17px; }
.section--dark .section-head p { color: #9db3a5; }

.center { text-align: center; }
.center .section-head { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), color 0.25s var(--ease);
  min-height: 48px;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 8px 24px rgba(96, 153, 105, 0.35); }
.btn--primary:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn--ghost { border: 1.5px solid rgba(255,255,255,0.45); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--green-deep); transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.brand img { height: 34px; width: auto; }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; color: var(--ink); }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-block: 8px;
  transition: color 0.2s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 2px;
  width: 100%; height: 2px;
  background: var(--green);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav a:hover { color: var(--green); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--green); }
.nav .btn { margin-left: 8px; padding: 11px 22px; }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 10px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: var(--forest);
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(0.9);
}
.hero__bg--banner {
  opacity: 0.38;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(13,31,21,0.92) 12%, rgba(13,31,21,0.55) 55%, rgba(13,31,21,0.25) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-block: clamp(80px, 12vh, 140px); }
.hero h1 {
  font-size: clamp(38px, 6.5vw, 68px);
  max-width: 14ch;
  margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: #8fc79c; }
.hero p {
  max-width: 52ch;
  font-size: clamp(16px, 1.6vw, 19px);
  color: #c9d8cd;
  margin-bottom: 36px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.16);
}
.hero__meta div { display: flex; flex-direction: column; gap: 2px; }
.hero__meta strong { font-family: var(--font-display); font-size: 24px; color: #fff; }
.hero__meta span { font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #93a89b; }

/* ---------- Feature / value grid ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #cfe0d2; }
.card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: #eaf3ec;
  color: var(--green);
  border-radius: 12px;
  margin-bottom: 20px;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- Split feature ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.split--reverse .split__media { order: -1; }
.split__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 340px;
}
.split h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 18px; }
.split p.lead { color: var(--muted); font-size: 17px; margin-bottom: 20px; }
.split ul { margin-top: 24px; display: grid; gap: 14px; }
.split li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-size: 15.5px; }
.split li svg { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; margin-top: 3px; }
.split li strong { font-family: var(--font-display); }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card__media {
  aspect-ratio: 4 / 3;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.product-card__media img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.product-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.product-card__tag {
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: #eaf3ec;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.product-card h3 { font-size: 19px; margin-bottom: 8px; }
.product-card .model { font-family: var(--font-display); font-size: 13px; color: var(--green-dark); font-weight: 600; letter-spacing: 0.05em; margin-bottom: 10px; }
.product-card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.product-card__specs {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  color: var(--muted);
}
.product-card__specs span { display: flex; justify-content: space-between; gap: 10px; }
.product-card__specs b { color: var(--ink); font-weight: 600; text-align: right; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 30px 16px; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 58px);
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.stat__num span { color: #8fc79c; }
.stat__label {
  margin-top: 10px;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93a89b;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--green-deep);
  background-image: radial-gradient(60% 120% at 85% 20%, rgba(96,153,105,0.35) 0%, transparent 60%);
  color: #fff;
  text-align: center;
  padding-block: clamp(70px, 9vw, 110px);
}
.cta-band h2 { font-size: clamp(30px, 4.5vw, 46px); max-width: 24ch; margin: 0 auto 18px; }
.cta-band p { color: #b9cdbf; max-width: 52ch; margin: 0 auto 36px; font-size: 17px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(36px, 6vw, 72px); }
.contact-info h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 18px; }
.contact-info > p { color: var(--muted); margin-bottom: 34px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; padding-block: 16px; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: none; }
.contact-item svg { width: 22px; height: 22px; color: var(--green); flex-shrink: 0; margin-top: 2px; }
.contact-item h4 { font-size: 15px; margin-bottom: 2px; }
.contact-item p, .contact-item a { color: var(--muted); font-size: 15px; }
.contact-item a:hover { color: var(--green); }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(26px, 4vw, 42px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 7px;
}
.form-field label .req { color: #c0392b; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fbfcfb;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(96, 153, 105, 0.14);
  background: #fff;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.form-success {
  display: none;
  background: #eaf3ec;
  border: 1px solid #c4ddca;
  color: var(--green-deep);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14.5px;
  margin-bottom: 18px;
}
.form-success.show { display: block; }

/* ---------- Product details (expandable specs) ---------- */
.product-card__details { margin-top: 16px; }
.product-card__details summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
  padding-block: 10px;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.product-card__details summary::-webkit-details-marker { display: none; }
.product-card__details summary::after {
  content: "+";
  font-size: 16px;
  line-height: 1;
  transition: transform 0.25s var(--ease);
}
.product-card__details[open] summary::after { transform: rotate(45deg); }
.product-card__details summary:hover { color: var(--green-dark); }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  background: var(--forest);
  color: #fff;
  padding-block: clamp(64px, 9vw, 96px);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 100% at 85% 0%, rgba(96,153,105,0.30) 0%, transparent 55%);
}
.page-hero__inner { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(34px, 5.5vw, 54px); margin-bottom: 14px; }
.page-hero p { color: #b9cdbf; max-width: 56ch; font-size: 17px; }
.page-hero .eyebrow { color: #8fc79c; }

/* ---------- About page ---------- */
.timeline { display: grid; gap: 26px; }
.timeline-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 22px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.timeline-item__year {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
}
.timeline-item h3 { font-size: 17px; margin-bottom: 6px; }
.timeline-item p { color: var(--muted); font-size: 14.5px; }

/* ---------- Brands page ---------- */
.brand-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
  padding-block: clamp(48px, 7vw, 80px);
}
.brand-line + .brand-line { border-top: 1px solid var(--line); }
.brand-line--reverse .brand-line__media { order: -1; }
.brand-line__media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  background: #fff;
}
.brand-line__media img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.brand-line h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.brand-line .tagline { font-family: var(--font-display); color: var(--green); font-weight: 600; letter-spacing: 0.04em; margin-bottom: 16px; }
.brand-line p { color: var(--muted); margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--green-deep);
  background: #eaf3ec;
  border-radius: 999px;
  padding: 8px 16px;
}

/* ---------- Products page ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.filter-btn {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.25s var(--ease);
  min-height: 44px;
}
.filter-btn:hover { border-color: var(--green); color: var(--green); }
.filter-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14.5px; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--green-dark); letter-spacing: 0.06em; text-transform: uppercase; width: 38%; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: #9db3a5; padding-block: 64px 40px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 18px; }
.site-footer .brand img { height: 30px; margin-bottom: 16px; }
.site-footer p { font-size: 14.5px; max-width: 34ch; }
.site-footer ul { display: grid; gap: 10px; }
.site-footer a { font-size: 14.5px; transition: color 0.2s; }
.site-footer a:hover { color: #8fc79c; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
}
.site-footer__bottom a:hover { color: #8fc79c; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-block: clamp(90px, 14vw, 160px); }
.notfound h1 { font-size: clamp(80px, 16vw, 160px); color: var(--green); line-height: 1; }
.notfound h2 { font-size: clamp(24px, 3.5vw, 34px); margin: 18px 0 12px; }
.notfound p { color: var(--muted); margin-bottom: 30px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .product-card { transition: none; }
  .btn:hover, .card:hover, .product-card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: 76px 0 auto 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
    box-shadow: 0 24px 48px rgba(13,31,21,0.12);
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 15px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a::after { display: none; }
  .nav .btn { margin: 18px 0 0; justify-content: center; }
  .nav-toggle { display: flex; }

  .split, .split--reverse .split__media, .contact-grid, .brand-line, .brand-line--reverse .brand-line__media {
    grid-template-columns: 1fr;
  }
  .brand-line--reverse .brand-line__media { order: 0; }
  .split__media img { min-height: 260px; }
}

@media (max-width: 640px) {
  .grid--3, .grid--2, .product-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { min-height: 90vh; }
}
