:root {
  --ink: #0e0d0c;
  --ink-soft: #2a2622;
  --paper: #e9ebe8;
  --mist: #d8d0cb;
  --moss: #2c4a3e;
  --moss-deep: #1c3229;
  --brass: #b8956c;
  --brass-soft: #d4b892;
  --danger: #8b3a2f;
  --glass: rgba(14, 13, 12, 0.55);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --top: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(184, 149, 108, 0.14), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(44, 74, 62, 0.12), transparent 50%),
    linear-gradient(180deg, #e2e4df 0%, var(--paper) 35%, #dde0da 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.045;
  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");
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--top);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem 1rem;
  align-items: center;
  padding: 0 1.25rem;
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(233, 235, 232, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(14, 13, 12, 0.08);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.topbar.is-solid {
  background: rgba(233, 235, 232, 0.94);
  box-shadow: 0 10px 30px rgba(14, 13, 12, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.02rem;
}

.search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 0.35rem 0.45rem 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(14, 13, 12, 0.1);
  min-width: 0;
}

.search-ico {
  width: 1rem;
  height: 1rem;
  fill: var(--ink-soft);
  flex: 0 0 auto;
}

.search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  min-width: 0;
  font-size: 0.95rem;
}

.search-submit {
  flex: 0 0 auto;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0.8;
}

.nav-link:hover,
.nav-link.is-active {
  opacity: 1;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid rgba(14, 13, 12, 0.12);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.05rem;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -5px;
}

.nav-toggle-bars::after {
  top: 5px;
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  background: rgba(14, 13, 12, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}

.mobile-nav:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav[hidden] {
  display: none !important;
}

.mobile-nav-panel {
  width: min(340px, 88vw);
  height: 100%;
  max-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(44, 74, 62, 0.08), transparent 28%),
    var(--paper);
  border-left: 1px solid rgba(14, 13, 12, 0.08);
  padding: calc(0.85rem + env(safe-area-inset-top, 0)) 1.15rem calc(1.25rem + env(safe-area-inset-bottom, 0));
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: translateX(12px);
  transition: transform 0.3s var(--ease);
  box-shadow: -20px 0 50px rgba(14, 13, 12, 0.18);
  position: relative;
  z-index: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav:not([hidden]) .mobile-nav-panel {
  transform: none;
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mobile-nav-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}

.mobile-nav-close {
  padding: 0.45rem 0.7rem;
}

.mobile-nav-links {
  display: grid;
  gap: 0.15rem;
}

.mobile-nav-links a {
  display: block;
  padding: 0.95rem 0.2rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border-bottom: 1px solid rgba(14, 13, 12, 0.08);
}

.mobile-nav-links a.is-active {
  color: var(--moss-deep);
}

.mobile-nav-cta {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

body.is-nav-open {
  overflow: hidden;
}

/* Keep header under the drawer — never raise it above the menu */
body.is-nav-open .topbar {
  z-index: 40;
  pointer-events: none;
}

.btn-solid,
.btn-line,
.btn-ghost {
  border: 0;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-weight: 650;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover {
  background: var(--moss);
  transform: translateY(-1px);
}

.btn-line {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(14, 13, 12, 0.25);
}

.btn-line:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

/* Hero — full bleed, brand first */
.hero {
  position: relative;
  min-height: calc(100vh - var(--top));
  min-height: calc(100svh - var(--top));
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--paper);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    #1a1814 center / cover no-repeat;
  transform: scale(1.04);
  animation: heroDrift 18s var(--ease) infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  filter: saturate(1.05) contrast(1.05);
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 13, 12, 0.78) 0%, rgba(14, 13, 12, 0.35) 48%, rgba(14, 13, 12, 0.2) 100%),
    linear-gradient(0deg, rgba(14, 13, 12, 0.72) 0%, transparent 45%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 6vw, 5rem);
  max-width: 42rem;
  animation: rise 0.9s var(--ease) both;
}

.brand-lockup {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 0.95;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.2vw, 2.15rem);
  line-height: 1.15;
  max-width: 16ch;
}

