/* =========================================================
   MFD Hero & Index Page
   ========================================================= */

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

/* Background gradient */
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 65% 40%, rgba(76,175,130,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 10% 80%, rgba(76,175,130,0.04) 0%, transparent 60%),
    linear-gradient(160deg, #0A0D0B 0%, #0D120F 50%, #0A0D0B 100%);
  z-index: 0;
}

/* Particle canvas */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Grid lines decoration */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.03;
  background-image:
    linear-gradient(to right, #4CAF82 1px, transparent 1px),
    linear-gradient(to bottom, #4CAF82 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-3xl) var(--sp-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3xl);
  align-items: center;
  width: 100%;
}

/* --- Label / Eyebrow --- */
.hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-green);
  margin-bottom: var(--sp-lg);
  opacity: 0;
  animation: fadeUp 600ms var(--ease-out) 100ms forwards;
}

.hero__label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-green);
  border-radius: 1px;
}

/* --- Headline with word-reveal --- */
.hero__title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: var(--sp-xl);
  overflow: hidden;
}

.hero__title .word {
  display: inline-block;
  overflow: hidden;
  margin-right: 0.2em;
  vertical-align: bottom;
}

.hero__title .word-inner {
  display: block;
  transform: translateY(110%);
  animation: wordReveal 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero__title .word:nth-child(1) .word-inner { animation-delay: 200ms; }
.hero__title .word:nth-child(2) .word-inner { animation-delay: 280ms; }
.hero__title .word:nth-child(3) .word-inner { animation-delay: 360ms; }
.hero__title .word:nth-child(4) .word-inner { animation-delay: 440ms; }

.hero__title .accent { color: var(--c-green); }

/* --- Description --- */
.hero__desc {
  font-size: 1.1rem;
  line-height: 1.75;
  max-width: 500px;
  opacity: 0;
  animation: fadeUp 600ms var(--ease-out) 550ms forwards;
}

/* --- CTA Buttons --- */
.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  margin-top: var(--sp-xl);
  opacity: 0;
  animation: fadeUp 600ms var(--ease-out) 650ms forwards;
}

/* --- Stats row --- */
.hero__stats {
  display: flex;
  gap: var(--sp-2xl);
  margin-top: var(--sp-2xl);
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--c-border);
  opacity: 0;
  animation: fadeUp 600ms var(--ease-out) 750ms forwards;
}

.hero__stat-value {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  color: var(--c-text-primary);
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.hero__stat-value span { color: var(--c-green); font-size: 1.5rem; }
.hero__stat-label {
  font-size: var(--fs-small);
  color: var(--c-text-second);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* --- Visual side (right column) --- */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 900ms var(--ease-out) 400ms forwards;
}

.hero__car-preview {
  position: relative;
  width: 100%;
  max-width: 520px;
}

.hero__car-preview svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 60px rgba(76,175,130,0.2));
}

/* Floating badge */
.hero__badge {
  position: absolute;
  bottom: -20px;
  right: 0;
  background: var(--c-bg-card);
  border: 1px solid var(--c-green);
  border-radius: var(--radius-lg);
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  box-shadow: var(--shadow-green);
  animation: float 4s ease-in-out infinite;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-green);
  animation: pulse-dot 2s ease infinite;
}

.hero__badge-text {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-primary);
}

/* Decorative green glow ring */
.hero__glow-ring {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76,175,130,0.08) 0%, transparent 70%);
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* --- Scroll Indicator --- */
.hero__scroll {
  position: absolute;
  bottom: var(--sp-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  opacity: 0;
  animation: fadeIn 600ms ease 1200ms forwards;
}

.hero__scroll-text {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  writing-mode: vertical-lr;
}

.hero__scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--c-green), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

/* =========================================================
   Index — Services Teaser
   ========================================================= */
.services-teaser {
  background: var(--c-bg-deep);
  position: relative;
}

.services-teaser::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--c-green), transparent);
}

.service-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-green);
  border-color: var(--c-green-dim);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  background: var(--c-green-glow);
  border: 1px solid rgba(76,175,130,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-green);
}

.service-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card__title {
  font-size: var(--fs-h4);
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.service-card__desc {
  font-size: var(--fs-small);
  line-height: 1.65;
}

/* =========================================================
   Index — Projects Teaser
   ========================================================= */
.projects-teaser {
  background: linear-gradient(to bottom, var(--c-bg-deep), #0C130E);
}

.project-preview {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  cursor: pointer;
  display: block;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease-out);
}
.project-preview:hover img { transform: scale(1.05); }

.project-preview__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,13,11,0.9) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-lg);
  opacity: 0;
  transition: opacity var(--dur-base) ease;
}
.project-preview:hover .project-preview__overlay { opacity: 1; }

.project-preview__title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-primary);
}

/* Placeholder for project images */
.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  color: var(--c-text-muted);
  background: var(--c-bg-surface);
}

/* =========================================================
   Index — CTA Section
   ========================================================= */
.cta-section {
  position: relative;
  overflow: hidden;
  background: var(--c-bg-card);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 50% 50%, rgba(76,175,130,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section__inner {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: #080B09;
  border-top: 1px solid var(--c-border);
  padding: var(--sp-3xl) 0 var(--sp-xl);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-2xl);
  padding-bottom: var(--sp-2xl);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: var(--sp-xl);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.footer__logo img {
  height: 40px;
  width: auto;
  opacity: 0.8;
  transition: opacity var(--dur-base) ease;
}
.footer__logo:hover img { opacity: 1; }

.footer__tagline {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

.footer__nav {
  display: flex;
  gap: var(--sp-2xl);
}

.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.footer__nav a {
  font-size: var(--fs-small);
  color: var(--c-text-second);
  text-decoration: none;
  transition: color var(--dur-base) ease;
  letter-spacing: 0.04em;
}
.footer__nav a:hover { color: var(--c-green); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.footer__bottom p {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

.footer__hint {
  font-style: italic;
}

@media (max-width: 768px) {
  .footer__inner {
    flex-direction: column;
  }
  .footer__nav {
    flex-direction: column;
    gap: var(--sp-lg);
  }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   Keyframes
   ========================================================= */
@keyframes wordReveal {
  to { transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    padding: var(--sp-2xl) var(--sp-lg);
  }
  .hero__visual { display: none; }
  .hero__label { margin: 0 auto var(--sp-lg); }
  .hero__desc  { margin: 0 auto; }
  .hero__actions { justify-content: center; flex-wrap: wrap; }
  .hero__stats { justify-content: center; flex-wrap: wrap; gap: var(--sp-xl); }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { text-align: center; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__label, .hero__title .word-inner, .hero__desc,
  .hero__actions, .hero__stats, .hero__visual,
  .hero__scroll, .hero__badge { animation: none; opacity: 1; transform: none; }
}
