/* Dallas Garage Review — foundation shell
   Brand: Carbon / Shop Paper / Concrete / Signal Red / Worklight Amber
   Type: Source Serif 4 + Inter + IBM Plex Mono
*/

:root {
  --carbon: #1d211f;
  --shop-paper: #f3f0e8;
  --concrete: #b7b4ab;
  --deep-oil: #343b38;
  --signal-red: #b64032;
  --worklight: #d39a45;
  --paper-elevated: #faf8f3;
  --paper-warm: #efe9dc;
  --max: 76rem;
  --measure: 38rem;
  --space-xs: 0.35rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: clamp(2.75rem, 5vw, 4.25rem);
  --space-2xl: clamp(3.5rem, 8vw, 6.5rem);
  --rule: 1px solid color-mix(in srgb, var(--carbon) 12%, transparent);
  --rule-strong: 1px solid color-mix(in srgb, var(--carbon) 22%, transparent);
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --header-h: 4.25rem;
  --radius: 2px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--carbon);
  background:
    radial-gradient(
      120% 80% at 100% 0%,
      color-mix(in srgb, var(--worklight) 9%, transparent),
      transparent 55%
    ),
    var(--shop-paper);
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

main {
  flex: 1;
}

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

a {
  color: var(--signal-red);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 2px solid var(--signal-red);
  outline-offset: 3px;
}

/* Layout */

.wrap {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
}

@media (min-width: 480px) {
  .wrap {
    width: min(100% - 2.5rem, var(--max));
  }
}

@media (min-width: 960px) {
  .wrap {
    width: min(100% - 3.5rem, var(--max));
  }
}

.measure {
  max-width: var(--measure);
}

/* Header */

.site-header {
  border-bottom: var(--rule);
  background: color-mix(in srgb, var(--shop-paper) 88%, white);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-block: 0.85rem;
  min-height: var(--header-h);
}

.wordmark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem);
  letter-spacing: 0.01em;
  color: var(--carbon);
  text-decoration: none;
  line-height: 1.15;
  min-width: 0;
  flex: 1 1 auto;
}

.wordmark:hover {
  color: var(--carbon);
}

.wordmark span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deep-oil);
  opacity: 0.72;
  margin-top: 0.22rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.15rem 0.15rem;
  width: 100%;
}

@media (min-width: 720px) {
  .nav {
    width: auto;
    justify-content: flex-end;
    gap: 0.2rem 0.35rem;
  }
}

.nav a {
  font-size: 0.9rem;
  color: var(--deep-oil);
  text-decoration: none;
  padding: 0.55rem 0.65rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
}

.nav a:hover {
  color: var(--carbon);
  background: color-mix(in srgb, var(--carbon) 5%, transparent);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--carbon);
  box-shadow: inset 0 -2px 0 var(--signal-red);
}

/* Hero / page intro */

.hero {
  position: relative;
  padding-block: var(--space-2xl) var(--space-xl);
  border-bottom: var(--rule);
  background:
    linear-gradient(
      105deg,
      color-mix(in srgb, var(--paper-warm) 70%, transparent) 0%,
      transparent 58%
    );
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--signal-red) 0%,
    var(--worklight) 100%
  );
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero__copy {
  min-width: 0;
  max-width: 38rem;
}

/* Hero art slot — wireframe until a final image is chosen */
.hero__art {
  position: relative;
  margin: 0;
  min-width: 0;
  border: var(--rule-strong);
  background: var(--paper-elevated);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--carbon) 5%, transparent),
    0 28px 50px -32px color-mix(in srgb, var(--carbon) 45%, transparent);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  width: 100%;
}

.hero__art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.hero__art--placeholder {
  background:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 12px,
      color-mix(in srgb, var(--carbon) 4.5%, transparent) 12px,
      color-mix(in srgb, var(--carbon) 4.5%, transparent) 13px
    ),
    var(--paper-elevated);
}

.hero__wireframe {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.25rem;
  text-align: center;
  pointer-events: none;
}

/* Corner registration marks */
.hero__art--placeholder::before,
.hero__art--placeholder::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: color-mix(in srgb, var(--carbon) 35%, transparent);
  border-style: solid;
  z-index: 1;
}

.hero__art--placeholder::before {
  top: 10px;
  left: 10px;
  border-width: 1px 0 0 1px;
}

.hero__art--placeholder::after {
  top: 10px;
  right: 10px;
  border-width: 1px 1px 0 0;
}

.hero__wireframe::before,
.hero__wireframe::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: color-mix(in srgb, var(--carbon) 35%, transparent);
  border-style: solid;
}

.hero__wireframe::before {
  bottom: 10px;
  left: 10px;
  border-width: 0 0 1px 1px;
}

.hero__wireframe::after {
  bottom: 10px;
  right: 10px;
  border-width: 0 1px 1px 0;
}

.hero__wireframe-label {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--carbon) 55%, transparent);
}

