/* ============================================================
   SCOTT'S TRACTOR SERVICE — style.css
   ============================================================ */

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

:root {
  --red:         #C8102E;
  --red-dark:    #9B0B22;
  --red-glow:    rgba(200, 16, 46, 0.18);
  --green:       #2E5E1E;
  --green-light: #3D7A27;
  --green-glow:  rgba(46, 94, 30, 0.25);
  --black:       #0E0E0E;
  --surface-1:   #141414;
  --surface-2:   #1A1A1A;
  --surface-3:   #212121;
  --border:      #2A2A2A;
  --offwhite:    #F0EDE8;
  --muted:       #888;
  --muted-2:     #555;

  --font-display: 'Oswald', sans-serif;
  --font-body:    'Inter', sans-serif;

  --transition: 0.3s ease;
  --radius:     10px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--offwhite);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

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

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; }

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--red); margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; margin-bottom: 0.75rem;
}
.divider {
  width: 52px; height: 4px;
  background: var(--red); border-radius: 2px;
  margin-bottom: 2.5rem;
}

/* ── SCROLL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.from-left  { transform: translateX(-48px); }
.reveal.from-right { transform: translateX(48px); }
.reveal.scale-in   { transform: scale(0.92); }

.reveal.visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Stagger children */
.stagger > * { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.stagger.visible > *:nth-child(1) { opacity:1; transform:none; transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { opacity:1; transform:none; transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { opacity:1; transform:none; transition-delay: 0.2s; }
.stagger.visible > *:nth-child(4) { opacity:1; transform:none; transition-delay: 0.3s; }
.stagger.visible > *:nth-child(5) { opacity:1; transform:none; transition-delay: 0.4s; }

/* ── NAV ── */
#navbar {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  padding: 0 2.5rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
  border-bottom: 2px solid transparent;
}
#navbar.scrolled {
  background: rgba(14,14,14,0.96);
  backdrop-filter: blur(12px);
  border-color: var(--red);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  letter-spacing: 0.05em;
}
.nav-logo img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}
.nav-logo span { color: var(--red); }
.footer-logo {
  width: 65px;
  height: 65px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.75rem;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
  position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: var(--red);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--offwhite); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--offwhite); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--red);
  color: #fff !important;
  padding: 0.4rem 1.1rem;
  border-radius: 6px;
  transition: background var(--transition) !important;
}
.nav-cta:hover { background: var(--red-dark) !important; }
.nav-cta::after { display: none !important; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--offwhite);
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none; position: fixed; top: 64px; left: 0; right: 0;
  background: rgba(14,14,14,0.98);
  border-bottom: 2px solid var(--red);
  padding: 1.5rem 2rem 2rem;
  z-index: 999; flex-direction: column; gap: 1.2rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 1.1rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}
.mobile-nav a:hover { color: var(--offwhite); }

/* ── HERO ── */
#hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center;
}

/* Video Background */
#hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(14,14,14,0.55) 0%,
    rgba(14,14,14,0.35) 40%,
    rgba(14,14,14,0.85) 100%
  );
}

/* Static fallback (shown when no video) */
.hero-static-bg {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(155deg, #0E0E0E 0%, #1a2a10 50%, #1a0008 100%);
}
.hero-static-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 30%, var(--red-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, var(--green-glow) 0%, transparent 55%);
}

/* Placeholder frame shown until video is added */
.hero-placeholder-frame {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border: 2px dashed rgba(200,16,46,0.3);
  pointer-events: none;
}
.hero-placeholder-frame .ph-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(200,16,46,0.5);
  background: rgba(14,14,14,0.7); padding: 0.3rem 0.9rem; border-radius: 4px;
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 820px; padding: 0 2rem;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(200,16,46,0.15);
  border: 1px solid rgba(200,16,46,0.35);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #e0a0aa; margin-bottom: 1.5rem;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 700; line-height: 0.95;
  letter-spacing: -0.02em; margin-bottom: 1.25rem;
}
.hero-title .line-red { color: var(--red); display: block; }
.hero-title .line-green { color: var(--green-light); display: block; font-size: 0.45em; letter-spacing: 0.08em; font-weight: 400; margin-bottom: 0.2em; }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(240,237,232,0.75);
  max-width: 520px; margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.88rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.85rem 2rem; border-radius: 8px;
  transition: all var(--transition); cursor: pointer; border: none;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,16,46,0.35); }
.btn-outline { background: transparent; color: var(--offwhite); border: 2px solid rgba(240,237,232,0.25); }
.btn-outline:hover { border-color: var(--offwhite); transform: translateY(-2px); }

.hero-scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  color: var(--muted); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  animation: bounce 1.6s infinite;
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(5px); }
}

/* ── SECTION WRAPPER ── */
.section { padding: 7rem 2rem; }
.section-inner { max-width: 1140px; margin: 0 auto; }
.section--dark  { background: var(--surface-1); }
.section--mid   { background: var(--black); }
.section--green { background: linear-gradient(135deg, #0c1f07 0%, #0e0e0e 60%); }

/* ── STATS BAR ── */
#stats {
  background: var(--red);
  padding: 2.5rem 2rem;
}
.stats-grid {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; text-align: center;
}
.stat-item {}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 700; line-height: 1;
  color: #fff;
}
.stat-label {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); margin-top: 0.25rem;
}

