/* IEMTech site styles. Most layout is inline in the pages; this file holds what
   inline styles can't do: fonts, hover and focus states, media queries,
   and animation. */

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root { --accent: #6ea8ff; }

html { scroll-behavior: smooth; }
body { margin: 0; background: #0a0d12; }
a { color: inherit; }
a:hover { color: inherit; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero blueprint grid */
.blueprint-grid {
  position: relative;
  background-image:
    linear-gradient(rgba(200, 220, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 220, 255, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: 0 0;
}
.grid-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.trace { position: absolute; opacity: .5; animation-timing-function: linear; animation-iteration-count: infinite; }
.trace.h { left: 0; right: 0; height: 1px; animation-name: trace-h; }
.trace.v { top: 0; bottom: 0; width: 1px; animation-name: trace-v; }
@keyframes trace-h { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes trace-v { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

/* Fig. 1 panels light up in turn */
.signal { opacity: .22; animation: signal 8s linear infinite; }
.signal.s2 { animation-delay: 2s; }
.signal.s3 { animation-delay: 4s; }
.signal.s4 { animation-delay: 6s; }
@keyframes signal { 0% { opacity: .22; } 3% { opacity: 1; } 22% { opacity: 1; } 28% { opacity: .22; } 100% { opacity: .22; } }

/* Fig. 1 layout: never strands a single panel, and keeps the portrait from
   being cropped into a wide strip on tablets. */
.fig-portrait { flex: 1 1 300px; min-height: min(100vw, 480px); }
.fig-body { flex: 999 1 560px; }
.fig-steps { grid-template-columns: minmax(0, 1fr); }
.fig-steps span { text-wrap: balance; }
@media (min-width: 480px) {
  .fig-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 640px) {
  .fig-portrait { flex: 1 1 240px; min-height: 340px; }
  .fig-body { flex: 999 1 400px; }
}
@media (min-width: 1180px) {
  .fig-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fig-portrait { flex-basis: 300px; }
  .fig-body { flex-basis: 560px; }
}

/* Work cards */
.lift { transition: transform .2s ease; }
.lift:hover { transform: translateY(-4px); }

/* Navigation */
.nav-links { display: flex; }
.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(200, 220, 255, .3);
  border-radius: 4px;
  background: #0a0d12;
  color: #eef2f7;
  cursor: pointer;
}
.nav-panel {
  display: grid;
  gap: 2px;
  flex: 1 0 100%;
  padding: 8px 0 4px;
  border-top: 1px solid rgba(200, 220, 255, .14);
}
.nav-panel[hidden] { display: none; }
.nav-panel a:not(.nav-cta) { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.nav-panel .nav-cta { justify-content: center; margin-top: 8px; }
@media (max-width: 819px) {
  .has-burger .nav-links { display: none; }
  .has-burger .nav-burger { display: grid; }
}
@media (min-width: 820px) {
  .nav-panel { display: none; }
}

/* COVA bracket screenshot: too small to read at full width on a phone, so
   crop to the phone mockup on the right. */
@media (max-width: 640px) {
  .cova-shot { aspect-ratio: 4 / 5; object-fit: cover; object-position: 100% 50%; }
}

/* Contact form */
#form-status { font-size: 15px; color: #3c4046; }
#form-status.is-error { color: #b3261e; }
#contact-form button[disabled] { opacity: .6; cursor: progress; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .signal { animation: none; opacity: 1; }
  .lift { transition: none; }
  .trace { display: none; }
}
