/* ALL4GROUPS Systems GmbH, Leibnitz.
   Colours sampled from the GROUPY logo: #3a8a2a (frames, signal arcs),
   darkened to #2d6b1f where text or a button needs 4.5:1.
   Signature: the signal from their mark and the name plate their devices carry. */

:root {
  --accent: #2d6b1f;
  --accent-deep: #1f4e14;
  --logo-green: #3a8a2a;
  --text: #1a1f1b;
  --muted: #4a5451;
  --bg: #fdfcf8;
  --plate: #ffffff;
  --line: #d6d3c6;
  --line-strong: #8b8a80;
  --foot-text: #d4d9d5;
  --foot-quiet: #a9b0ab;

  --head: Bahnschrift, "DIN Alternate", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* 1.25 scale on 17 px (phone) and 18 px (desktop) */
  --fs-label: 0.875rem;
  --fs-small: 0.95rem;
  --fs-1: 1.25rem;
  --fs-2: 1.563rem;
  --fs-3: 1.953rem;
  --fs-4: 2.441rem;
  --fs-5: 3.052rem;

  --gutter: 20px;
  --strip-h: clamp(200px, 60vw, 280px);
}
@media (min-width: 768px)  { :root { --gutter: 32px; } }
@media (min-width: 1120px) { :root { --gutter: 48px; } }
@media (min-width: 1440px) { :root { --gutter: 64px; } }
@media (min-width: 1920px) { :root { --gutter: 96px; } }

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

html {
  font-size: 17px;
  color: var(--text);
  background: var(--bg);
  text-size-adjust: 100%;
}
@media (min-width: 768px) { html { font-size: 18px; } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.6;
}

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

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 16px;
  text-wrap: balance;
}
h1 { font-size: var(--fs-3); }
h2 { font-size: var(--fs-3); }
h3 { font-size: var(--fs-1); }
@media (min-width: 1024px) {
  h1 { font-size: var(--fs-4); }
  h2 { font-size: var(--fs-4); }
  h3 { font-size: var(--fs-2); }
}

p { margin: 0 0 16px; max-width: 68ch; }
ul { margin: 0 0 16px; }
strong { font-weight: 600; }
address { font-style: normal; }

.frame { padding-inline: var(--gutter); }

section { padding-block: 48px; }
@media (min-width: 768px) { section { padding-block: 80px; } }
main > section + section { border-top: 1px solid var(--line); }
[id] { scroll-margin-top: 24px; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 5;
  padding: 12px 16px;
  background: var(--text);
  color: #fff;
}
.skip:focus { top: 8px; }

/* ------------------------------------------------------------------ links */

a { color: var(--accent); text-decoration: none; }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Text links carry a green line; on hover it becomes the double signal line. */
main a:not(.btn) {
  background-image: linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%, 0 calc(100% - 5px);
  background-size: 100% 2px, 0 1px;
  padding-bottom: 3px;
}
@media (hover: hover) {
  main a:not(.btn):hover { background-size: 100% 2px, 100% 1px; }
}
main a:not(.btn):focus-visible { background-size: 100% 2px, 100% 1px; }

/* ---------------------------------------------------------------- buttons */

/* Call buttons never move: the colour changes at once and that is all. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}
.btn:hover, .btn:focus-visible {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ----------------------------------------------------------------- header */

