/* womenruinedsociety.com — restraint as design */

:root {
  --ink: #0E0E0E;
  --paper: #F4F2EE;
  --muted: #7A7A7A;
  --chrome: #5A5A5A;
  --oxblood: #B5121B;
  --serif: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --pad-outer: 96px;
  --fade-ms: 600ms;
  --marquee-duration: 240s;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

/* --- ambient background video --- */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(0.85) contrast(1.05);
  pointer-events: none;
}

/* ink wash sits between video and content */
.bg-tint {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(14,14,14,0.35) 0%, rgba(14,14,14,0.78) 65%, rgba(14,14,14,0.94) 100%),
    linear-gradient(180deg, rgba(14,14,14,0.55) 0%, rgba(14,14,14,0.55) 100%);
  z-index: 1;
  pointer-events: none;
}

/* --- masthead: brand wordmark + tagline --- */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 36px 32px 20px 32px;
  text-align: center;
  z-index: 5;
  pointer-events: none;
  user-select: none;
}

.wordmark {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(13px, 1.5vw, 18px);
  letter-spacing: 0.22em;
  font-variant: small-caps;
  color: var(--paper);
}

.wordmark .dot {
  color: var(--oxblood);
}

.tagline {
  margin: 8px 0 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: 0.01em;
  color: var(--muted);
}

/* --- marquee: continuous-scroll ticker of all tweets --- */
.marquee {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-180px);
  z-index: 4;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  pointer-events: none;
}

.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 100%;
  height: 1px;
  background: rgba(244,242,238,0.06);
}

.marquee::before { transform: translateY(-22px); }
.marquee::after { transform: translateY(22px); }

.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(12px, 1.05vw, 14px);
  letter-spacing: 0.04em;
  color: var(--chrome);
  animation: marquee-scroll var(--marquee-duration) linear infinite;
  will-change: transform;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  padding: 14px 0;
}

.marquee-text {
  color: rgba(244,242,238,0.78);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(13px, 1.15vw, 15px);
  letter-spacing: 0.005em;
  font-weight: 400;
}

.marquee-handle {
  color: var(--muted);
  margin: 0 14px 0 12px;
}

.marquee-divider {
  color: var(--oxblood);
  margin: 0 22px;
  font-size: 0.85em;
  opacity: 0.7;
}

@keyframes marquee-scroll {
  from { transform: translateX(0%); }
  to   { transform: translateX(-50%); }
}

/* --- featured tweet card --- */
main#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad-outer);
  padding-top: calc(var(--pad-outer) + 80px);
  z-index: 3;
  pointer-events: none;
}

.card {
  width: 100%;
  max-width: 880px;
  opacity: 1;
  transition: opacity var(--fade-ms) cubic-bezier(0.16, 1, 0.3, 1);
  padding-top: 120px;
}

.card.fading {
  opacity: 0;
}

.tweet-text {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 4.2vw, 54px);
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--paper);
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  hyphens: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.hairline {
  border: 0;
  border-top: 1px solid var(--oxblood);
  width: 32px;
  margin: 28px 0 14px 0;
  opacity: 0.95;
}

.tweet-meta {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0;
}

/* empty state: hide card, brand mark + marquee carry the page */
.card.empty .tweet-text,
.card.empty .hairline,
.card.empty .tweet-meta {
  display: none;
}

/* --- chrome: brand mark + counter --- */
.chrome {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--chrome);
  pointer-events: none;
  z-index: 6;
}

.brandmark,
.counter {
  user-select: none;
}

/* --- play / pause control --- */
.play-toggle {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--chrome);
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 200ms ease, color 200ms ease;
  z-index: 7;
}

.play-toggle:hover {
  opacity: 1;
  color: var(--paper);
}

.play-toggle:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 4px;
}

.next-arrow {
  position: fixed;
  top: 50%;
  right: 32px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--chrome);
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 400ms ease, color 200ms ease;
  z-index: 7;
}

.next-arrow.visible {
  opacity: 0.55;
}

.next-arrow:hover {
  opacity: 1;
  color: var(--paper);
}

.next-arrow:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 4px;
  opacity: 1;
}

/* --- mobile: 375px parity is non-negotiable --- */
@media (max-width: 768px) {
  :root {
    --pad-outer: 60px;
    --marquee-duration: 180s;
  }
  .masthead {
    padding-top: 24px;
  }
  .marquee {
    transform: translateY(-130px);
  }
  .card {
    padding-top: 80px;
  }
}

@media (max-width: 480px) {
  :root {
    --pad-outer: 28px;
    --marquee-duration: 140s;
  }

  .masthead {
    padding: 18px 16px 12px 16px;
  }

  .wordmark {
    letter-spacing: 0.18em;
  }

  .marquee {
    transform: translateY(-100px);
  }

  .marquee-track {
    font-size: 13px;
  }

  .marquee-text {
    font-size: 13px;
  }

  .tweet-text {
    font-size: clamp(20px, 5.6vw, 28px);
    line-height: 1.32;
  }

  .hairline {
    margin: 20px 0 12px 0;
  }

  .tweet-meta {
    font-size: 12px;
  }

  .chrome {
    padding: 14px 16px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .play-toggle {
    bottom: 16px;
  }

  .next-arrow {
    right: 12px;
  }

  /* on small screens the video can drag perf — soften */
  .bg-video {
    filter: saturate(0.8) contrast(1.05) brightness(0.85);
  }
}

@media (max-width: 380px) {
  :root {
    --pad-outer: 22px;
  }

  .chrome {
    font-size: 10px;
    padding: 12px 14px;
  }
}

/* respect reduced-motion: kill marquee + fades + autoplay */
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .next-arrow { transition: none; }
  .marquee-track { animation: none; }
  .bg-video { display: none; }
  .bg-tint { background: var(--ink); }
}
