/* Debal site — editorial / kitchen-table, photo-led */

:root {
  --paper: #f3efe6;
  --paper-2: #ebe4d6;
  --ink: #1a1612;
  --soot: #0e0c0a;
  --muted: #5c534a;
  --faint: #8a7f72;
  --line: #d4c8b4;
  --gold: #c9921a;
  --gold-bright: #e8a22b;
  --clay: #c43c24;
  --display: "Fraunces", "Times New Roman", serif;
  --body: "Source Serif 4", "Georgia", serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

/* —— top —— */
.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.mark span {
  color: var(--gold-bright);
}

.top-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  flex: 1;
  text-align: center;
}

.top-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

.top-nav {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-shrink: 0;
}

.top-nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  color: var(--ink);
}

.top-nav a.top-link {
  color: var(--ink);
}

/* —— design board —— */
.page-design .top-note {
  display: none;
}

.design-main {
  padding: 48px clamp(20px, 4vw, 48px) 80px;
  max-width: 960px;
}

.design-title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 16px;
}

.design-lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 12px;
  line-height: 1.55;
}

.design-lede code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 2px;
}

.design-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 36px;
}

.design-hero-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 28px;
  padding: 24px 22px 20px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 2px;
  max-width: 560px;
}

.design-hero-cta .design-card-kicker {
  color: var(--gold-bright);
}

.design-hero-cta .design-card-title {
  color: #fff;
}

.design-hero-cta .design-card-body {
  color: rgba(255, 255, 255, 0.72);
}

.design-hero-cta .design-card-cta {
  color: var(--gold-bright);
}

.design-hero-cta:hover {
  box-shadow: 10px 12px 0 color-mix(in srgb, var(--gold) 45%, transparent);
}

.design-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.design-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  padding: 22px 20px 18px;
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.design-card:hover {
  border-color: var(--ink);
  box-shadow: 8px 10px 0 color-mix(in srgb, var(--ink) 6%, transparent);
}

.design-card-hot {
  border-color: var(--gold);
  background: linear-gradient(165deg, #fffdf7 0%, #fff 55%);
}

.design-card-kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.design-card-hot .design-card-kicker {
  color: var(--gold);
}

.design-card-title {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.design-card-body {
  flex: 1;
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.5;
}

.design-card-cta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 8px;
}

.design-notes {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  max-width: 540px;
}

.design-notes h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 14px;
}

.design-notes ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.design-notes li {
  margin-bottom: 10px;
}

.design-notes-foot {
  margin: 20px 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}

.design-notes-foot a {
  color: var(--ink);
}

.chapter {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 12px;
}

/* —— photos —— */
.hero-photo {
  margin: 0;
  position: relative;
}

.hero-photo img {
  width: 100%;
  max-height: min(72vh, 640px);
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
}

.hero-photo figcaption {
  position: absolute;
  left: clamp(20px, 4vw, 48px);
  bottom: 18px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0e9dc;
  background: rgba(14, 12, 10, 0.55);
  padding: 8px 12px;
  backdrop-filter: blur(4px);
}

.duo {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) 56px;
  align-items: stretch;
}

.duo-photo {
  margin: 0;
  padding-top: 40px;
}

.duo-photo img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 10px 12px 0 color-mix(in srgb, var(--ink) 8%, transparent);
}

.duo-photo figcaption {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 10px;
}

.wide-photo {
  margin: 0 0 72px;
  position: relative;
  max-height: 70vh;
  overflow: hidden;
}

.wide-photo img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  filter: saturate(0.9);
}

.wide-caption {
  position: absolute;
  right: clamp(20px, 5vw, 56px);
  bottom: 28px;
  max-width: 280px;
  background: var(--paper);
  padding: 20px 22px;
  border: 1px solid var(--line);
  box-shadow: 8px 10px 0 color-mix(in srgb, var(--ink) 7%, transparent);
}

.wide-caption p {
  margin: 0;
}

.wide-caption p:last-child {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 6px;
  line-height: 1.25;
}

.note-row {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr;
  gap: 28px;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 48px) 72px;
  max-width: 1000px;
  margin: 0 auto;
}

.key-photo {
  margin: 0;
  border: 1px solid var(--line);
  box-shadow: 8px 10px 0 color-mix(in srgb, var(--gold) 25%, transparent);
}

.key-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* —— poster —— */
.poster {
  padding: clamp(40px, 8vw, 72px) clamp(20px, 4vw, 48px) 48px;
  max-width: 1100px;
}

.chapter {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 20px;
}

.poster h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 36px;
  max-width: 14ch;
}

