/* Tap Retail homepage. Vanilla CSS, no build step. */

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/barlow-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/barlow-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/barlow-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/barlow-condensed-800.woff2') format('woff2');
}

:root {
  --navy: #14213D;
  --navy-2: #22335E;
  --navy-rule: #34466F;
  --accent: #E8590C;
  --accent-bg: #EC6214; /* behind navy text: 4.81:1 with #14213D */
  --accent-deep: #B84300;
  --accent-soft: #FF8A4C;
  --ink-soft: #4A5670;
  --white: #FFFFFF;
  --band: #F1F3F7;
  --line: #E3E9F2;
  --card-line: #DCE4F0;
  --on-navy: #D5DDEA;
  --on-navy-mute: #B8C3DA;
  --open: #1E7A46;

  --font-body: 'Barlow', system-ui, sans-serif;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;

  --gutter: clamp(20px, 4.5vw, 64px);
  --section: clamp(56px, 7vw, 96px);
  --radius: 12px;
  --radius-sm: 8px;
  --ease: 0.2s ease;
  --focus: var(--accent);

  /* Tap Town, day palette */
  --hero-bg: #EEF3FA;
  --hero-text: #14213D;
  --hero-sub: #4A5670;
  --hero-eyebrow: #B84300;
  --slab: #9AA7BF;
  --slab-l: #7F8DA8;
  --slab-r: #6B7994;
  --tile: #C2CEE0;
  --dash: #B4C0D6;
  --win: #7FA3D6;
  --grass: #8CC4A0;
  --leaf: #4FA36E;
  --leaf-l: #3F8A5B;
  --leaf-r: #2F7049;
  --beam: 0;
}

/* Tap Town, night palette. theme.js sets data-mode on <html> before first paint. */
html[data-mode='night'] {
  --hero-bg: #0B1226;
  --hero-text: #FFFFFF;
  --hero-sub: #C7D0E4;
  --hero-eyebrow: #FF8A4C;
  --slab: #1C2A4D;
  --slab-l: #121C36;
  --slab-r: #0D152B;
  --tile: #2A3A63;
  --dash: #3A4C7C;
  --win: #FFC857;
  --grass: #24503F;
  --leaf: #2F6B4F;
  --leaf-l: #245540;
  --leaf-r: #1B4232;
  --beam: 0.3;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(20, 33, 61, 0.12);
  background: var(--navy);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--navy);
  background: var(--navy);
}

h1,
h2,
h3,
p,
dl,
dd,
ol {
  margin: 0;
}

ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--navy);
  transition: color var(--ease);
}

a:hover {
  color: var(--accent-deep);
}

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

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

[hidden] {
  display: none !important;
}

.wrap {
  max-width: 1312px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--white);
}

/* Type */

.eyebrow {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 0.95;
  text-wrap: balance;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn--solid {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.btn--solid:hover {
  background: var(--navy-2);
  border-color: var(--navy-2);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  border-color: var(--hero-text);
  color: var(--hero-text);
}

.btn--ghost:hover {
  background: var(--hero-text);
  color: var(--hero-bg);
}

.btn--lg {
  min-height: 48px;
  padding: 0 26px;
  font-size: 17px;
}

.btn--nav {
  padding: 0 24px;
  font-size: 17px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  font-weight: 600;
  text-underline-offset: 5px;
}

.text-link--sm {
  font-size: 16px;
}

/* Header */

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

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 40px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--navy);
  text-decoration: none;
}

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

.wordmark__tap {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 46px;
  line-height: 0.85;
  letter-spacing: 0.01em;
}

.wordmark__bar {
  width: 2px;
  height: 32px;
  background: var(--accent);
}

.wordmark__retail {
  font-size: 20px;
  font-weight: 500;
}

.wordmark--light {
  color: var(--white);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 30px;
}

.site-nav__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}

/* Hero */

.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  transition: background-color 0.9s ease, color 0.9s ease;
}

html[data-mode='night'] .hero {
  --focus: var(--accent-soft);
}

.hero__inner {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  grid-template-areas:
    'intro town'
    'card town';
  column-gap: 48px;
  row-gap: 22px;
  padding-top: 56px;
  padding-bottom: 64px;
}

