/**
 * SPB Character Building & Outbond
 * Design System: Ethos & Earth
 * Path: assets/css/style.css
 */

/* ========================================
   IMPORTS & VARIABLES
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Light Mode (Default) */
:root {
  --surface: #fcf9f8;
  --surface-dim: #dcd9d9;
  --surface-bright: #fcf9f8;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f6f3f2;
  --surface-container: #f0eded;
  --surface-container-high: #eae7e7;
  --surface-container-highest: #e5e2e1;
  --on-surface: #1b1b1c;
  --on-surface-variant: #424844;
  --inverse-surface: #303030;
  --inverse-on-surface: #f3f0ef;
  --outline: #727974;
  --outline-variant: #c1c8c3;
  --surface-tint: #476558;
  --primary: #163328;
  --on-primary: #ffffff;
  --primary-container: #2d4a3e;
  --on-primary-container: #99b9a9;
  --inverse-primary: #adcebe;
  --secondary: #44664b;
  --on-secondary: #ffffff;
  --secondary-container: #c5ecc9;
  --on-secondary-container: #4a6c50;
  --tertiary: #3e2a00;
  --on-tertiary: #ffffff;
  --tertiary-container: #5b3f00;
  --on-tertiary-container: #dba94c;
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #93000a;
  --background: #fcf9f8;
  --on-background: #1b1b1c;
  --surface-variant: #e5e2e1;
  --border-light: #d5d0c8;
  --shadow-subtle: 0px 4px 12px rgba(0, 0, 0, 0.05);
  --section-gap: 120px;
  --transition: 0.3s ease;
}

/* Dark Mode */
[data-theme="dark"] {
  --surface: #1a1a1a;
  --surface-dim: #121212;
  --surface-bright: #2a2a2a;
  --surface-container-lowest: #0f0f0f;
  --surface-container-low: #262626;
  --surface-container: #2a2a2a;
  --surface-container-high: #333333;
  --surface-container-highest: #3a3a3a;
  --on-surface: #ededed;
  --on-surface-variant: #a8a8a8;
  --inverse-surface: #ededed;
  --inverse-on-surface: #303030;
  --outline: #727974;
  --outline-variant: #3a3a3a;
  --surface-tint: #3a6b55;
  --primary: #3a6b55;
  --on-primary: #ffffff;
  --primary-container: #2d4a3e;
  --on-primary-container: #99b9a9;
  --inverse-primary: #163328;
  --secondary: #8dd5a0;
  --on-secondary: #0d3d1d;
  --secondary-container: #2c4e34;
  --on-secondary-container: #aad0ae;
  --tertiary: #f2be5f;
  --on-tertiary: #3a2800;
  --tertiary-container: #5e4200;
  --on-tertiary-container: #ffdea8;
  --error: #ffb4ab;
  --on-error: #690005;
  --error-container: #93000a;
  --on-error-container: #ffdad6;
  --background: #1a1a1a;
  --on-background: #ededed;
  --surface-variant: #3a3a3a;
  --border-light: #3a3a3a;
  --shadow-subtle: 0px 4px 12px rgba(0, 0, 0, 0.3);
}

/* ========================================
   RESET & BASE
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  background-color: var(--background);
  color: var(--on-background);
  overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.display-xl, h1 {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.11;
  letter-spacing: -0.02em;
}

@media (max-width: 767px) {
  .display-xl, h1 {
    font-size: 48px;
    line-height: 1.17;
    letter-spacing: -0.01em;
  }
}

.headline-lg, h2 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.2;
}

h4 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.33;
}

.body-md {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
}

.body-sm {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.label-caps {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.43;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.small, small {
  font-size: 14px;
  font-weight: 400;
}

/* ========================================
   SPACING & GRID
   ======================================== */

.container {
  width: 100%;
  padding: 0 20px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 24px;
    max-width: 1200px;
  }
}

/* ========================================
   BUTTONS
   ======================================== */

.btn,
.theme-toggle,
.lang-toggle .lang-btn,
.hamburger,
.nav-admin-btn {
  transition: 
    transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1),
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover,
.theme-toggle:hover,
.lang-btn:hover,
.hamburger:hover,
.nav-admin-btn:hover {
  transform: translateY(-1px);
}