.hero__wireframe-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--deep-oil) 55%, transparent);
}

/* Mobile: art sits under copy, sized so type still leads */
@media (max-width: 879px) {
  .hero__art {
    max-width: 20rem;
    width: 100%;
    justify-self: start;
  }
}

@media (min-width: 880px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(15rem, 0.68fr);
    gap: clamp(1.75rem, 3.5vw, 3.25rem);
    align-items: center;
  }

  .hero__art {
    align-self: center;
    max-width: none;
    width: 100%;
  }
}

@media (min-width: 1100px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.7fr);
  }
}

.page-header {
  position: relative;
  padding-block: var(--space-xl) var(--space-lg);
  border-bottom: var(--rule);
  background: color-mix(in srgb, var(--paper-warm) 45%, var(--shop-paper));
}

.page-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--signal-red);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-red);
  margin: 0 0 var(--space-md);
}

.hero h1,
.page-header h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.15rem, 1.4rem + 3.2vw, 3.65rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-md);
  max-width: 14ch;
  text-wrap: balance;
}

.page-header h1 {
  max-width: 18ch;
}

.lede {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem);
  max-width: 34rem;
  margin: 0 0 var(--space-lg);
  color: var(--deep-oil);
  line-height: 1.55;
}

.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
  margin: 0 0 var(--space-lg);
  color: var(--carbon);
  padding-left: 0.85rem;
  border-left: 2px solid var(--worklight);
}

.page-header .lede {
  margin-bottom: 0;
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  min-height: 2.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--carbon);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  touch-action: manipulation;
}

@media (max-width: 419px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}

.btn--primary {
  background: var(--carbon);
  color: var(--shop-paper);
}

.btn--primary:hover {
  background: var(--signal-red);
  border-color: var(--signal-red);
  color: var(--shop-paper);
}

.btn--ghost {
  background: transparent;
  color: var(--carbon);
}

.btn--ghost:hover {
  background: color-mix(in srgb, var(--carbon) 6%, transparent);
  color: var(--carbon);
}

/* Sections */

.section {
  padding-block: var(--space-xl);
  border-bottom: var(--rule);
}

.section:last-of-type {
  border-bottom: 0;
}

.section h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.55rem, 1.25rem + 1.1vw, 2.05rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 var(--space-md);
  max-width: 22ch;
  text-wrap: balance;
}

.section h2 + p,
.section h2 + ul,
.section h2 + ol,
.section h2 + .callout,
.section h2 + .steps,
.section h2 + .trust,
.section h2 + .cards,
.section h2 + .chips {
  margin-top: 0.15rem;
}

.section h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  margin: var(--space-lg) 0 var(--space-sm);
}

.section p {
  margin: 0 0 var(--space-md);
  max-width: var(--measure);
}

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

.section ul,
.section ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.2rem;
  max-width: var(--measure);
}

.section li {
  margin-bottom: 0.5rem;
}

.section li::marker {
  color: var(--signal-red);
}

/* Steps — How it works
   Important: no min-height: 100%, no grid-auto-rows: 1fr, no nowrap titles.
   Those caused sticky expanded heights / widths on browser resize. */

.section--steps {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--paper-warm) 55%, var(--shop-paper)) 0%,
      var(--shop-paper) 100%
    );
}

.section--steps .wrap > h2 {
  max-width: none;
  margin-bottom: 0.35rem;
}

.steps {
  /* Fixed 3-up at large widths; never invent empty 1fr tracks that stick */
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  align-items: start;
  gap: 1rem;
  margin: 1.35rem 0 0;
  /* Reset .section ol padding/max-width so cards can use full width */
  padding: 0;
  list-style: none;
  max-width: none !important;
  width: 100%;
}

@media (min-width: 700px) {
  .steps {
    /* 2 columns until titles have room in 3-up */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem 1.25rem;
  }
}

@media (min-width: 1040px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
    /* Equal-height cards only at this breakpoint, still auto-sized from content */
    align-items: stretch;
  }
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem 1rem;
  align-items: start;
  margin: 0;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-width: 100%;
  padding: 1.25rem 1.2rem 1.35rem;
  background: var(--paper-elevated);
  border: var(--rule);
  border-radius: var(--radius);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--carbon) 5%, transparent),
    0 18px 40px -28px color-mix(in srgb, var(--carbon) 35%, transparent);
}

.step::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    var(--signal-red) 0%,
    color-mix(in srgb, var(--worklight) 70%, var(--signal-red)) 100%
  );
  border-radius: var(--radius) 0 0 var(--radius);
}

@media (min-width: 700px) {
  .step {
    padding: 1.4rem 1.35rem 1.5rem 1.3rem;
  }
}

@media (min-width: 1040px) {
  .step {
    /* Stretch with the grid row; content still drives intrinsic height */
    height: auto;
    padding: 1.55rem 1.5rem 1.65rem 1.4rem;
  }
}

