:root {
  --bg: #0b0d10;
  --bg-elev: #14171c;
  --bg-card: #1a1e24;
  --text: #f5f6f8;
  --text-dim: #a7adb8;
  --text-faint: #6b7280;
  --accent: #e82127; /* Tesla red */
  --accent-hover: #c81a1f;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --maxw: 1180px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 56px);
  background: rgba(11, 13, 16, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.wordmark {
  font-weight: 700;
  letter-spacing: 0.42em;
  font-size: 18px;
  padding-left: 4px;
}

.brand .divider {
  color: var(--text-faint);
}

.brand .sub {
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-picker {
  position: relative;
}

.lang-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 7px 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.lang-caret {
  font-size: 10px;
  line-height: 1;
  opacity: 0.8;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 168px;
  max-height: 60vh;
  overflow-y: auto;
  background: #14171c;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.lang-menu[hidden] {
  display: none;
}

.lang-option {
  display: block;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.lang-option.active {
  color: var(--text);
  background: rgba(232, 33, 39, 0.16);
}

html[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

.header-cta {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--text);
  color: #0b0d10;
  transition: transform 0.15s ease, background 0.15s ease;
}

.header-cta:hover {
  transform: translateY(-1px);
  background: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 12vw, 140px) clamp(20px, 5vw, 56px) 40px;
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  max-width: 130vw;
  background: radial-gradient(circle at center, rgba(232, 33, 39, 0.22), transparent 60%);
  pointer-events: none;
  filter: blur(10px);
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 34px;
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--text-dim);
}

.hero-sub strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--text);
  color: #0b0d10;
}

.btn-primary:hover {
  background: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- Hero trust line ---------- */
.hero-trust {
  margin: 20px auto 0;
  font-size: 13.5px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

/* ---------- Hero product stage (photoless, pure CSS) ---------- */
.hero-stage {
  position: relative;
  z-index: 2;
  max-width: 820px;
  height: clamp(230px, 34vw, 340px);
  margin: 54px auto 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  /* Drop in a real photo later:  --hero-photo: url("hero.jpg"); */
  background-image: var(--hero-photo, none);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.stage-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(232, 33, 39, 0.28), transparent 55%),
    radial-gradient(90% 70% at 50% 120%, rgba(120, 150, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #12151b 0%, #0a0c10 100%);
}

/* Perspective road converging to a glowing horizon */
.stage-road {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 200%;
  height: 62%;
  transform: translateX(-50%) perspective(420px) rotateX(62deg);
  transform-origin: bottom center;
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.04) 40%, transparent),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, 0.06) 46px 48px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 55%);
          mask-image: linear-gradient(180deg, transparent, #000 55%);
}

.stage-road::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  width: 8px;
  height: 100%;
  transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0 22px, transparent 22px 46px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%);
          mask-image: linear-gradient(180deg, transparent, #000 60%);
}