.btn:active,
.theme-toggle:active,
.lang-btn:active,
.hamburger:active,
.nav-admin-btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:focus-visible,
.theme-toggle:focus-visible,
.lang-btn:focus-visible,
.hamburger:focus-visible,
.nav-admin-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 0.5rem;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  transition: all var(--transition);
}

.btn-primary {
  background-color: var(--primary-container);
  color: var(--on-primary);
  border: 1px solid var(--primary-container);
}

.btn-primary:hover {
  background-color: #1E332A;
  border-color: #1E332A;
}

.btn-primary:active {
  opacity: 0.9;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary-container);
}

.btn-secondary:hover {
  background-color: var(--surface-container-low);
}

.btn-ghost {
  background-color: transparent;
  color: var(--primary);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-ghost:hover {
  opacity: 0.7;
}

.btn-inverse {
  background-color: var(--on-primary);
  color: var(--primary-container);
  border: 1px solid var(--on-primary);
}

.btn-inverse:hover {
  opacity: 0.9;
}

/* ========================================
   CARDS & CONTAINERS
   ======================================== */

.card {
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 32px;
  box-shadow: none;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--outline);
}

@media (max-width: 767px) {
  .card {
    padding: 20px;
  }
}

.card-sm {
  padding: 20px;
}

/* ========================================
   INPUTS & FORMS
   ======================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  background-color: var(--surface-container-low);
  color: var(--on-surface);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  transition: all var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border: 2px solid var(--primary);
  box-shadow: none;
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--on-surface);
}

.form-group {
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========================================
   CHIPS & BADGES
   ======================================== */

.chip, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  background-color: rgba(68, 102, 75, 0.2);
  color: var(--primary);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.chip:hover,
.chip.active {
  background-color: rgba(68, 102, 75, 0.35);
}

.badge-gold {
  background-color: rgba(219, 169, 76, 0.2);
  color: var(--on-tertiary-container);
}

/* ========================================
   GLASS EFFECT (Limited to 3 zones)
   ======================================== */

