:root {
  --bg: #f3f0ea;
  --surface: rgba(255, 252, 248, 0.92);
  --ink: #090909;
  --muted: #5f5b57;
  --line: rgba(9, 9, 9, 0.16);
  --line-soft: rgba(9, 9, 9, 0.08);
  --accent: #111111;
  --accent-dark: #000000;
  --highlight: #d8d2cb;
  --success: #dff3e5;
  --success-ink: #24543a;
  --danger: #f6d7d2;
  --danger-ink: #7b2f22;
  --shadow: 0 18px 48px rgba(12, 12, 12, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.72), transparent 24%),
    linear-gradient(180deg, #f3f0ea 0%, #ece8e1 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell,
.admin-shell,
.admin-auth-shell {
  min-height: 100vh;
}

.flash-stack {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 30;
  display: grid;
  gap: 0.5rem;
  width: min(32rem, calc(100% - 2rem));
  transform: translateX(-50%);
}

.flash {
  margin: 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.flash-notice {
  color: var(--success-ink);
}

.flash-alert {
  color: var(--danger-ink);
}

.landing-page {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.5rem 0 7rem;
  position: relative;
}

.section-kicker,
.site-header__brand,
.admin-eyebrow {
  margin: 0 0 0.4rem;
  color: #2e2b28;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-header {
  padding: 1rem 0 0.2rem;
}

.site-header__tagline {
  margin: 0;
  color: var(--muted);
}

.site-header__nav,
.admin-nav,
.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.site-header__nav a,
.admin-nav__link,
.filter-link {
  position: relative;
  color: var(--ink);
  padding: 0.35rem 0;
}

.site-header__nav a:not(:last-child)::after,
.admin-nav__link:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -0.5rem;
  top: 50%;
  width: 1px;
  height: 1.3rem;
  background: var(--line);
  transform: translateY(-50%);
}

.site-header__nav a:hover,
.admin-nav__link:hover,
.filter-link:hover,
.filter-link--active {
  color: var(--muted);
}

main > section {
  margin-top: 8rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: 2rem;
  align-items: center;
  min-height: 78vh;
  margin-top: 3.4rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 8%;
  bottom: -1.2rem;
  height: 1px;
  background: var(--line-soft);
}

.hero__copy h1,
.story-split__text h2,
.manifesto h2,
.formats__intro h2,
.gallery__lead h2,
.lead-section__copy h2,
.auth-card h1,
.admin-card h2 {
  margin: 0;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.hero__copy h1 {
  max-width: 7ch;
  font-size: clamp(4.1rem, 9vw, 7.6rem);
}

.hero__lead,
.story-split__text p,
.gallery__lead p,
.lead-section__copy p,
.format-item p {
  color: var(--muted);
  line-height: 1.7;
}

.hero__lead {
  max-width: 29rem;
  margin-top: 1.35rem;
  font-size: 1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.hero__microcopy {
  max-width: 26rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.button,
.admin-nav__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  padding: 1rem 1.45rem;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.button:hover,
.admin-nav__button:hover {
  transform: translateY(-1px);
}

.button--primary,
.admin-nav__button {
  background: var(--accent);
  color: #fcfaf7;
}

.button--primary:hover,
.admin-nav__button:hover {
  background: var(--accent-dark);
}

.button--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.button--secondary:hover {
  border-color: var(--ink);
}

.button--full {
  width: 100%;
}

.hero-media {
  position: relative;
  min-height: 680px;
}

.hero-note {
  position: absolute;
  right: 1.2rem;
  bottom: -1.2rem;
  max-width: 15rem;
  padding: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-graphic {
  position: absolute;
  border: 2px solid rgba(0, 0, 0, 0.42);
  border-radius: 50%;
  pointer-events: none;
}

.hero-graphic--one {
  inset: 9% auto auto -8%;
  width: 68%;
  height: 82%;
  transform: rotate(-18deg);
}

.hero-graphic--two {
  inset: auto -6% 3% auto;
  width: 48%;
  height: 58%;
  transform: rotate(22deg);
}

.image-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.42)),
    linear-gradient(135deg, rgba(28, 28, 28, 0.28), rgba(220, 213, 205, 0.72));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, filter 220ms ease;
  filter: grayscale(0.15) contrast(1.08) saturate(0.82);
}

.image-panel:hover {
  transform: translateY(-3px);
  filter: grayscale(0.08) contrast(1.12) saturate(0.88);
}

.image-panel__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.18) contrast(1.06) saturate(0.84);
}

