/* ============================================
   S2 AIRDUCT — Global Design System
   Duct System Specialist — Premium Website
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,300&display=swap');

/* ─────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --clr-primary:       #97A0A7;   /* 60% — steel blue-grey */
  --clr-primary-light: #B8BFC4;
  --clr-primary-dark:  #7A858C;
  --clr-light:         #F1F1F1;   /* 30% — off-white */
  --clr-light-warm:    #EBEBEB;
  --clr-accent:        #556775;   /* 10% — deep slate */
  --clr-accent-dark:   #3D5060;
  --clr-accent-light:  #6D8494;
  --clr-white:         #FFFFFF;
  --clr-dark:          #1E2A32;
  --clr-text:          #3D4C57;
  --clr-text-muted:    #7A8A94;
  --clr-border:        rgba(151, 160, 167, 0.22);
  --clr-border-strong: rgba(151, 160, 167, 0.4);

  /* Gradients */
  --grad-hero:     linear-gradient(145deg, #F1F1F1 0%, #E8ECEE 40%, #DDE3E7 100%);
  --grad-accent:   linear-gradient(135deg, #556775 0%, #3D5060 100%);
  --grad-dark:     linear-gradient(135deg, #1E2A32 0%, #2C3E4A 100%);
  --grad-shimmer:  linear-gradient(90deg, #F1F1F1 25%, #E0E4E6 50%, #F1F1F1 75%);

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(30, 42, 50, 0.06);
  --shadow-sm:  0 4px 12px rgba(30, 42, 50, 0.08);
  --shadow-md:  0 8px 28px rgba(30, 42, 50, 0.12);
  --shadow-lg:  0 16px 48px rgba(30, 42, 50, 0.16);
  --shadow-xl:  0 24px 64px rgba(30, 42, 50, 0.2);
  --shadow-card: 0 2px 8px rgba(85, 103, 117, 0.08), 0 8px 32px rgba(85, 103, 117, 0.06);
  --shadow-hover: 0 8px 24px rgba(85, 103, 117, 0.15), 0 20px 48px rgba(85, 103, 117, 0.1);
  --shadow-inner: inset 0 2px 8px rgba(30, 42, 50, 0.06);

  /* Typography */
  --font:   'Kanit', sans-serif;
  --fs-xs:  0.75rem;
  --fs-sm:  0.875rem;
  --fs-md:  1rem;
  --fs-lg:  1.125rem;
  --fs-xl:  1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 2rem;
  --fs-4xl: 2.5rem;
  --fs-5xl: 3.25rem;
  --fs-6xl: 4rem;
  --fs-7xl: 5rem;

  /* Spacing */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;  --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.25rem; --sp-6: 1.5rem;
  --sp-8: 2rem;     --sp-10: 2.5rem; --sp-12: 3rem;
  --sp-16: 4rem;    --sp-20: 5rem;   --sp-24: 6rem;
  --sp-32: 8rem;

  /* Border Radius */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 9999px;

  /* Transitions */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:      all 0.15s var(--ease);
  --t:           all 0.3s var(--ease);
  --t-slow:      all 0.5s var(--ease);
  --t-spring:    all 0.4s var(--ease-spring);

  /* Layout */
  --max-w:      1300px;
  --header-h:   96px;
  --section-py: 6rem;
}

/* ─────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.footer-logo-link .logo-name {
  color: var(--clr-white);
  font-size: var(--fs-xl);
}

.footer-logo-link .logo-tagline {
  color: rgba(255,255,255,0.4);
}

.footer-brand .logo-name { margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--clr-text);
  background: var(--clr-white);
  line-height: 1.75;
  overflow-x: hidden;
}

img  { max-width: 100%; height: auto; display: block; }
a    { text-decoration: none; color: inherit; transition: var(--t); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
svg  { flex-shrink: 0; }

/* ─────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-8);
}

.section        { padding: var(--section-py) 0; }
.section-lg     { padding: calc(var(--section-py) * 1.4) 0; }
.section-sm     { padding: var(--sp-12) 0; }

/* ─────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────── */
.h-display {
  font-size: var(--fs-7xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--clr-dark);
}

.h1 {
  font-size: var(--fs-6xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--clr-dark);
}

.h2 {
  font-size: var(--fs-5xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--clr-dark);
}

.h3 {
  font-size: var(--fs-4xl);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--clr-dark);
}

.h4 {
  font-size: var(--fs-3xl);
  font-weight: 600;
  line-height: 1.25;
  color: var(--clr-dark);
}

.h5 {
  font-size: var(--fs-2xl);
  font-weight: 600;
  line-height: 1.3;
  color: var(--clr-dark);
}

.text-label {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-accent);
}

.text-body     { font-size: var(--fs-md);  line-height: 1.75; }
.text-body-sm  { font-size: var(--fs-sm);  line-height: 1.7; }
.text-muted    { color: var(--clr-text-muted); }
.text-accent   { color: var(--clr-accent); }
.text-white    { color: var(--clr-white); }
.text-dark     { color: var(--clr-dark); }
.text-center   { text-align: center; }

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.9rem 2rem;
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  transition: var(--t);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid transparent;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--t);
}

