/*
Theme Name: AMS Automobiles
Theme URI: https://garage-ams-automobiles.ch
Author: Victor Charton
Author URI: https://victorcharton.com
Description: Motion-driven dark theme for Garage AMS Automobiles in Etoy, Switzerland. Built with Syncopate display font, electric blue accents, grid animation, parallax, and scroll reveals.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 8.1
License: All rights reserved
License URI: https://garage-ams-automobiles.ch
Text Domain: ams-automobiles
Tags: dark, custom-colors, custom-menu, custom-logo, featured-images, full-width-template, responsive-layout, translation-ready
*/

/* ============================================================
   RESET & CUSTOM PROPERTIES
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f1319;
  --bg2: #161c25;
  --bg3: #1d2530;
  --surface: #242e3c;
  --border: rgba(30,106,255,0.08);
  --border-hover: rgba(30,106,255,0.2);
  --text: #eaecf0;
  --text2: #c8cdd8;
  --dim: #6b7a90;
  --blue: #1e6aff;
  --blue2: #4d8aff;
  --blue3: #80aaff;
  --blue-glow: rgba(30,106,255,0.12);
  --blue-dim: rgba(30,106,255,0.06);
  --red: #ff3b30;
  --display: 'Syncopate', sans-serif;
  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* GRAIN */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 9000; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 3rem;
  background: rgba(6,8,13,0.6);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s;
}

nav.scrolled { background: rgba(6,8,13,0.92); padding: 0.8rem 3rem; }

.nav-logo { display: flex; align-items: center; gap: 0.7rem; }
.nav-logo img { height: 38px; border-radius: 50%; }
.nav-logo span { font-family: var(--display); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 400; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim); transition: color 0.3s;
}
.nav-links a:hover { color: var(--blue2); }

.nav-cta {
  padding: 0.55rem 1.5rem !important; background: var(--blue) !important;
  color: white !important; font-weight: 700 !important; border-radius: 4px;
  transition: all 0.3s !important; border: 1px solid var(--blue) !important;
}
.nav-cta:hover { background: transparent !important; color: var(--blue2) !important; }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 1001; padding: 8px;
}
.nav-hamburger span { width: 22px; height: 1.5px; background: var(--text); transition: all 0.4s; }
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

.mobile-menu {
  position: fixed; inset: 0; background: var(--bg); z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  opacity: 0; visibility: hidden; transition: all 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--display); font-size: 1.2rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--dim); transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--blue2); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 2rem; overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; filter: saturate(0.4) brightness(0.5); }

.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(30,106,255,0.08) 0%, transparent 50%),
    linear-gradient(180deg, rgba(6,8,13,0.5) 0%, transparent 30%, rgba(6,8,13,0.9) 100%);
}

/* Animated grid lines */
.hero-grid {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  background-image:
    linear-gradient(rgba(30,106,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,106,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.hero-content { position: relative; z-index: 2; max-width: 900px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem; background: var(--blue-dim);
  border: 1px solid rgba(30,106,255,0.12); border-radius: 2px;
  font-family: var(--mono); font-size: 0.55rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--blue2);
  margin-bottom: 2.5rem;
  opacity: 0; animation: fadeUp 0.8s 0.2s forwards;
}

.hero-badge::before {
  content: ''; width: 6px; height: 6px; background: var(--blue);
  border-radius: 1px; box-shadow: 0 0 10px var(--blue); animation: blink 2s infinite;
}

@keyframes blink { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

.hero h1 {
  font-family: var(--display); font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 700; line-height: 1.15; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp 1s 0.4s forwards;
}

.hero h1 span {
  display: block; color: var(--blue);
  text-shadow: 0 0 40px rgba(30,106,255,0.3);
}

.hero-sub {
  font-size: 0.95rem; font-weight: 300; color: var(--text2); line-height: 1.8;
  max-width: 550px; margin: 0 auto 2.5rem;
  opacity: 0; animation: fadeUp 0.8s 0.6s forwards;
}

.hero-buttons {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.8s 0.8s forwards;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; font-family: var(--mono); font-size: 0.62rem;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  border: none; cursor: pointer; transition: all 0.4s; position: relative; overflow: hidden;
}

.btn-primary {
  background: var(--blue); color: white; border: 1px solid var(--blue);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0; background: white;
  transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); z-index: -1;
}
.btn-primary:hover { color: var(--bg); }
.btn-primary:hover::before { transform: translateY(0); }

.btn-ghost {
  background: transparent; color: var(--text2);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue2); }

.hero-scroll {
  position: absolute; bottom: 2rem; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  opacity: 0; animation: fadeUp 0.8s 1.2s forwards; z-index: 2;
}
.hero-scroll span { font-family: var(--mono); font-size: 0.45rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--dim); }
.scroll-line { width: 1px; height: 40px; background: linear-gradient(180deg, var(--blue), transparent); animation: scrollPulse 2.5s infinite; }