.step__index {
  font-family: var(--font-mono);
  font-size: clamp(1.65rem, 1.4rem + 0.6vw, 2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: color-mix(in srgb, var(--signal-red) 82%, var(--carbon));
  opacity: 0.92;
  user-select: none;
  /* Pin index to top; never stretch the card */
  align-self: start;
  padding-top: 0.15rem;
}

.step__content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  min-height: 0;
}

@media (min-width: 1040px) {
  .step__content {
    /* Fill stretched card; body text can sit naturally without forcing min heights */
    flex: 1 1 auto;
  }
}

.step__label {
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-red);
  line-height: 1.3;
}

.step__title {
  margin: 0;
  max-width: none;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.12rem + 0.4vw, 1.5rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--carbon);
  /* Natural wrap only—never force nowrap (that bloated card width on resize) */
  hyphens: manual;
  text-wrap: balance;
}

.step__text {
  margin: 0.35rem 0 0;
  max-width: none;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--deep-oil);
}

/* Kill any inherited list spacing from .section li / .section p */
.section--steps .steps,
.section--steps .step,
.section--steps .step p {
  max-width: none;
}

.section--steps .step {
  margin-bottom: 0;
}

.section--steps .step::marker {
  content: none;
}

/* Trust / meta strips */

.trust {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
  max-width: none;
}

@media (min-width: 720px) {
  .trust {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

.trust li {
  margin: 0;
  padding: 1.15rem 1.2rem;
  border-left: 3px solid var(--signal-red);
  background: color-mix(in srgb, var(--carbon) 3.5%, transparent);
  font-size: 0.98rem;
  line-height: 1.5;
}

/* Callout / empty state */

.callout {
  position: relative;
  padding: clamp(1.25rem, 3vw, 1.85rem);
  background: var(--paper-elevated);
  border: var(--rule);
  border-left: 3px solid var(--worklight);
  max-width: 46rem;
  box-shadow: 0 12px 40px color-mix(in srgb, var(--carbon) 4%, transparent);
}

.callout p {
  margin: 0;
  max-width: none;
  font-size: 1.02rem;
}

.callout strong {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.08em;
  display: inline;
}

/* Disclosure blocks */

.disclosure {
  padding: 1.15rem 1.2rem;
  border: var(--rule);
  border-left: 3px solid var(--deep-oil);
  background: color-mix(in srgb, var(--concrete) 16%, var(--shop-paper));
  margin-bottom: var(--space-md);
  max-width: var(--measure);
}

.disclosure__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 var(--space-xs);
  color: var(--signal-red);
}

.disclosure p {
  margin: 0;
  font-size: 0.95rem;
  max-width: none;
}

/* Contact cards */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: none;
  margin-top: var(--space-md);
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

.card {
  padding: 1.35rem 1.4rem;
  border: var(--rule);
  background: var(--paper-elevated);
  border-top: 3px solid color-mix(in srgb, var(--carbon) 55%, var(--concrete));
  min-width: 0;
}

.card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  max-width: none;
  font-size: 0.98rem;
  color: var(--deep-oil);
}

/* Category chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
  max-width: none;
}

.chips li {
  margin: 0;
  padding: 0.5rem 0.8rem;
  border: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  background: var(--paper-elevated);
  color: var(--deep-oil);
}

.chips li:hover {
  border-color: color-mix(in srgb, var(--signal-red) 45%, var(--concrete));
  color: var(--carbon);
}

/* Footer */

.site-footer {
  margin-top: auto;
  border-top: 3px solid var(--signal-red);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--deep-oil) 40%, var(--carbon)) 0%,
      var(--carbon) 28%
    );
  color: color-mix(in srgb, var(--shop-paper) 88%, white);
  padding-block: var(--space-xl) var(--space-lg);
}

.site-footer a {
  color: color-mix(in srgb, var(--shop-paper) 90%, white);
}

.site-footer a:hover {
  color: white;
}

.site-footer__grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: 1.3fr 1fr;
  }
}

@media (min-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.site-footer h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--space-sm);
  color: var(--shop-paper);
}

.site-footer p,
.site-footer li {
  font-size: 0.92rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--shop-paper) 78%, var(--concrete));
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  display: inline-block;
  padding: 0.15rem 0;
  min-height: 2rem;
}

.site-footer__meta {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid color-mix(in srgb, var(--shop-paper) 14%, transparent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--shop-paper) 55%, var(--concrete));
}

/* Utilities */

.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;
}

.email-link {
  font-weight: 500;
  word-break: break-word;
}

/* Skip link */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  background: var(--carbon);
  color: var(--shop-paper);
  padding: 0.55rem 0.85rem;
  z-index: 100;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

/* Prefer reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}

/* Print: keep it simple */

@media print {
  .site-header {
    position: static;
  }

  .hero::before,
  .page-header::before,
  .hero .wrap::after {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