/* Zone 1: Navbar scrolled */
.site-header.scrolled {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: rgba(252, 249, 248, 0.72);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .site-header.scrolled {
  background-color: rgba(26, 26, 26, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Zone 2: Weather chip */
.weather-chip {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 36px;
  box-shadow: none;
  line-height: 1;
  color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .weather-chip {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.weather-chip .weather-icon {
  font-size: 14px;
}

.weather-chip .weather-temp {
  font-weight: 700;
  color: #fff;
}

.weather-chip .weather-condition {
  color: rgba(255, 255, 255, 0.7);
}

.hero-topbar {
  pointer-events: none;
}

.hero-topbar .weather-chip {
  pointer-events: auto;
}

/* Zone 3: Lightbox backdrop */
.lightbox-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.45);
}

/* ========================================
   LAYOUT & SECTIONS
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--background);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

nav .logo {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: transform 0.3s ease;
}

nav .logo:hover {
  transform: translateY(-1px);
}

nav .logo .brand-emblem {
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

nav .logo:hover .brand-emblem {
  transform: rotate(180deg) scale(1.1);
}

nav .logo-text {
  font-size: clamp(14px, 1.8vw, 17px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

nav .logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

nav .logo:hover img {
  transform: scale(1.05);
}

nav .nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
}

nav .nav-menu a {
  color: var(--on-surface);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
  position: relative;
  padding: 4px 0;
  display: inline-block;
}

nav .nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: 1px;
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

nav .nav-menu a:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

nav .nav-menu a:hover::after {
  width: 100%;
  left: 0;
}

nav .nav-menu a.active {
  color: var(--primary);
  font-weight: 600;
}

nav .nav-menu a.active::after {
  width: 100%;
  left: 0;
}

nav .nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme Toggle: Sun/Moon icon swap */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: all var(--transition);
  color: var(--on-surface);
}

.theme-toggle:hover {
  background-color: var(--surface-container-low);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.theme-toggle:hover .icon-sun:not([style*="display: none"]) {
  transform: rotate(45deg);
}

.theme-toggle:hover .icon-moon {
  transform: scale(1.1) rotate(-15deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Light mode: show sun, hide moon */
[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg);
  position: absolute;
}

/* Dark mode: show moon, hide sun */
[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg);
  position: absolute;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Language Toggle Pill Slider */
.lang-toggle {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--surface-container);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 3px;
  min-height: 36px;
}

.lang-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background-color: var(--primary-container);
  border-radius: 999px;
  transition: transform 0.3s ease, width 0.3s ease;
  z-index: 0;
}

/* When EN is active, slide right */
.lang-toggle.en-active .lang-slider {
  transform: translateX(100%);
}

.lang-btn {
  position: relative;
  z-index: 1;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: color 0.3s ease;
  border: none;
  background: none;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-btn.active {
  color: var(--on-primary);
}

.hamburger span {
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.2s ease;
}

.hamburger:hover span:nth-child(1) {
  transform: translateX(2px);
}

.hamburger:hover span:nth-child(3) {
  transform: translateX(-2px);
}

/* Hamburger */
.hamburger {
  display: none;
  position: relative;
  z-index: 101;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: all var(--transition);
  color: var(--on-surface);
}

.hamburger:hover {
  background-color: var(--surface-container-low);
}

.hamburger span {
  width: 24px;
  height: 2px;
  background-color: var(--on-surface);
  border-radius: 1px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* ponytail: drawer up to 1023px, ceiling: desktop nav needs 1024px to fit logo+5 items+controls (689px row at 768px); upgrade path: compact nav variant if desktop menu grows past 1024px */
@media (max-width: 1023px) {
  nav .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 75vw;
    max-width: 300px;
    height: 100vh;
    flex-direction: column;
    gap: 0;
    background-color: var(--background);
    z-index: 100;
    padding: 80px 20px 40px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  nav .nav-menu.active {
    display: flex;
    transform: translateX(0);
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 95;
    backdrop-filter: blur(2px);
  }

  .nav-overlay.active {
    display: block;
  }

  nav .nav-menu a {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--on-surface);
    margin-bottom: 4px;
    opacity: 0;
    transform: translateX(20px);
    animation: mobileMenuSlideIn 0.3s ease forwards;
    transition: background-color 0.2s, color 0.2s;
  }

  nav .nav-menu a:nth-child(1) { animation-delay: 0.05s; }
  nav .nav-menu a:nth-child(2) { animation-delay: 0.1s; }
  nav .nav-menu a:nth-child(3) { animation-delay: 0.15s; }
  nav .nav-menu a:nth-child(4) { animation-delay: 0.2s; }
  nav .nav-menu a:nth-child(5) { animation-delay: 0.25s; }

  nav .nav-menu a:hover,
  nav .nav-menu a:active {
    background-color: var(--surface-container-low);
  }

  nav .nav-menu a.active {
    background-color: var(--primary);
    color: var(--on-primary);
  }

  nav .nav-menu a.active::after {
    display: none;
  }

  nav .logo-text {
    font-size: clamp(13px, 3.5vw, 15px);
  }

  nav .logo .brand-emblem {
    width: 24px;
    height: 24px;
  }

  nav .logo img {
    height: 30px;
  }

  .hamburger {
    display: flex;
  }

  nav .nav-controls {
    gap: 8px;
  }

  .lang-toggle {
    padding: 2px 4px;
  }
}

/* ponytail: logo text dropped below 480px, ceiling: emblem-only brand above 480px; upgrade path: shorten nav_logo_text setting instead of hiding if brand name is required on small phones */
@media (max-width: 479px) {
  nav .logo-text {
    display: none;
  }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-slides.single-slide .hero-slide {
  opacity: 1;
}

.hero-slides.single-slide .hero-slide:first-child {
  animation: kenburns 12s ease-in-out infinite alternate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  animation: kenburns 8s linear alternate;
}

@keyframes kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

@keyframes mobileMenuSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--primary);
  opacity: 0.35;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: var(--on-primary);
  max-width: 800px;
  padding: 0 20px;
}

.hero-content .label-caps {
  color: var(--on-tertiary-container);
  margin-bottom: 8px;
}

.hero-content h1 {
  color: var(--on-primary);
  margin-bottom: 16px;
}

.hero-content p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.95);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

@media (max-width: 767px) {
  .hero {
    min-height: 60vh;
  }

  .hero-topbar {
    display: none;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60vh;
  }

  .hero-content h1 {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .hero-content p {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .hero-cta {
    gap: 12px;
  }

  .weather-chip {
    padding: 6px 14px;
    font-size: 11px;
  }

  .weather-chip .weather-divider {
    margin: 0 6px;
    height: 10px;
  }

  .weather-chip .weather-condition {
    display: none;
  }

  .btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* ========================================
   SECTIONS & TONAL LAYERING
   ======================================== */

section {
  padding: var(--section-gap) 0;
}

section:nth-child(even) {
  background-color: var(--surface);
}

section:nth-child(odd) {
  background-color: var(--background);
}

.section-label {
  display: block;
  margin-bottom: 16px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  margin-bottom: 12px;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  background-color: var(--primary-container);
  color: var(--on-primary);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 48px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--on-primary);
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.95;
}

.footer-col a {
  color: var(--on-primary);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity var(--transition);
  display: inline-block;
  margin-bottom: 8px;
}

.footer-col a:hover {
  opacity: 1;
}

.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color var(--transition);
}

.social-icons a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.footer-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.15);
  margin-bottom: 20px;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  opacity: 0.85;
}