.image-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.12;
  background:
    linear-gradient(rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.image-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -16% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  z-index: 1;
  background: rgba(255, 255, 255, 0.08);
}

.image-panel--hero {
  height: 680px;
  min-height: 680px;
  clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
}

.image-panel--wide {
  min-height: 440px;
  margin-top: 5rem;
  clip-path: polygon(0 0, 100% 7%, 100% 100%, 0 92%);
}

.image-panel--immersive {
  min-height: 620px;
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
}

.image-panel--square {
  min-height: 340px;
}

.image-panel--tall {
  min-height: 540px;
  clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 94%);
}

.image-panel--offset {
  transform: translateY(4rem) rotate(-2deg);
}

.story-split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  align-items: start;
}

.story-split__text {
  padding-top: 4.5rem;
}

.story-split__text h2,
.manifesto h2,
.formats__intro h2,
.gallery__lead h2,
.lead-section__copy h2 {
  font-size: clamp(2.6rem, 5.5vw, 4.8rem);
}

.full-bleed {
  width: calc(100% + 10rem);
  margin-left: -5rem;
  position: relative;
}

.full-bleed::before,
.full-bleed::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.full-bleed::before {
  top: -2.5rem;
  left: 8%;
  width: 34%;
  height: 118%;
  transform: rotate(11deg);
}

.full-bleed::after {
  right: 6%;
  bottom: -2rem;
  width: 26%;
  height: 110%;
  transform: rotate(-14deg);
}

.manifesto {
  max-width: 900px;
}

.formats {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3.4rem;
  align-items: start;
}

.formats__list {
  display: grid;
  gap: 1rem;
}

.format-item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.format-item__index {
  display: inline-block;
  padding-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.format-item__body {
  display: grid;
  gap: 0.3rem;
}

.format-item h3 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.format-item p {
  margin: 0;
}

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 2.8rem;
  align-items: start;
}

.gallery__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.gallery__grid .image-panel--tall {
  grid-row: span 2;
}

.lead-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(340px, 0.9fr);
  gap: 3.5rem;
  align-items: start;
}

.lead-card,
.admin-card,
.auth-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lead-card {
  padding: 1.5rem;
}

.lead-form,
.auth-form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 0.45rem;
}

.form-row label,
.detail-list dt {
  font-size: 0.92rem;
  font-weight: 700;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.92rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: 2px solid rgba(0, 0, 0, 0.18);
  outline-offset: 1px;
}

.form-row--checkbox {
  gap: 0.6rem;
}

.checkbox {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--muted);
}

.checkbox input {
  width: auto;
  margin-top: 0.25rem;
}

.field-error {
  margin: 0;
  color: var(--danger-ink);
  font-size: 0.9rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.admin-shell {
  background: #efebe6;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 1rem;
}

.admin-title {
  margin: 0;
  font-size: 2rem;
}

.admin-main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 3rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.admin-grid--detail {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.admin-card,
.auth-card {
  padding: 1.5rem;
}

.admin-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  font-size: 0.88rem;
}

.stats-list,
.detail-list {
  display: grid;
  gap: 0.85rem;
}

.stat-item,
.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.5);
}

.detail-list dt,
.detail-list dd {
  margin: 0;
}

.auth-card {
  width: min(460px, calc(100% - 2rem));
  margin: 8vh auto 0;
}

@media (max-width: 900px) {
  main > section {
    margin-top: 5rem;
  }

  .hero,
  .story-split,
  .formats,
  .gallery,
  .lead-section,
  .admin-grid--detail {
    grid-template-columns: 1fr;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .admin-header,
  .admin-card__header {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 1rem;
  }

  .hero {
    min-height: auto;
  }

  .hero__copy h1 {
    font-size: 3.6rem;
  }

  .hero-media {
    min-height: auto;
  }

  .image-panel--hero,
  .image-panel--immersive {
    height: 420px;
    min-height: 420px;
  }

  .image-panel--wide,
  .image-panel--offset {
    margin-top: 0;
    transform: none;
  }

  .full-bleed {
    width: 100%;
    margin-left: 0;
  }

  .full-bleed::before,
  .full-bleed::after,
  .hero-graphic {
    display: none;
  }

  .hero-note {
    position: static;
    max-width: none;
  }
}