.lede {
  margin: 1rem 0 1.5rem;
  max-width: 34ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(243, 239, 232, 0.86);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero .btn-solid {
  background: var(--paper);
  color: var(--ink);
}

.hero .btn-solid:hover {
  background: var(--brass-soft);
}

.hero .btn-line {
  color: var(--paper);
  border-color: rgba(243, 239, 232, 0.4);
}

.hero-scroll {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 2;
  writing-mode: vertical-rl;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  opacity: 0.7;
  animation: pulse 2.4s ease-in-out infinite;
}

/* Room strip */
.strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 1.25rem 1.25rem 0.25rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.room-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.7rem;
  align-items: center;
  min-width: 190px;
  padding: 0.4rem 0.85rem 0.4rem 0.4rem;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(14, 13, 12, 0.08);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.room-chip:hover,
.room-chip.is-on {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(44, 74, 62, 0.35);
}

.room-chip img {
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.room-chip strong {
  display: block;
  font-size: 0.92rem;
}

.room-chip span {
  font-size: 0.78rem;
  opacity: 0.65;
}

.feed-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding: 1.75rem 1.25rem 0.75rem;
}

.feed-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.feed-head p {
  margin: 0.25rem 0 0;
  opacity: 0.65;
}

.seg {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(14, 13, 12, 0.1);
  padding: 0.2rem;
}

.seg button,
.seg a {
  border: 0;
  background: transparent;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  opacity: 0.7;
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.seg button.is-on,
.seg a.is-on {
  background: var(--ink);
  color: var(--paper);
  opacity: 1;
}

.related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.25rem 0.5rem;
}

.related button,
.related a {
  border: 1px solid rgba(14, 13, 12, 0.12);
  background: rgba(255, 255, 255, 0.45);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: none;
  color: inherit;
}

.related button:hover,
.related a:hover {
  border-color: var(--moss);
}

/* Pinterest-style masonry — JS packs into shortest column; DOM order stays sequential */
.masonry {
  position: relative;
  display: block;
  width: 100%;
  padding: 0.5rem 1.25rem 2rem;
  min-height: 120px;
}

.pin {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  background: #ddd6cb;
  overflow: hidden;
  animation: pinIn 0.55s var(--ease) both;
}

.pin img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  transition: transform 0.7s var(--ease), filter 0.4s var(--ease);
}

.pin-hit {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  text-align: left;
  text-decoration: none;
  color: inherit;
}

.pin:hover img {
  transform: scale(1.04);
  filter: brightness(0.92);
}

.pin-veil {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 0.85rem 0.85rem;
  background: linear-gradient(transparent, rgba(14, 13, 12, 0.72));
  color: var(--paper);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.pin:hover .pin-veil,
.pin:focus-within .pin-veil {
  opacity: 1;
  transform: none;
}

.pin-title {
  font-weight: 650;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pin-save {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 0.45rem 0.75rem;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.25s;
}

.pin:hover .pin-save,
.pin:focus-within .pin-save,
.pin-save.is-saved {
  opacity: 1;
  transform: none;
}

.pin-save.is-saved {
  background: var(--moss);
  color: var(--paper);
}

.load-more-wrap {
  text-align: center;
  padding: 0 1.25rem 3rem;
}

.status {
  opacity: 0.6;
  font-size: 0.9rem;
}

/* Full photo detail page */
.photo-page {
  padding: 0 0 3rem;
  animation: pinIn 0.45s var(--ease) both;
}

.photo-page-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem 0.5rem;
}

.photo-page-crumb {
  margin: 0;
  opacity: 0.6;
  font-size: 0.9rem;
}

.photo-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem 1.5rem;
  align-items: start;
}

.photo-stage {
  margin: 0;
  background: #d8d0c4;
  overflow: hidden;
  min-height: 420px;
}

.photo-stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(78vh, 900px);
  object-fit: contain;
  background: #e2e5e3;
}

.photo-info {
  position: sticky;
  top: calc(var(--top) + 0.75rem);
  padding: 0.25rem 0.25rem 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--moss);
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.photo-info h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.15;
}

.muted {
  opacity: 0.65;
  font-size: 0.92rem;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 0.5rem;
}