.hero__intro {
  grid-area: intro;
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.hero__eyebrow {
  color: var(--hero-eyebrow);
  transition: color 0.9s ease;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 6.4vw, 92px);
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.hero__sub {
  font-size: 19px;
  color: var(--hero-sub);
  transition: color 0.9s ease;
}

.hero__town {
  grid-area: town;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Tap Town */

.town {
  position: relative;
}

.town__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.c-slab { fill: var(--slab); }
.c-slabl { fill: var(--slab-l); }
.c-slabr { fill: var(--slab-r); }
.c-tile { fill: var(--tile); }
.c-grass { fill: var(--grass); }
.c-leaf { fill: var(--leaf); }
.c-leafl { fill: var(--leaf-l); }
.c-leafr { fill: var(--leaf-r); }
.c-accent { fill: var(--accent); }
.win { fill: var(--win); }

.c-slab,
.c-slabl,
.c-slabr,
.c-tile,
.c-grass,
.c-leaf,
.c-leafl,
.c-leafr,
.win {
  transition: fill 0.9s ease;
}

.road-dash {
  stroke: var(--dash);
  stroke-width: 2;
  stroke-dasharray: 10 12;
  opacity: 0.7;
  transition: stroke 0.9s ease;
}

.tile {
  stroke: transparent;
  stroke-width: 3;
  stroke-linejoin: round;
  transition: fill 0.9s ease, stroke var(--ease);
}

.is-animated .win {
  transition: none;
}

.tile.is-selected {
  stroke: var(--accent-bg);
}

.obj--site {
  cursor: pointer;
}

.car {
  pointer-events: none;
}

.car__beam {
  fill: #FFE9A8;
  opacity: var(--beam);
  transition: opacity 0.9s ease;
}

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  padding: 0;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 10px rgba(20, 33, 61, 0.35);
  transition: background-color var(--ease), color var(--ease);
}

.pin:hover {
  background: var(--navy-2);
}

.pin[aria-pressed='true'] {
  background: var(--accent-bg);
  color: var(--navy);
}

/* Hidden only while the build-in is being prepared. theme.js removes this as a fallback. */
.anim-pending .town__svg,
.anim-pending .pin {
  visibility: hidden;
}

.town-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.town-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.town-bar__hint {
  font-size: 16px;
  font-weight: 500;
  color: var(--hero-sub);
  transition: color 0.9s ease;
}

/* Site card */

.site-card {
  grid-area: card;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 14px 34px rgba(20, 33, 61, 0.14);
  --focus: var(--accent);
}

.site-card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-card__tag {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.site-card__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.site-card__addr {
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.site-card__fuel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.price {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--band);
}

.price__label {
  font-size: 13px;
  color: var(--ink-soft);
}

.price__value {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.site-card__foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-card__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}

.status-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--open);
}

.site-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Stats */

.stats {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 28px 32px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 64px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: 16px;
  color: var(--ink-soft);
}

/* Bands */

.band--soft {
  background: var(--band);
}

.band--white {
  background: var(--white);
}

.band--navy {
  background: var(--navy);
  color: var(--white);
  --focus: var(--accent-soft);
}

.band__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: var(--section);
  padding-bottom: var(--section);
}

.band__inner--wide-gap {
  gap: 48px;
}

.band__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
}

.band__lede {
  color: var(--ink-soft);
}

.band--navy .eyebrow {
  color: var(--accent-soft);
}

.band--navy .band__lede {
  color: var(--on-navy);
}

/* What we do */

.biz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.biz-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 260px;
  padding: 32px;
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color var(--ease), transform var(--ease);
}

.biz-card:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
}

.biz-card__top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.biz-card__mark {
  width: 40px;
  height: 4px;
  background: var(--accent);
}

.biz-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
}

.biz-card__text {
  color: var(--ink-soft);
}

/* Our story */

.directors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 32px;
}

.director {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 28px;
  border-top: 1px solid var(--navy-rule);
}

.director__letter {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(150px, 24vw, 220px);
  line-height: 0.8;
  color: var(--accent);
}

.director__name {
  margin-top: 14px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}

.director__role {
  font-size: 16px;
  color: var(--on-navy-mute);
}

.director__line {
  color: var(--on-navy);
}

/* Locations */

.locations {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.site-list {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 14px 20px;
  border-radius: 10px;
  background: var(--white);
}

.site-row__main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.site-row__num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 17px;
  font-weight: 600;
}

.site-row__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.site-row__name {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.site-row__tag {
  font-size: 15px;
  color: var(--ink-soft);
}

.map-placeholder {
  flex: 1 1 420px;
  min-width: 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  border: 2px dashed #8F9BB3;
  border-radius: var(--radius);
  background: var(--card-line);
  text-align: center;
}

.map-placeholder__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
}

.map-placeholder__text {
  max-width: 320px;
  font-size: 16px;
  color: var(--ink-soft);
}

/* Work with us */

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 24px;
  padding-top: var(--section);
  padding-bottom: var(--section);
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius);
}

.cta--accent {
  background: var(--accent-bg);
  --focus: var(--navy);
}

.cta--accent .cta__text {
  font-weight: 500;
}

.cta--soft {
  background: var(--band);
}

.cta--soft .cta__text {
  color: var(--ink-soft);
}

/* Footer */

.site-footer {
  background: var(--navy);
  color: var(--white);
  --focus: var(--accent-soft);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 56px;
  padding-bottom: 64px;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}

.footer-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--white);
  font-size: 16px;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent-soft);
}

.site-footer__legal {
  padding-top: 24px;
  border-top: 1px solid var(--navy-rule);
  font-size: 15px;
  color: var(--on-navy-mute);
}

/* Tablet and phone: the town sits between the intro and the info card */

@media (max-width: 1040px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'intro'
      'town'
      'card';
    row-gap: 28px;
    padding-top: 40px;
    padding-bottom: 48px;
  }

  .hero__intro {
    gap: 16px;
  }

  .hero__town {
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .site-nav {
    gap: 0 22px;
  }

  .site-nav__link {
    font-size: 16px;
  }

  .hero__title {
    font-size: clamp(48px, 15vw, 60px);
  }

  .hero__sub {
    font-size: 18px;
  }

  .stat__value {
    font-size: 52px;
  }

  .biz-card {
    min-height: 0;
    padding: 24px;
  }

  .map-placeholder {
    min-height: 280px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .btn:active,
  .biz-card:hover {
    transform: none;
  }
}
