/* =============================================================================
   BLACK & WHITE BY BARRY WHITE — design system
   Monochrome editorial. Restraint is the identity.
============================================================================= */

/* ---- Tokens ---- */
:root {
  /* Type scale (fluid) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.3rem + 3vw, 3.5rem);
  --text-hero: clamp(2.75rem, 1rem + 8vw, 7.5rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --content-narrow: 640px;
  --content-default: 940px;
  --content-wide: 1240px;

  --radius-sm: 2px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 320ms var(--ease);

  /* Traditional English editorial serif pairing. */
  --font-display: "Cormorant Garamond", "Garamond", "Baskerville", "Times New Roman", serif;
  --font-body: "Libre Baskerville", "Baskerville", Georgia, serif;
}

/* ---- Themes (true monochrome) ---- */
:root,
[data-theme="light"] {
  --bg: #f5f4f2;
  --surface: #ffffff;
  --ink: #111111;
  --ink-soft: #3a3a3a;
  --muted: #6b6b6b;
  --faint: #9a9a9a;
  --line: #dededa;
  --line-strong: #c4c4c0;
  --accent: #111111; /* monochrome: accent IS ink */
  --photo-frame: #e9e8e5;
  --shadow: 0 1px 30px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
  --bg: #0c0c0c;
  --surface: #141414;
  --ink: #ededeb;
  --ink-soft: #cccccc;
  --muted: #9a9a98;
  --faint: #6a6a68;
  --line: #2a2a2a;
  --line-strong: #3a3a3a;
  --accent: #ffffff;
  --photo-frame: #1a1a1a;
  --shadow: 0 1px 40px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0c0c0c;
    --surface: #141414;
    --ink: #ededeb;
    --ink-soft: #cccccc;
    --muted: #9a9a98;
    --faint: #6a6a68;
    --line: #2a2a2a;
    --line-strong: #3a3a3a;
    --accent: #ffffff;
    --photo-frame: #1a1a1a;
    --shadow: 0 1px 40px rgba(0, 0, 0, 0.5);
  }
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.72;
  color: var(--ink);
  background: var(--bg);
  transition: background var(--transition), color var(--transition);
}
img,
svg,
picture {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
::selection {
  background: var(--ink);
  color: var(--bg);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Layout primitives ---- */
.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 5vw, var(--space-16));
}
.wrap--narrow {
  max-width: var(--content-narrow);
}
.wrap--default {
  max-width: var(--content-default);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* =============================================================================
   HEADER
============================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.brand .logo {
  width: 34px;
  height: 34px;
  color: var(--ink);
  flex: none;
}
.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.01em;
  line-height: 1;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-5), 3vw, var(--space-10));
}
.nav a {
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  position: relative;
  padding-block: var(--space-1);
  transition: color var(--transition);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width var(--transition);
}
.nav a:hover,
.nav a.is-active {
  color: var(--ink);
}
.nav a:hover::after,
.nav a.is-active::after {
  width: 100%;
}
.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.theme-toggle:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* =============================================================================
   HERO (home)
============================================================================= */
.hero {
  padding-top: clamp(var(--space-16), 9vw, var(--space-32));
  padding-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(var(--space-8), 5vw, var(--space-20));
  align-items: end;
}
.hero h1 {
  font-size: var(--text-hero);
  line-height: 0.98;
  letter-spacing: -0.012em;
}
.hero h1 em {
  font-style: italic;
  color: var(--ink-soft);
}
.hero-lead {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 38ch;
  line-height: 1.62;
}
.hero-meta {
  margin-top: var(--space-8);
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--muted);
}
.hero-figure {
  position: relative;
}
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  background: var(--photo-frame);
}
.hero-figure figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* =============================================================================
   SECTION HEADING
============================================================================= */
.section {
  padding-block: clamp(var(--space-12), 7vw, var(--space-24));
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-10);
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-size: var(--text-xl);
}
.section-head .count {
  font-size: var(--text-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* =============================================================================
   POST GRID (home)
============================================================================= */
.post-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(var(--space-6), 3vw, var(--space-12)) clamp(var(--space-6), 2.5vw, var(--space-10));
}
.post-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
}
/* editorial rhythm: feature the first two posts larger */
.post-card.is-feature {
  grid-column: span 6;
}
.post-card a {
  display: block;
}
.card-figure {
  position: relative;
  overflow: hidden;
  background: var(--photo-frame);
  aspect-ratio: 4 / 5;
}
.post-card.is-feature .card-figure {
  aspect-ratio: 3 / 2;
}
.card-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transition: transform 900ms var(--ease), filter var(--transition);
  will-change: transform;
}
.post-card a:hover .card-figure img {
  transform: scale(1.04);
}
.card-index {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  color: #fff;
  mix-blend-mode: difference;
  z-index: 2;
}
.card-body {
  padding-top: var(--space-4);
}
.card-meta {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}
.card-title {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.1;
  color: var(--ink);
  transition: opacity var(--transition);
}
.post-card.is-feature .card-title {
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2rem);
}
.post-card a:hover .card-title {
  opacity: 0.6;
}

