/* elixr labs, responsive layer over the canvas design */
:root { --gx: 48px; }

html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid #E0A400; outline-offset: 3px; border-radius: 4px; }

/* current page in the nav */
nav a[aria-current="page"] { color: #F6F6F4; }

@media (max-width: 1100px) {
  :root { --gx: 36px; }
}

@media (max-width: 820px) {
  :root { --gx: 20px; }

  /* nav */
  header nav { gap: 20px !important; font-size: 13px !important; }

  /* hero widget stack */
  [style*="height:520px"] { height: 420px !important; }
  [style*="width:216px"] { width: 148px !important; }

  /* grids */
  [style*="grid-template-columns:repeat(2,minmax(0,1fr))"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:repeat(3,minmax(0,1fr))"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:repeat(4,minmax(0,1fr))"] { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  [style*="grid-template-columns:repeat(12,minmax(0,1fr))"] { grid-template-columns: 1fr !important; }
  [style*="grid-column:span"] { grid-column: auto !important; }

  /* the three-wide widget strip inside the browser window stays three */
  [style*="padding:18px"] [style*="grid-template-columns:repeat(3,minmax(0,1fr))"] { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }

  /* capability word row reads as a stack on a phone */
  [data-caps] { gap: 4px 18px !important; }

  /* big headlines get a touch tighter */
  h1 { letter-spacing: -.045em !important; }
}

@media (max-width: 600px) {
  /* on a phone the hero shows the phone mockup alone, centred */
  [style*="right:0;top:10px"] { display: none !important; }
  [style*="left:0;bottom:0;width:216px"] {
    width: 212px !important;
    left: calc(50% - 106px) !important;
    bottom: 6px !important;
  }
  [style*="height:520px"] { height: 430px !important; }
  [data-tilegrid] { gap: 14px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
