/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #111111;
  --white: #ffffff;
  --red: #d9182d;
  --gray: #6f6f6f;
  --light-gray: #f2f2f2;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: var(--white);
  color: var(--black);
  line-height: 1.6;
}

a {
  text-decoration: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  color: var(--white);
  background-image: url("images/teslaheader.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 260px;
  display: flex;
  align-items: center;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.header-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  grid-column: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(-14px);
}

.site-nav {
  grid-column: 3;
  justify-self: end;
}

.brand-name {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.brand-tagline {
  position: absolute;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.8rem;
  color: #e6e6e6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Navigation */
.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  border-color: var(--red);
}

/* Hero */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 2rem 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1 1 420px;
}

.hero-text h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--black);
}

.hero-subtext {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 480px;
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-block;
  background-color: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: 4px;
  letter-spacing: 0.3px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background-color: #b3131f;
  transform: translateY(-2px);
}

.hero-image {
  flex: 1 1 380px;
  display: flex;
  justify-content: center;
}

.image-placeholder {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  background-color: var(--light-gray);
  border: 2px dashed #cccccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.95rem;
  font-weight: 500;
}

/* About */
.about {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 2rem 5rem;
}

.about-image {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.about-image .image-placeholder {
  max-width: 360px;
  aspect-ratio: 4 / 3;
}

.about-text h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--black);
  text-align: center;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--gray);
  margin-bottom: 1.25rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* How It Works */
.how-it-works {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem 5rem;
  text-align: center;
}

.how-it-works h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  color: var(--black);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--red);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.step p {
  font-size: 0.95rem;
  color: var(--gray);
  max-width: 280px;
}

/* Footer */
.site-footer {
  background-color: var(--black);
  color: var(--white);
  text-align: center;
  padding: 2.5rem 1rem 1.75rem;
}

.footer-brand {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.footer-tagline {
  font-size: 0.9rem;
  color: #cccccc;
  margin-top: 0.5rem;
}

.footer-contact {
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

.footer-contact a {
  color: var(--white);
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: var(--red);
}

.footer-divider {
  color: var(--red);
  margin: 0 0.6rem;
}

.footer-copyright {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #999999;
}

/* Responsive */
@media (max-width: 640px) {
  .site-header {
    min-height: 190px;
  }

  .hero {
    padding: 3rem 1.5rem;
    text-align: center;
  }

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

  .hero-subtext {
    max-width: 100%;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
  }

  .brand {
    transform: none;
  }

  .brand-tagline {
    position: static;
    transform: none;
    white-space: normal;
    margin-top: 0.35rem;
  }

  .site-nav {
    justify-self: center;
  }

  .site-nav ul {
    justify-content: center;
    flex-wrap: wrap;
  }
}
