/* ===== CSS Custom Properties ===== */
:root {
  /* ── Palette: Depth B2B Light ── */
  --color-white: #ffffff;
  --color-bg: #fafafa;
  --color-bg-alt: #f4f3f1;
  --color-bg-deep: #e9e6e1;
  --color-bg-dark: #14120f;
  --color-surface: #ffffff;
  --color-surface-hover: #f5f4f2;
  --color-border: rgba(0, 0, 0, 0.07);
  --color-border-strong: rgba(0, 0, 0, 0.10);
  --color-text: #1a1917;
  --color-text-muted: #5c5953;
  --color-text-dim: #9b9790;
  --color-text-inverse: #f0ede8;
  --color-accent: #c41e3a;
  --color-accent-glow: rgba(196, 30, 58, 0.10);
  --color-accent-dim: rgba(196, 30, 58, 0.04);
  --color-accent-blue: #0682db;
  --color-accent-blue-hover: #229af0;
  --color-accent-blue-active: #036fbc;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Source Serif 4', 'Inter', Georgia, serif;

  /* Type Scale (1.25 major third) */
  --text-xs: 0.75rem;     /* 12px — captions */
  --text-sm: 0.875rem;    /* 14px — secondary */
  --text-base: 1rem;      /* 16px — body */
  --text-md: 1.125rem;    /* 18px — lead */
  --text-lg: 1.25rem;     /* 20px — subhead */
  --text-xl: 1.563rem;    /* 25px — heading */

  /* Spacing */
  --container-max: 1320px;
  --section-padding: clamp(80px, 10vw, 120px);
  --nav-height: 72px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-slow: 0.9s;
  --duration-medium: 0.6s;
  --duration-fast: 0.3s;
}

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

html {
  scroll-behavior: auto;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
  cursor: default;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: #fff;
}

::-moz-selection {
  background: var(--color-accent);
  color: #fff;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px);
}

.section-padding {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

.section-label {
  font-family: var(--font-primary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  line-height: 1.12;
  color: var(--color-text);
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 clamp(20px, 5vw, 40px);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: #ffffff;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo-svg {
  width: 180px;
  height: 24px;
}

.logo-text-nav {
  fill: var(--color-accent);
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.nav-logo {
  position: relative;
  z-index: 10;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text);
  transition: color 0.2s ease;
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover { color: var(--color-accent); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-cta {
  color: #fff !important;
  background: var(--color-accent);
  padding: 8px 20px;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.nav-cta::after { display: none; }
.nav-cta:hover {
  background: #d4283e;
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 10;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out-quart), opacity 0.3s;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 40%),
              linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, transparent 20%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-bottom: 1.5rem;
  color: #fff;
}

.hero-title-line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.7);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  border: none;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
  opacity: 0;
  transform: translateY(20px);
}

.hero-cta:hover {
  background: #d4283e;
  transform: translateY(-2px);
}

.cta-arrow {
  transition: transform 0.3s var(--ease-out-quart);
}

.hero-cta:hover .cta-arrow {
  transform: translateX(4px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.scroll-text {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.5);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.scroll-dot {
  position: absolute;
  top: 0;
  left: -1px;
  width: 3px;
  height: 12px;
  background: var(--color-accent);
  border-radius: 2px;
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0% { transform: translateY(-100%); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}

/* ===== LOGO MARQUEE ===== */
.logo-marquee {
  background: #fff;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 28px 0;
  overflow: hidden;
}

.logo-marquee::before,
.logo-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.marquee-track { overflow: hidden; }
.marquee-inner { display: flex; width: max-content; }

.marquee-row {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: marqueeScroll 40s linear infinite;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  transition: color 0.2s;
  padding: 0 8px;
  cursor: default;
}

.marquee-logo:hover { color: var(--color-accent); }

.marquee-divider {
  font-size: 1rem;
  color: var(--color-text-dim);
  margin: 0 12px;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  will-change: transform, opacity;
}

.reveal-stagger .title-word {
  opacity: 0;
  transform: translateY(40px);
  display: inline-block;
  will-change: transform, opacity;
}

/* ===== SCROLL REVEAL (non-GSAP) ===== */
.sr-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.sr-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CTA SECTION ===== */
.cta {
  text-align: center;
  position: relative;
  background: #fff;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.cta-body {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 3px rgba(6, 130, 219, 0.08);
  background: #fff;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2322262a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 32px;
  background: var(--color-accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.cta-btn:hover {
  background: #d4283e;
  transform: translateY(-1px);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.cta-btn:hover .btn-arrow {
  transform: translateX(3px);
}

.cta-note {
  font-size: 0.75rem;
  color: var(--color-text-dim);
}

/* ===== FOOTER ===== */
.footer {
  padding: 60px 0 30px;
  background: #fff;
  border-top: 1px solid var(--color-border);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  width: 80px;
  height: 16px;
  margin-bottom: 1rem;
}

.footer-logo-text {
  fill: var(--color-accent);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--color-text-dim);
}

.footer-links-group h4 {
  font-family: var(--font-primary);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 1.1rem;
}

.footer-links-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links-group a {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.footer-links-group a:hover { color: var(--color-accent); }

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.social-links a {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.social-links a:hover { color: var(--color-accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .image-frame img {
    height: 350px;
  }

  .models-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .design-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .design-image-main img {
    height: 400px;
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-brand {
    grid-column: span 3;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
    --section-padding: 50px;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1.15rem;
  }

  .nav-toggle {
    display: flex;
  }

  .models-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
  }

  .services-grid {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-content {
    padding: 0 20px;
  }

  .scroll-indicator {
    right: 20px;
    bottom: 30px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .design-image-main img {
    height: 300px;
  }
}
