/* ============================================================
   Periyasamy Industriess — Modern Design System
   ============================================================ */

/* NOTE: All COLOR tokens live in theme.css (dark + light schemes).
   This file holds only structural tokens + layout/structure rules. */
:root {
  --radius:   18px;
  --radius-sm: 12px;
  --maxw:     1200px;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --marquee-h: 48px;

  --font-sans:    "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
}

/* ---------- 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-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--marquee-h); /* reserve room for the fixed bottom ticker */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
svg { display: block; }
::selection { background: var(--accent); color: #1a0f00; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; position: relative; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h3 { font-size: 1.25rem; }
.grad { background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); display: inline-block; }
.eyebrow--light { color: var(--accent-2); }

.section__head { max-width: 640px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.section__head .eyebrow { justify-content: center; }
.section__sub { color: var(--muted); margin-top: 1rem; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  --pad: 0.85rem 1.5rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: var(--pad);
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  border-radius: 100px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, color 0.3s;
  white-space: nowrap;
}
.btn--sm { --pad: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn--lg { --pad: 1rem 1.9rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--primary {
  background: var(--grad-accent); color: #1a0f00;
  box-shadow: 0 12px 30px -10px rgba(255, 122, 24, 0.6);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -10px rgba(255, 122, 24, 0.75); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,0.03); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-3px); }

/* ============================================================
   Header
   ============================================================ */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
  padding: 0.7rem 0;
}
.nav { display: flex; align-items: center; gap: 0.5rem; }
.nav__links { margin-left: auto; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand__mark { display: grid; place-items: center; background: #fff; border-radius: 9px; padding: 4px; box-shadow: 0 4px 14px -6px rgba(0,0,0,0.45); transition: transform 0.4s var(--ease); }
.brand:hover .brand__mark { transform: translateY(-2px) scale(1.05); }
.brand__mark img { width: 30px; height: 30px; object-fit: contain; display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-display); }
.brand__text strong { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.brand__text em { font-style: normal; font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links > a:not(.btn) {
  font-size: 0.95rem; font-weight: 500; color: var(--muted); position: relative; padding: 0.25rem 0;
  transition: color 0.25s;
}
.nav__links > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--grad-accent); transition: width 0.3s var(--ease);
}
.nav__links > a:not(.btn):hover { color: var(--text); }
.nav__links > a:not(.btn):hover::after { width: 100%; }

/* Theme toggle switch */
.theme-toggle { background: none; border: 0; cursor: pointer; padding: 0; margin-left: 0.4rem; display: inline-flex; align-items: center; }
.theme-toggle__track {
  width: 58px; height: 30px; border-radius: 100px; padding: 3px;
  background: var(--switch-track); border: 1.5px solid var(--switch-border);
  display: flex; align-items: center; transition: background 0.3s, border-color 0.3s;
}
.theme-toggle:hover .theme-toggle__track { border-color: var(--accent); }
.theme-toggle__thumb {
  position: relative; width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad-accent); color: #1a0f00; display: grid; place-items: center;
  transform: translateX(0); transition: transform 0.4s var(--ease);
  box-shadow: 0 4px 10px -2px rgba(0,0,0,0.45);
}
:root[data-theme="light"] .theme-toggle__thumb { transform: translateX(26px); }
.theme-toggle__thumb svg { position: absolute; width: 15px; height: 15px; transition: opacity 0.25s var(--ease), transform 0.4s var(--ease); }
.theme-toggle .ic-sun  { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-toggle .ic-moon { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="light"] .theme-toggle .ic-sun  { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="light"] .theme-toggle .ic-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; z-index: 110; }
.nav__toggle span { width: 26px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.25s; }
.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: 100svh; display: flex; align-items: center; padding-top: 6rem; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(1200px 600px at 75% 15%, rgba(255, 122, 24, 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 90%, rgba(56, 189, 248, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.hero__inner { position: relative; max-width: 880px; }
.hero__eyebrow {
  font-family: var(--font-display); font-size: 0.82rem; letter-spacing: 0.28em; font-weight: 600;
  color: var(--steel); text-transform: uppercase; margin-bottom: 1.4rem;
}
.hero__title { font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 1.04; margin-bottom: 1.5rem; }
.hero__lead { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 620px; margin-bottom: 2.2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3.5rem; }

.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 2.4rem 0 20px; padding: 1.5rem 0.5rem; width: 100%;
  background: var(--stat-card); border: 1px solid var(--line);
  border-radius: var(--radius); backdrop-filter: blur(8px);
}
.stat { text-align: center; padding: 0.35rem 0.9rem; position: relative; }
.stat:not(:first-child)::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 64%; background: var(--line);
}
.stat__num { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 700; color: var(--text); line-height: 1; }
.stat__label { font-size: 0.82rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.5rem; display: block; }

.hero__scroll { position: absolute; left: auto; right: 2rem; bottom: calc(var(--marquee-h) + 1.2rem); transform: none; width: 26px; height: 42px; border: 2px solid var(--muted-2); border-radius: 14px; display: grid; place-items: start center; padding-top: 7px; opacity: 0.7; }
/* Only show the scroll cue when the viewport is tall enough that it won't collide with hero content */
@media (max-height: 860px), (max-width: 760px) { .hero__scroll { display: none; } }
.hero__scroll span { width: 4px; height: 8px; background: var(--accent); border-radius: 2px; animation: scrolldot 1.6s infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(-4px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* ============================================================
   Marquee
   ============================================================ */
.marquee {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  height: var(--marquee-h); display: flex; align-items: center;
  background: var(--grad-accent); color: #1a0f00; overflow: hidden;
  box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, 0.45);
}
.marquee__track { display: inline-flex; gap: 1.5rem; white-space: nowrap; animation: marquee 32s linear infinite; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.05em; }
.marquee__track span { opacity: 0.95; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   About
   ============================================================ */
.about__grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.about__media { position: relative; height: 520px; }
.about__img { position: absolute; border-radius: var(--radius); background-size: cover; background-position: center; box-shadow: var(--shadow); }
.about__img--1 {
  inset: 0 30% 25% 0;
  background-image: linear-gradient(180deg, rgba(11,18,32,0.1), rgba(11,18,32,0.5)), url("../assets/img/about-1.jpg");
}
.about__img--2 {
  inset: 35% 0 0 35%; border: 4px solid var(--bg);
  background-image: linear-gradient(180deg, rgba(11,18,32,0.1), rgba(11,18,32,0.5)), url("../assets/img/about-2.jpg");
}
.about__badge {
  position: absolute; left: -8px; bottom: 8%; z-index: 3;
  background: var(--grad-accent); color: #1a0f00; padding: 1rem 1.3rem; border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px -12px rgba(255,122,24,0.6); text-align: center;
}
.about__badge strong { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.about__badge span { font-size: 0.78rem; font-weight: 600; }

.about__content > p { color: var(--muted); margin-top: 1.1rem; }
.about__content h2 { margin-top: 0.5rem; }
.about__cards { display: grid; gap: 1rem; margin-top: 2rem; }
.fcard {
  display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.1rem; align-items: center;
  padding: 1.2rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.fcard:hover { transform: translateX(6px); border-color: rgba(255,122,24,0.4); background: var(--surface-2); }
.fcard__icon { grid-row: span 2; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.fcard__icon svg { width: 24px; height: 24px; }
.fcard h3 { font-size: 1.05rem; align-self: end; }
.fcard p { color: var(--muted); font-size: 0.92rem; align-self: start; grid-column: 2; }

/* ============================================================
   Industries
   ============================================================ */
.industries { background: var(--bg-2); }
.ind__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.ind {
  position: relative; min-height: 420px; border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: flex-end; isolation: isolate; cursor: default;
  border: 1px solid var(--line);
  background-size: cover; background-position: center;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.ind::before { content: ""; position: absolute; inset: 0; z-index: -1; transition: transform 0.7s var(--ease); background-size: cover; background-position: center; }
.ind:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.ind:hover::before { transform: scale(1.08); }
.ind--oil::before    { background-image: url("../assets/img/ind-oil.jpg"); }
.ind--energy::before { background-image: url("../assets/img/ind-energy.jpg"); }
.ind--vehicle::before{ background-image: url("../assets/img/ind-vehicle.jpg"); }
.ind--mining::before { background-image: url("../assets/img/ind-mining.jpg"); }
.ind__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,18,32,0.1) 0%, rgba(11,18,32,0.55) 45%, rgba(11,18,32,0.96) 100%); }
.ind__body { padding: 1.6rem; }
.ind__no { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: var(--accent-2); letter-spacing: 0.1em; }
.ind__body h3 { font-size: 1.5rem; margin: 0.4rem 0 0.6rem; color: #fff; }
.ind__body p { color: rgba(255,255,255,0.82); font-size: 0.92rem; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.5s var(--ease), opacity 0.4s, margin 0.4s; }
.ind:hover .ind__body p { max-height: 200px; opacity: 1; }

/* ============================================================
   Facilities band
   ============================================================ */
.facilities { overflow: hidden; }
.facilities__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(115deg, rgba(11,18,32,0.97) 0%, rgba(11,18,32,0.78) 55%, rgba(15,26,46,0.6) 100%),
    url("../assets/img/facilities.jpg") center/cover;
}
.facilities__inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.facilities__content h2 { color: #fff; }
.facilities__content > p { color: rgba(255,255,255,0.78); margin-top: 1.1rem; max-width: 540px; }
.checklist { display: grid; gap: 0.7rem; margin: 1.6rem 0 2rem; }
.checklist li { display: flex; align-items: center; gap: 0.7rem; color: #fff; font-weight: 500; }
.checklist li::before { content: ""; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--grad-accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat; }

.facilities__metrics { display: grid; gap: 1rem; }
.metric { background: rgba(18, 29, 51, 0.7); border: 1px solid rgba(255,255,255,0.10); border-radius: var(--radius); padding: 1.6rem 1.8rem; backdrop-filter: blur(8px); }
.metric__num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; line-height: 1; }
.metric__label { color: rgba(255,255,255,0.72); font-size: 0.92rem; margin-top: 0.4rem; display: block; }

/* ============================================================
   Gallery
   ============================================================ */
.gallery__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 1.1rem; }
.gitem {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: var(--surface) center/cover; display: flex; align-items: flex-end; isolation: isolate;
  transition: transform 0.4s var(--ease);
}
.gitem::before { content: ""; position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; transition: transform 0.6s var(--ease); }
.gitem::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(11,18,32,0.9)); }
.gitem:hover { transform: scale(0.985); }
.gitem:hover::before { transform: scale(1.1); }
.gitem span { position: relative; z-index: 2; padding: 1.1rem 1.3rem; font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: #fff; }
.gitem--tall { grid-row: span 2; }
.gitem--wide { grid-column: span 2; }
.gitem:nth-child(1)::before { background-image: url("../assets/img/g1-turning.jpg"); }
.gitem:nth-child(2)::before { background-image: url("../assets/img/g2-valve.jpg"); }
.gitem:nth-child(3)::before { background-image: url("../assets/img/g3-vmc.jpg"); }
.gitem:nth-child(4)::before { background-image: url("../assets/img/g4-boring.jpg"); }
.gitem:nth-child(5)::before { background-image: url("../assets/img/g5-gearbox.jpg"); }
.gitem:nth-child(6)::before { background-image: url("../assets/img/g6-inspect.jpg"); }

/* ============================================================
   Contact
   ============================================================ */
.contact { background: var(--bg-2); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact__info > p { color: var(--muted); margin-top: 1rem; max-width: 440px; }
.contact__list { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
.contact__list li { display: flex; gap: 1.1rem; align-items: flex-start; }
.contact__ic { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.contact__ic svg { width: 22px; height: 22px; }
.contact__list strong { font-family: var(--font-display); display: block; margin-bottom: 0.2rem; }
.contact__list p { color: var(--muted); font-size: 0.95rem; }
.contact__list a:hover { color: var(--accent-2); }

.contact__form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.5rem); box-shadow: var(--shadow); display: grid; gap: 1.2rem; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.1rem 1rem 0.5rem; color: var(--text); font: inherit; font-size: 0.98rem; resize: vertical;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field textarea { padding-top: 1.4rem; }
.field label {
  position: absolute; left: 1rem; top: 0.95rem; color: var(--muted-2); pointer-events: none;
  font-size: 0.98rem; transition: transform 0.2s var(--ease), color 0.2s, font-size 0.2s;
  transform-origin: left;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,24,0.15); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-0.7rem) scale(0.78); color: var(--accent-2);
}
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-0.55rem) scale(0.78); }
.form__note { color: #6ee7a8; font-size: 0.92rem; text-align: center; font-weight: 500; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 5rem); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 2.5rem; padding-bottom: 3rem; }
.brand--footer .brand__text strong { font-size: 1.2rem; }
.footer__brand p { color: var(--muted); margin-top: 1rem; max-width: 280px; font-size: 0.95rem; }
.cert { margin-top: 1.6rem; }
.cert__label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 0.7rem; }
.cert__badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 1.1rem;
  box-shadow: var(--shadow); transition: transform 0.3s var(--ease);
}
.cert__badge:hover { transform: translateY(-3px); }
.cert__badge img { height: 38px; width: auto; }
.footer__col h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted-2); margin-bottom: 1.1rem; }
.footer__col a, .footer__col span { display: block; color: var(--muted); font-size: 0.95rem; margin-bottom: 0.65rem; transition: color 0.2s; }
.footer__col a:hover { color: var(--accent-2); }
.footer__bar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.footer__bar p { color: var(--muted-2); font-size: 0.88rem; }