.logo-band {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding-block: 12px;
}
.logo-band .frame {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo-link { display: block; flex: 0 1 auto; min-width: 0; }
.logo { width: 60px; height: auto; }
.logo-band .btn { padding-inline: 16px; font-size: 1rem; }
.num-full { display: none; }
@media (min-width: 360px) {
  .num-short { display: none; }
  .num-full { display: inline; }
}
@media (min-width: 768px) {
  .logo-band { padding-block: 16px; }
  .logo-band .btn { font-size: 1.125rem; }
  .logo { width: 72px; }
}
@media (min-width: 1024px) {
  .logo-band { padding-block: 24px; }
  .logo { width: clamp(560px, 56vw, 760px); }
}

.nav-band { border-bottom: 1px solid var(--line); }
.nav-band .frame {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.nav-band a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}
.nav-band a[aria-current] { color: var(--accent); font-weight: 600; }
.nav-band a:hover, .nav-band a:focus-visible { color: var(--accent); }
@media (min-width: 420px) {
  .nav-band .frame { display: flex; gap: 8px 32px; }
  .nav-band a { min-height: 48px; }
}

/* ------------------------------------------------------------------- hero */

.hero { padding-block: 24px 32px; }
.hero-head { position: relative; }
.hero h1 { font-size: 1.75rem; margin: 0; }
.hero .lede { margin: 12px 0 20px; font-size: 1.0625rem; color: var(--muted); max-width: 52ch; }
.hero-photo {
  margin: 24px 0 0;
  aspect-ratio: 2 / 1;
  border-radius: 8px;
  overflow: hidden;
}
@media (min-width: 420px) {
  .hero-head {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 12px;
  }
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 84% 50%;
}
@media (min-width: 600px) {
  .hero-photo { aspect-ratio: 1600 / 572; }
  .hero-photo img { object-position: 50% 50%; }
}
@media (min-width: 900px) {
  .hero { padding-block: 48px; }
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    grid-template-areas: "head head" "photo side";
    column-gap: 48px;
    align-items: center;
  }
  .hero-head {
    grid-area: head;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
  }
  .hero h1 { font-size: clamp(1.9rem, 3vw, 3.052rem); }
  .hero .lede { margin: 0 0 24px; font-size: var(--fs-1); line-height: 1.45; }
  .hero-photo { grid-area: photo; margin-top: 32px; }
  .hero-side { grid-area: side; margin-top: 32px; }
}

/* The sender: three arcs from their mark. They go out once on load.
   On a phone it sits beside the first line of the headline. */
.signal {
  --d: 60px;
  --w: 4px;
  position: absolute;
  right: 0;
  top: -2px;
  width: var(--d);
  height: calc(var(--d) / 2 + var(--w) * 2);
}
.signal i {
  position: absolute;
  left: 50%;
  bottom: calc(var(--w) * 1.5);
  width: var(--r);
  height: var(--r);
  margin: 0 0 calc(var(--r) / -2) calc(var(--r) / -2);
  border: var(--w) solid transparent;
  border-top-color: var(--logo-green);
  border-radius: 50%;
}
.signal i:nth-child(1) { --r: calc(var(--d) / 3); }
.signal i:nth-child(2) { --r: calc(var(--d) * 2 / 3); }
.signal i:nth-child(3) { --r: var(--d); }
.signal b {
  position: absolute;
  left: 50%;
  bottom: calc(var(--w) / 2);
  width: calc(var(--w) * 2);
  height: calc(var(--w) * 2);
  margin-left: calc(var(--w) * -1);
  border-radius: 50%;
  background: var(--logo-green);
}
@media (min-width: 420px) {
  .signal {
    --d: 72px;
    --w: 5px;
    position: relative;
    top: 0;
    flex: none;
  }
}
@media (min-width: 900px) {
  .signal { --d: 132px; --w: 8px; }
}