@keyframes scrollPulse { 0%,100% { opacity: 0.2; transform: scaleY(0.5); } 50% { opacity: 1; transform: scaleY(1); } }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee-wrap {
  padding: 1.5rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: hidden; background: var(--bg2);
}
.marquee-track { display: flex; gap: 3rem; animation: marquee 25s linear infinite; width: max-content; }
.marquee-track span {
  font-family: var(--display); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; white-space: nowrap; color: var(--dim); opacity: 0.3;
}
.marquee-track .dot { color: var(--blue); opacity: 0.4; }

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   SERVICES
   ============================================================ */
.services { padding: 7rem 3rem; background: var(--bg); }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  font-family: var(--mono); font-size: 0.5rem; font-weight: 700; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 1rem; display: block;
}
.section-title {
  font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; max-width: 600px; margin: 0 auto 1rem;
}
.section-desc { font-size: 0.88rem; font-weight: 300; color: var(--dim); line-height: 1.8; max-width: 500px; margin: 0 auto; }

.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); max-width: 1200px; margin: 0 auto;
  border: 1px solid var(--border);
}

.service-card {
  background: var(--bg); padding: 2.5rem 2rem; position: relative; overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.service-card:hover { background: var(--bg2); }
.service-card:hover::before { transform: scaleX(1); }

.service-num {
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.2em;
  color: var(--blue); margin-bottom: 1.5rem; opacity: 0.5;
}
.service-card:hover .service-num { opacity: 1; }

.service-card h3 {
  font-family: var(--display); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.8rem;
  transition: color 0.3s;
}
.service-card:hover h3 { color: var(--blue2); }

.service-card p { font-size: 0.78rem; font-weight: 300; color: var(--dim); line-height: 1.7; }

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: 7rem 3rem; background: var(--bg2);
  display: flex; justify-content: center;
}
.about-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem;
  max-width: 1100px; align-items: center; width: 100%;
}

.about-image { position: relative; overflow: hidden; }
.about-image img { width: 100%; height: 400px; object-fit: cover; filter: saturate(0.8) brightness(1.1); transition: all 0.8s; }
.about-image:hover img { filter: saturate(1); transform: scale(1.03); }
.about-image::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(30,106,255,0.08); pointer-events: none;
}

.about-tag { font-family: var(--mono); font-size: 0.5rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--blue); margin-bottom: 1.5rem; }
.about-title { font-family: var(--display); font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.5rem; line-height: 1.3; }
.about-text { font-size: 0.85rem; font-weight: 300; color: var(--text2); line-height: 1.9; margin-bottom: 1rem; }

.about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); margin-top: 2rem; border: 1px solid var(--border);
}
.about-stat {
  background: var(--bg2); padding: 1.2rem 1rem; text-align: center;
  transition: background 0.3s;
}
.about-stat:hover { background: var(--bg3); }
.about-stat-val { font-family: var(--display); font-size: 1.2rem; font-weight: 700; color: var(--blue2); }
.about-stat-label { font-family: var(--mono); font-size: 0.45rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--dim); margin-top: 0.3rem; }

/* ============================================================
   WHY US
   ============================================================ */
.why { padding: 7rem 3rem; background: var(--bg); }
.why-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  max-width: 1000px; margin: 0 auto;
}
.why-card { text-align: center; padding: 2rem 1.5rem; }
.why-icon {
  width: 52px; height: 52px; margin: 0 auto 1.5rem;
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--blue); transition: all 0.4s;
}
.why-card:hover .why-icon { border-color: var(--blue); background: var(--blue-dim); box-shadow: 0 0 20px rgba(30,106,255,0.1); }
.why-card h3 { font-family: var(--display); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6rem; }
.why-card p { font-size: 0.78rem; font-weight: 300; color: var(--dim); line-height: 1.7; }

/* ============================================================
   LOCATION
   ============================================================ */