/* =============================================================================
   POST DETAIL
============================================================================= */
.post-hero {
  padding-top: clamp(var(--space-10), 6vw, var(--space-20));
  padding-bottom: var(--space-8);
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--space-10);
  transition: gap var(--transition), color var(--transition);
}
.post-back:hover {
  color: var(--ink);
  gap: var(--space-3);
}
.post-titleblock {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-8);
}
.post-titleblock h1 {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
}
.post-titleblock .post-place {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--muted);
  letter-spacing: 0.04em;
}
.post-date {
  text-align: right;
  font-size: var(--text-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.post-photos {
  margin-block: clamp(var(--space-10), 5vw, var(--space-16));
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.post-photo figure {
  background: var(--photo-frame);
}
.post-photo img {
  width: 100%;
  filter: grayscale(1) contrast(1.02);
}
.post-photo figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.04em;
}

.post-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-10), 5vw, var(--space-16));
}
@media (min-width: 880px) {
  .post-body {
    grid-template-columns: 300px 1fr;
    align-items: start;
  }
}

/* Spec sheet */
.spec {
  border-top: 1px solid var(--ink);
  padding-top: var(--space-5);
}
@media (min-width: 880px) {
  .spec {
    position: sticky;
    top: 6rem;
  }
}
.spec h3 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--space-5);
}
.spec dl {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-5);
  row-gap: 0;
}
.spec dt {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  padding-block: var(--space-3);
  border-top: 1px solid var(--line);
}
.spec dd {
  font-size: var(--text-sm);
  color: var(--ink);
  padding-block: var(--space-3);
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.spec dt:first-of-type,
.spec dd:first-of-type {
  border-top: 0;
}
.spec-setup {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  line-height: 1.55;
}
.spec-setup span {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

/* Reflection */
.reflection .eyebrow {
  display: block;
  margin-bottom: var(--space-5);
}
.reflection p {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1rem + 1.4vw, 1.875rem);
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 30ch;
}
.reflection .sig {
  margin-top: var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* post nav (prev/next) */
.post-foot {
  margin-top: clamp(var(--space-16), 8vw, var(--space-32));
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.post-foot a {
  padding-block: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: opacity var(--transition);
}
.post-foot a:hover {
  opacity: 0.55;
}
.post-foot a:last-child {
  text-align: right;
  align-items: flex-end;
  border-left: 1px solid var(--line);
  padding-left: var(--space-8);
}
.post-foot a:first-child {
  padding-right: var(--space-8);
}
.post-foot .lbl {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-foot .ttl {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--ink);
}

/* =============================================================================
   ABOUT
============================================================================= */
.about {
  padding-top: clamp(var(--space-16), 8vw, var(--space-24));
  padding-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-10), 5vw, var(--space-16));
}
@media (min-width: 820px) {
  .about-grid {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: start;
  }
}
.about-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  background: var(--photo-frame);
}
@media (min-width: 820px) {
  .about-figure {
    position: sticky;
    top: 6rem;
  }
}
.about-copy h1 {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-8);
}
.about-copy p {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: var(--space-6);
  max-width: 56ch;
}
.philosophy {
  margin-top: var(--space-12);
  border-top: 1px solid var(--ink);
}
.philosophy-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 560px) {
  .philosophy-item {
    grid-template-columns: 0.5fr 1fr;
    gap: var(--space-6);
    align-items: baseline;
  }
}
.philosophy-item .k {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--ink);
}
.philosophy-item .v {
  font-size: var(--text-base);
  color: var(--ink-soft);
}