/* The receivers: three facts, each with its lamp. */
.receivers {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.receivers li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--muted);
}
@media (min-width: 900px) {
  .receivers {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    column-gap: 48px;
    border-bottom: 1px solid var(--line);
  }
  .receivers li { border-bottom: 0; padding-block: 14px; --lamp-top: 21px; }
}
.receivers li::before,
.receivers li::after {
  content: "";
  position: absolute;
  left: 2px;
  top: var(--lamp-top, 17px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.receivers li::before { border: 2px solid var(--logo-green); }
.receivers li::after { background: var(--logo-green); }

@media (prefers-reduced-motion: no-preference) {
  .signal i { animation: arc-out 450ms ease-out both; }
  .signal i:nth-child(1) { animation-delay: 150ms; }
  .signal i:nth-child(2) { animation-delay: 400ms; }
  .signal i:nth-child(3) { animation-delay: 650ms; }
  .receivers li::after { animation: lamp-on 300ms ease-out both; }
  .receivers li:nth-child(1)::after { animation-delay: 1000ms; }
  .receivers li:nth-child(2)::after { animation-delay: 1150ms; }
  .receivers li:nth-child(3)::after { animation-delay: 1300ms; }
  @keyframes arc-out {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes lamp-on {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: none; }
  }
}

/* ------------------------------------------------------------ name plates */

/* Every photo and logo sits on a plate like the one on the back of a Groupy:
   white card, rounded frame, an eyelet. Nothing is drawn over the photo. */
.plate {
  position: relative;
  background: var(--plate);
  border: 4px solid var(--logo-green);
  border-radius: 10px;
}
.plate::before {
  content: "";
  position: absolute;
  left: 20px;
  top: -18px;
  width: 30px;
  height: 18px;
  border-radius: 9px 9px 0 0;
  background: var(--logo-green);
}
.plate::after {
  content: "";
  position: absolute;
  left: 30px;
  top: -11px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
}
.plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.plate.fill img { object-fit: cover; }

/* ---------------------------------------------------------- product strip */

.section-head { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--muted); }

.strip-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.strip-nav[hidden] { display: none; }
@media (min-width: 600px) {
  [data-strip] .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 24px;
  }
  [data-strip] .section-head h2,
  [data-strip] .section-head p { grid-column: 1; }
  .strip-nav { grid-column: 2; grid-row: 1 / span 2; }
}
.strip-nav button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
}
.strip-nav button:hover, .strip-nav button:focus-visible {
  background: var(--accent);
  color: #fff;
}
.strip-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.strip {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 28px var(--gutter) 16px;
  scrollbar-width: thin;
}
.slide {
  flex: 0 0 auto;
  width: clamp(240px, calc(var(--strip-h) * var(--ar, 1)), 84vw);
  margin: 0;
  scroll-snap-align: start;
}
.slide.ar-3x2  { --ar: 1.5; }
.slide.ar-16x9 { --ar: 1.78; }
.slide.ar-wide { --ar: 2; }
.slide .plate { height: var(--strip-h); }
.slide figcaption { padding-top: 16px; }
.slide h3 { margin-bottom: 8px; }
.slide figcaption p { margin-bottom: 8px; max-width: 44ch; }

