/* =============================================
   Swiss Mountain Mechanical — Shared Styles
   Design System + Nav + Footer + Utilities
   ============================================= */

/* --- Font Faces (Variable Fonts) --- */
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/PlayfairDisplay-Variable.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/SourceSans3-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* --- Design Tokens --- */
:root {
  --navy: #1C2E4A;
  --steel: #3D5A80;
  --steel-light: #4E6E96;
  --steel-pale: #5C7FA3;
  --ice: #C8DAE8;
  --ice-light: #D9E6F0;
  --silver: #C8C8C8;
  --silver-light: #E0E0E0;
  --copper: #D76531;
  --copper-light: #E07A4A;
  --copper-bright: #F0935A;
  --cream: #F0F3F7;
  --cream-dark: #D8DFE8;
  --slate: #6B7D8E;
  --charcoal: #1A1A2E;
  --white: #F7F9FB;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', -apple-system, sans-serif;

  --max-width: 1200px;
  --nav-height: 76px;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(28, 46, 74, 0.08);
  --shadow-hover: 0 6px 24px rgba(28, 46, 74, 0.14);
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.75;
  color: var(--charcoal);
  background: var(--white);
  padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--steel);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--copper);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.25;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 700; }

ul { list-style: none; }

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.7s ease forwards;
  opacity: 0;
}

.fade-in-up.delay-1 { animation-delay: 0.15s; }
.fade-in-up.delay-2 { animation-delay: 0.3s; }
.fade-in-up.delay-3 { animation-delay: 0.45s; }
.fade-in-up.delay-4 { animation-delay: 0.6s; }

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

.text-center { text-align: center; }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header p {
  max-width: 640px;
  margin: 12px auto 0;
  color: var(--slate);
  font-size: 1.15rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--copper);
  color: #fff;
}

.btn-primary:hover {
  background: var(--copper-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(215, 101, 49, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--copper);
  border: 2px solid var(--copper);
}

.btn-outline:hover {
  background: var(--copper);
  color: #fff;
  transform: translateY(-2px);
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-left-color: var(--copper);
  transform: translateY(-4px);
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--slate);
  line-height: 1.7;
}

.card-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--copper);
  font-weight: 600;
}

.card-link:hover {
  color: var(--copper-light);
}

/* --- Grid --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* --- Section Label --- */
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1rem;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(215, 101, 49, 0.2);
  border: 1px solid var(--copper);
  border-radius: 2px;
  color: var(--copper-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* --- Service Icon --- */
.service-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--navy), var(--steel));
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

/* --- Service Card (enhanced) --- */
.service-card {
  padding: 2.5rem;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  position: relative;
  overflow: hidden;
  transition: all 0.4s;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--copper);
  transition: height 0.4s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(61, 90, 128, 0.12);
  border-color: var(--steel-pale);
}

.service-card:hover::before {
  height: 100%;
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--slate);
  line-height: 1.75;
  font-size: 1.05rem;
}

/* --- Image Card --- */
.img-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.img-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.4s;
}

.img-card:hover img {
  transform: scale(1.05);
}

/* =============================================
   NAVIGATION
   ============================================= */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(28, 46, 74, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--copper);
  height: var(--nav-height);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ice-light);
  line-height: 1.2;
}

.nav-logo-text span {
  display: block;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--copper-light);
}

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

.nav-links li a {
  color: var(--ice);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
  padding: 8px 0;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--copper);
  transition: width var(--transition);
}

.nav-links li a:hover {
  color: var(--copper-light);
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-links li a.active {
  color: var(--copper-light);
}

.nav-links li a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--copper) !important;
  color: #fff !important;
  padding: 10px 22px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--copper-light) !important;
}

/* --- Hamburger --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  width: 26px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =============================================
   PAGE HERO
   ============================================= */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--steel) 100%);
  padding: 80px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200'%3E%3Cpath fill='%23D76531' fill-opacity='0.06' d='M0,200 L360,60 L540,120 L720,40 L900,100 L1080,20 L1440,160 L1440,200 Z'/%3E%3Cpath fill='%23C8DAE8' fill-opacity='0.05' d='M0,200 L240,80 L480,140 L660,50 L840,110 L1080,30 L1260,90 L1440,200 Z'/%3E%3C/svg%3E") no-repeat bottom center;
  background-size: cover;
  pointer-events: none;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 16px;
  position: relative;
}

.page-hero p {
  color: var(--ice);
  font-size: 1.25rem;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

/* Home hero — taller */
.hero-home {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 100px;
}

.hero-home .hero-content {
  position: relative;
  z-index: 1;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* =============================================
   SLOGAN BANNER
   ============================================= */
.slogan-banner {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--copper) 0%, var(--copper-light) 100%);
  text-align: center;
}

