/* ============================================================
   Scroll Poetry Press — shared styles
   Palette: ink (cover) / paper (page) — the site alternates
   between the two to echo a printed chapbook's cover vs. pages.
   ============================================================ */

:root {
  --ink: #14161c;
  --ink-2: #1b1e26;
  --ink-line: #2b2f3a;
  --paper: #f5f0e4;
  --paper-2: #ece4d1;
  --paper-line: #ded4b9;
  --ink-text: #1b1a17;
  --ink-text-muted: #756e5c;
  --paper-text: #ece7d9;
  --paper-text-muted: #8b8fa3;
  --moss: #3f5741;
  --moss-deep: #2e4132;
  --brass: #c9a227;
  --brass-bright: #ddb937;

  --font-display: "Fraunces", "Iowan Old Style", ui-serif, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1080px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* ---------- layout shells ---------- */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

section.ink {
  background: var(--ink);
  color: var(--paper-text);
}

section.paper {
  background: var(--paper);
  color: var(--ink-text);
}

/* ---------- header ---------- */

.site-header {
  background: var(--ink);
  color: var(--paper-text);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--ink-line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark .mark {
  color: var(--brass);
  font-style: italic;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper-text-muted);
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--paper-text);
  border-bottom-color: var(--brass);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  color: var(--paper-text);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--ink-line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .site-nav.open {
    max-height: 240px;
  }

  .site-nav a {
    width: 100%;
    padding: 16px 28px;
    border-bottom: 1px solid var(--ink-line);
  }
}

/* ---------- hero (ink title band, used on every page) ---------- */

.hero {
  padding: 88px 0 96px;
}

.hero .eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  margin: 0;
  max-width: 14ch;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--brass);
}

/* ---------- the scroll signature ---------- */

.scroll-visual {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}

.scroll-frame {
  position: relative;
  width: 260px;
  height: 340px;
  border: 1px solid var(--ink-line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--ink-2);
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    black 40px,
    black calc(100% - 40px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    black 40px,
    black calc(100% - 40px),
    transparent 100%
  );
}

.scroll-track {
  position: absolute;
  inset: 0;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: scroll-up 14s linear infinite;
}

.scroll-track .line {
  height: 8px;
  border-radius: 4px;
  background: var(--ink-line);
}

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

.scroll-pause {
  position: absolute;
  top: 50%;
  left: 22px;
  right: 22px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.scroll-pause .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass-bright);
  flex-shrink: 0;
  box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.15);
}

.scroll-pause .line {
  height: 10px;
  width: 68%;
  border-radius: 5px;
  background: var(--brass);
  animation: pulse-glow 3.2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-track { animation: none; }
  .scroll-pause .line { animation: none; }
}

/* ---------- buttons / links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--moss);
  color: var(--paper);
}
.btn-primary:hover { background: var(--moss-deep); }

.btn-outline {
  background: transparent;
  border-color: var(--paper-line);
  color: var(--ink-text);
}
.btn-outline:hover { border-color: var(--moss); color: var(--moss); }

.btn-ghost {
  background: transparent;
  border-color: var(--ink-line);
  color: var(--paper-text);
}
.btn-ghost:hover { border-color: var(--brass); color: var(--brass-bright); }

/* ---------- home: links section ---------- */

.link-cards {
  padding: 72px 0 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.link-card {
  border: 1px solid var(--paper-line);
  border-radius: 18px;
  padding: 36px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.link-card .label {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-text-muted);
}

.link-card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  margin: 0;
}

.link-card p {
  margin: 0;
  color: var(--ink-text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.link-card .actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge-placeholder {
  font-size: 12px;
  color: var(--ink-text-muted);
  border: 1px dashed var(--paper-line);
  border-radius: 999px;
  padding: 6px 14px;
}

/* ---------- prose (verbatim copy blocks) ---------- */

.prose {
  padding: 72px 0 40px;
  max-width: 720px;
}

.prose p {
  font-size: 18px;
  line-height: 1.75;
  margin: 0 0 24px;
}

.prose p:last-child { margin-bottom: 0; }

.editor-block {
  padding: 40px 0 96px;
  max-width: 720px;
  border-top: 1px solid var(--paper-line);
  margin-top: 16px;
}

.editor-block .label {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-text-muted);
  margin: 40px 0 12px;
}

.editor-block h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 16px;
}

.editor-block p {
  font-size: 17px;
  line-height: 1.75;
  margin: 0;
}

/* ---------- guidelines ---------- */

.guideline {
  padding: 56px 0;
  max-width: 720px;
  border-bottom: 1px solid var(--paper-line);
}

.guideline:last-of-type { border-bottom: none; }

.guideline .num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--moss);
  font-size: 15px;
  margin: 0 0 10px;
}

.guideline h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 20px;
}

.guideline p {
  font-size: 17px;
  line-height: 1.75;
  margin: 0;
}

.guideline .theme-title {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--moss);
}

.guideline .inline-link,
.prose .inline-link {
  color: var(--moss);
  text-decoration: underline;
  text-decoration-color: var(--paper-line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

.guideline .inline-link:hover,
.prose .inline-link:hover {
  text-decoration-color: var(--moss);
}

.guidelines-wrap { padding-bottom: 40px; }

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

.site-footer {
  background: var(--ink);
  color: var(--paper-text-muted);
  padding: 48px 0;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer .wordmark { color: var(--paper-text); }

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: var(--paper-text-muted);
  transition: color 0.15s ease;
}

.footer-links a:hover { color: var(--brass-bright); }

.footer-meta {
  font-size: 13px;
  color: var(--ink-line);
  width: 100%;
  padding-top: 24px;
  margin-top: 8px;
  border-top: 1px solid var(--ink-line);
}