.poster h1 .gold {
  color: var(--gold);
  font-style: italic;
  font-weight: 500;
}

.poster-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 32px 48px;
  align-items: start;
  max-width: 900px;
}

.poster-lede {
  margin: 0;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38ch;
}

.marginalia {
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--muted);
}

.marginalia p {
  margin: 0 0 6px;
}

.marginalia .hand {
  margin-top: 14px;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* —— pull —— */
.pull {
  margin: 40px 0 0;
  padding: 36px 28px 32px;
  background: var(--soot);
  color: #f0e9dc;
  border-radius: 4px 4px 40px 4px;
  align-self: end;
}

.pull blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.pull figcaption {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a8f7e;
}

/* —— sheets —— */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 clamp(20px, 4vw, 48px) 72px;
  max-width: 1100px;
}

.sheet {
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 32px 28px 36px;
  border-radius: 2px;
  box-shadow: 6px 8px 0 color-mix(in srgb, var(--ink) 6%, transparent);
}

.sheet.dark {
  background: var(--ink);
  color: #efe8db;
  border-color: var(--ink);
  box-shadow: 6px 8px 0 color-mix(in srgb, var(--gold) 35%, transparent);
}

.sheet h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  line-height: 1.2;
}

.sheet p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.02rem;
}

.sheet.dark p,
.sheet.dark li {
  color: #cfc4b2;
}

.sheet em {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink);
}

.sheet.dark em {
  color: var(--gold-bright);
}

.stamp {
  display: inline-block;
  margin-top: 8px !important;
  font-family: var(--mono) !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay) !important;
  border: 1.5px solid var(--clay);
  padding: 6px 10px;
  transform: rotate(-1.5deg);
}

.street-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.street-list li {
  margin: 0 0 22px;
  font-size: 1rem;
  line-height: 1.5;
}

.street-list li:last-child {
  margin-bottom: 0;
}

.street-list span {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 6px;
}

/* —— ledger —— */
.ledger {
  padding: 16px clamp(20px, 4vw, 48px) 80px;
  max-width: 900px;
}

.ledger header {
  margin-bottom: 28px;
}

.ledger h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}

.ledger dl {
  margin: 0;
  border-top: 2px solid var(--ink);
}

.ledger dl > div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.ledger dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 3px;
}

.ledger dd {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink);
}

/* —— note —— */
.note-paper {
  background: #fffdf7;
  border: 1px solid var(--line);
  padding: 36px 32px 32px;
  box-shadow:
    0 1px 0 var(--line),
    12px 16px 0 color-mix(in srgb, var(--ink) 5%, transparent);
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    color-mix(in srgb, var(--gold) 18%, transparent) 31px,
    color-mix(in srgb, var(--gold) 18%, transparent) 32px
  );
  background-position: 0 48px;
}

.note-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 12px;
}

.note-paper h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  background: #fffdf7;
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 2px;
}

.note-paper ul {
  margin: 16px 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.note-paper li {
  margin-bottom: 10px;
}

.note-sign {
  margin: 24px 0 0;
  font-family: var(--display);
  font-style: italic;
  color: var(--faint);
  text-align: right;
}

/* —— ticker —— */
.places {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0 18px;
  overflow: hidden;
  background: var(--paper-2);
}

.places > p {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 12px;
  padding: 0 clamp(20px, 4vw, 48px);
}

.ticker {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: scroll 28s linear infinite;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  padding-left: 48px;
}

.ticker span::after {
  content: "·";
  margin-left: 40px;
  color: var(--gold);
}

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

/* —— close —— */
.close {
  padding: 80px clamp(20px, 4vw, 48px) 48px;
  max-width: 720px;
}

.close h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 18px;
}

.close-lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 36ch;
  margin: 0 0 28px;
}

.close-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn-solid {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 22px;
  background: var(--clay);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
}

.btn-line {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
}

.colophon {
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--faint);
  margin: 0;
}

.colophon a {
  color: var(--ink);
}

.end {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  padding: 28px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
}

@media (max-width: 780px) {
  .top-note {
    display: none;
  }

  .poster-grid,
  .columns,
  .duo,
  .note-row,
  .ledger dl > div {
    grid-template-columns: 1fr;
  }

  .poster h1 {
    max-width: none;
  }

  .duo-photo {
    padding-top: 24px;
  }

  .pull {
    border-radius: 2px;
    margin-top: 24px;
  }

  .wide-caption {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 0 clamp(20px, 4vw, 48px);
    margin-top: -24px;
    max-width: none;
  }

  .wide-photo {
    max-height: none;
  }

  .wide-photo img {
    max-height: 55vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker {
    animation: none;
  }
}