/* ── ABOUT ── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
.about-text p {
  color: var(--muted); line-height: 1.85;
  margin-bottom: 1.1rem; font-size: 1.02rem;
}
.about-text p strong { color: var(--offwhite); }
.about-text p em { color: var(--green-light); font-style: normal; font-weight: 600; }

.about-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.75rem;
}
.ph { /* image placeholder */
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.5rem; color: var(--muted-2);
  font-size: 0.75rem; text-align: center; padding: 1rem;
  transition: border-color var(--transition);
  overflow: hidden;
}
.ph:hover { border-color: var(--red); }
.ph svg { opacity: 0.3; flex-shrink: 0; }
.ph .ph-tag { color: var(--red); opacity: 0.65; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.ph.span2 { grid-column: span 2; }
.ph.tall { aspect-ratio: 16/7; }
.ph.square { aspect-ratio: 1; }
.ph.portrait { aspect-ratio: 3/4; }
.ph.landscape { aspect-ratio: 4/3; }

/* Image styling for inserted photos */
.about-imgs img {
  width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px;
}

.gallery-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ── SERVICES ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--red);
  box-shadow: 0 12px 40px rgba(200,16,46,0.15);
}
.service-card .card-img { aspect-ratio: 16/9; }
.service-card .card-body { padding: 1.4rem 1.5rem 1.75rem; }
.service-card h3 {
  font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem;
}
.service-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; }
.card-chip {
  display: inline-block; margin-top: 0.85rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.25rem 0.75rem;
  border-radius: 999px; background: var(--green); color: #fff;
}
.card-chip.red { background: var(--red); }

/* ── EQUIPMENT ── */
.equip-feature {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: center;
  margin-bottom: 5rem;
}
.equip-feature:nth-child(even) { direction: rtl; }
.equip-feature:nth-child(even) > * { direction: ltr; }
.equip-feature:last-child { margin-bottom: 0; }

.equip-img { border-radius: var(--radius); overflow: hidden; }
.equip-img .ph { border-radius: 0; }

.equip-info {}
.equip-info h3 {
  font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem;
}
.equip-info .model-badge {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; background: var(--red);
  color: #fff; padding: 0.2rem 0.7rem; border-radius: 4px;
  margin-bottom: 1rem;
}
.equip-info p { color: var(--muted); font-size: 0.95rem; line-height: 1.75; }

.spec-pills {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem;
}
.spec-pill {
  font-size: 0.78rem; font-weight: 600;
  background: var(--surface-3);
  border: 1px solid var(--border);
  padding: 0.3rem 0.85rem; border-radius: 6px;
  color: var(--offwhite);
}

/* ── GALLERY ── */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 0.75rem;
}
.gallery-item { border-radius: 8px; overflow: hidden; }
.gallery-item.wide { grid-column: span 2; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item .ph {
  width: 100%; height: 100%;
  border-radius: 0;
  aspect-ratio: auto;
  transition: border-color var(--transition);
}
.gallery-item .ph:hover { border-color: var(--green-light); }

/* ── SPECS TABLE ── */
.specs-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start;
}
.specs-img-wrap { border-radius: var(--radius); overflow: hidden; }
.spec-table { border-collapse: collapse; width: 100%; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 0.9rem 0.25rem; font-size: 0.95rem; }
.spec-table .label { color: var(--muted); width: 45%; }
.spec-table .value { font-weight: 700; color: var(--offwhite); }

/* ── CONTACT ── */
#contact { background: var(--black); text-align: center; }
.contact-wrap { max-width: 680px; margin: 0 auto; }
.contact-wrap p {
  color: var(--muted); font-size: 1.05rem;
  line-height: 1.75; margin-bottom: 2.5rem;
}
.phone-link {
  display: inline-flex; align-items: center; gap: 0.85rem;
  background: var(--red); color: #fff;
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 1rem 2.5rem; border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.phone-link:hover {
  background: var(--red-dark);
  transform: scale(1.04);
  box-shadow: 0 12px 40px rgba(200,16,46,0.4);
}
.contact-meta {
  margin-top: 1.5rem; color: var(--muted-2);
  font-size: 0.88rem; letter-spacing: 0.04em;
}
.contact-meta span { color: var(--muted); }

/* ── FOOTER ── */
footer {
  background: var(--surface-1);
  border-top: 3px solid var(--green);
  text-align: center; padding: 2rem;
  color: var(--muted-2); font-size: 0.82rem;
}
footer strong { color: var(--red); }

/* ── SCROLL PROGRESS BAR ── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(to right, var(--red), var(--green-light));
  z-index: 9999; width: 0%; transition: width 0.1s linear;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-grid,
  .equip-feature,
  .equip-feature:nth-child(even),
  .specs-layout { grid-template-columns: 1fr; direction: ltr; }

  .equip-feature { gap: 2rem; }

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

  .gallery-masonry { grid-template-columns: 1fr 1fr; }
  .gallery-item.wide { grid-column: span 2; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero-title { font-size: clamp(2.5rem, 12vw, 4rem); }

  .gallery-masonry { grid-template-columns: 1fr; }
  .gallery-item.wide,
  .gallery-item.tall { grid-column: span 1; grid-row: span 1; }

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

  .about-imgs { grid-template-columns: 1fr; }
  .ph.span2 { grid-column: span 1; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scroll-arrow { animation: none; }
  .hero-eyebrow .dot { animation: none; }
}
