/* disoriented.blog — shared design tokens & layout.
   This file is the single source of truth for how the site looks.
   Edit it here (not in output/), then rebuild. */

:root{
  --paper: #E8E6DF;
  --sheet: #F2F1EC;
  --ink: #201E1A;
  --ink-soft: #58564D;
  --ink-faint: #8B897D;
  --fog-line: #CBCDC3;
  --signal: #3E5750;
  --signal-text: #2C3E37;
  --signal-soft: #7C948C;
}

*{ box-sizing: border-box; }

html{ background: var(--paper); }

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  position: relative;
  overflow-x: hidden;
}

body::before{
  content: "";
  position: fixed;
  inset: -10%;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(ellipse 50% 45% at 85% 30%, rgba(255,255,255,0.35), transparent 65%),
    radial-gradient(ellipse 70% 50% at 50% 90%, rgba(90,95,80,0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: drift 100s ease-in-out infinite alternate;
}

@keyframes drift{
  0%   { transform: translate(0,0); }
  100% { transform: translate(-2%, 3%); }
}

@media (prefers-reduced-motion: reduce){
  body::before{ animation: none; }
}

.wrap{
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 28px 100px;
}

/* ---------- utility top bar ---------- */
.utility{
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding: 28px 0 0;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.utility a{
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.utility a:hover, .utility a:focus-visible{
  color: var(--signal-text);
  border-bottom-color: var(--signal-soft);
}

/* ---------- hero / wordmark ---------- */
.hero{ padding: 56px 0 40px; }

.wordmark{
  font-family: 'Fraunces', serif;
  font-weight: 480;
  font-size: clamp(52px, 11vw, 92px);
  line-height: 1;
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 6px -0.02em;
  user-select: none;
}
.wordmark a{ color: inherit; text-decoration: none; display: flex; flex-wrap: wrap; }
.wordmark .lw{
  display: inline-block;
  transform: rotate(var(--r,0deg)) translateY(var(--y,0));
  transition: transform 0.4s ease;
}
.wordmark:hover .lw{
  transform: rotate(calc(var(--r,0deg) * 0.4)) translateY(calc(var(--y,0) * 0.4));
}
.wordmark .suffix{
  font-family: 'Space Mono', monospace;
  font-size: 0.19em;
  font-weight: 400;
  align-self: flex-end;
  color: var(--ink-faint);
  margin-left: 6px;
  letter-spacing: 0;
  transform: rotate(-2deg);
}

.tagline{
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 40ch;
  line-height: 1.7;
  margin: 18px 0 0;
}
.tagline em{ font-style: normal; color: var(--signal-text); }

/* ---------- wavy divider ---------- */
.divider{
  width: 100%;
  height: 10px;
  margin: 44px 0 26px;
  display: block;
  overflow: visible;
}

/* ---------- archive controls (homepage only) ---------- */
.controls{
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 12px;
}
.shuffle-btn{
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  background: none;
  border: 1px solid var(--fog-line);
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.shuffle-btn:hover, .shuffle-btn:focus-visible{
  border-color: var(--signal-soft);
  color: var(--signal-text);
}
.shuffle-btn:active{ transform: scale(0.97); }
.shuffle-icon{ display:inline-block; transition: transform 0.5s ease; }
.shuffle-btn.spin .shuffle-icon{ transform: rotate(220deg); }

/* ---------- entries (homepage pile) ---------- */
.pile{
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.entry{
  background: var(--sheet);
  border: 1px solid var(--fog-line);
  border-radius: 2px;
  padding: 26px 28px 24px;
  max-width: 92%;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.5s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.entry:hover{ transform: rotate(0deg); border-color: var(--signal-soft); }
.entry:nth-child(4n+2){ align-self: flex-end; }
.entry:nth-child(4n+3){ align-self: flex-start; margin-left: 6%; }

.entry-meta{
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-faint);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}
.entry-meta .vis{ color: var(--signal-text); }

.entry h2{
  font-family: 'Fraunces', serif;
  font-weight: 460;
  font-style: italic;
  font-size: 27px;
  line-height: 1.25;
  margin: 0 0 10px;
}
.entry h2 a{ color: inherit; text-decoration: none; }
.entry h2 a:hover, .entry h2 a:focus-visible{ color: var(--signal-text); }

.entry p{ margin: 0 0 14px; color: var(--ink); font-size: 16.5px; }

.entry .more{
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--signal-text);
  text-decoration: none;
  border-bottom: 1px solid var(--signal-soft);
  padding-bottom: 1px;
}
.entry .more:hover, .entry .more:focus-visible{ color: var(--ink); border-color: var(--ink); }

/* asides: unframed, larger, italic, no card */
.aside{ background: none; border: none; padding: 6px 4% 6px 8%; max-width: 82%; }
.aside p{
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 380;
  font-size: 23px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------- post page (single opened sheet) ---------- */
.post-sheet{
  background: var(--sheet);
  border: 1px solid var(--fog-line);
  border-radius: 2px;
  padding: 34px 36px 38px;
  margin-bottom: 40px;
}
.post-meta{
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.post-meta .vis{ color: var(--signal-text); }

.post-title{
  font-family: 'Fraunces', serif;
  font-weight: 460;
  font-style: italic;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2;
  margin: 0 0 26px;
}

.post-body p{ margin: 0 0 20px; font-size: 18px; }
.post-body h3{
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  margin: 34px 0 14px;
  color: var(--ink);
}
.post-body ul{ margin: 0 0 20px; padding-left: 22px; }
.post-body li{ margin-bottom: 8px; }
.post-body p.pull{
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 380;
  font-size: 25px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 30px 0;
  padding-left: 4%;
}
.post-body .divider{ margin: 34px 0; }

.post-figure{ margin: 28px 0; }
.post-figure img{
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--fog-line);
  border-radius: 2px;
}
.post-figure figcaption{
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 8px;
}

.back-link{
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--signal-text);
  text-decoration: none;
  border-bottom: 1px solid var(--signal-soft);
}
.back-link:hover, .back-link:focus-visible{ color: var(--ink); border-color: var(--ink); }

/* ---------- footer ---------- */
footer{
  margin-top: 80px;
  padding-top: 26px;
  border-top: 1px solid var(--fog-line);
  font-family: 'Space Mono', monospace;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.9;
}
footer p{ max-width: 52ch; }
footer a{ color: var(--signal-text); }
footer .fine{ color: var(--ink-faint); font-size: 11px; margin-top: 18px; }

a{ outline-offset: 3px; }
a:focus-visible, button:focus-visible{ outline: 2px solid var(--signal); }

/* ---------- mobile ---------- */
@media (max-width: 560px){
  body{ font-size: 16.5px; }
  .wrap{ padding: 0 18px 70px; }
  .wordmark .lw{ transform: none; }
  .wordmark:hover .lw{ transform: none; }
  .entry{ max-width: 100%; transform: none !important; padding: 20px 20px 18px; }
  .entry:nth-child(4n+2), .entry:nth-child(4n+3){ align-self: stretch; margin-left: 0; }
  .aside{ max-width: 100%; padding-left: 6%; }
  .post-sheet{ padding: 22px 20px 26px; }
  .post-body p.pull{ font-size: 21px; padding-left: 0; }
  .controls{ flex-direction: column; align-items: flex-start; }
}