@media (max-width: 767px) {
  .footer-content {
    gap: 32px;
  }

  .site-footer {
    padding: 40px 0 16px;
  }
}

/* ========================================
   UTILITIES
   ======================================== */

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--on-surface-variant); }
.text-error { color: var(--error); }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.hidden { display: none !important; }
.visible { display: block !important; }

.no-scroll {
  overflow: hidden;
}

/* ========================================
   REVEAL ANIMATIONS
   ======================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ========================================
   SERVICE CARD HOVER
   ======================================== */

.service-card {
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.service-card:hover i {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

/* ========================================
   TESTIMONIAL CARD
   ======================================== */

.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* ========================================
   CLIENTS MARQUEE
   ======================================== */

.clients-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.clients-marquee {
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

/* ========================================
   TEAM CARD
   ======================================== */

.team-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.team-card:hover .team-avatar {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.team-avatar {
  transition: box-shadow 0.3s ease;
}

/* ========================================
   RESPONSIVE HELPERS
   ======================================== */

@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .show-mobile-only {
    display: none !important;
  }
}

/* ========================================
   REVEAL ANIMATIONS
   ======================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   RESPONSIVE FIXES
   ======================================== */

@media (max-width: 400px) {
  .display-xl, h1 {
    font-size: clamp(22px, 7vw, 32px) !important;
    line-height: 1.2;
  }

  .hero {
    min-height: 50vh !important;
  }

  .hero-topbar {
    display: none !important;
  }

  .hero-content h1 {
    font-size: 22px !important;
    margin-bottom: 10px;
  }

  .hero-content p {
    font-size: 13px !important;
    margin-bottom: 20px;
  }

  .container {
    padding: 0 16px !important;
  }

  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr !important;
  }

  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .card {
    padding: 20px !important;
  }

  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .footer-col {
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .testimonials-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 1920px) {
  .container {
    max-width: 1400px;
  }

  .hero-content h1 {
    font-size: clamp(40px, 4vw, 64px);
  }

  .hero-content p {
    font-size: 20px;
  }

  .display-xl, h1 {
    font-size: clamp(40px, 4vw, 64px);
  }

  .card {
    padding: 40px !important;
  }
}

@media (max-width: 767px) {
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    text-align: center;
  }

  .footer-col h4 {
    margin-bottom: 12px;
  }

  .social-icons {
    justify-content: center;
  }
}

.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 900;
  transition: transform 0.3s, box-shadow 0.3s;
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

@media (max-width: 400px) {
  .wa-float {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }

  .wa-float svg {
    width: 24px;
    height: 24px;
  }
}

.form-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.form-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-msg {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.form-msg.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-msg.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