.stage-car {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.stage-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 30px;
  border-radius: 18px;
  background: rgba(11, 13, 16, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  animation: rise 6s ease-in-out infinite;
}

.stage-badge strong {
  font-size: clamp(44px, 8vw, 74px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(180deg, #fff, #c7ccd4);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stage-badge span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

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

.scroll-hint {
  margin: 44px auto 0;
  width: 26px;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}

.scroll-hint span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--text-dim);
  animation: scrolldot 1.6s ease-in-out infinite;
}

@keyframes scrolldot {
  0% { opacity: 0; transform: translateY(-4px); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ---------- Perks ---------- */
.perks {
  max-width: var(--maxw);
  margin: 20px auto 0;
  padding: 20px clamp(20px, 5vw, 56px) 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.perk {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: center;
}

.perk-icon {
  font-size: 30px;
  margin-bottom: 12px;
}

.perk h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
}

.perk p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* ---------- Notes / eligibility ---------- */
.notes {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 56px) 20px;
}

.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.notes-list li {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px 22px 48px;
  color: var(--text-dim);
  font-size: 15px;
}

.notes-list li::before {
  content: "✓";
  position: absolute;
  left: 20px;
  top: 21px;
  color: var(--accent);
  font-weight: 700;
}

.notes-list strong {
  color: var(--text);
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .notes-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- Section titles ---------- */
.section-title {
  text-align: center;
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 40px;
}

/* ---------- Models ---------- */
.models {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 70px clamp(20px, 5vw, 56px);
}

.model-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}

.model-card:last-child {
  margin-bottom: 0;
}

.model-visual {
  position: relative;
  min-height: 260px;
  background:
    radial-gradient(circle at 50% 120%, rgba(232, 33, 39, 0.28), transparent 55%),
    linear-gradient(160deg, #20252d 0%, #0f1216 100%);
  overflow: hidden;
}

.model-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  /* Drop a real photo later:  style="--photo: url('modely.jpg')"  */
  background-image: var(--photo, none);
}

/* Big typographic model watermark (photoless, on-brand) */
.model-visual::before {
  content: attr(data-mark);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(120px, 22vw, 220px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
  -webkit-background-clip: text;
          background-clip: text;
  z-index: 1;
}

.model-visual .visual-tag {
  position: absolute;
  left: 22px;
  bottom: 18px;
  z-index: 2;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.model-body {
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.model-body.center {
  text-align: center;
  align-items: center;
}

.model-all {
  grid-template-columns: 1fr;
}

.badge {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(232, 33, 39, 0.12);
  border: 1px solid rgba(232, 33, 39, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.model-body h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.model-perk {
  color: var(--text-dim);
  font-size: 17px;
  margin: 0 0 26px;
}

.model-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.model-body.center .model-actions {
  justify-content: center;
}

/* ---------- Section lead + a11y ---------- */
.section-lead {
  max-width: 720px;
  margin: -24px auto 34px;
  text-align: center;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.6;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Rewards by country ---------- */
.rewards {
  max-width: 920px;
  margin: 0 auto;
  padding: 70px clamp(20px, 5vw, 56px) 30px;
}

.rewards-toolbar {
  display: flex;
  justify-content: center;
  margin: 0 0 22px;
}

.rewards-search {
  display: block;
  width: min(420px, 100%);
}

.rewards-search input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 13px 20px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rewards-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 33, 39, 0.18);
}

.rewards-search input::placeholder {
  color: var(--text-faint);
}

.rewards-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.rewards-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.rewards-table thead th {
  text-align: left;
  padding: 15px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.rewards-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
}

.rewards-table tbody tr:last-child td {
  border-bottom: none;
}

.rewards-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.rewards-country {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.rewards-flag {
  margin-right: 10px;
  font-size: 18px;
}

.reward-tag {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.reward-tag--fsd {
  background: rgba(96, 165, 250, 0.14);
  color: #7fb4ff;
}

.reward-tag--sc {
  background: rgba(232, 33, 39, 0.14);
  color: #ff6b6f;
}

.reward-tag--credit {
  background: rgba(52, 211, 153, 0.14);
  color: #4ade9a;
}

.reward-tag--none {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-faint);
}

.rewards-empty {
  padding: 22px 20px;
  margin: 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 15px;
}

.rewards-note {
  max-width: 720px;
  margin: 24px auto 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 13.5px;
  line-height: 1.6;
}

.rewards-note strong {
  color: var(--text-dim);
}

@media (max-width: 560px) {
  .rewards-table thead th:nth-child(3),
  .rewards-table tbody td:nth-child(3) {
    display: none;
  }
}

/* ---------- Steps ---------- */
.steps {
  max-width: 820px;
  margin: 0 auto;
  padding: 30px clamp(20px, 5vw, 56px) 100px;
}

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-dim);
}

.steps-list strong {
  color: var(--text);
}

.step-num {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin-top: -6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px clamp(20px, 5vw, 56px) 60px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.site-footer p {
  margin: 6px 0;
}

.site-footer a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--text);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .perks {
    grid-template-columns: 1fr;
  }
  .model-card,
  .model-y,
  .model-3 {
    grid-template-columns: 1fr;
  }
  .model-visual {
    min-height: 200px;
    order: -1;
  }
}

@media (max-width: 520px) {
  .header-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-badge,
  .scroll-hint span {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}