/* =============================================================================
   FOOTER
============================================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(var(--space-16), 8vw, var(--space-32));
}
.site-footer--minimal {
  margin-top: clamp(var(--space-8), 5vw, var(--space-16));
}
.site-footer--minimal .footer-bottom {
  justify-content: center;
  border-top: 0;
  padding-block: var(--space-8);
}

/* =============================================================================
   ADMIN EDITOR
============================================================================= */
.admin-top {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-5) clamp(var(--space-5), 5vw, var(--space-16));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  border-bottom: 1px solid var(--line);
}
.admin-top__actions,
.admin-form__actions,
.admin-list__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.admin-link,
.admin-button {
  border: 1px solid var(--line);
  padding: 0.65rem 0.8rem;
  font-size: var(--text-xs);
  color: var(--ink-soft);
  background: var(--bg);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.admin-button:hover,
.admin-link:hover,
.admin-button--dark {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.admin-button--danger {
  color: var(--ink);
  border-color: var(--line-strong);
}
.admin-shell {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: clamp(var(--space-8), 5vw, var(--space-16)) clamp(var(--space-5), 5vw, var(--space-16));
}
.admin-intro {
  max-width: 760px;
  margin-bottom: var(--space-10);
}
.admin-intro h1 {
  margin-top: var(--space-4);
  font-size: var(--text-2xl);
}
.admin-intro p:not(.eyebrow) {
  margin-top: var(--space-4);
  color: var(--ink-soft);
}
.admin-intro code,
.admin-preview textarea,
.admin-field input,
.admin-field textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(360px, 1.3fr) minmax(280px, 0.95fr);
  gap: var(--space-6);
  align-items: start;
}
.admin-panel {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 74%, var(--bg));
  padding: var(--space-6);
}
.admin-list {
  position: sticky;
  top: 92px;
}
.admin-list__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--muted);
}
.admin-entry-list {
  display: grid;
  gap: var(--space-2);
  max-height: 460px;
  overflow: auto;
  padding-right: var(--space-1);
}
.admin-entry {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  padding: var(--space-3);
  background: transparent;
}
.admin-entry span,
.admin-entry small {
  display: block;
}
.admin-entry span {
  color: var(--ink);
  font-size: var(--text-sm);
}
.admin-entry small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: var(--text-xs);
}
.admin-entry.is-active {
  border-color: var(--ink);
  background: var(--bg);
}
.admin-list__tools {
  margin-top: var(--space-5);
}
.admin-form {
  display: grid;
  gap: var(--space-4);
}
.admin-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.admin-section-title {
  margin-top: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.admin-field {
  display: grid;
  gap: var(--space-2);
}
.admin-field span,
.admin-check,
.admin-field small {
  font-size: var(--text-xs);
  color: var(--muted);
}
.admin-field input,
.admin-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.55;
}
.admin-field input:focus,
.admin-field textarea:focus {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}
.admin-check {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.admin-preview {
  position: sticky;
  top: 92px;
}
.admin-preview figure {
  margin-top: var(--space-5);
  background: var(--photo-frame);
}
.admin-preview img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
}
.admin-preview h2 {
  margin-top: var(--space-5);
  font-size: var(--text-xl);
}
.admin-preview p {
  margin-top: var(--space-3);
  color: var(--ink-soft);
  font-size: var(--text-sm);
}
.admin-preview textarea {
  margin-top: var(--space-6);
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  padding: var(--space-4);
  font-size: 0.75rem;
  line-height: 1.45;
}

/* =============================================================================
   SHARE STORY PAGE
============================================================================= */
.story-page {
  min-height: calc(100dvh - 86px);
}
.story-grid {
  padding-top: clamp(var(--space-16), 10vw, var(--space-32));
  padding-bottom: clamp(var(--space-16), 8vw, var(--space-24));
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  align-items: start;
}
.story-copy h1 {
  margin-top: var(--space-5);
  max-width: 8ch;
  font-size: var(--text-2xl);
}
.story-form {
  display: grid;
  gap: var(--space-6);
}
.story-upload {
  min-height: clamp(300px, 42vw, 560px);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--photo-frame);
  color: var(--muted);
  cursor: pointer;
}
.story-upload input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.story-upload span {
  z-index: 2;
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid var(--line);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.story-upload img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  opacity: 0;
  transition: opacity var(--transition);
}
.story-upload img.is-visible {
  opacity: 1;
}
.story-thought {
  display: grid;
  gap: var(--space-3);
}
.story-thought span {
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.story-thought textarea {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  line-height: 1.35;
  resize: vertical;
}
.story-thought textarea:focus {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}
.story-submit {
  justify-self: start;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  color: var(--ink);
  font-size: var(--text-sm);
}
.story-submit:disabled {
  opacity: 0.5;
  cursor: progress;
}
.story-note {
  margin-top: var(--space-5);
  max-width: 34ch;
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
}
.story-status {
  font-size: var(--text-sm);
  line-height: 1.6;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, var(--bg));
  color: var(--ink-soft);
}
.story-status.is-error {
  border-color: var(--line-strong);
  color: var(--ink);
}
.story-status.is-success {
  border-color: var(--ink);
  color: var(--ink);
}
.story-status.is-pending {
  color: var(--muted);
}

