/* 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: #535B6B;
  --white: #FFFFFF;
  --paper: #F7F6F3;
  --line: #E5E2DC;
  --on-navy: #D5DDEA;
  --on-navy-mute: #B8C3DA;
  --font-body: 'Barlow', system-ui, sans-serif;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --gutter: clamp(20px, 4.5vw, 64px);
  --section: clamp(72px, 9vw, 128px);
  --radius: 8px;
  --ease: 0.25s ease;
  --focus: var(--accent);
}

*,
*::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.55;
  color: var(--navy);
  background: var(--white);
}

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

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

img {
  max-width: 100%;
}

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

/* Two wordings of the same line: .wide-only is the full one, .narrow-only the
   shorter one shown on phones. Only one is ever displayed, or read out. */

.narrow-only {
  display: none;
}

.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);
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

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

/* Type. Headings are sentence case at a moderate weight; the heavy condensed
   face is kept for the wordmark and the main hero line. */

.display--lg {
  font-size: clamp(32px, 3.7vw, 54px);
  line-height: 1.08;
}

.display {
  font-weight: 600;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  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);
}

.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--light {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}

.btn--light:hover {
  background: var(--accent-bg);
  border-color: var(--accent-bg);
  color: var(--navy);
}

/* Orange, with navy text (4.81:1): the header's Delivery button. */
.btn--accent {
  background: var(--accent-bg);
  border-color: var(--accent-bg);
  color: var(--navy);
}

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

/* The large orange "Order delivery" button in the homepage's delivery band. */
.btn--order {
  min-height: 56px;
  padding: 0 30px;
  border-radius: 999px;
  border-color: var(--accent-bg);
  background: var(--accent-bg);
  color: var(--navy);
  font-size: 18px;
  box-shadow: 0 12px 30px rgba(236, 98, 20, 0.28);
}

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

.btn__arrow {
  margin-left: 8px;
  transition: transform var(--ease);
}

.btn--order:hover .btn__arrow {
  transform: translateX(3px);
}

/* Read out, not shown. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A delivery app's logo on a white tile (scripts/delivery.mjs): every tile one size,
   each logo in the middle covering about the same area, never stretched. */
.app-tile {
  position: relative;
  display: block;
  border-radius: 12px;
  background: var(--white);
}

.app-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.app-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.btn--lg {
  min-height: 48px;
  padding: 0 24px;
}

.btn--sm {
  padding: 0 16px;
  font-size: 15px;
}

.btn--nav {
  padding: 0 22px;
}

/* Delivery: a button beside Tap in on wide screens; on phones a link in the menu. */
.site-nav__links .site-nav__link--menu {
  display: none;
}

.btn--delivery {
  margin-right: -20px;
}

@media (max-width: 759px) {
  .site-nav__links .site-nav__link--menu {
    display: flex;
  }

  .btn--delivery {
    display: none;
  }
}

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

/* Header */

.site-header {
  position: relative;
  z-index: 5;
  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 32px;
}

/* On wide screens the links sit straight in the nav row. */

.site-nav__links {
  display: contents;
}

.menu-btn {
  display: none;
}

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

/* Bands */

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

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

/* Navy bands carry the partners and the contact line. The colour change is the divider. */

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

/* Partners and the contact line are both navy and sit together: a hairline between them. */

.band--navy + .band--navy {
  border-top: 1px solid var(--navy-rule);
}

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

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

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

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

.site-list {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

/* Work with us: a navy band with one line and one button */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 64px;
  padding-top: var(--section);
  padding-bottom: var(--section);
}

.cta__copy {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 760px;
}

.cta .btn {
  flex: none;
}

/* Footer: light, so it does not run into the navy band above it */

.site-footer {
  background: var(--paper);
  color: var(--navy);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
  padding-top: 72px;
  padding-bottom: 40px;
}

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

.footer-col__title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: inherit;
  font-size: 15px;
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* A small map pin before each site. */

.footer-col--sites a::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border: 2px solid var(--accent);
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
}

.site-footer__legal {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
}

.site-footer__legal a {
  color: inherit;
  text-underline-offset: 3px;
}

.site-footer__legal p {
  margin: 0;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--navy);
  font-weight: 600;
}

/* Wide tablets and small laptops */

@media (max-width: 1040px) {
  .site-footer__inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer__lead {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 56px;
  }
}

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

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

  .band__inner {
    gap: 36px;
  }
}

/* Phones (below 760px). Less at once: shorter wording, details behind a tap,
   more space between sections, 16px text and 44px tap targets. Nothing in this
   block applies on wider screens. */

@media (max-width: 759px) {
  :root {
    --section: 84px;
  }

  body {
    font-size: 17px;
  }

  .wide-only {
    display: none;
  }

  .narrow-only {
    display: inline;
  }

  .band__inner {
    gap: 32px;
  }

  .display {
    font-size: 30px;
  }

  .display--lg {
    font-size: 32px;
  }

  /* Reading sizes and tap heights that the wide layout sets smaller */

  .btn--sm {
    font-size: 16px;
  }

  .btn--sm {
    min-height: 44px;
  }

  /* Contact */

  .cta {
    gap: 28px;
  }

  .cta .btn {
    width: 100%;
  }

  /* Footer: the three lists fold away under their headings */

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 56px;
    padding-bottom: 28px;
  }

  .site-footer__lead {
    margin-bottom: 32px;
  }

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

  .footer-col__title {
    margin: 0;
    padding: 16px 0 4px;
  }

  .footer-col__title:has(button) {
    padding: 0;
  }

  .footer-col__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 54px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--navy);
    font: inherit;
    font-size: 14px;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
  }

  .footer-col__toggle::after {
    content: '';
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    rotate: 45deg;
    transition: rotate 0.25s ease;
  }

  .footer-col__toggle[aria-expanded='true']::after {
    rotate: -135deg;
  }

  .footer-col ul {
    padding-bottom: 12px;
  }

  .footer-col a {
    min-height: 44px;
    font-size: 16px;
  }

  .site-footer__legal {
    margin-top: 0;
    padding-top: 20px;
    font-size: 13px;
    line-height: 1.5;
  }
}

/* Smooth scrolling (smooth.js): the rules Lenis needs. The page's own smooth
   scrolling for anchor links would fight it, so it is off while Lenis runs. */

html.lenis,
html.lenis body {
  height: auto;
}

html.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* The curtain out of the hero, and livelier sections (see fx.js) */

/* Headings rising line by line */

.line {
  display: block;
  overflow: hidden;
}

.line__in {
  display: block;
}

.tx-sticky #hero {
  position: sticky;
  top: 0;
  z-index: 0;
}

.tx-sticky main > :not(#hero) {
  position: relative;
  z-index: 1;
}

.tx-sticky #hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 30;
  background: var(--navy);
  opacity: var(--dim, 0);
  pointer-events: none;
}

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

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