/* ============================================================
   Earlian — content hub layer
   masthead (docu / messages / the list), signup overlay,
   docu + messages page styles. Loads after soon.css.
   ============================================================ */

:root {
  --cream: #f2ead8;
  --red: #c8332b;
  --ink: #0a0a0a;
}

/* ---------------- masthead ---------------- */

.mast {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 55;
  display: flex;
  justify-content: center;
  gap: clamp(26px, 6vw, 72px);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.mast.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.mast a {
  position: relative;
  font-family: 'Rock Salt', cursive;
  font-size: clamp(14px, 2vw, 19px);
  color: var(--cream);
  text-decoration: none;
  padding: 10px 18px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.mast a:nth-child(1) { transform: rotate(-2deg); }
.mast a:nth-child(2) { transform: rotate(1.4deg); }
.mast a:nth-child(3) { transform: rotate(-1deg); }

.mast a .scribble {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.mast a .scribble path {
  fill: none;
  stroke: var(--red);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.28s ease;
}

.mast a:hover .scribble path,
.mast a:focus-visible .scribble path,
.mast a.active .scribble path {
  stroke-dashoffset: 0;
}

/* ---------------- signup overlay ("the list") ---------------- */

.list-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 4, 0.62);
  padding: 24px;
}

.list-overlay.open { display: flex; }

.list-card {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  max-width: 520px;
  width: 100%;
  padding: 58px 44px 42px;
  transform: rotate(-1.5deg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.list-card h2 {
  font-family: 'Rock Salt', cursive;
  font-size: clamp(23px, 4.5vw, 32px);
  margin: 0 0 12px;
}

.list-sub {
  font-family: 'Special Elite', monospace;
  font-size: 15px;
  opacity: 0.7;
  margin: 0 0 28px;
}

.list-close {
  position: absolute;
  top: 8px;
  right: 14px;
  background: none;
  border: none;
  font-family: 'Permanent Marker', cursive;
  font-size: 26px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  padding: 6px;
}

.list-close:hover { color: var(--red); }

/* form (shared by overlay + inline section) */

.list-form input {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(10, 10, 10, 0.7);
  font-family: 'Special Elite', monospace;
  font-size: 18px;
  padding: 10px 2px;
  margin-bottom: 18px;
  color: inherit;
  outline: none;
}

.list-form input:focus { border-bottom-color: var(--red); }

.list-submit {
  position: relative;
  background: none;
  border: none;
  font-family: 'Permanent Marker', cursive;
  font-size: 24px;
  color: inherit;
  cursor: pointer;
  padding: 4px 8px;
}

.list-submit:hover { color: var(--red); }

.list-err {
  font-family: 'Special Elite', monospace;
  color: var(--red);
  font-size: 14px;
  min-height: 18px;
  margin: 10px 0 0;
}

.list-done {
  font-family: 'Rock Salt', cursive;
  font-size: clamp(22px, 4vw, 28px);
  text-align: center;
  padding: 26px 0 10px;
  margin: 0;
}

/* torn tape strips (signup card + vid cards) */

.tape {
  position: absolute;
  width: 110px;
  height: 34px;
  background: rgba(242, 234, 216, 0.72);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  opacity: 0.85;
  pointer-events: none;
}

.tape.tl { top: -16px; left: -34px; transform: rotate(-38deg); }
.tape.tr { top: -16px; right: -34px; transform: rotate(38deg); }
.tape.bl { bottom: -16px; left: -34px; transform: rotate(38deg); }
.tape.br { bottom: -16px; right: -34px; transform: rotate(-38deg); }

/* ---------------- hub pages (docu / messages) ---------------- */

body.hub {
  background: var(--ink);
  color: var(--cream);
  margin: 0;
  min-height: 100vh;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 130px 24px 90px;
}

.page-title {
  font-family: 'Rock Salt', cursive;
  font-size: clamp(38px, 8vw, 62px);
  margin: 0;
  display: inline-block;
  transform: rotate(-1.5deg);
}

.page-rule {
  height: 6px;
  width: min(300px, 58%);
  margin-top: 8px;
  background: var(--red);
  border-radius: 50%;
  transform: rotate(-0.6deg);
  opacity: 0.9;
}

/* docu grid */

.page-sub {
  font-family: 'Special Elite', monospace;
  font-size: 15px;
  opacity: 0.6;
  margin: 18px 0 0;
}

/* the web — city route strip */

.route {
  display: flex;
  align-items: center;
  margin-top: 44px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.route-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transform: rotate(var(--r, 0deg));
  flex-shrink: 0;
}

.route-city {
  font-family: 'Rock Salt', cursive;
  font-size: 15px;
  color: var(--cream);
  letter-spacing: 1px;
  white-space: nowrap;
}

.route-node:hover .route-city { color: var(--red); }

.route-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.route-seg {
  flex: 1;
  min-width: 42px;
  height: 2px;
  margin: 0 10px 22px;
  background-image: repeating-linear-gradient(
    90deg, var(--red) 0 7px, transparent 7px 14px
  );
  opacity: 0.75;
  transform: scaleX(0);
  transform-origin: left center;
  animation: route-draw 0.5s ease forwards;
  animation-delay: var(--d, 0s);
}

@keyframes route-draw {
  to { transform: scaleX(1); }
}

/* postcard stamps */

.stamp {
  position: absolute;
  top: 18px;
  right: 16px;
  z-index: 2;
  font-family: 'Sedgwick Ave Display', cursive;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 3px;
  padding: 2px 10px;
  border: 3px double var(--red);
  transform: rotate(7deg);
  opacity: 0.85;
  pointer-events: none;
}

.kind {
  position: absolute;
  top: 20px;
  left: 16px;
  z-index: 2;
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 3px 8px;
  transform: rotate(-4deg);
  pointer-events: none;
}

.kind-docu { color: var(--red); border: 1px solid var(--red); }

.kind-skit {
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--cream);
}

.postmark {
  float: right;
  color: var(--red);
  letter-spacing: 2px;
}

.vid-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 52px;
  margin-top: 60px;
}

@media (max-width: 720px) {
  .vid-grid { grid-template-columns: 1fr; }
}

.vid-card {
  position: relative;
  margin: 0;
  background: #111;
  padding: 10px;
  transform: rotate(var(--r, 0deg));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

.vid-frame { aspect-ratio: 16 / 9; background: #000; }

.vid-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.vid-card figcaption {
  font-family: 'Special Elite', monospace;
  font-size: 14px;
  opacity: 0.75;
  padding: 12px 4px 4px;
}

/* messages feed */

.msg {
  padding: 36px 0 30px;
  border-bottom: 2px dashed rgba(242, 234, 216, 0.18);
}

.msg:first-child { margin-top: 34px; }

.msg h2 {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(24px, 4vw, 32px);
  margin: 0 0 8px;
}

.msg time {
  font-family: 'Special Elite', monospace;
  color: var(--red);
  font-size: 14px;
  letter-spacing: 2px;
}

.msg p {
  font-family: 'Special Elite', monospace;
  font-size: 17px;
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 14px 0 0;
  opacity: 0.92;
}

.msg-empty {
  font-family: 'Special Elite', monospace;
  opacity: 0.6;
  font-size: 18px;
  margin-top: 54px;
}

/* inline signup section (messages page footer) */

.list-section {
  margin-top: 80px;
  padding: 44px 34px 38px;
  background: var(--cream);
  color: var(--ink);
  transform: rotate(-0.8deg);
  position: relative;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.list-section h2 {
  font-family: 'Rock Salt', cursive;
  font-size: clamp(22px, 4vw, 30px);
  margin: 0 0 10px;
}
