/* secondshift.be — dark only, four colors, IBM Plex Mono (OFL 1.1, self-hosted). */

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
}

:root {
  --night: #14162B;
  --dim:   #2A2D45;
  --paper: #F1F1EE;
  --amber: #E8A33D;
  --slate: #9DA2BD;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--night);
  color: var(--paper);
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

::selection { background: var(--amber); color: var(--night); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }

a { color: var(--amber); text-decoration: none; }

/* Links inside running text keep an underline: color alone can't mark them (WCAG 1.4.1). */
p a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.hero,
main > section,
.footer-inner {
  width: min(100% - 48px, 680px);
  margin-inline: auto;
}

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

/* Compact header: the page flows like a document, no reserved first screen. */
.hero {
  padding: clamp(96px, 15vh, 160px) 0 64px;
}

/* Horizontal lockup, kit proportions: wordmark em = 2/3 of symbol height, gap 0.6em. */
.lockup {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: clamp(28px, 8.5vw, 56px);
}

.symbol { display: block; width: 1.5em; height: 1.5em; }

.wordmark {
  font-size: 1em;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
}

.cursor {
  color: var(--amber);
  animation: blink 1.1s steps(1, end) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

h1 {
  margin-top: 64px;
  font-size: clamp(29px, 5.6vw, 44px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 24ch;
}

.tagline {
  margin-top: 22px;
  color: var(--slate);
  font-size: clamp(15px, 2.4vw, 17px);
}

/* ---- sections ---- */

main > section { padding: 64px 0; }

h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  letter-spacing: 0.14em;
}

.prose { margin-top: 26px; max-width: 62ch; }

/* ---- the building ---- */

.building {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 5vw, 28px);
  width: min(100%, 420px);
}

.w {
  aspect-ratio: 1;
  background: var(--dim);
  border-radius: 22%; /* matches the logo: rx 4 on 18px cells */
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.w:hover {
  background: #3D3944;
  background: color-mix(in srgb, var(--dim) 90%, var(--amber));
}

.w.lit {
  background: var(--amber);
  box-shadow: 0 0 20px rgba(232, 163, 61, 0.25), 0 0 60px rgba(232, 163, 61, 0.12);
}

.w.lit:hover {
  background: var(--amber);
  box-shadow: 0 0 24px rgba(232, 163, 61, 0.4), 0 0 72px rgba(232, 163, 61, 0.18);
}

/* One dim window stutters for ~150ms every 21s. Off under reduced motion. */
.w.flicker { animation: flick 21s steps(1, end) infinite; }

@keyframes flick {
  0%, 95.8%, 96.4%, 97.2%, 100% { background-color: var(--dim); }
  96.1% { background-color: #3B3A52; }
  96.8% { background-color: #333350; }
}

.note {
  margin-top: 36px;
  color: var(--slate);
  font-size: 14.5px;
}

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

footer {
  margin-top: 72px;
  border-top: 1px solid var(--dim);
  padding: 56px 0 80px;
}

.mail { font-weight: 500; }

.legal {
  margin-top: 18px;
  color: var(--slate);
  font-size: 14px;
}

/* ---- small screens ---- */

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero { padding-top: 72px; }
  h1 { margin-top: 52px; }
  main > section { padding: 52px 0; }
}

/* ---- motion off ---- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