.location { padding: 7rem 3rem; background: var(--bg2); }
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 1100px; margin: 3rem auto 0; }

.info-block { margin-bottom: 2rem; }
.info-block h3 { font-family: var(--display); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue2); margin-bottom: 1rem; }

.hours-list { list-style: none; }
.hours-list li { display: flex; justify-content: space-between; padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 0.8rem; }
.hours-list li:last-child { border: none; }
.hours-list .day { color: var(--dim); font-weight: 300; }
.hours-list .time { font-family: var(--mono); font-size: 0.72rem; color: var(--text); }
.hours-list .closed { color: var(--red); font-family: var(--mono); font-size: 0.72rem; }

.contact-info p { font-size: 0.85rem; font-weight: 300; color: var(--text2); line-height: 2; }
.contact-info a { color: var(--blue2); transition: color 0.3s; }
.contact-info a:hover { color: white; }

.map-wrap { border: 1px solid var(--border); overflow: hidden; min-height: 400px; }
.map-wrap iframe { width: 100%; height: 100%; min-height: 400px; border: none; filter: brightness(0.75) contrast(1.05) saturate(0.3); }

/* ============================================================
   CTA
   ============================================================ */
.cta {
  padding: 6rem 2rem; text-align: center; position: relative; overflow: hidden;
  background: var(--bg);
}
.cta::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(30,106,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 2rem 3rem; border-top: 1px solid var(--border); background: var(--bg2);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; }
.footer-brand img { height: 28px; border-radius: 50%; }
.footer-brand span { font-family: var(--display); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-family: var(--mono); font-size: 0.55rem; color: var(--dim); letter-spacing: 0.06em; transition: color 0.3s; }
.footer-links a:hover { color: var(--blue2); }
.footer-copy { font-family: var(--mono); font-size: 0.5rem; color: var(--dim); opacity: 0.4; }

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

.reveal { opacity: 0; transform: translateY(40px); transition: all 1s cubic-bezier(0.16,1,0.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }

/* ============================================================
   RESPONSIVE — MOBILE FIRST
   ============================================================ */

/* Mobile base (< 768px) */
.nav-links { display: none; }
.nav-hamburger { display: flex; }
nav { padding: 0.8rem 1.25rem; }
.hero { padding: 0 1.25rem; }
.hero h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
.hero-sub { font-size: 0.85rem; }
.hero-buttons { flex-direction: column; align-items: center; }
.hero-buttons .btn { width: 100%; justify-content: center; }
section, .services, .about, .why, .location { padding: 4rem 1.25rem; }
.services-grid { grid-template-columns: 1fr; }
.about-inner { grid-template-columns: 1fr; gap: 2.5rem; }
.about-stats { grid-template-columns: 1fr; }
.why-grid { grid-template-columns: 1fr; gap: 1.5rem; }
.location-grid { grid-template-columns: 1fr; gap: 2rem; }
footer { flex-direction: column; text-align: center; padding: 2rem 1.25rem; }
.section-title { font-size: 1.3rem; }
.about-title { font-size: 1.2rem; }
.about-image img { height: 250px; }
.map-wrap { min-height: 280px; }
.map-wrap iframe { min-height: 280px; }
.glow { font-size: inherit; }

/* Tablet (768px+) */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-hamburger { display: none; }
  nav { padding: 1rem 2rem; }
  .hero { padding: 0 2rem; }
  .hero h1 { font-size: clamp(2rem, 5.5vw, 4rem); }
  .hero-sub { font-size: 0.95rem; }
  .hero-buttons { flex-direction: row; }
  .hero-buttons .btn { width: auto; }
  section, .services, .about, .why, .location { padding: 7rem 2rem; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .location-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  footer { flex-direction: row; text-align: left; padding: 2rem 3rem; }
  .section-title { font-size: clamp(1.5rem, 3vw, 2.2rem); }
  .about-title { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
  .about-image img { height: 400px; }
  .map-wrap { min-height: 400px; }
  .map-wrap iframe { min-height: 400px; }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  nav { padding: 1.2rem 3rem; }
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .about-inner { gap: 5rem; }
  section, .services, .about, .why, .location { padding: 7rem 3rem; }
}

/* ============================================================
   WORDPRESS ADMIN BAR OFFSET
   ============================================================ */
.admin-bar nav {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar nav {
    top: 46px;
  }
}
