/* ============================================================
   PROMPTWEB teaser — "Continuous Feed" (§8), restraint pass.
   Sensibility, not artifact: neutral white field, disciplined
   grid, slab caps, mono data, one hand-ruled red stroke.
   ============================================================ */

:root {
  --paper:       #FAFAFA;   /* near-white neutral. Paper is white, not cream. */
  --paper-shade: #F1F1F0;
  --ink:         #161616;
  --rule:        #DADAD7;
  --red-tape:    #C1271D;   /* the one bold gesture */
  --machine:     #31586B;

  --display: "Courier Prime", "IBM Plex Mono", "Courier New", monospace;
  --body:    "IBM Plex Sans", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", "Courier New", monospace;

  --margin: clamp(28px, 5vw, 88px);   /* one margin governs every edge */
}

html, body { height: 100%; margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  overflow: hidden;
}

#app { position: fixed; inset: 0; }
.frame { width: 100vw; height: 100vh; overflow: hidden; }
canvas { display: block; }

/* ---- Copy block: top-left on the margin grid ---- */
.overlay-text {
  position: absolute;
  top: var(--margin);
  left: var(--margin);
  max-width: 380px;
  z-index: 10;
}

.masthead {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(1.8rem, 3.6vw + 0.5rem, 3rem);
  line-height: 1;
  animation: settle 140ms ease-out 80ms both;
}

/* The signature: a draftsman's red stroke, drawn on load */
.red-rule {
  display: block;
  width: min(100%, 300px);
  height: 8px;
  margin: 10px 0 0;
}
.red-rule path {
  fill: none;
  stroke: var(--red-tape);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: rule-draw 240ms ease-out forwards;
}
.red-rule path:first-child  { animation-delay: 260ms; }
.red-rule path:nth-child(2) { animation-delay: 470ms; }
@keyframes rule-draw { to { stroke-dashoffset: 0; } }

.lede {
  margin: 40px 0 0;
  font-size: 1.05rem;
  line-height: 1.5;
  animation: settle 140ms ease-out 560ms both;
}

.contact-row {
  margin: 14px 0 0;
  animation: settle 140ms ease-out 660ms both;
}

.contact {
  position: relative;
  display: inline-block;
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
}
/* Red underline draws left-to-right on hover, ~120ms (§8) */
.contact::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 0;
  background: var(--red-tape);
  transition: width 120ms ease-out;
}
.contact:hover::after,
.contact:focus-visible::after { width: 100%; }

:focus-visible {
  outline: 2px solid var(--red-tape);
  outline-offset: 3px;
}

@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Corner data, set in the utility voice, both on the grid ---- */
.colophon,
.spin-hint {
  position: fixed;
  bottom: calc(var(--margin) / 2);
  margin: 0;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--machine);
  z-index: 10;
  pointer-events: none;
}

.colophon { left: var(--margin); opacity: 0.55; }

/* The semi-hidden invitation: appears late, reads like a spec note */
.spin-hint {
  right: var(--margin);
  opacity: 0;
  animation: hint-in 1s ease-out 6s forwards;
}
@keyframes hint-in { to { opacity: 0.55; } }

/* ---- Drag-drop banner (dev aid) ---- */
.banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--paper-shade);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 6px 12px;
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .overlay-text { max-width: none; right: var(--margin); }
  .colophon { display: none; }   /* one corner note is enough on a phone */
}

/* ---- Reduced motion: no sequence, everything simply present ---- */
@media (prefers-reduced-motion: reduce) {
  .masthead, .lede, .contact-row { animation: none; }
  .red-rule path { animation: none; stroke-dashoffset: 0; }
  .contact::after { transition: none; }
  .spin-hint { animation: none; opacity: 0.55; }
}