.slogan-banner p {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.4;
}

/* =============================================
   CTA BAND
   ============================================= */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--steel) 100%);
  padding: 64px 24px;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 12px;
}

.cta-band p {
  color: var(--ice);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 28px;
}

.cta-band-copper {
  background: var(--copper);
}

.cta-band-copper h2,
.cta-band-copper p {
  color: #fff;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 64px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-logo-col img {
  width: 48px;
  margin-bottom: 16px;
}

.footer-logo-col p {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--ice);
  font-size: 1rem;
}

footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

footer ul li {
  margin-bottom: 8px;
}

footer ul li a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  transition: color var(--transition);
}

footer ul li a:hover {
  color: var(--copper-bright);
}

.footer-contact-col p {
  margin-bottom: 8px;
  font-size: 1rem;
}

.footer-contact-col a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-contact-col a:hover {
  color: var(--copper-bright);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.4);
  margin-left: 16px;
}

.footer-bottom-links a:hover {
  color: var(--copper-bright);
}

/* =============================================
   FORM STYLES
   ============================================= */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 1rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--silver-light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  background: #fff;
  transition: border-color var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--steel);
  box-shadow: 0 0 0 3px rgba(61, 90, 128, 0.1);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

select {
  appearance: none;
  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 fill='%236B7D8E' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  body { font-size: 17px; }

  .section { padding: 56px 0; }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-6 {
    grid-template-columns: 1fr;
  }

  /* Mobile nav */
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--navy);
    flex-direction: column;
    padding: 100px 32px 32px;
    gap: 4px;
    transition: right var(--transition);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links li { width: 100%; }

  .nav-links li a {
    display: block;
    padding: 12px 16px;
    font-size: 1.05rem;
  }

  .nav-cta {
    text-align: center;
    margin-top: 12px;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Hero */
  .hero-home {
    min-height: 70vh;
    padding: 80px 0 64px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .page-hero {
    padding: 56px 0 48px;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .card { padding: 24px; }
}

/* =============================================
   SCROLL REVEAL ANIMATIONS
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.reveal-left {
  transform: translateX(-40px);
}

.reveal.reveal-right {
  transform: translateX(40px);
}

.reveal.revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* Staggered children — cards in grids */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.3s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.35s; }
.reveal-stagger.revealed > *:nth-child(n+7) { transition-delay: 0.4s; }

.reveal-stagger.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   STAT COUNTER BAND
   ============================================= */
.stats-band {
  background: var(--navy);
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.stats-band::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--copper), var(--copper-light), var(--copper));
}

.stats-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(200, 218, 232, 0.15);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--copper-bright);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ice);
  text-transform: uppercase;
  letter-spacing: 2px;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
  .stat-item:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* =============================================
   NAV SCROLL EFFECT
   ============================================= */
nav {
  transition: height 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

nav.nav-scrolled {
  height: 60px;
  background: rgba(28, 46, 74, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

nav.nav-scrolled .nav-logo img {
  height: 40px;
}

nav.nav-scrolled .nav-logo-text {
  font-size: 1.1rem;
}

.nav-logo img {
  transition: height 0.3s ease;
}

.nav-logo-text {
  transition: font-size 0.3s ease;
}

/* Nav phone number */
.nav-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ice);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: auto;
  margin-right: 1.5rem;
  white-space: nowrap;
  transition: color 0.3s;
}

.nav-phone:hover {
  color: var(--copper-light);
}

.nav-phone svg {
  width: 16px;
  height: 16px;
  stroke: var(--copper-light);
  fill: none;
  stroke-width: 2;
}

@media (max-width: 768px) {
  .nav-phone { display: none; }
}

/* =============================================
   MOBILE FLOATING CALL BUTTON
   ============================================= */
.mobile-call-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 60px;
  height: 60px;
  background: var(--copper);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(215, 101, 49, 0.4);
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: pulse-ring 2s ease-out infinite;
}

.mobile-call-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(215, 101, 49, 0.5);
}

.mobile-call-btn svg {
  width: 26px;
  height: 26px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(215, 101, 49, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(215, 101, 49, 0); }
  100% { box-shadow: 0 0 0 0 rgba(215, 101, 49, 0); }
}

@media (max-width: 768px) {
  .mobile-call-btn { display: flex; }
}

/* =============================================
   PARALLAX
   ============================================= */
.parallax-wrap {
  overflow: hidden;
  position: relative;
}

.parallax-img {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* =============================================
   ACCESSIBILITY — REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > *,
  .parallax-img {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .mobile-call-btn {
    animation: none;
  }
}