/* ============================================================
   Floating chat launcher
   ============================================================ */
.chat-fab {
  position: fixed; right: 1.5rem; bottom: calc(var(--marquee-h) + 1.25rem); z-index: 95;
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad-accent); color: #1a0f00; display: grid; place-items: center;
  box-shadow: 0 14px 32px -8px rgba(255, 122, 24, 0.6);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.chat-fab:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 20px 42px -8px rgba(255, 122, 24, 0.75); }
.chat-fab:active { transform: scale(0.96); }
.chat-fab__ic { position: absolute; width: 28px; height: 28px; transition: opacity 0.25s var(--ease), transform 0.3s var(--ease); }
.chat-fab__ic--close { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.chat-fab.is-open .chat-fab__ic--chat  { opacity: 0; transform: rotate(90deg) scale(0.6); }
.chat-fab.is-open .chat-fab__ic--close { opacity: 1; transform: none; }

/* pulse ring */
.chat-fab__pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); z-index: -1; animation: fabpulse 2.4s var(--ease) infinite; }
@keyframes fabpulse { 0% { transform: scale(1); opacity: 0.5; } 70%, 100% { transform: scale(1.7); opacity: 0; } }

/* hover tooltip */
.chat-fab__tip {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%) translateX(8px);
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  padding: 0.5rem 0.85rem; border-radius: 10px; font-family: var(--font-display); font-weight: 600;
  font-size: 0.85rem; white-space: nowrap; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.chat-fab:hover .chat-fab__tip { opacity: 1; transform: translateY(-50%) translateX(0); }

