/* Shared styles for the static Wireten site (page styles live inline in each page). */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }
html, body { overflow-x: clip; }  /* never scroll sideways */
img { max-width: 100%; }
[hidden] { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Mobile menu */
.w-burger { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto;
  border: 1px solid rgba(11,18,32,0.14); border-radius: 12px; background: #FFFFFF; color: #0B1220; cursor: pointer; }
@media (max-width: 860px) {
  .w-burger { display: inline-flex; }
  .w-navlinks { display: none !important; width: 100%; flex-direction: column; align-items: stretch !important; gap: 0 !important; padding-top: 8px; }
  .w-navlinks.open { display: flex !important; }
  .w-navlinks a { padding: 12px 4px; font-size: 17px; border-bottom: 1px solid rgba(11,18,32,0.06); }
  .w-navlinks a:last-child { margin-top: 12px; border-bottom: 0; text-align: center; padding: 14px 18px !important; }
}

/* Top bar on small phones: keep the message, hide store and social links */
@media (max-width: 600px) {
  .w-topbar-extra { display: none !important; }
}

/* Tap targets in the footer */
footer a { display: inline-block; padding: 6px 0; }

/* Contact form */
.h-captcha { min-height: 78px; }
#c-error { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: #FBEDEA; color: #9A3B26; font-size: 15px; }
.fld[aria-invalid="true"] { border-color: #9A3B26 !important; box-shadow: 0 0 0 3px rgba(154,59,38,0.15); }
.f-err { display: block; margin-top: 4px; color: #9A3B26; font-size: 13px; font-weight: 500; }

/* Cookie banner */
.ck { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 560px; margin: 0 auto;
  background: #FFFFFF; color: #0B1220; border: 1px solid rgba(11,18,32,0.1); border-radius: 18px;
  box-shadow: 0 24px 60px -24px rgba(11,18,32,0.45); font: 15px/1.5 'Geist', system-ui, sans-serif; padding: 20px; }
.ck h2 { margin: 0 0 6px; font-size: 17px; }
.ck p { margin: 0 0 14px; color: #44505F; font-size: 14px; }
.ck a { color: #245B92; font-weight: 600; }
.ck-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: #F4F7FB; border-radius: 12px; margin-bottom: 8px; font-size: 14px; }
.ck-row small { display: block; color: #5B6676; font-size: 12px; }
.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ck button { font: inherit; font-weight: 600; font-size: 14px; border-radius: 999px; padding: 10px 18px; min-height: 44px; cursor: pointer; }
.ck .ck-primary { background: #245B92; color: #FFFFFF; border: 0; flex: 1; }
.ck .ck-ghost { background: #FFFFFF; color: #0B1220; border: 1px solid rgba(11,18,32,0.2); }
.ck .ck-link { background: none; border: 0; color: #245B92; padding: 10px 4px; }

/* Legal pages and 404 */
.legal { background: #FAF8F3; padding: 64px 24px 96px; font-family: 'Geist', system-ui, sans-serif; color: #0B1220; }
.legal-in { max-width: 760px; margin: 0 auto; line-height: 1.7; font-size: 16px; color: #2B3442; }
.legal h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.1; letter-spacing: -0.03em; color: #0B1220; margin: 0 0 8px; }
.legal h2 { font-size: 22px; letter-spacing: -0.01em; color: #0B1220; margin: 40px 0 10px; }
.legal h3 { font-size: 18px; color: #0B1220; margin: 28px 0 8px; }
.legal a { color: #245B92; }
.legal ul, .legal ol { padding-left: 22px; }

/* Home story on phones: stack the supplier screen above the retailer phone */
@media (max-width: 700px) {
  .w-stage { height: auto !important; display: flex; flex-direction: column; gap: 10px; }
  .w-laptop-label, .w-laptop, .w-phone { position: relative !important; left: auto !important; right: auto !important; top: auto !important; }
  .w-laptop { width: 100% !important; }
  .w-laptop-in { padding: 16px !important; min-height: 0 !important; }
  .w-phone { width: 230px !important; margin: 18px auto 34px; }
  .w-phone > div:first-child { height: 460px !important; }
  .w-steps { display: flex !important; overflow-x: auto; gap: 12px !important; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .w-steps li { flex: 0 0 150px; scroll-snap-align: start; }
}

/* Contact on phones: heading, then the form, then the call details */
@media (max-width: 860px) {
  .c-grid { display: flex !important; flex-direction: column; gap: 28px !important; }
  .c-left { display: contents !important; }
  .c-left > * { order: 2; }
  .c-left > :nth-child(-n+3) { order: 0; }
  .c-right { order: 1; }
}

/* Home: on laptops and desktops, fit the whole top section in one screen */
@media (min-width: 1000px) {
  .w-hero { padding: 22px 24px 20px !important; }
  .w-hero-grid { gap: 40px !important; align-items: start !important; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) !important; }
  .w-hero-left { gap: 12px !important; }
  .w-hero-left h1 { font-size: 50px !important; line-height: 1.03 !important; }
  .w-hero-left > p { font-size: 17px !important; }
  .w-isnot > div { padding: 12px 16px !important; gap: 6px !important; }
  .w-isnot ul { gap: 3px !important; font-size: 13.5px !important; }
  .w-isnot li { white-space: nowrap; }
  .w-hero-app img[alt^="QR code"] { width: 64px !important; height: 64px !important; }
  .w-stage { zoom: 0.82; }
}
@media (min-width: 1000px) and (max-height: 780px) {
  .w-hero-left h1 { font-size: 42px !important; }
  .w-hero-left > p { font-size: 16px !important; }
  .w-hero-left { gap: 10px !important; }
  .w-isnot > div { padding: 10px 14px !important; }
  .w-stage { zoom: 0.74; }
}

/* Cookie banner sits in the corner on bigger screens so it doesn't cover the page */
@media (min-width: 700px) {
  .ck { left: auto; right: 24px; bottom: 24px; margin: 0; max-width: 380px; padding: 18px; }
  .ck .ck-actions { flex-wrap: nowrap; }
}

/* Everything slightly smaller on laptops and desktops (owner feedback: the site felt zoomed in) */
@media (min-width: 1000px) {
  /* Owner checked with Chrome zoom: previous size (0.85) + 25% for the page, + 10% for the dark banner and footer */
  :root { --z: 1.15; }
  section.w-cta, footer { zoom: 0.88; }
  /* Tighter spacing between sections */
  section { padding-top: 64px !important; padding-bottom: 64px !important; }
  section.w-first { padding-top: 32px !important; padding-bottom: 40px !important; }
  section.w-hero { padding-top: 22px !important; padding-bottom: 24px !important; }
  /* Headings in proportion */
  h1 { font-size: 52px !important; }
  .w-hero-left h1 { font-size: 50px !important; }
  h2[style*="font-size: 48px"], h2[style*="48px)"] { font-size: 40px !important; }
  h2[style*="font-size: 52px"], h2[style*="font-size: 60px"], h2[style*="font-size: 62px"], h2[style*="font-size: 64px"] { font-size: 44px !important; }
  /* Closing dark banner: less empty space, smaller headline */
  section.w-cta { padding-top: 72px !important; padding-bottom: 72px !important; }
  section.w-cta h2 { font-size: 42px !important; }
  section.w-cta h2 + p { font-size: 17px !important; }
}

/* Keep comfortable side margins: scale a little less on narrower laptop screens */
@media (min-width: 1000px) and (max-width: 1239px) { :root { --z: 0.92; } }
@media (min-width: 1240px) and (max-width: 1319px) { :root { --z: 0.97; } }
@media (min-width: 1320px) and (max-width: 1399px) { :root { --z: 1.02; } }
@media (min-width: 1400px) and (max-width: 1499px) { :root { --z: 1.08; } }
@media (min-width: 1000px) {
  body { zoom: var(--z) !important; }
  /* hCaptcha picture pop-up: undo the page scaling, then show it about 20% smaller than normal */
  /* only the pop-up container (never the page itself, which also holds the "I am human" box) */
  body > div:not(:has(header)):has(iframe[src*="frame=challenge"]) { zoom: calc(0.82 / var(--z)); }
}


/* Same top-section proportions on every page as on Home */
@media (min-width: 1000px) {
  section.w-first h1 { font-size: 50px !important; line-height: 1.04 !important; }
  section.w-first h1 + p, section.w-first h1 ~ p { font-size: 17px !important; }
  section.w-first figure img, section.w-first > div > div > img { max-height: 440px; object-fit: cover; }
}

@media (min-width: 861px) {
  #c-form div[style*="minmax(min(100%, 220px), 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Contact on computers: header and footer stay the same as every page; only the content below the menu
   is shown a bit smaller so the form fits on one screen. Original photo kept; photo and form end on the same line. */
@media (min-width: 1000px) {
  :root { --cz: 1; }  /* same size as every other page */
  section.w-first:has(#c-form) { zoom: var(--cz); }
  section.w-first:has(#c-form) > div { max-width: calc(1200px / var(--cz)) !important; }
  .h-captcha { zoom: calc(1 / var(--cz)); }
  .c-grid { align-items: stretch !important; }
  .c-left figure { margin-top: auto !important; }  /* photo bottom = form bottom */
}

/* Contact form text the same size as body text on the other pages (owner: form fonts looked small) */
@media (min-width: 861px) {
  #c-form .lbl { font-size: 16px !important; }
  #c-form .fld { font-size: 17px !important; }
  #c-form [data-role] { font-size: 16px !important; }
  #c-form p, #c-form [data-t="roleNote"], #c-form .lbl span span { font-size: 15px !important; }
  #c-form button[type="submit"] { font-size: 18px !important; }
  .c-right h2 { font-size: 30px !important; }
}

/* Nothing should jump between pages: every page's top section starts at the same spot */
@media (min-width: 1000px) {
  section.w-first, section.w-hero { padding-top: 32px !important; }
  section.w-first div[style*="display: grid"] { align-items: start !important; }
  .legal h1 { font-size: 50px !important; }
  section.w-first div:has(> h1) { gap: 18px !important; }
}
