/* PickMyTesla — deeper black / dark grey, sharp type, red CTA */
:root {
  --black: #050506;
  --white: #ffffff;
  --bg: #0a0a0b;
  --surface: #121214;
  --surface-2: #1a1a1d;
  --grey-900: #080809;
  --grey-700: #2e2e32;
  --grey-500: #8a8a90;
  --grey-400: #a8a8ae;
  --grey-300: #c8c8cc;
  --border: #222226;
  --border-sharp: #2e2e33;
  --red: #e31837;
  --red-hover: #c4122e;
  --max-width: 1080px;
  --nav-height: 68px;
  --radius: 2px;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --tracking-tight: -0.03em;
  --tracking-wide: 0.06em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--grey-300);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* —— Nav —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-height);
  height: auto;
  background: rgba(5, 5, 6, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  gap: 0.75rem;
}

.site-nav .logo {
  font-weight: 700;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
  color: var(--white);
  text-transform: none;
  flex-shrink: 0;
  line-height: 1;
}

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

.nav-links {
  display: flex;
  gap: 0.125rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--grey-500);
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius);
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--white);
  background: var(--surface-2);
}

/* —— In-body disclosure (not a top banner) —— */
.disclosure-inline {
  font-size: 0.875rem;
  color: var(--grey-500);
  line-height: 1.45;
  margin: 0 0 1rem;
  max-width: 40rem;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
}

.disclosure-inline strong {
  color: var(--grey-300);
  font-weight: 600;
}

.disclosure-inline u {
  text-underline-offset: 2px;
}

/* —— Main layout —— */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

h1 {
  font-size: clamp(1.85rem, 5.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 0.5rem;
  line-height: 1.1;
  color: var(--white);
}

h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 1.75rem 0 0.6rem;
  letter-spacing: var(--tracking-wide);
  color: var(--white);
  text-transform: uppercase;
}

h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 1.25rem 0 0.4rem;
  color: var(--white);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 0.85rem;
  color: var(--grey-400);
  font-size: 0.9375rem;
}

.lede {
  font-size: 1rem;
  color: var(--grey-500);
  max-width: 36rem;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.placeholder {
  color: var(--grey-500);
  font-style: italic;
  border-left: 2px solid var(--border-sharp);
  padding-left: 0.75rem;
  margin: 0.6rem 0 1rem;
}

/* —— Home hero —— */
.hero {
  margin: 0 0 1.25rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border: none;
  border-radius: 0;
}

/* —— Page hero (car pages: top under nav) —— */
.page-hero {
  margin: 0 0 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border: none;
  border-radius: 0;
}

@media (max-width: 559px) {
  .page-hero {
    aspect-ratio: 16 / 9;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .hero {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    aspect-ratio: 16 / 9;
  }
}

/* —— Cards (Home) —— */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.card-grid--cars {
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .card-grid--cars {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
  }
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-sharp);
  background: var(--surface-2);
  color: inherit;
  transform: translateY(-2px);
}

.card-media {
  aspect-ratio: 16 / 10;
  background: var(--grey-900);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.35s ease;
}

.card:hover .card-media img {
  transform: scale(1.03);
}

.card-media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-700);
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: 600;
}

.card-body {
  padding: 0.9rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card h2 {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  letter-spacing: var(--tracking-tight);
  text-transform: none;
  color: var(--white);
}

.card p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--grey-500);
  line-height: 1.4;
  flex: 1;
}

.card .card-cta {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
}

.card:hover .card-cta {
  color: var(--red-hover);
}

/* Secondary card (FSD etc.) — compact, no large image */
.card--secondary {
  flex-direction: row;
  align-items: center;
  padding: 1rem 1.1rem;
  gap: 1rem;
}

.card--secondary .card-body {
  padding: 0;
}

.card-grid--secondary {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .card-grid--secondary {
    grid-template-columns: 1fr;
  }
}

/* —— CTA button —— */
.cta-block {
  margin: 1.5rem 0;
  padding: 1.25rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.cta-block p {
  margin-bottom: 0.85rem;
  font-size: 0.875rem;
  color: var(--grey-500);
}

.btn-cta {
  display: inline-block;
  background: var(--red);
  color: var(--white) !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.btn-cta:hover {
  background: var(--red-hover);
  color: var(--white) !important;
  box-shadow: 0 0 0 1px var(--red-hover);
}

/* —— Trim compare table —— */
.section-who {
  margin: 1.25rem 0 1.5rem;
}

.trim-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 1.5rem;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table.trim-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  min-width: 480px;
}

table.trim-compare th,
table.trim-compare td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

table.trim-compare th {
  background: var(--black);
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.6875rem;
}

table.trim-compare tbody tr:nth-child(even) {
  background: var(--surface);
}

table.trim-compare tbody tr:nth-child(odd) {
  background: var(--bg);
}

table.trim-compare td {
  color: var(--grey-400);
}

table.trim-compare td:first-child {
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  background: var(--surface-2);
}

/* —— FAQ (FSD) —— */
.faq {
  margin: 1.25rem 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
}

.faq-item p {
  margin: 0;
  font-size: 0.875rem;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--grey-900);
  padding: 1.25rem 1rem;
  font-size: 0.75rem;
  color: var(--grey-500);
  text-align: center;
}

.site-footer p {
  margin: 0 0 0.4rem;
  color: var(--grey-500);
  font-size: inherit;
}

.site-footer .footer-links {
  margin-top: 0.6rem;
}

.site-footer .footer-links a {
  color: var(--grey-400);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-footer .footer-links a:hover {
  color: var(--red);
  text-decoration: underline;
}

.site-footer .sep {
  margin: 0 0.4rem;
  color: var(--grey-700);
}

/* —— Utility —— */
.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;
}

/* —— Figures (inline, non-hero) —— */
.figure {
  margin: 0.85rem 0 1.25rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.figure img {
  border: none;
  border-radius: 0;
  width: 100%;
}

.figure figcaption,
.note {
  font-size: 0.75rem;
  color: var(--grey-500);
  font-style: normal;
  margin: 0.5rem 0 0;
  letter-spacing: 0.01em;
}

.cta-block .cta-banner {
  display: block;
  margin: 0 auto 0.85rem;
  max-width: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.how-list {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  color: var(--grey-400);
  font-size: 0.9375rem;
}

.how-list li {
  margin-bottom: 0.35rem;
}

.how-list strong {
  color: var(--white);
}

.skip-link {
  font-size: 0.875rem;
}

/* Section labels above card grids */
.section-label {
  margin-bottom: 0.5rem;
}