/* =============================================================================
   PRIVATE STUDIO — auth gate, tabs, submissions board
============================================================================= */
.studio-gate {
  max-width: var(--content-narrow);
  margin-inline: auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-10);
  padding: clamp(var(--space-12), 8vw, var(--space-24)) clamp(var(--space-5), 5vw, var(--space-16));
}
.studio-gate .brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.studio-gate__form {
  display: grid;
  gap: var(--space-5);
}
.studio-gate__form h1 {
  font-size: var(--text-2xl);
}
.studio-gate__copy {
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.studio-gate__form .admin-button {
  justify-self: start;
}
.studio-tabs {
  display: inline-flex;
  gap: var(--space-2);
}
.studio-tabs .admin-button.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.studio-who {
  font-size: var(--text-xs);
  color: var(--muted);
}

.story-board {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .story-board {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1080px) {
  .story-board {
    grid-template-columns: repeat(3, 1fr);
  }
}
.story-board__empty {
  color: var(--muted);
  font-size: var(--text-sm);
}
.story-card {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 74%, var(--bg));
  display: flex;
  flex-direction: column;
}
.story-card__media {
  margin: 0;
  background: var(--photo-frame);
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.story-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
}
.story-card__noimg {
  font-size: var(--text-xs);
  color: var(--muted);
}
.story-card__body {
  padding: var(--space-5);
  display: grid;
  gap: var(--space-3);
}
.story-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--muted);
}
.story-card__status {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid var(--line);
  padding: 0.15rem 0.5rem;
}
.story-card__status--new {
  border-color: var(--ink);
  color: var(--ink);
}
.story-card__thought {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.4;
  color: var(--ink);
  white-space: pre-wrap;
}
.story-card__file {
  font-size: var(--text-xs);
  color: var(--faint);
  word-break: break-all;
}
.story-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.story-card__actions .admin-button:disabled {
  opacity: 0.45;
  cursor: default;
}
.footer-inner {
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 32ch;
}
.footer-brand .logo {
  width: 40px;
  height: 40px;
  color: var(--ink);
}
.footer-brand p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-4);
  font-weight: 600;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  transition: color var(--transition);
}
.footer-col a:hover {
  color: var(--ink);
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: var(--space-6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--faint);
  letter-spacing: 0.04em;
}

/* =============================================================================
   ENTRANCE ANIMATION
============================================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* =============================================================================
   RESPONSIVE
============================================================================= */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .hero-figure {
    order: -1;
  }
  .hero-figure img {
    aspect-ratio: 16 / 10;
  }
  .post-card,
  .post-card.is-feature {
    grid-column: span 6;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-list,
  .admin-preview {
    position: static;
  }
  .story-grid {
    grid-template-columns: 1fr;
  }
  .story-copy h1 {
    max-width: 12ch;
  }
}
@media (max-width: 620px) {
  .brand-name small {
    display: none;
  }
  .nav {
    gap: var(--space-5);
  }
  .nav .nav-text {
    display: none;
  }
  .post-card,
  .post-card.is-feature {
    grid-column: span 12;
  }
  .post-titleblock {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .post-date {
    text-align: left;
  }
  .post-foot .ttl {
    font-size: var(--text-base);
  }
  .admin-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-two {
    grid-template-columns: 1fr;
  }
  .admin-panel {
    padding: var(--space-4);
  }
}

/* Live-journal additions: empty state, solo hero, image placeholders */
.journal-empty {
  color: var(--muted);
  text-align: center;
  padding-block: var(--space-7, 4rem);
  max-width: 46ch;
  margin-inline: auto;
}
.journal-empty h2 {
  margin-bottom: 0.75rem;
}
.hero-grid--solo {
  grid-template-columns: 1fr;
}
.hero-figure__placeholder,
.card-figure__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  background: var(--photo-frame);
}
.admin-imgpath {
  color: var(--muted);
  font-size: var(--text-sm);
  margin-top: -0.25rem;
}