/* Reception: four bars beside the product name fill up when you point at it. */
.bars {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 16px;
  margin-left: 10px;
  --bar: var(--line);
}
.bars,
.bars::after {
  background:
    linear-gradient(var(--bar), var(--bar)) 0 100% / 4px 4px no-repeat,
    linear-gradient(var(--bar), var(--bar)) 7px 100% / 4px 8px no-repeat,
    linear-gradient(var(--bar), var(--bar)) 14px 100% / 4px 12px no-repeat,
    linear-gradient(var(--bar), var(--bar)) 21px 100% / 4px 16px no-repeat;
}
.bars::after {
  content: "";
  position: absolute;
  inset: 0;
  --bar: var(--logo-green);
  clip-path: inset(0 100% 0 0);
}
.slide:focus-within .bars::after { clip-path: inset(0); }
.slide:focus-within .plate { border-color: var(--accent-deep); }
.slide:focus-within .plate::before { background: var(--accent-deep); }
@media (hover: hover) {
  .slide:hover .bars::after { clip-path: inset(0); }
  .slide:hover .plate { border-color: var(--accent-deep); }
  .slide:hover .plate::before { background: var(--accent-deep); }
}
@media (hover: none) {
  .bars::after { clip-path: inset(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .bars::after { transition: clip-path 150ms steps(4, end); }
  .slide:hover .bars::after,
  .slide:focus-within .bars::after { transition: clip-path 600ms steps(4, end); }
}

/* ------------------------------------------------------------- references */

.ref-grid {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 16px;
}
.ref {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--plate);
  border: 2px solid var(--line);
  border-radius: 10px;
}
.ref::before {
  content: "";
  position: absolute;
  left: 14px;
  top: -14px;
  width: 26px;
  height: 14px;
  border: 2px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--plate);
}
.ref::after {
  content: "";
  position: absolute;
  left: 23px;
  top: -8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.ref-logo {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
}
@media (min-width: 600px) {
  .ref-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
}
@media (min-width: 1024px) {
  .ref-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ref { aspect-ratio: 16 / 9; }
}
@media (min-width: 1600px) {
  .ref-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .ref { aspect-ratio: 3 / 2; }
}

/* fifteen logos on the Safe Gate page: three or five in a row */
.ref-grid.by-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ref-grid.by-five .ref { aspect-ratio: 1; }
@media (min-width: 768px) {
  .ref-grid.by-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ref-grid.by-five .ref { aspect-ratio: 16 / 9; }
}
@media (min-width: 1600px) {
  .ref-grid.by-five .ref { aspect-ratio: 5 / 2; }
}

.partner {
  display: grid;
  gap: 16px 48px;
  align-items: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.partner-logo { width: 200px; height: auto; }
.partner h3 { margin-bottom: 8px; }
.partner p { margin: 0; }
@media (min-width: 768px) {
  .partner { grid-template-columns: 200px minmax(0, 1fr); }
}

/* ------------------------------------------------------------- call strip */

main > .call-strip {
  background: var(--accent);
  color: #fff;
  border-top: 0;
}
.call-strip .frame {
  display: grid;
  gap: 24px;
  align-items: center;
}
.call-strip h2 { font-size: var(--fs-3); margin-bottom: 8px; }
.call-strip p { margin: 0; }
.call-strip .btn {
  background: #fff;
  color: var(--accent);
  border-color: #fff;
}
.call-strip .btn:hover, .call-strip .btn:focus-visible {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.call-strip :focus-visible { outline-color: #fff; }
.call-strip .mail { margin-top: 12px; }
.call-strip .mail a {
  color: #fff;
  background-image: linear-gradient(#fff, #fff), linear-gradient(#fff, #fff);
}
@media (min-width: 900px) {
  .call-strip .frame { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px; }
}

/* ----------------------------------------------------------------- footer */

footer {
  background: var(--text);
  color: var(--foot-text);
  padding-block: 48px 32px;
  font-size: var(--fs-small);
}
.foot {
  display: grid;
  gap: 32px;
}
footer h2 {
  font-family: var(--body);
  font-size: var(--fs-label);
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--foot-quiet);
  margin: 0 0 8px;
}
footer p, footer address { margin: 0; max-width: 34ch; }
footer ul { list-style: none; margin: -9px 0 0; padding: 0; }
footer li { padding-block: 9px; }
footer li:has(a) { padding-block: 0; }
footer a { color: #fff; }
footer li a { display: inline-block; padding-block: 9px; }
footer a:hover, footer a:focus-visible { text-decoration: underline; }
footer :focus-visible { outline-color: #fff; }
@media (min-width: 600px) {
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
}
@media (min-width: 1024px) {
  .foot { grid-template-columns: 1fr 1.2fr 1fr 1.4fr; }
}

/* ---------------------------------------------------------- product pages */

.crumb { font-size: var(--fs-small); margin-bottom: 12px; }
.product-hero { padding-block: 40px 48px; }
.product-hero .frame {
  display: grid;
  gap: 32px;
  align-items: center;
}
.product-hero h1 { margin-bottom: 12px; }
.product-hero .lede { font-size: 1.0625rem; color: var(--muted); margin: 0; }
.plate-hero {
  width: min(100%, 328px);
  aspect-ratio: 1;
  margin-top: 18px;
}
.plate-hero.wide { width: 100%; aspect-ratio: 3 / 2; }
@media (min-width: 900px) {
  .product-hero { padding-block: 64px; }
  .product-hero .frame { grid-template-columns: 328px minmax(0, 1fr); gap: 64px; }
  .product-hero .frame.wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .product-hero .plate-hero { order: -1; }
  .product-hero .lede { font-size: var(--fs-1); line-height: 1.45; }
}

.product-body .frame {
  display: grid;
  gap: 48px;
  align-items: start;
}
.product-body h2 { font-size: var(--fs-2); margin-top: 32px; }
.product-body h2:first-child { margin-top: 0; }
.product-body ul { padding-left: 1.1em; max-width: 68ch; }
.product-body li { margin-bottom: 8px; }
@media (min-width: 900px) {
  .product-body .frame { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 64px; }
}

.ask {
  border-top: 4px solid var(--logo-green);
  padding-top: 20px;
}
.ask h2 { font-size: var(--fs-2); margin-top: 0; }
.ask p { margin-bottom: 12px; }
.ask .btn { margin-top: 4px; }

.gallery .section-head { margin-bottom: 0; }

.page-head { padding-block: 40px 0; border-bottom: 0; }
main > .page-head + section { border-top: 0; padding-top: 32px; }

.facts { margin: 0; }
.facts div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { margin: 0; }