@media (max-width: 760px) {
  .chat-fab { width: 54px; height: 54px; right: 1.1rem; }
  .chat-fab__ic { width: 25px; height: 25px; }
  .chat-fab__tip { display: none; }
}
@media (prefers-reduced-motion: reduce) { .chat-fab__pulse { animation: none; } }

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

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .ind__grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid, .facilities__inner, .contact__grid { grid-template-columns: 1fr; }
  .about__media { height: 440px; max-width: 520px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  /* backdrop-filter on the scrolled header makes it the containing block for the
     fixed mobile drawer, which breaks the drawer after scrolling. Use a solid
     background on mobile instead so the drawer stays anchored to the viewport. */
  .header.scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }

  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(80%, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.8rem;
    background: var(--surface); padding: 2rem; border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform 0.45s var(--ease); box-shadow: var(--shadow);
    z-index: 105;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links > a:not(.btn) { font-size: 1.2rem; }
  .nav__cta { width: 100%; }
  .nav__toggle { display: flex; }
  .theme-toggle { margin-left: auto; }

  .hero__stats { grid-template-columns: repeat(2, 1fr); margin-bottom: 20px; }
  .stat { padding: 0.9rem 0.6rem; }
  .stat:not(:first-child)::before { display: none; }
  .stat:nth-child(even)::before { display: block; } /* vertical divider between the two columns */
  .stat:nth-child(n+3)::after { /* horizontal divider between the two rows */
    content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px; background: var(--line);
  }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gitem--wide { grid-column: span 2; }
  .gitem--tall { grid-row: span 1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .ind__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
}

/* Touch devices: no hover, so always show industry descriptions */
@media (hover: none) {
  .ind__body p { max-height: 200px; opacity: 1; }
  .ind { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
