/* Central Florida Hybrid EV Auto Repair — tokens from design/DESIGN.md.
   Palette built by the HSL procedure (graphite neutrals, hue 220;
   high-voltage orange, hue 26). Calibration: linear-app (staircase
   math, display tracking), emilkowal-ski (gap jumps). Sans only,
   system faces; no external requests. */
:root {
  --frame: #20262e;
  --sheet: #f6f8f9;
  --surface: #e9edf0;
  --ink-1: #16191d;
  --ink-2: #3d454e;
  --ink-3: #68727c;
  --accent: #b35209;
  --accent-dark: #9d4708;
  --band: #14181d;
  --band-ink: #f2f5f7;
  --band-muted: #a7b0b9;
  --line: rgba(22, 25, 29, 0.14);
  --line-band: rgba(242, 245, 247, 0.22);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --wrap: 1200px;
  --radius: 6px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--ink-3) var(--frame);
}

body {
  margin: 0;
  background: var(--frame);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #fad9b8;
  color: var(--ink-1);
}

a {
  color: inherit;
  touch-action: manipulation;
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--ink-1);
  outline-offset: 3px;
}

.band a:focus-visible,
.band .button:focus-visible {
  outline-color: var(--band-ink);
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin: 0 auto;
}

section[id] {
  scroll-margin-top: 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 40;
  padding: 12px 16px;
  background: var(--ink-1);
  color: var(--sheet);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Sheet on the graphite frame ---------- */

.sheet {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--sheet);
  box-shadow: 0 24px 64px rgba(10, 14, 18, 0.35);
}

/* ---------- The mark: an authored battery gauge ---------- */

.mark {
  width: 48px;
  height: 48px;
  flex: none;
}

.mark .plate {
  fill: var(--ink-1);
}

.mark .cell {
  fill: var(--sheet);
}

.mark .cell-o {
  fill: none;
  stroke: var(--sheet);
  stroke-width: 3.5;
}

.mark .live {
  fill: var(--accent);
}

.band .mark .plate {
  fill: var(--band-ink);
}

.band .mark .cell {
  fill: var(--band);
}

.band .mark .cell-o {
  stroke: var(--band);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-row {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  text-decoration: none;
}

.brand-words {
  display: grid;
  line-height: 1.05;
}

.brand-name {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  white-space: nowrap;
}

.brand-sub {
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin: 0 -10px;
  padding: 0 10px;
  color: var(--ink-1);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--ink-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease-out);
}

/* ---------- Buttons: one style, machined radius ---------- */

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--sheet);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 150ms ease, transform 120ms var(--ease-out);
}

.button:active {
  transform: scale(0.98);
}

/* The header action is a text link on desktop: the hero button is in
   view with it, and the accent is rationed to one filled instance
   per viewport (critique r1, issues 2 + 5). */
.text-action {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  margin-left: auto;
  padding: 0 4px;
  color: var(--ink-1);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.text-action::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--ink-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: var(--accent-dark);
  }

  .site-nav a:hover::after,
  .text-action:hover::after {
    transform: scaleX(1);
  }

  .arrow-link:hover .arrow {
    transform: translateX(3px);
  }
}

.arrow {
  display: inline-block;
  transition: transform 200ms var(--ease-out);
}

.arrow-link {
  text-underline-offset: 4px;
}

/* ---------- Hero: category, then the address set large ---------- */

.hero-inner {
  padding: 96px 0 104px;
}

.hero h1 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(2.5rem, 5.2vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--ink-1);
  text-wrap: balance;
}

/* Boldness is spent here: the corrected address at display scale —
   the fact this shop's customers are getting wrong. */
.hero-address {
  margin: 24px 0 0;
  font-size: clamp(3.4rem, 8.6vw, 7.375rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-sub {
  max-width: 560px;
  margin: 32px 0 0;
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  line-height: 1.5;
}

.hero-action {
  margin: 40px 0 0;
}

/* The one entrance: hero content rises once on load. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-inner [data-enter] {
  animation: rise 560ms var(--ease-out) backwards;
}

.hero-inner [data-enter]:nth-child(2) {
  animation-delay: 70ms;
}

.hero-inner [data-enter]:nth-child(3) {
  animation-delay: 140ms;
}

.hero-inner [data-enter]:nth-child(4) {
  animation-delay: 210ms;
}

/* ---------- Sections ---------- */

.section {
  padding: 96px 0;
}

.section h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink-1);
}

/* ---------- Visit ---------- */

.visit {
  padding-top: 0;
}

.visit-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 24px;
  align-items: stretch;
}

.visit-panel {
  padding: 48px;
  background: var(--surface);
  border-radius: var(--radius);
}

.visit-panel p {
  margin: 0;
}

.visit-address {
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink-1);
}

.visit-address a {
  text-decoration: none;
}

.visit-directions {
  margin-top: 12px;
  font-size: 1rem;
}

