:root {
  --bg: #040404;
  --head: #E8E8EC;
  --body: #B9BEC6;
  --label: #787C82;
  --accent: #5FE3D0;
  --rule: rgba(120, 124, 130, 1);
  --edge: rgba(185, 190, 198, 0.3);
  --control-height: 48px;
  --strip-height: 24px;
  --frame-inset: 18px;
  --content-max: 560px;
  --gutter: 28px;
  --duration-fast: 150ms;
  --panel: rgba(4, 4, 4, 0.82);
  --panel-bleed: 8px;
}

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

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 56px 0;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M60 0H0V60' fill='none' stroke='rgba(185,190,198,0.05)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  color: var(--body);
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

/* Frame and strips */
.frame {
  position: fixed;
  inset: var(--frame-inset);
  border: 1px solid var(--edge);
  pointer-events: none;
  z-index: 1;
}
.frame i {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 0 solid var(--body);
}
.frame i:nth-child(1) { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.frame i:nth-child(2) { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.frame i:nth-child(3) { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.frame i:nth-child(4) { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.strip {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  height: var(--strip-height);
  padding: 0 calc(var(--frame-inset) + 8px);
  background: var(--bg);
  color: var(--label);
  font-size: 10px;
  line-height: var(--strip-height);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}
.strip-top { top: 0; }
.strip-bottom { bottom: 0; }

/* Layout */
main {
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  margin: 0 calc(var(--panel-bleed) * -1);
  padding: 40px var(--panel-bleed);
  border-top: 1px solid var(--label);
  background: var(--panel);
}
section:first-child { border-top: 0; padding-top: 24px; }

h1, h2, h3 {
  margin: 0;
  color: var(--head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(24px, 7.2vw, 40px); line-height: 1.2; }
h2, h3 { font-size: 14px; }

.label {
  margin: 0;
  color: var(--label);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.eyebrow { margin-bottom: 16px; }
.sub { margin: 16px 0 24px; color: var(--body); font-size: 15px; }
.micro { margin: 12px 0 0; color: var(--label); font-size: 11px; line-height: 1.5; }

/* Form */
form { display: flex; flex-direction: column; gap: 12px; }

input[type="email"], button[type="submit"] {
  width: 100%;
  height: var(--control-height);
  margin: 0;
  padding: 0 14px;
  border-radius: 2px;
  font-family: inherit;
  font-size: 14px;
  transition: color var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast);
}
input[type="email"] {
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--head);
}
input[type="email"]::placeholder { color: var(--label); opacity: 1; }
input[type="email"]:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 12px rgba(95, 227, 208, 0.30); }

button[type="submit"] {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.2em;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(95, 227, 208, 0.18);
}
button[type="submit"]:hover { color: var(--head); border-color: var(--head); box-shadow: 0 0 14px rgba(95, 227, 208, 0.35); }
button[type="submit"]:focus-visible { box-shadow: 0 0 14px rgba(95, 227, 208, 0.35); }
button[type="submit"]:focus-visible,
a:focus-visible,
.previews:focus-visible { outline: 1px solid var(--head); outline-offset: 3px; }

@media (min-width: 768px) {
  form { flex-direction: row; }
  input[type="email"] { flex: 1 1 auto; width: auto; }
  button[type="submit"] { flex: 0 0 auto; width: auto; padding: 0 24px; }
}

/* Preview strip */
.previews {
  display: flex;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0 0 12px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.previews li { flex: 0 0 160px; scroll-snap-align: start; }
.previews figure { margin: 0; }
.previews img { display: block; width: 160px; height: auto; border: 1px solid var(--edge); }
.previews figcaption { margin-top: 8px; color: var(--label); font-size: 10px; letter-spacing: 0.3em; }

/* What's inside */
.inside { margin: 16px 0 0; padding: 0; list-style: none; }
.inside li {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--edge);
}
.inside li:first-child { border-top: 0; }
.inside .num { color: var(--label); font-weight: 500; }
.inside p { grid-column: 2; margin: 4px 0 0; }

blockquote { margin: 16px 0 0; padding: 0 0 0 16px; border-left: 1px solid var(--label); }
blockquote p { margin: 0; }
blockquote strong { color: var(--head); font-weight: 800; }

/* Footer and links */
.site-footer {
  position: relative;
  width: min(calc(var(--content-max) + 2 * var(--panel-bleed)), calc(100% - 2 * (var(--gutter) - var(--panel-bleed))));
  margin: 0 auto;
  padding: 24px var(--panel-bleed);
  border-top: 1px solid var(--label);
  background: var(--panel); color: var(--label); font-size: 10px; line-height: 1.7; }
.site-footer p { margin: 0 0 12px; }
a { color: var(--body); text-decoration: underline; text-underline-offset: 3px; transition: color var(--duration-fast); }
a:hover { color: var(--head); }
.back { display: inline-block; margin-top: 24px; color: var(--label); font-size: 11px; letter-spacing: 0.2em; text-decoration: none; }

/* fx layer (fx.js). Selectors never match with JS off. */
.fx-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 300ms; }
.fx-bg-on .fx-bg { opacity: 1; }
.fx-bg-on body { background-color: transparent; }

.fx-cursor-dot, .fx-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9;
  pointer-events: none;
  border-radius: 2px;
  will-change: transform;
}
.fx-cursor-dot { width: 6px; height: 6px; background: var(--head); }
.fx-cursor-ring { width: 32px; height: 32px; border: 1px solid var(--label); transition: border-color var(--duration-fast); }
.fx-cursor-ring.is-link { border-color: var(--accent); }
.fx-cursor-dot.is-hidden, .fx-cursor-ring.is-hidden { opacity: 0; }
.fx-cursor-on, .fx-cursor-on a, .fx-cursor-on button { cursor: none; }
.fx-cursor-on input { cursor: text; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after,
  input[type="email"], button[type="submit"], a, .fx-bg, .fx-cursor-ring { transition: none; scroll-behavior: auto; }
}

@media (max-width: 359px) {
  .strip { padding: 0 22px; letter-spacing: 0.15em; }
}