.btn:hover::before { background: rgba(255,255,255,0.12); }

.btn-primary {
  background: var(--clr-dark);
  color: var(--clr-white);
  border-color: var(--clr-dark);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--grad-accent);
  color: var(--clr-white);
  border-color: var(--clr-accent);
  box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-outline {
  background: transparent;
  color: var(--clr-dark);
  border-color: var(--clr-border-strong);
}

.btn-outline:hover {
  background: var(--clr-light);
  border-color: var(--clr-primary);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: var(--clr-white);
  border-color: rgba(255,255,255,0.4);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}

.btn-lg { padding: 1.1rem 2.5rem; font-size: var(--fs-md); }
.btn-sm { padding: 0.6rem 1.4rem; font-size: var(--fs-xs); }

/* ─────────────────────────────────────────────
   BADGES & LABELS
───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  background: rgba(85, 103, 117, 0.09);
  border: 1px solid rgba(85, 103, 117, 0.2);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-accent);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-accent);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   CARDS
───────────────────────────────────────────── */
.card {
  background: var(--clr-white);
  border-radius: var(--r-xl);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-card);
  padding: var(--sp-8);
  transition: var(--t);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-6px);
  border-color: rgba(85, 103, 117, 0.25);
}

.card-glass {
  background: rgba(241, 241, 241, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--r-xl);
}

/* ─────────────────────────────────────────────
   SECTION HEADERS
───────────────────────────────────────────── */
.section-header {
  max-width: 640px;
  margin-bottom: var(--sp-16);
}

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

.section-eyebrow {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-accent);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.section-eyebrow.center {
  justify-content: center;
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--clr-border-strong);
  max-width: 40px;
}

.section-eyebrow.center::before,
.section-eyebrow.center::after {
  max-width: 40px;
}

.section-title {
  font-size: var(--fs-5xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--clr-dark);
  margin-bottom: var(--sp-6);
}

.section-desc {
  font-size: var(--fs-lg);
  font-weight: 300;
  line-height: 1.8;
  color: var(--clr-text-muted);
}

/* ─────────────────────────────────────────────
   DIVIDER
───────────────────────────────────────────── */
.divider {
  width: 52px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-primary));
  border-radius: var(--r-full);
  margin: var(--sp-4) 0;
}

.divider.center { margin-inline: auto; }

/* ─────────────────────────────────────────────
   ICON BOX
───────────────────────────────────────────── */
.icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--t);
}

.icon-box-sm { width: 44px; height: 44px; border-radius: var(--r-md); }
.icon-box-lg { width: 72px; height: 72px; border-radius: var(--r-xl); }

