/* ==========================================================================
   Twist Marketing Inc.
   Brand tokens — sampled pixel-by-pixel from the original artwork.
   Do not alter --navy or --lime: they are the identity.
   ========================================================================== */

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Identity — exact values from the source PNGs */
  --navy: #001972;
  --lime: #93D600;

  /* Lime fails WCAG on white (1.77:1). Same hue (78.8deg), darkened only
     where lime meets white. Never used on navy — see README. */
  --lime-display: #70A300;  /* 3.03:1 — large display text only */
  --lime-ink:     #588000;  /* 4.66:1 — any text size */

  /* Ground — carried over from the original page */
  --panel:        #FFFFFF;
  --panel-border: #0963AD;  /* the original 1px shape border */
  --surround:     #4F4F4F;  /* the original body background */
  --ink:          #000000;  /* body copy is black in the source artwork */

  /* Typography.
     Montserrat is a *stand-in*. The original body face is a geometric sans
     with a double-storey 'a' and single-storey 'g' — most likely Avenir or
     Proxima Nova (both commercial). Montserrat measured ~8% wider at matched
     cap-height, hence the negative tracking below. Confirm against Twist's
     brand guide in Phase 1, then swap this one line. */
  --face: 'Montserrat', 'Avenir Next', 'Proxima Nova', 'Segoe UI', system-ui, sans-serif;

  /* Measured from the source artwork at the original 900px canvas */
  --fs-hl-sm:   clamp(1.35rem, 3.9vw, 2.19rem);  /* 35px  "Specializing in" / "and" */
  --fs-hl-lg:   clamp(1.95rem, 5.9vw, 3.31rem);  /* 53px  "Shopper Marketing" */
  --fs-list:    clamp(1.05rem, 2.9vw, 1.75rem);  /* 28px  service lists */
  --fs-tagline: clamp(1.15rem, 3.1vw, 2.5rem);   /* 40px  hero tagline */
  --fs-addr:    clamp(0.72rem, 1.75vw, 0.94rem); /* 15px  address block */

  --panel-pad: clamp(1.15rem, 4vw, 2.5rem);
}

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

body {
  margin: 0;
  background: var(--surround);
  color: var(--ink);
  font-family: var(--face);
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--navy); }
a:focus-visible,
.social a:focus-visible {
  outline: 3px solid var(--lime-display);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Visually hidden, still announced */
.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 50%; transform: translateX(-50%) translateY(-150%);
  z-index: 10;
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.skip:focus { transform: translateX(-50%) translateY(0); }

/* ---------- the white panel (original: 900px shape, 1px blue border) ---------- */
.panel {
  max-width: 900px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}
@media (min-width: 940px) {
  .panel { margin: 2rem auto; }
}

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  justify-content: center;
  padding: 0 var(--panel-pad);
}
.logo {
  width: min(450px, 62%);
  height: auto;
}

/* ---------- headline ---------- */
.headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: clamp(1.5rem, 3.5vw, 3.4rem) 0 0;
  padding: 0 var(--panel-pad);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}
.hl-sm {
  font-size: var(--fs-hl-sm);
  color: var(--lime-display);
}
.hl-lg {
  font-size: var(--fs-hl-lg);
  color: var(--navy);
}
.hl-line { white-space: nowrap; }

/* ---------- services ---------- */
/* NOTE: the original sets these two lists at DIFFERENT sizes (~30px and
   ~23px) — almost certainly an artefact of the old page builder, since the
   content is parallel. Normalised here to a single size. To restore the
   original mismatch, give the second .service its own smaller font-size. */
.services {
  display: flex;
  flex-direction: column;
  gap: clamp(0.9rem, 2vw, 1.4rem);
  align-items: center;
  margin: clamp(1.4rem, 3vw, 2.5rem) 0 0;
  padding: 0 var(--panel-pad);
  font-size: var(--fs-list);
}
.service { width: 100%; max-width: 30ch; }
.service h2 {
  margin: 0;
  font-size: 1em;
  font-weight: 400;
  line-height: 1.35;
}
.service ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.service li {
  line-height: 1.35;
  padding-left: 1.05em;
  text-indent: -1.05em;
}
.service li::before {
  content: "\2022";
  padding-right: 0.45em;
}

/* ---------- hero: photo + live tagline ---------- */
/* The tagline was burnt into the source PNG. The photo is cropped above it
   (903x272) and the sentence is restored as real text over a navy scrim. */
.hero {
  position: relative;
  margin: clamp(1.6rem, 3.4vw, 2.6rem) 0 0;
  padding: 0;
}
.hero img { width: 100%; }

.hero figcaption {
  font-size: var(--fs-tagline);
  font-weight: 300;
  line-height: 1.18;
  text-align: center;
  text-wrap: balance;
}

/* Wide: tagline sits over the photo, as in the original */
@media (min-width: 700px) {
  .hero figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    color: #fff;
    padding: 3.2em 1rem 0.55em;
    background: linear-gradient(to bottom,
                rgba(0, 25, 114, 0) 0%,
                rgba(0, 25, 114, 0.55) 45%,
                rgba(0, 25, 114, 0.88) 100%);
  }
}

/* Narrow: the photo is too short to carry text — place it beneath, in navy */
@media (max-width: 699.98px) {
  .hero figcaption {
    color: var(--navy);
    padding: 0.9rem var(--panel-pad) 0;
  }
}

/* ---------- 20 years badge ---------- */
.badge {
  width: min(353px, 46%);
  margin: clamp(1.6rem, 3.6vw, 3rem) auto 0;
}

/* ---------- contact ---------- */
.contact {
  margin: clamp(1.1rem, 2.4vw, 1.6rem) 0 0;
  padding: 0 var(--panel-pad);
  font-size: var(--fs-addr);
  font-style: normal;
  font-weight: 400;
  text-align: center;
  line-height: 1.65;
}
.contact .addr-line { margin: 0; }
.contact a {
  color: inherit;
  text-decoration-color: rgba(0, 0, 0, 0.35);
  text-underline-offset: 2px;
}
.contact a:hover { color: var(--navy); text-decoration-color: currentColor; }
.contact .sep { white-space: nowrap; margin-left: 0.9em; }

/* ---------- social ---------- */
.social {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 2.4vw, 1.35rem);
  margin: clamp(1.3rem, 2.8vw, 2.1rem) 0 0;
  padding: 0 var(--panel-pad);
}
.social a {
  display: block;
  color: var(--navy);
  transition: color 0.15s ease, transform 0.15s ease;
}
.social svg { width: 40px; height: 40px; display: block; }
.social a:hover { color: var(--lime-ink); transform: translateY(-2px); }

/* ---------- footer device: lime rule above a navy block ---------- */
/* Reproduces gr-bl-base-421x137.png as geometry — no image request. */
.base {
  width: min(421px, 55%);
  height: clamp(64px, 9vw, 137px);
  margin: clamp(1.4rem, 3vw, 2.2rem) auto 0;
  background: var(--navy);
  border-top: clamp(14px, 2vw, 31px) solid var(--lime);
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
