/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap');

@font-face {
  font-family: 'Univers67CondensedBold';
  src: url('../assets/fonts/univers67condensedbold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Shared Tokens */
:root {
  --bg: #eeeeee;
  --panel: #ffffff;
  --ink: #1b1f24;
  --muted: #6b7280;
  --accent: #d13a5f;
  --accent-600: #b22e4d;
  --line: #e5e7eb;
  --focus: #2563eb;

  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Focus visibility: show only for keyboard (focus-visible) */
:where(a, button, [tabindex]:not([tabindex="-1"])):focus { outline: none; }
:where(a, button, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Layout */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
@media (min-width: 960px) {
  .container { padding-left: var(--gutter); padding-right: var(--gutter); }
}

.section { margin: 24px 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
@media (min-width: var(--bp-md)) {
  .card { padding: 24px; }
}

/* Removed legacy .hero and .headline (unused) */
.subtle { color: var(--muted); }

/* Removed legacy .spec-table (replaced by .specs__table) */

/* Removed legacy .cta and color-variant buttons; replaced by .actions .btn */

/* A11y helpers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Footer */
footer { color: var(--muted); font-size: 0.875rem; text-align: center; }

/* ---- Delta Layout Additions (Key Delta Points) ---- */
:root {
  /* Additional tokens */
  --color-bg: #f6f7f9;
  --color-surface: #ffffff;
  --color-text: #111111;
  --color-red: #A21036;
  --color-black: #000000;
  --shadow-1: 0 2px 6px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);

  --gutter: 16px;
  --content-max: 960px;

  --radius-2: 8px;
  --radius-3: 12px;

  --title-weight: 900;
  --title-leading: 1.05;
  --btn-radius: 10px;
  --btn-shadow: 0 6px 16px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.12);
}

/* .container defined earlier; using root-driven gutters and width */
@media (min-width: 640px) { :root { --gutter: 24px; --content-max: 1040px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; --content-max: 1120px; } }

/* 1) Banner */
.banner {}
.banner__img {
  display: block;
  width: 100%;
  /* Allow more vertical image to show to reduce top/bottom cropping */
  --banner-min-h: 260px;
  --banner-vw: 55vw;
  --banner-max-h: 640px;
  height: clamp(var(--banner-min-h), var(--banner-vw), var(--banner-max-h));
  object-fit: cover;
  object-position: center;
  background: #e5e7eb;
}

/* 2) Title */
.title { margin-top: 0px; }
/* Full-bleed white band behind the title; text areas framed in red */
.title {
  background: #ffffff;
  /* extend background edge-to-edge while content aligns with container */
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  padding-top: 20px;
  padding-bottom: 20px;
  color: inherit;
}
.title__lines { display: block; }
.title__line {
  display: inline-block;
  font-weight: var(--title-weight);
  letter-spacing: 0.5px;
  line-height: var(--title-leading);
  text-transform: uppercase;
  font-family: 'Univers67CondensedBold', 'Roboto', Arial, sans-serif;
  /* Increase by ~2px across the range */
  font-size: clamp(40px, 5.8vw, 56px);
  margin-bottom: 2px;
  /* Unified: white text inside solid red filled box */
  color: #fff;
  background: var(--color-red);
  padding: 0.15em 0.35em;
  box-decoration-break: clone;
}
/* Unify both lines; modifiers are no-ops now */
.title__line--highlight, .title__line--plain { }

/* 3) Specs */
.specs { margin-top: 0px; font-size: 0.825rem; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
.specs__table { width: 100%; border-collapse: separate; border-spacing: 0 1px; }
.specs__label,
.specs__value { padding: 6px 20px; vertical-align: middle; }
.specs__label {
  width: 36%;
  background: var(--color-red);
  color: #fff;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.4px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  text-align: right; /* feedback2: right-align first column */
}
.specs__value {
  background: var(--color-surface);
  color: var(--color-text);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: var(--shadow-1);
}
@media (min-width: 640px) { .specs__label { width: 30%; } }
@media (min-width: 768px) { .specs__label { width: 28%; } }
/* Avoid breaking inside single words; allow natural wrapping between words */
.specs__label, .specs__value { word-break: normal; overflow-wrap: break-word; }

/* 4) Actions */
.actions { margin-top: 40px; margin-bottom: 48px; background: none; padding: 0; }
.actions .btn {
  display: block;
  width: max-content; /* shrink to fit text */
  text-align: center;
  background: var(--color-black);
  color: #fff;
  text-decoration: none;
  padding: 20px 24px;
  border-radius: 0;
  box-shadow: var(--btn-shadow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-family: 'Univers67CondensedBold', 'Roboto', Arial, sans-serif;
  transition: filter 160ms ease, transform 120ms ease;
  min-height: 48px;
  /* Ensure consistent sizing across <a> and <button> */
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap; /* avoid awkward wraps; widen instead */
  min-width: 280px; /* give more width to accommodate text size */
  /* Normalize native <button> UA styles to match <a> */
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
  cursor: pointer;
}
.actions .btn + .btn { margin-top: 16px; }
.actions .btn:hover { filter: brightness(1.05); text-decoration: none; }
.actions .btn:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  .actions .btn { transition: none; }
  .actions .btn:active { transform: none; }
}

/* QR grid */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 24px 0 48px;
}
.qr-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.qr-card h2 {
  margin: 0 0 8px 0;
  font-size: 1rem;
}
.qr-card img { width: 100%; height: auto; display: block; }

/* 5) Modal (Supplier Info) — redesigned per popupstyling.md */
:root {
  --brand-red: var(--color-red);
  --text-black: #111111;
  --text-white: #ffffff;
  --bg-white: #ffffff;
  --radius-xl: 16px;
  --shadow-lg: 0 20px 40px rgba(0,0,0,.2);
  --container-w: min(980px, 92vw);
}

.modal {
  position: fixed; inset: 0;
  display: none;
  place-items: center;
  background: rgba(0,0,0,.45);
  padding: 24px;
  z-index: 1000;
}
.modal[aria-hidden="false"] { display: grid; }

.modal__panel {
  width: var(--container-w);
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden; /* keeps the red header flush */
}

.modal__header {
  position: relative;
  background: var(--brand-red);
  padding: 28px 72px 28px 28px; /* space for close btn on right */
}
.modal__title {
  margin: 0;
  color: var(--text-white);
  font-weight: 800;
  font-size: clamp(28px, 4.2vw, 44px);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Univers67CondensedBold', 'Roboto', Arial, sans-serif;
  line-height: 1
}

.modal__close {
  position: absolute;
  top: 18px; right: 18px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 0; background: transparent; padding: 0;
  cursor: pointer;
}
.modal__close img { display: block; width: 100%; height: 100%; object-fit: contain; }
.modal__close:focus-visible { outline: 3px solid #000; outline-offset: 2px; }

.modal__body { background: var(--bg-white); padding: 32px 28px 36px; }

.section-title {
  margin: 0 0 18px;
  color: var(--brand-red);
  font-weight: 800;
  font-size: clamp(22px, 2.5vw, 38px);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-family: 'Univers67CondensedBold', 'Roboto', Arial, sans-serif;
}

.supplier-intro { color: var(--text-black); font-size: clamp(18px, 2.1vw, 28px); line-height: 1.35; margin: 8px 0 22px; }

.supplier-entry { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: baseline; font-size: clamp(30px, 4vw, 54px); line-height: 1.1; margin: 8px 0; }
.supplier-name { font-weight: 800; color: var(--text-black); }
.supplier-stand { font-weight: 800; color: var(--brand-red); margin-left: 8px; }

@media (max-width: 520px){
  .modal__header{ padding: 22px 60px 22px 18px; }
  .modal__body{ padding: 24px 18px 28px; }
  .modal__close{ width: 38px; height: 38px; top: 10px; right: 10px; }
}