.visit-directions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-weight: 500;
  color: var(--ink-1);
}

.visit-note {
  margin: 0;
  align-self: center;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-1);
}

/* ---------- The shop: statement, then the spec sheet ---------- */

.shop {
  border-top: 1px solid var(--line);
}

.statement {
  max-width: 26ch;
  margin: 48px 0 0;
  font-size: clamp(1.75rem, 4vw, 2.875rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink-1);
  text-wrap: balance;
}

.spec {
  margin: 64px 0 0;
  max-width: 880px;
}

.spec-row {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.spec-row:last-child {
  border-bottom: 1px solid var(--line);
}

.spec-row dt {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.spec-row dd {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-1);
}

.shop-line {
  margin: 48px 0 0;
  font-size: 1.15rem;
  line-height: 1.55;
}

/* ---------- Close: the dark field, earned last ---------- */

.band {
  background: var(--band);
  color: var(--band-ink);
}

.close {
  padding: 96px 0 64px;
  overflow: hidden;
}

.close h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.close-line {
  margin: 24px 0 0;
  color: var(--band-muted);
  font-size: 1.15rem;
}

.close-action {
  margin: 36px 0 0;
}

.close-name {
  margin: 64px 0 0;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.close-name-main {
  display: block;
  font-size: clamp(2.75rem, 6.2vw, 5.75rem);
  white-space: nowrap;
}

.close-name-sub {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.6rem, 4.3vw, 3.75rem);
  color: var(--band-muted);
  white-space: nowrap;
}

/* ---------- Footer: columns ---------- */

.site-footer {
  padding: 72px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-col h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-1);
}

.footer-col p {
  margin: 0 0 6px;
  line-height: 1.5;
}

.footer-col a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-left: -8px;
  padding: 0 8px;
  color: var(--ink-1);
  font-weight: 500;
  text-underline-offset: 4px;
}

.legal-row {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.legal-row p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.88rem;
}

/* ---------- Phone bar ---------- */

.phone-bar {
  display: none;
}

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  body {
    font-size: 16px;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .sheet {
    box-shadow: none;
  }

  .wrap {
    width: min(var(--wrap), calc(100% - 36px));
  }

  .header-row {
    min-height: 74px;
    gap: 16px;
  }

  .mark {
    width: 44px;
    height: 44px;
  }

  .brand-name {
    font-size: 1.12rem;
  }

  .brand-sub {
    font-size: 0.78rem;
  }

  .site-nav {
    display: none;
  }

  .text-action {
    /* Removed on phone (critique r1, issue 2): the hero button and
       the phone bar carry the action. */
    display: none;
  }

  .hero-inner {
    padding: 56px 0 64px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 10.5vw, 3.4rem);
  }

  .hero-address {
    margin-top: 24px;
    /* Critique r1, issue 2: the address holds its decisive jump on
       phone too — about 1.4x the phone h1, wrapping to two lines
       rather than shrinking. */
    font-size: clamp(3rem, 15vw, 3.75rem);
    line-height: 1.02;
    white-space: normal;
  }

  .hero-sub {
    margin-top: 24px;
  }

  .hero-action {
    margin-top: 32px;
  }

  .hero-action .button {
    /* Critique r1, issue 2: the filled button is restored on phone;
       it is the hero's one filled instance. */
    width: 100%;
  }

  .section {
    padding: 64px 0;
  }

  .visit {
    padding-top: 0;
  }

  .visit-grid {
    grid-template-columns: 1fr;
    margin-top: 36px;
  }

  .visit-panel {
    padding: 24px;
  }

  .visit-address {
    font-size: 1.125rem;
  }

  .statement {
    margin-top: 36px;
  }

  .spec {
    margin-top: 48px;
  }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 16px 0;
  }

  .shop-line {
    margin-top: 36px;
  }

  .close {
    padding-top: 64px;
  }

  .close-action .button {
    /* Critique r1, issue 5: on phone the band's action is a text
       link — the permanent phone bar is the filled instance in
       this viewport. */
    width: auto;
    background: transparent;
    color: var(--band-ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 5px;
    justify-content: flex-start;
    padding: 0;
  }

  .close-name {
    margin-top: 48px;
  }

  .close-name-main {
    font-size: clamp(1.9rem, 8.6vw, 2.6rem);
    white-space: normal;
  }

  .close-name-sub {
    font-size: clamp(1.3rem, 6vw, 2rem);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .phone-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--sheet);
    border-top: 1px solid var(--line);
  }

  .phone-bar .button {
    flex: 1;
    min-height: 52px;
    padding: 0 12px;
    font-size: 0.95rem;
  }
}

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

  .hero-inner [data-enter] {
    animation: none;
  }

  .button,
  .site-nav a::after,
  .text-action::after,
  .arrow {
    transition: none;
  }

  .button:active {
    transform: none;
  }
}