.icon-box-light {
  background: var(--clr-light);
  color: var(--clr-accent);
}

.icon-box-accent {
  background: var(--grad-accent);
  color: var(--clr-white);
}

.icon-box-dark {
  background: var(--clr-dark);
  color: var(--clr-white);
}

/* ─────────────────────────────────────────────
   PAGE HERO (inner pages)
───────────────────────────────────────────── */
.page-hero {
  padding-top: calc(var(--header-h) + var(--sp-20));
  padding-bottom: var(--sp-20);
  background: var(--grad-dark);
  color: var(--clr-white);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(151,160,167,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -80px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(85,103,117,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-6);
}

.page-hero-title {
  font-size: var(--fs-6xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-6);
}

.page-hero-desc {
  font-size: var(--fs-lg);
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
}

/* ─────────────────────────────────────────────
   STARS RATING
───────────────────────────────────────────── */
.stars {
  display: flex;
  gap: 3px;
  color: #F5A623;
}

.stars svg { width: 16px; height: 16px; }

/* ─────────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes float {
  0%,100% { transform: translateY(0px) rotate(0deg); }
  33%      { transform: translateY(-14px) rotate(1deg); }
  66%      { transform: translateY(-7px) rotate(-1deg); }
}

@keyframes pulse-slow {
  0%,100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.05); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Scroll-triggered animations */
.anim-up, .anim-left, .anim-right, .anim-fade {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.anim-up    { transform: translateY(36px); }
.anim-left  { transform: translateX(-36px); }
.anim-right { transform: translateX(36px); }
.anim-fade  { transform: none; }

.anim-up.in, .anim-left.in, .anim-right.in, .anim-fade.in {
  opacity: 1;
  transform: none !important;
}

.d-1 { transition-delay: 0.08s; }
.d-2 { transition-delay: 0.16s; }
.d-3 { transition-delay: 0.24s; }
.d-4 { transition-delay: 0.32s; }
.d-5 { transition-delay: 0.40s; }
.d-6 { transition-delay: 0.48s; }

/* ─────────────────────────────────────────────
   GRID UTILITIES
───────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

/* ─────────────────────────────────────────────
   SCROLLBAR
───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--clr-light); }
::-webkit-scrollbar-thumb { background: var(--clr-primary); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-accent); }

::selection { background: var(--clr-accent); color: var(--clr-white); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --fs-7xl: 4rem;
    --fs-6xl: 3.25rem;
    --fs-5xl: 2.75rem;
    --section-py: 5rem;
  }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --fs-7xl: 3rem;
    --fs-6xl: 2.5rem;
    --fs-5xl: 2.25rem;
    --fs-4xl: 2rem;
    --section-py: 4rem;
  }
  .container  { padding: 0 var(--sp-5); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: var(--sp-5); }
  .section-title { font-size: var(--fs-4xl); }
  .page-hero-title { font-size: var(--fs-5xl); }
}

@media (max-width: 480px) {
  :root { --section-py: 3rem; }
  .container { padding: 0 var(--sp-4); }
  .btn { padding: 0.8rem 1.6rem; }
  .btn-lg { padding: 0.95rem 2rem; font-size: var(--fs-sm); }
}

/* --- COMPREHENSIVE RESPONSIVE FIXES (Global) --- */
@media (max-width: 1200px) {
  .container { padding: 0 40px; }
}
@media (max-width: 991px) {
  .container { padding: 0 30px; }
  .section, .section-lg, .section-sm { padding: 3rem 0; }
  .section-title { font-size: 2.25rem !important; }
}
@media (max-width: 767px) {
  .container { padding: 0 20px; }
  .section-title { font-size: 2rem !important; }
  .page-hero-title { font-size: 2.5rem !important; }
  .btn, .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section-title { font-size: 1.75rem !important; }
  .page-hero-title { font-size: 2rem !important; }
}
