/* ==========================================================================
   CLSG — Design System
   Chandra Lakshmi Safety Glass Pvt. Ltd.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  /* ---- Color: rooted in the brand's own navy + the red used in its
     product banners, on a warm stone ground instead of clinical white ---- */
  --ink: #0b1e38;
  --ink-deep: #061024;
  --red: #b32a26;
  --red-deep: #8c201d;
  --stone: #f6f3ee;
  --stone-dim: #ece7de;
  --paper: #fffdf9;
  --graphite: #1c2430;
  --steel: #5b6472;
  --steel-pale: #9aa2ad;
  --brass: #a9803f;
  --line: #ddd7ca;
  --line-dark: rgba(255,255,255,.14);

  /* ---- Type ---- */
  --f-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* ---- Spacing scale (8px base) ---- */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;
  --sp-8: 64px;
  --sp-12: 96px;
  --sp-16: 128px;

  --container: 1280px;
  --radius: 3px;
  --ease: cubic-bezier(.16,.8,.24,1);
}

/* ---- Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-sans);
  color: var(--graphite);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }

::selection { background: var(--brass); color: #fff; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
html { scrollbar-color: var(--ink) var(--stone); scrollbar-width: thin; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--stone); }
::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 6px; }

/* ---- Type scale ---- */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.02em; line-height: 1.08; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 5.2vw, 4.6rem); font-weight: 900; letter-spacing: -.03em; }
h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h4 { font-size: 1.05rem; letter-spacing: -.01em; }
p { color: var(--steel); max-width: 62ch; }
p.lede { font-size: 1.2rem; color: var(--graphite); line-height: 1.55; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
}

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---- Layout ---- */
.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}
@media (min-width: 900px) { .wrap { padding-inline: var(--sp-6); } }

section { padding-block: var(--sp-12); position: relative; }
section.tight { padding-block: var(--sp-8); }
.bg-ink { background: var(--ink); color: #fff; }
.bg-ink h2, .bg-ink h3, .bg-ink h4 { color: #fff; }
.bg-ink p { color: rgba(255,255,255,.68); }
.bg-stone { background: var(--stone); }

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (min-width: 901px) and (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: -.01em;
  padding: 15px 30px;
  border-radius: var(--radius);
  transition: transform .3s var(--ease), background .3s ease, color .3s ease, border-color .3s ease;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--ink); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.bg-ink .btn-ghost, .hero .btn-ghost, .page-hero .btn-ghost { border-color: var(--line-dark); color: #fff; }
.btn-ghost:hover { border-color: var(--ink); }
.bg-ink .btn-ghost:hover, .hero .btn-ghost:hover, .page-hero .btn-ghost:hover { border-color: #fff; }
.btn-text {
  font-weight: 700;
  font-size: .92rem;
  position: relative;
  padding-bottom: 3px;
}
.btn-text::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.btn-text:hover::after { transform-origin: left; }
.btn-text svg { transition: transform .3s var(--ease); }
.btn-text:hover svg { transform: translateX(4px); }

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding-block: 22px;
  transition: padding .35s var(--ease), background .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  padding-block: 14px;
  background: rgba(11,30,56,.92);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(255,255,255,.08);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand img { height: 40px; width: auto; }
.brand-text { line-height: 1.15; }
.brand-text strong { display: block; font-size: .95rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text span { display: block; font-size: .66rem; letter-spacing: .08em; color: rgba(255,255,255,.55); text-transform: uppercase; }

.site-header:not(.is-scrolled) { background: linear-gradient(180deg, rgba(6,16,36,.55), transparent); }

.main-nav { display: flex; align-items: center; gap: var(--sp-6); }
.main-nav ul { display: flex; gap: var(--sp-4); }
.main-nav a {
  color: rgba(255,255,255,.82);
  font-size: .88rem;
  font-weight: 600;
  position: relative;
  padding-block: 4px;
}
.main-nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.main-nav a:hover, .main-nav a.active { color: #fff; }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 26px; }
.nav-toggle span { height: 2px; background: #fff; transition: transform .3s ease, opacity .3s ease; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 0 0 0 30%;
    background: var(--ink-deep);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: var(--sp-6);
    transform: translateX(100%);
    transition: transform .45s var(--ease);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: var(--sp-3); }
  .main-nav a { font-size: 1.3rem; }
  body.nav-open { overflow: hidden; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.25) saturate(1.05) contrast(1.05) brightness(.62);
  transform: scale(1.08);
  transition: transform 6s var(--ease);
}
.hero.is-in .hero-media img { transform: scale(1); }
.hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,16,36,.15) 0%, rgba(6,16,36,.55) 68%, rgba(6,16,36,.92) 100%);
}
.hero-content { position: relative; z-index: 2; color: #fff; padding-block: var(--sp-12) var(--sp-8); width: 100%; }
.hero .eyebrow { color: var(--brass); margin-bottom: var(--sp-2); display: block; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero p.lede { color: rgba(255,255,255,.72); max-width: 52ch; margin-top: var(--sp-3); }
.hero-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); flex-wrap: wrap; }
.hero-stats { display: flex; gap: var(--sp-6); margin-top: var(--sp-8); border-top: 1px solid var(--line-dark); padding-top: var(--sp-3); flex-wrap: wrap; }
.hero-stats div strong { display: block; font-family: var(--f-mono); font-size: 1.8rem; color: var(--brass); }
.hero-stats div span { font-size: .78rem; color: rgba(255,255,255,.6); }

.page-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
  overflow: hidden;
}
.page-hero .hero-content { padding-block: var(--sp-12) var(--sp-6); }
.page-hero h1 { max-width: 18ch; }

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
  background: var(--paper);
  border-top: 3px solid transparent;
  padding: var(--sp-4);
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.card:hover { border-top-color: var(--brass); transform: translateY(-4px); }
.card .num { font-family: var(--f-mono); font-size: .8rem; color: var(--steel-pale); }
.card h3 { margin-top: var(--sp-1); }
.card p { margin-top: var(--sp-1); font-size: .95rem; }

.tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
}
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.3) saturate(1.05) contrast(1.05);
  transition: transform .7s var(--ease), filter .5s ease;
}
.tile:hover img { transform: scale(1.06); filter: grayscale(0); }
.tile::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6,16,36,.88) 100%);
}
.tile-label {
  position: absolute; left: var(--sp-3); right: var(--sp-3); bottom: var(--sp-3);
  z-index: 2; color: #fff;
}
.tile-label .eyebrow { color: var(--brass); }
.tile-label h3 { color: #fff; margin-top: 4px; }

.feature-row {
  display: flex;
  gap: var(--sp-4);
  padding-block: var(--sp-3);
  border-top: 1px solid var(--line);
  align-items: flex-start;
}
.feature-row:last-child { border-bottom: 1px solid var(--line); }
.feature-row img, .feature-row svg { width: 44px; height: 44px; object-fit: contain; flex: none; }
.feature-row h3, .feature-row h4 { margin-bottom: 4px; font-size: 1.05rem; }
.feature-row p { font-size: .94rem; }

/* ---- Spec table ---- */
.spec-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.spec-table th { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); font-weight: 600; }
.spec-table td.mono { color: var(--ink); font-weight: 600; }
.spec-table tr:hover td { background: var(--stone); }

