/* Discover PDX Food Carts — landing page
   Built from discover_PDX_web.ai (desktop artboard 1630 wide, mobile artboard 579 wide).
   Values come from css/tokens.css; numbers below that aren't tokens are layout positions
   measured from the comps. */

/* Licensed web fonts: drop the files into /fonts with these names (see CLAUDE.md). */
@font-face {
  font-family: "Animo";
  src: url("../fonts/Animo-NormalRegular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sharp Grotesk";
  src: url("../fonts/SharpGrotesk-Medium20.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* Open-licensed stand-ins (SIL OFL), shipped locally, used until the licensed files above exist. */
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/fallback/barlow-condensed-latin-500-normal.woff2") format("woff2");
  font-weight: 400 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/fallback/familjen-grotesk-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 25px;
  overflow-x: hidden;
}
img { display: block; max-width: none; }
.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;
}

/* ---------- Stage: header, hero, map, pin (desktop positions in comp px) ---------- */
.stage {
  position: relative;
  height: 734px;               /* the panel's top edge in the desktop comp; the map runs on behind the panel */
}

.map-window {
  position: absolute; left: 0; right: 0;
  top: 260px; height: 800px;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, #000 22%, #000 72%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0, #000 22%, #000 72%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-composite: intersect;
}
/* The map image is 2511 x 1211 at comp scale; the site on NE Alberta sits at
   48.87% / 50.1% of it, and the pin tip sits there. */
.map {
  --map-w: 2511px;
  position: absolute;
  width: var(--map-w);
  height: calc(var(--map-w) * 0.48228);
  left: 50%;
  top: calc(585px - 260px - var(--map-w) * 0.48228 * 0.501);
  transform: translateX(-48.87%);
  background: url("../assets/map.jpg") center / 100% 100% no-repeat;
}

.loops {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 700px;
  pointer-events: none;
}
.loops img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.masthead {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 118px;
}
.brand { margin: 0; font-weight: inherit; }
.wordmark { width: 517px; height: auto; margin: 0 auto; }
.lockup-sub {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 32px;
  letter-spacing: 0.02em;
  color: var(--deep-blue);
  text-transform: uppercase;
}
.lockup-sub .gap { display: inline-block; width: 0.75em; }

.hero-title {
  margin: 52px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 46px;
  text-transform: uppercase;
  color: var(--accent);
}
.br-mobile { display: none; }

.pin {
  position: absolute; z-index: 2;
  width: 61px; height: 88px;
  left: 50%; top: 497px;
  transform: translateX(-50%);
}

/* ---------- Panel ---------- */
main { position: relative; z-index: 3; }
.panel {
  width: min(var(--panel-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 41px var(--space-panel) var(--space-panel);
  border-radius: var(--radius-panel);
  background: var(--panel);
  color: var(--on-panel);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 61px;
  align-items: start;
}
.panel-heading {
  margin: 0;
  text-wrap: balance;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 46px;
  text-transform: uppercase;
  color: var(--panel-heading);
}
.panel-copy {
  margin: 20px 0 0;
  font-size: 16px;
  line-height: 25px;
}

/* ---------- Form ---------- */
.cart-form { margin-top: 25px; }
.row-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-field) var(--space-field-pair);
}
.field { position: relative; }
.row-pair + .field { margin-top: var(--space-field); }
.field input,
.field textarea,
.check input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  line-height: 22px;
  color: var(--on-panel);
  background: transparent;
  border: var(--field-border) solid var(--on-panel);
  border-radius: var(--radius-full);
  height: var(--field-height);
  padding: 11px 22px 10px;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea {
  height: 122px;
  border-radius: var(--radius-field);
  padding-top: 14px;
  resize: vertical;
}
/* Floating label: sits where the comp's placeholder sits, moves to the top edge on focus/fill. */
.field label {
  position: absolute;
  left: 22px; top: 11px;
  font-size: 16px; line-height: 22px;
  color: var(--on-panel);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .15s ease, top .15s ease;
}
.field-multi label { top: 14px; }
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: -9px;
  transform: scale(.8125);
  padding: 0 6px;
  margin-left: -6px;
  background: var(--panel);
  border-radius: 4px;
}

.row-submit {
  margin-top: var(--space-field);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-field-pair);
}
.check { display: flex; align-items: center; gap: 10px; padding-left: 14px; }
.check label { font-size: 14px; line-height: 22px; white-space: nowrap; }
.check input {
  width: var(--field-height);
  padding: 0;
  text-align: center;
}
.btn {
  width: 193px;
  height: var(--field-height);
  border: 0;
  border-radius: var(--radius-full);
  background: var(--deep-blue);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  padding-top: 3px;
}
.btn:hover { background: var(--deep-blue-tint-1); }
.btn[disabled] { opacity: .7; cursor: progress; }

.field input:focus-visible,
.field textarea:focus-visible,
.check input:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.check input[aria-invalid="true"] { border-width: 2px; }

.form-status { margin: 16px 0 0; min-height: 25px; }
.form-status:empty { margin: 0; min-height: 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer (not in the comp: name and address for people and search) ---------- */
.foot {
  text-align: center;
  padding: 64px 24px 48px;
  font-size: 14px; line-height: 22px;
  color: var(--ink-muted);
}
.foot p { margin: 0; }

/* ---------- Desktop narrower than the comp ---------- */
@media (max-width: 1100px) {
  .panel { column-gap: 40px; padding-left: 40px; padding-right: 40px; }
}

/* ---------- Mobile: positions follow the 579-wide mobile comp, scaled to the viewport ---------- */
@media (max-width: 759px) {
  :root { --u: calc(100vw / 579); }

  .stage { height: calc(805 * var(--u)); }

  .loops { height: calc(640 * var(--u)); }

  .map-window { top: calc(300 * var(--u)); height: calc(820 * var(--u)); }
  .map {
    --map-w: calc(2511 * var(--u));
    top: calc(628 * var(--u) - 300 * var(--u) - var(--map-w) * 0.48228 * 0.501);
  }

  .masthead { padding-top: calc(189 * var(--u)); }
  .wordmark { width: calc(417 * var(--u)); }
  .lockup-sub {
    margin-top: calc(6 * var(--u));
    font-size: max(15px, calc(21.2 * var(--u)));
    line-height: 1.2;
  }
  .hero-title {
    margin-top: calc(34 * var(--u));
    font-size: max(28px, calc(47.76 * var(--u)));
    line-height: 1.19;
  }
  .br-mobile { display: inline; }

  .pin {
    top: calc(540 * var(--u));
    width: calc(61 * var(--u)); height: auto;
  }

  .panel {
    width: calc(100% - 2 * 29 * var(--u));
    grid-template-columns: 1fr;
    padding: 40px max(24px, calc(58 * var(--u))) 36px;
    min-height: 0;
  }
  .panel-heading { font-size: max(30px, calc(39.55 * var(--u))); line-height: 1.15; }
  .panel-col + .panel-col { margin-top: 50px; }
  .row-pair { column-gap: 16px; }
  .btn { width: auto; flex: 0 1 193px; min-width: 140px; }
  .check { padding-left: 14px; }
}

@media (max-width: 380px) {
  .row-pair { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .field label { transition: none; }
}