.photo-sections {
  display: grid;
  gap: 2rem;
  padding: 0.5rem 1.25rem 2rem;
}

.related-label {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.web-divider {
  margin: 0.25rem 1.25rem 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

.sheet-related-chips {
  padding: 0.75rem 0 0;
}

.pin.is-web::after {
  content: "";
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background-color: rgba(14, 13, 12, 0.72);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f7f3eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.85rem 0.85rem;
  pointer-events: none;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.related-grid--page {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.related-grid--web {
  max-height: none;
  overflow: visible;
  margin-bottom: 0.75rem;
}

.related-grid button,
.related-grid a {
  padding: 0;
  border: 0;
  background: #ddd6cb;
  cursor: pointer;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
}

.related-grid img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}

.related-grid--page img {
  height: 160px;
}

.related-grid button:hover img,
.related-grid a:hover img {
  transform: scale(1.06);
}

.sheet-more-similar {
  width: min(320px, 100%);
  margin: 0 0 1rem;
}

@media (max-width: 900px) {
  .photo-layout {
    grid-template-columns: 1fr;
  }

  .photo-info {
    position: static;
  }

  .photo-stage {
    min-height: 260px;
  }

  .photo-stage img {
    max-height: 70vh;
  }
}

/* Rooms / boards card grid (separate from pin masonry) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  padding: 0.5rem 1.25rem 2rem;
  position: relative;
}

.cards-grid[hidden] {
  display: none !important;
}

.masonry[hidden] {
  display: none !important;
}

.board-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(14, 13, 12, 0.08);
  cursor: pointer;
  text-align: left;
  padding: 0;
  overflow: hidden;
  transition: transform 0.3s var(--ease);
  text-decoration: none;
  color: inherit;
  display: block;
}

.board-card:hover {
  transform: translateY(-3px);
}

.board-card .cover {
  height: 150px;
  background: #d8d0c4 center / cover no-repeat;
}

.board-card .body {
  padding: 0.85rem 1rem 1.1rem;
}

.board-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.board-card p {
  margin: 0.25rem 0 0;
  opacity: 0.65;
  font-size: 0.85rem;
}

/* Modal */
.modal {
  border: 0;
  padding: 0;
  width: min(420px, calc(100vw - 2rem));
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(14, 13, 12, 0.28);
}

.modal::backdrop {
  background: rgba(14, 13, 12, 0.45);
}

.modal form {
  padding: 1.35rem;
  display: grid;
  gap: 0.85rem;
}

.modal h3 {
  margin: 0;
  font-family: var(--font-display);
}

.modal label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.modal input {
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(14, 13, 12, 0.15);
  background: rgba(255, 255, 255, 0.7);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.board-pick {
  display: grid;
  gap: 0.5rem;
}

.board-pick button {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(14, 13, 12, 0.12);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-weight: 600;
}

.board-pick button:hover {
  border-color: var(--moss);
  background: rgba(44, 74, 62, 0.08);
}

.is-hidden-hero .hero {
  display: none;
}

@keyframes pinIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroDrift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, -1%, 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.9;
  }
}

@media (max-width: 980px) and (min-width: 861px) {
  .nav {
    gap: 0.55rem;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  .nav .btn-solid {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
  }

  .search {
    max-width: 420px;
  }
}

@media (max-width: 860px) {
  :root {
    --top: 118px;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 0;
    padding: 0.65rem 0.85rem 0.7rem;
    gap: 0.55rem 0.65rem;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .nav-toggle {
    display: grid;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .nav {
    display: none;
  }

  .search {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    margin: 0;
    padding: 0.45rem 0.55rem 0.45rem 0.75rem;
  }

  .search input {
    font-size: 16px; /* avoid iOS zoom on focus */
  }

  .search input::placeholder {
    color: rgba(14, 13, 12, 0.45);
  }

  .search-submit {
    display: none;
  }

  .feed-head {
    flex-direction: column;
    align-items: start;
  }

  .seg {
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 420px) {
  .brand-name {
    letter-spacing: 0.06em;
  }

  .search {
    padding-left: 0.65rem;
  }
}

/* Content pages (journal, about, legal) */
.content-page {
  min-height: calc(100vh - var(--top) - 12rem);
  padding: 1.5rem 1.25rem 3rem;
}

.content-shell {
  width: min(720px, 100%);
  margin: 0 auto;
}

.content-shell.is-index {
  width: min(1100px, 100%);
}

.article-hero {
  margin: 0 0 2rem;
  overflow: hidden;
  background: #d8d0c4;
}

.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-figure {
  margin: 1.75rem 0;
  background: #e2e5e3;
}

.article-figure.is-wide {
  margin-left: max(-1.25rem, calc(50% - 50vw + 1.25rem));
  margin-right: max(-1.25rem, calc(50% - 50vw + 1.25rem));
  width: auto;
}

@media (min-width: 860px) {
  .article-figure.is-wide {
    margin-left: -4rem;
    margin-right: -4rem;
  }
}

.article-figure img {
  width: 100%;
  max-height: min(70vh, 640px);
  object-fit: cover;
}

.article-figure figcaption {
  margin: 0;
  padding: 0.65rem 0.15rem 0;
  font-size: 0.85rem;
  line-height: 1.45;
  opacity: 0.65;
}

.article-figure.is-link {
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.article-figure.is-link:hover img {
  filter: brightness(0.97);
}

.article-quote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.1rem;
  border-left: 3px solid var(--brass);
}

.article-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.45;
  opacity: 0.9;
}

.article-list {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
  line-height: 1.65;
}

.article-list li {
  margin: 0.35rem 0;
}

.content-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss);
}

.content-shell > h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.content-dek {
  margin: 0 0 1.75rem;
  font-size: 1.1rem;
  line-height: 1.55;
  opacity: 0.78;
  max-width: 40rem;
}

.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0 0 2rem;
  font-size: 0.85rem;
  opacity: 0.65;
}

.article-body h2 {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.article-body p {
  margin: 0 0 1.1rem;
  line-height: 1.7;
  font-size: 1.02rem;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 2rem 0 0;
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.journal-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.journal-card-cover {
  display: block;
  margin-bottom: 1rem;
  overflow: hidden;
  background: #d8d0c4;
  aspect-ratio: 4 / 3;
}

.journal-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.journal-card:hover .journal-card-cover img {
  transform: scale(1.04);
}

.journal-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.journal-card-tone {
  height: 8px;
  margin-bottom: 1rem;
  background: var(--moss);
}

.journal-card-tone.is-mist { background: #9aa39a; }
.journal-card-tone.is-brass { background: var(--brass); }
.journal-card-tone.is-ink { background: var(--ink); }
.journal-card-tone.is-moss { background: var(--moss); }

.journal-card h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.2;
}

.journal-card p {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.72;
  flex: 1;
}

.journal-card-meta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
}

.journal-related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.photo-journal {
  margin-top: 2rem;
  padding-top: 0.5rem;
}

.static-sections {
  display: grid;
  gap: 1.5rem;
}

.static-sections h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.static-sections p {
  margin: 0;
  line-height: 1.65;
  opacity: 0.85;
}

/* Site footer */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid rgba(14, 13, 12, 0.1);
  background:
    linear-gradient(180deg, rgba(44, 74, 62, 0.06), transparent 40%),
    rgba(226, 228, 223, 0.9);
}

.footer-inner {
  width: min(1100px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.75rem 0 1.75rem;
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) 2fr;
  gap: 2rem 3rem;
}

.footer-tag {
  margin: 0.85rem 0 0;
  max-width: 16rem;
  line-height: 1.5;
  opacity: 0.7;
  font-size: 0.95rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.footer-col {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.footer-col h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}

.footer-col a {
  font-size: 0.92rem;
  opacity: 0.85;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}

.footer-col a:hover {
  opacity: 1;
  color: var(--moss-deep);
}

.footer-bottom {
  width: min(1100px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1rem 0 1.75rem;
  border-top: 1px solid rgba(14, 13, 12, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.82rem;
  opacity: 0.6;
}

.footer-bottom p {
  margin: 0;
}

body.is-photo-page .site-footer,
body.is-content-page .site-footer {
  margin-top: 2rem;
}

@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
}