/* ---- Logo strip ---- */
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-6); }
.logo-strip img { height: 34px; width: auto; object-fit: contain; filter: grayscale(1) opacity(.55); transition: filter .3s ease; }
.logo-strip img:hover { filter: grayscale(0) opacity(1); }

/* ---- Section heading pattern ---- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.section-head .eyebrow { display: block; margin-bottom: var(--sp-1); }
.section-head p { margin-top: var(--sp-2); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--ink-deep); color: rgba(255,255,255,.6); padding-block: var(--sp-8) var(--sp-4); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-6); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--sp-2); }
.footer-grid li { margin-bottom: 10px; font-size: .9rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand strong { color: #fff; font-size: 1.1rem; display: block; margin-bottom: var(--sp-2); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: var(--sp-8); padding-top: var(--sp-3); border-top: 1px solid var(--line-dark); font-size: .8rem; flex-wrap: wrap; gap: var(--sp-2); }

/* ==========================================================================
   MOTION: reveal system
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-group .reveal:nth-child(1) { transition-delay: .05s; }
.reveal-group .reveal:nth-child(2) { transition-delay: .12s; }
.reveal-group .reveal:nth-child(3) { transition-delay: .19s; }
.reveal-group .reveal:nth-child(4) { transition-delay: .26s; }
.reveal-group .reveal:nth-child(5) { transition-delay: .33s; }
.reveal-group .reveal:nth-child(6) { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-media img { transition: none !important; transform: none !important; opacity: 1 !important; }
}

/* ---- Custom line-icon system (replaces stock clipart icons) ---- */
.icon-svg {
  color: var(--ink);
  display: block;
  margin-bottom: var(--sp-1);
  transition: color .35s ease, transform .35s var(--ease);
}
.feature-row .icon-svg { color: var(--brass); margin-bottom: 0; flex: none; }
.card:hover .icon-svg,
.feature-row:hover .icon-svg,
.bg-ink .icon-svg { color: var(--brass); }
.bg-ink [class*="reveal"]:hover .icon-svg { transform: scale(1.08); }

/* ---- Contact form: validation + submit states ---- */
.quote-form { display: grid; gap: var(--sp-2); }
.field { display: flex; flex-direction: column; }
.field label { font-size: .8rem; font-weight: 600; color: var(--steel); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 6px;
  font: inherit;
  background: var(--paper);
  color: var(--graphite);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11,30,56,.1);
}
.field-error {
  display: none;
  font-size: .78rem;
  color: var(--red);
  margin-top: 4px;
}
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.field.has-error .field-error { display: block; }
.form-status {
  max-width: none;
  font-size: .9rem;
  font-weight: 600;
  min-height: 1.4em;
}
.form-status.success { color: #1a7a4c; }
.form-status.error { color: var(--red); }

/* ---- Utilities ---- */
.mt-1{margin-top:var(--sp-1)}.mt-2{margin-top:var(--sp-2)}.mt-3{margin-top:var(--sp-3)}.mt-4{margin-top:var(--sp-4)}.mt-6{margin-top:var(--sp-6)}
.center{text-align:center}
.max-w{max-width:70ch}
