/* ============================================================
   NORTHLESS — site stylesheet
   Palette, type, and layout tokens are defined once here.
   Edit the :root variables to retune the whole site.
   ============================================================ */

:root {
  /* Palette */
  --bg: #0e0f11;          /* near-black charcoal */
  --panel: #15171b;       /* slightly lifted surface */
  --ink: #e7e2d6;         /* faded ivory — primary text */
  --ink-dim: #9b968a;     /* dimmed ivory — secondary text */
  --slate: #6e7681;       /* captions, metadata */
  --amber: #b98b52;       /* dusty amber — the only accent */
  --line: rgba(231, 226, 214, 0.12);

  /* Type */
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;

  /* Rhythm */
  --measure: 38rem;       /* comfortable reading width */
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

/* ---------- Reset & base ---------- */

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Film grain — the whole site sits under a faint animated grain.
   Pure CSS/SVG, no images. Disabled for reduced-motion users. */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 2%); }
  40% { transform: translate(2%, -1%); }
  60% { transform: translate(-1%, -2%); }
  80% { transform: translate(1%, 2%); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }

a { color: var(--ink); text-decoration: none; transition: color 0.3s ease; }
a:hover, a:focus-visible { color: var(--amber); }
a:focus-visible { outline: 1px solid var(--amber); outline-offset: 4px; }

/* Small-caps utility label */
.label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ---------- Header / nav ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--gutter);
  background: linear-gradient(to bottom, rgba(14,15,17,0.9), transparent);
}

.site-logo {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-nav { display: flex; gap: 2rem; }

.site-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

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

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; color: var(--ink); font-size: 1.4rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: 0;
    background: rgba(14,15,17,0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { font-size: 1rem; }
}

/* ---------- Letterboxed hero (homepage signature) ---------- */

.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 0 var(--gutter);
}

/* Cinematic bars */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: clamp(2.5rem, 8vh, 5rem);
  background: #000;
  z-index: 2;
}
.hero::before { top: 0; }
.hero::after { bottom: 0; }

.hero-line {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 400;
  font-style: italic;
  max-width: 30ch;
  color: var(--ink);
  opacity: 0;
  animation: heroFade 2.4s ease 0.6s forwards;
}

.hero-attrib {
  margin-top: 2rem;
  opacity: 0;
  animation: heroFade 2s ease 2s forwards;
}

@keyframes heroFade { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .hero-line, .hero-attrib { opacity: 1; animation: none; }
}

.hero-scroll {
  position: absolute;
  bottom: clamp(3.5rem, 10vh, 6.5rem);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--slate);
  z-index: 3;
}

/* ---------- Page scaffolding ---------- */

.page {
  padding: 10rem var(--gutter) 6rem;
  max-width: 72rem;
  margin: 0 auto;
}

.page-title { margin-bottom: 0.75rem; }
.page-intro { color: var(--ink-dim); max-width: var(--measure); margin-bottom: 4rem; }

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 4rem 0;
}

/* Fade-in on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Homepage section links ---------- */

.index-list { margin-top: 4rem; }

.index-item {
  display: block;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}
.index-item:last-child { border-bottom: 1px solid var(--line); }

.index-item h2 { transition: color 0.3s ease, transform 0.4s ease; }
.index-item:hover h2 { color: var(--amber); transform: translateX(0.5rem); }
.index-item p { color: var(--slate); margin-top: 0.4rem; max-width: var(--measure); }

/* ---------- Poetry ---------- */

.poem {
  max-width: var(--measure);
  margin: 0 auto 7rem;
}

.poem-title {
  margin-bottom: 2rem;
  color: var(--ink);
}

.poem-body {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.9;
  white-space: pre-line; /* keeps line breaks as written */
}

.poem-meta { margin-top: 2rem; }

/* ---------- Stories ---------- */

.story-card {
  display: block;
  padding: 3rem;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 2rem;
  transition: border-color 0.3s ease;
}
.story-card:hover { border-color: var(--amber); }
.story-card h2 { margin-bottom: 0.6rem; }
.story-card p { color: var(--ink-dim); max-width: var(--measure); }
.story-card .label { display: inline-block; margin-top: 1.5rem; color: var(--amber); }

/* Story reading page */
.story-body {
  max-width: var(--measure);
  margin: 0 auto;
}
.story-body p { margin-bottom: 1.4rem; }
.story-body .dialogue { color: var(--ink); }

.back-link { display: inline-block; margin-bottom: 3rem; }

/* ---------- Photography ---------- */

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
}

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2.39 / 1; /* anamorphic widescreen */
  background: var(--panel);
  overflow: hidden;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85) contrast(1.04);
  transition: transform 1.2s ease;
}
.frame:hover img { transform: scale(1.02); }

/* Placeholder treatment until real photographs are added */
.frame-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame-empty span { color: var(--slate); font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase; }

.frame-caption { margin-top: 0.9rem; }

/* ---------- Shop ---------- */

.shop-stage {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: var(--measure);
}

.shop-stage h2 { font-style: italic; margin-bottom: 1.5rem; }
.shop-stage p { color: var(--ink-dim); margin-bottom: 2.5rem; }

.notify-form { display: flex; gap: 0; max-width: 26rem; width: 100%; }

.notify-form input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-right: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
}
.notify-form input:focus { outline: none; border-color: var(--amber); }

.notify-form button {
  background: none;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0 1.4rem;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.notify-form button:hover { background: var(--amber); color: var(--bg); }

/* ---------- About ---------- */

.about-body { max-width: var(--measure); }
.about-body p { margin-bottom: 1.5rem; color: var(--ink-dim); }
.about-body p:first-of-type { color: var(--ink); font-family: var(--serif); font-size: 1.35rem; line-height: 1.7; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.footer-social { display: flex; gap: 2rem; }
.footer-social a { font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--slate); }
.footer-social a:hover { color: var(--amber); }

.footer-mark { color: var(--slate); font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase; }

/* ---------- Art: originals & prints ---------- */

.art-tabs { display: flex; gap: 2rem; margin: -2rem 0 4rem; }
.art-tabs a {
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-dim); padding-bottom: 0.4rem; border-bottom: 1px solid var(--line);
}
.art-tabs a:hover { color: var(--amber); border-color: var(--amber); }

.art-section { scroll-margin-top: 6rem; }
.art-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; }
.art-section-note { color: var(--ink-dim); margin: 0.5rem 0 2.5rem; }

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 3rem 2rem;
}

.art-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}
.art-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s ease, opacity 0.4s ease; }
.art-card:hover .art-frame img { transform: scale(1.02); }
.art-frame-empty { display: flex; align-items: center; justify-content: center; }
.art-frame-empty > span:first-child { color: var(--slate); font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; }

.art-info { padding-top: 1.1rem; }
.art-title { margin-bottom: 0.25rem; }
.art-meta { color: var(--slate); font-size: 0.88rem; line-height: 1.5; }

.art-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin-top: 1.1rem; }
.art-price { font-family: var(--serif); font-size: 1.35rem; }

.buy-btn {
  display: inline-block;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase;
  padding: 0.75rem 1.2rem;
  transition: background 0.3s ease, color 0.3s ease;
}
a.buy-btn:hover, a.buy-btn:focus-visible { background: var(--amber); color: var(--bg); }
.buy-btn-quiet { border-color: var(--line); color: var(--ink-dim); }
.buy-btn-off { border-color: var(--line); color: var(--slate); cursor: default; }

.size-select {
  margin-top: 0.9rem; width: 100%;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line);
  font-family: var(--sans); font-size: 0.9rem; padding: 0.65rem 0.8rem;
}
.size-select:focus { outline: none; border-color: var(--amber); }

/* Sold originals stay on the wall, dimmed and marked */
.sold-flag {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--bg); color: var(--amber);
  border: 1px solid var(--amber);
  font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase;
  padding: 0.35rem 0.7rem 0.35rem 0.9rem;
}
.is-sold .art-frame img { opacity: 0.45; filter: grayscale(1); }
.is-sold .art-title, .is-sold .art-price { color: var(--slate); }
.is-sold .art-price { text-decoration: line-through; }
.sold-note { color: var(--amber); }

.art-empty { color: var(--slate); }

.art-terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 2.5rem; }
.art-terms p:not(.label) { color: var(--ink-dim); font-size: 0.95rem; margin-top: 0.6rem; }
.art-terms a { color: var(--amber); }

/* ---------- Orbit: the oval carousel ---------- */

.orbit { --orbit-w: clamp(9.5rem, 44vw, 15rem); margin-inline: calc(var(--gutter) * -0.5); }
.orbit.orbit-wide { --orbit-w: clamp(13rem, 66vw, 26rem); }

.orbit-stage {
  position: relative;
  height: calc(var(--orbit-w) * 1.25 + 7.5rem);
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  user-select: none; -webkit-user-select: none;
  outline: none;
}
.orbit-wide .orbit-stage { height: calc(var(--orbit-w) * 0.42 + 8rem); }
.orbit-stage.is-dragging { cursor: grabbing; }
.orbit-stage:focus-visible { box-shadow: inset 0 0 0 1px var(--line); }

.orbit-item {
  position: absolute; top: 50%; left: 50%;
  width: var(--orbit-w);
  background: none; border: 0; padding: 0;
  color: inherit; font: inherit; text-align: left;
  cursor: pointer;
  will-change: transform, opacity;
  -webkit-tap-highlight-color: transparent;
}
.orbit-stage.is-dragging .orbit-item { cursor: grabbing; }
.orbit-item:focus-visible { outline: 1px solid var(--amber); outline-offset: 6px; }

.orbit-face { display: block; }
.orbit-face .art-frame { display: flex; }
.orbit-wide .orbit-face .art-frame { aspect-ratio: 2.39 / 1; }
.orbit-face-title {
  display: block; margin-top: 0.8rem;
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.orbit-face-sub { display: block; color: var(--slate); font-size: 0.85rem; margin-top: 0.15rem; }
.orbit-face.is-sold .orbit-face-title { color: var(--slate); }
.orbit-face.is-sold .orbit-face-sub { color: var(--amber); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.68rem; margin-top: 0.4rem; }
.orbit-item:not(.is-front) .orbit-face-title,
.orbit-item:not(.is-front) .orbit-face-sub { opacity: 0; }
.orbit-face-title, .orbit-face-sub { transition: opacity 0.3s ease; }

.poem-face {
  display: flex; flex-direction: column; gap: 0.9rem;
  aspect-ratio: 4 / 5;
  background: var(--panel); border: 1px solid var(--line);
  padding: 1.4rem 1.2rem; overflow: hidden;
}
.poem-face-title { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; }
.poem-face-lines {
  flex: 1; overflow: hidden; white-space: pre-line;
  color: var(--ink-dim); font-family: var(--serif); font-size: 0.98rem; line-height: 1.55;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}
.poem-face-more { color: var(--amber); }

.orbit-controls { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 0.25rem; }
.orbit-nav, .viewer-nav {
  width: 2.75rem; height: 2.75rem;
  background: none; border: 1px solid var(--line); color: var(--ink);
  font-family: var(--serif); font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.orbit-nav:hover:not(:disabled), .viewer-nav:hover { border-color: var(--amber); color: var(--amber); }
.orbit-nav:disabled { opacity: 0.3; cursor: default; }
.orbit-status { min-width: 4rem; text-align: center; }

/* ---------- Viewer: the enlarged piece with its ordering options ---------- */

html.viewer-open { overflow: hidden; }
.viewer {
  width: min(60rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  margin: auto; padding: 0;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line);
  overflow: hidden;
}
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: rgba(5, 6, 7, 0.86); }
.viewer-bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line);
}
.viewer-nav { width: 2.5rem; height: 2.5rem; }
.viewer-count { min-width: 3.5rem; text-align: center; }
.viewer-close {
  margin-left: auto; background: none; border: 0; color: var(--ink-dim); cursor: pointer;
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase;
  padding: 0.9rem 0.6rem;
}
.viewer-close:hover { color: var(--amber); }
.viewer-body { overflow-y: auto; padding: clamp(1rem, 4vw, 2.25rem); overscroll-behavior: contain; }

.viewer .art-card { display: grid; gap: 1.5rem; }
.viewer .art-frame { aspect-ratio: auto; background: none; border: 0; }
.viewer .art-frame img { width: 100%; height: auto; max-height: 68dvh; object-fit: contain; }
.viewer .art-frame-empty { aspect-ratio: 4 / 5; max-height: 55dvh; background: var(--panel); border: 1px solid var(--line); width: 100%; }
.viewer .art-card:hover .art-frame img { transform: none; }
.viewer .art-info { padding-top: 0; }
.viewer .art-title { font-size: clamp(1.6rem, 4vw, 2.2rem); }
@media (min-width: 720px) {
  .viewer .art-card { grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 1fr); align-items: start; gap: 2.5rem; }
  .viewer .art-info { position: sticky; top: 0; }
}
.viewer .poem { margin: 0 auto; max-width: var(--measure); opacity: 1; transform: none; }
.viewer .poem-title { font-size: clamp(1.8rem, 5vw, 2.6rem); }

@media (prefers-reduced-motion: reduce) {
  .orbit-face-title, .orbit-face-sub { transition: none; }
}

.poem-epigraph { color: var(--slate); font-style: italic; margin: -1.25rem 0 2rem; }
.poem-body em { font-style: italic; }
.orbit-jump {
  display: block; margin: 1.25rem auto 0; width: min(100%, 20rem);
  background: var(--panel); color: var(--ink-dim);
  border: 1px solid var(--line);
  font-family: var(--serif); font-size: 1rem; padding: 0.6rem 0.8rem;
}
.orbit-jump:focus { outline: none; border-color: var(--amber); color: var(--ink); }

/* Rotating intro lines (js/hero.js) */
.hero-line { white-space: pre-line; }
a.hero-attrib { display: block; }
a.hero-attrib:hover { color: var(--amber); }
.hero-rotating .hero-line, .hero-rotating .hero-attrib { animation: none; opacity: 1; transition: opacity 1.4s ease; }
.hero-rotating.is-out .hero-line, .hero-rotating.is-out .hero-attrib { opacity: 0; }

/* ---------- Header while scrolling ----------
   The page slides behind the bar; the current section appears beside the wordmark. */
.site-header { transition: padding 0.4s ease, border-color 0.4s ease; border-bottom: 1px solid transparent; }
/* The blur lives on a layer behind the bar's contents, so the phone menu
   (a fixed panel inside the header) still covers the whole screen. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(14, 15, 17, 0.82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.4s ease;
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  padding-top: 0.9rem; padding-bottom: 0.9rem;
}
/* Carousel pieces stack among themselves, never above the header */
.orbit-stage { isolation: isolate; }
.site-logo { flex: none; }
.site-here {
  flex: 1 1 0; min-width: 0;
  margin: 0 1.25rem 0 1rem; padding-left: 1rem;
  border-left: 1px solid var(--line);
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(0.6rem);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.site-header.shows-here .site-here { opacity: 1; transform: none; }
.site-nav, .nav-toggle { flex: none; }
@media (max-width: 860px) { .nav-toggle { position: relative; z-index: 2; } }
@media (prefers-reduced-motion: reduce) { .site-header, .site-here { transition: none; } }

/* Story extras: journal entries, lists, content note */
.story-body .journal { border-left: 1px solid var(--line); padding-left: 1.25rem; margin: 2.5rem 0; font-style: italic; }
.story-body .journal p { margin-bottom: 0.5rem; }
.story-body .journal .journal-date { font-style: normal; color: var(--amber); margin-bottom: 1rem; }
.story-body .story-list { margin: 0 0 1.4rem 1.4rem; }
.story-body .story-list li { margin-bottom: 0.6rem; }
.story-note { color: var(--slate); }
.story-card .story-note { display: block; margin-top: 1rem; color: var(--slate); }
p.story-note { margin: -2.5rem 0 3rem; }

/* Art page intro image: fills the top of the page on any screen.
   The whole picture always shows (never cropped). On a tall phone it spans the
   full width; on a wide screen it fills the height and its dark wall blends
   into the page at the sides. */
.art-intro {
  --bar: 4.75rem;                         /* room for the header */
  width: 100vw;
  margin: -10rem 0 4rem 50%;
  transform: translateX(-50%);
  padding-top: var(--bar);
  background: #0e0e0e;
}
.art-intro { overflow: hidden; }
.art-intro-wall {
  position: relative; margin: 0 auto;
  width: min(100vw, calc((100vh - var(--bar)) * 4 / 3));
  width: min(100vw, calc((100svh - var(--bar)) * 4 / 3));
  aspect-ratio: 4 / 3;
}
.art-intro img {
  display: block; width: 100%; height: 100%;
  /* soften the bottom and side edges so the wall melts into the page */
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent), linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(to bottom, #000 88%, transparent), linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
/* Each frame on the wall is a link to its listing */
.art-spot { position: absolute; display: block; border: 1px solid transparent; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.art-spot:hover, .art-spot:focus-visible { border-color: var(--amber); box-shadow: 0 0 2.5rem rgba(185, 139, 82, 0.28); outline: none; z-index: 2; }
.art-spot-tip {
  position: absolute; left: 50%; top: calc(100% + 0.5rem); transform: translate(-50%, 0.4rem);
  display: flex; flex-direction: column; gap: 0.2rem;
  width: max-content; max-width: 16rem;
  padding: 0.75rem 0.9rem;
  background: rgba(8, 9, 10, 0.95); border: 1px solid var(--line);
  color: var(--ink-dim); font-size: 0.8rem; line-height: 1.35; text-align: left;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
}
.art-spot-tip strong { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; color: var(--ink); }
.art-spot:hover .art-spot-tip, .art-spot:focus-visible .art-spot-tip { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .art-spot-tip { display: none; } }

/* Original | Print switch in the opened view */
.kind-switch { display: inline-flex; border: 1px solid var(--line); margin-bottom: 1.25rem; }
.kind-switch-btn {
  background: none; border: 0; color: var(--ink-dim); cursor: pointer;
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 0.6rem 1rem;
}
.kind-switch-btn[aria-pressed="true"] { background: var(--amber); color: var(--bg); cursor: default; }
.kind-switch-btn:not([aria-pressed="true"]):hover { color: var(--amber); }


/* ---------- Hover: the piece comes closer and shows its options ---------- */
.orbit-face { transition: transform 0.45s cubic-bezier(.2,.7,.2,1); transform-origin: 50% 45%; }
.orbit-face .art-frame { position: relative; }
.orbit-options {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 2.2rem 0.9rem 0.8rem;
  background: linear-gradient(to top, rgba(8, 9, 10, 0.94) 55%, transparent);
  color: var(--ink); font-family: var(--sans); font-size: 0.8rem; line-height: 1.35; text-align: left;
  opacity: 0; transform: translateY(0.5rem);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.orbit-options-cta { margin-top: 0.35rem; color: var(--amber); font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; }
@media (hover: hover) {
  .orbit-stage:not(.is-dragging) .orbit-item.is-front:hover .art-frame,
  .orbit-stage:not(.is-dragging) .orbit-item.is-front:hover .poem-face { transform: translateY(-0.5rem) scale(1.38); }
  .orbit-stage:not(.is-dragging) .orbit-item.is-front:hover .art-frame,
  .orbit-stage:not(.is-dragging) .orbit-item.is-front:hover .poem-face { box-shadow: 0 1.6rem 2.2rem -0.4rem rgba(0, 0, 0, 0.85), 0 0 2.5rem rgba(0, 0, 0, 0.6); }
  .orbit-stage:not(.is-dragging) .orbit-item.is-front:hover .orbit-options { opacity: 1; transform: none; }
}
/* Touch screens have no hover: the piece in front always shows its options */
@media (hover: none) {
  .orbit-item.is-front .orbit-options { opacity: 1; transform: none; }
}
.orbit-item:focus-visible .orbit-options { opacity: 1; transform: none; }
.ship-note { margin-top: 0.9rem; }
@media (prefers-reduced-motion: reduce) { .orbit-face, .orbit-options { transition: none; } }

/* ---------- Floating: pieces lift toward you with a shadow behind ---------- */
.orbit-face .art-frame, .poem-face { transition: box-shadow 0.45s ease, border-color 0.3s ease; }
.art-spot { border: 0; }
.art-spot:hover, .art-spot:focus-visible { border: 0; box-shadow: none; }
.art-spot-lift {
  position: absolute; inset: 0; display: block;
  background-image: url("../images/art-intro.jpg"); background-repeat: no-repeat;
  opacity: 0;
  transition: transform 0.45s cubic-bezier(.2,.7,.2,1), box-shadow 0.45s ease, opacity 0.2s ease;
}
.art-spot:hover .art-spot-lift, .art-spot:focus-visible .art-spot-lift {
  opacity: 1;
  transform: translateY(-2.2%) scale(1.06);
  box-shadow: 0 1.8rem 2.4rem -0.5rem rgba(0, 0, 0, 0.9), 0 0 3rem rgba(0, 0, 0, 0.7);
}
@media (prefers-reduced-motion: reduce) { .art-spot-lift { transition: none; } }

/* Hovered piece comes right up to you: let it grow past the row, and fade the rest */
.orbit-stage { overflow: visible; overflow-x: clip; }
.orbit-face .art-frame, .poem-face { border-color: transparent; }
@media (hover: hover) {
  .orbit-stage:not(.is-dragging):has(.orbit-item.is-front:hover) .orbit-item:not(.is-front) { opacity: 0.1 !important; transition: opacity 0.4s ease; }
  .orbit-item.is-front:hover { z-index: 500 !important; }
  .orbit:has(.orbit-item.is-front:hover) { position: relative; z-index: 5; }
}
.orbit-face .art-frame, .poem-face { transform-origin: 50% 100%; transition: transform 0.45s cubic-bezier(.2,.7,.2,1), box-shadow 0.45s ease; }

/* About: portrait beside the text */
.about-layout { display: grid; gap: 2.5rem; margin-top: 3rem; align-items: start; }
.about-photo img { display: block; width: 100%; height: auto; }
.about-body a { color: var(--amber); }
@media (min-width: 800px) {
  .about-layout { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: 4rem; }
  .about-photo { position: sticky; top: 6rem; }
}
@media (max-width: 799px) { .about-photo { max-width: 24rem; } }
a.footer-mark:hover { color: var(--amber); }

/* Tabs that switch views (Photographs | Films) */
.view-tabs a[aria-current="true"] { color: var(--ink); border-color: var(--amber); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Films */
.film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 3rem 2rem; }
.film-card { display: block; color: inherit; }
.film-frame { position: relative; aspect-ratio: 16 / 9; background: var(--panel); overflow: hidden; margin-bottom: 1rem; transition: transform 0.45s cubic-bezier(.2,.7,.2,1), box-shadow 0.45s ease; }
.film-frame img, .film-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-frame.art-frame-empty { display: flex; align-items: center; justify-content: center; }
.film-play {
  position: absolute; left: 1rem; bottom: 1rem;
  color: var(--ink); font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase;
  padding: 0.5rem 0.8rem; background: rgba(8, 9, 10, 0.8);
}
@media (hover: hover) {
  a.film-card:hover .film-frame { transform: translateY(-0.4rem) scale(1.03); box-shadow: 0 1.6rem 2.2rem -0.4rem rgba(0, 0, 0, 0.85); }
  a.film-card:hover .film-play { color: var(--amber); }
}
.view-tabs { margin: 1.75rem 0 3rem; }
/* The hanging poem: the whole sheet lifts, cut to the shape of the paper */
.art-spot-soft .art-spot-lift {
  -webkit-clip-path: polygon(10% 8%, 50% 5%, 94.5% 1.5%, 97.8% 48%, 96.6% 81%, 90% 86.5%, 83% 88.5%, 51% 96.2%, 1.5% 98.6%, 6.4% 48%);
          clip-path: polygon(10% 8%, 50% 5%, 94.5% 1.5%, 97.8% 48%, 96.6% 81%, 90% 86.5%, 83% 88.5%, 51% 96.2%, 1.5% 98.6%, 6.4% 48%);
}
.art-spot-soft { transition: filter 0.45s ease; }
.art-spot-soft:hover, .art-spot-soft:focus-visible { filter: drop-shadow(0 1.6rem 1.4rem rgba(0, 0, 0, 0.9)); }
.art-spot-soft:hover .art-spot-lift, .art-spot-soft:focus-visible .art-spot-lift { box-shadow: none; transform: translateY(-3%) scale(1.1); }

/* ---------- Poems as pages of a book ---------- */
:root { --paper: #ebe3d2; --paper-edge: #d9cfba; --page-ink: #1d1a16; --page-ink-dim: #5d564b; }

/* The small page in the carousel */
.poem-face {
  position: relative;
  background:
    linear-gradient(90deg, rgba(40, 30, 15, 0.22), rgba(40, 30, 15, 0.06) 5%, transparent 12%),
    radial-gradient(120% 90% at 60% 35%, var(--paper), var(--paper-edge));
  border: 0;
  color: var(--page-ink);
  padding: 1.6rem 1.2rem 2.2rem 1.6rem;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.12);
}
.poem-face-title { color: var(--page-ink); font-size: 1.2rem; }
.poem-face-lines { color: var(--page-ink-dim); font-size: 0.86rem; line-height: 1.6; }
.poem-face-more {
  position: absolute; left: 0; right: 0; bottom: 0.7rem; text-align: center;
  color: var(--page-ink-dim); font-family: var(--serif); font-size: 0.78rem; letter-spacing: 0.1em;
}

/* The opened poem: one page, cream paper, a shadow in the gutter, a page number */
.viewer:has(.viewer-body > .poem) { width: min(38rem, calc(100vw - 1.5rem)); }
.viewer-body:has(> .poem) {
  padding: 0;
  background:
    linear-gradient(90deg, rgba(40, 30, 15, 0.26), rgba(40, 30, 15, 0.07) 4%, transparent 11%),
    radial-gradient(130% 80% at 60% 30%, var(--paper), var(--paper-edge));
}
.viewer .poem {
  position: relative;
  max-width: none; margin: 0;
  min-height: min(46rem, calc(100dvh - 6rem));
  padding: clamp(2.5rem, 8vw, 4.5rem) clamp(1.5rem, 7vw, 4rem) 5rem clamp(2rem, 9vw, 4.75rem);
  color: var(--page-ink);
}
.viewer .poem::before {                      /* running head */
  content: "Northless";
  display: block; margin-bottom: clamp(2rem, 6vw, 3.5rem);
  font-family: var(--serif); font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--page-ink-dim); text-align: center;
}
.viewer .poem::after {                       /* page number */
  content: attr(data-page);
  position: absolute; left: 0; right: 0; bottom: 1.75rem; text-align: center;
  font-family: var(--serif); font-size: 0.9rem; color: var(--page-ink-dim);
}
.viewer .poem .poem-title { color: var(--page-ink); font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 400; margin-bottom: 2rem; }
.viewer .poem .poem-body { color: var(--page-ink); font-family: var(--serif); font-size: clamp(1.02rem, 2.6vw, 1.15rem); line-height: 1.85; }
.viewer .poem .poem-epigraph { color: var(--page-ink-dim); }

/* ---------- Stories as pages of a book ---------- */
.book { max-width: 38rem; margin: 0 auto; }
.book-page, html:not(.has-book) .story-body {
  position: relative;
  background:
    linear-gradient(90deg, rgba(40, 30, 15, 0.26), rgba(40, 30, 15, 0.07) 4%, transparent 11%),
    radial-gradient(130% 80% at 60% 30%, var(--paper), var(--paper-edge));
  color: var(--page-ink);
  padding: clamp(2rem, 7vw, 3.5rem) clamp(1.4rem, 6vw, 3.5rem) 4.5rem clamp(1.9rem, 8vw, 4.25rem);
  box-shadow: 0 1.5rem 3rem -1rem rgba(0, 0, 0, 0.8);
}
html:not(.has-book) .story-body { max-width: 38rem; margin: 0 auto; }
.book-head { text-align: center; margin-bottom: clamp(1.5rem, 5vw, 2.75rem); font-family: var(--serif); font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--page-ink-dim); }
.book-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.2; color: var(--page-ink); margin-bottom: 1.5rem; }
.book-folio { position: absolute; left: 0; right: 0; bottom: 1.5rem; text-align: center; font-family: var(--serif); font-size: 0.9rem; color: var(--page-ink-dim); }
.book-text.story-body, html:not(.has-book) .story-body { max-width: none; font-family: var(--serif); font-size: clamp(1.02rem, 2.6vw, 1.12rem); line-height: 1.8; }
.book-text.story-body p, .book-text.story-body li, html:not(.has-book) .story-body p { color: var(--page-ink); }
.book-text.story-body p { margin-bottom: 1.1rem; }
.book-text.story-body .dialogue { color: var(--page-ink); }
.book-text.story-body .journal { border-left-color: rgba(40, 30, 15, 0.3); margin: 1.5rem 0; }
.book-text.story-body .journal .journal-date { color: #7a5524; font-family: var(--sans); }
.book-controls { margin-top: 1.5rem; }

/* Story cards on the Stories page: paper too */
.story-card {
  background:
    linear-gradient(90deg, rgba(40, 30, 15, 0.22), rgba(40, 30, 15, 0.06) 3%, transparent 8%),
    radial-gradient(130% 90% at 60% 30%, var(--paper), var(--paper-edge));
  border-color: transparent;
}
.story-card h2 { color: var(--page-ink); }
.story-card p { color: var(--page-ink-dim); }
.story-card .label { color: #7a5524; }
.story-card .story-note { color: var(--page-ink-dim); }

/* Book: turn the page from the bottom of the page itself */
.book-page { padding-bottom: 1.25rem; }
.book-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.book-folio { position: static; flex: 1; }
.book-turn {
  width: 3.25rem; height: 2.75rem; flex: none;
  background: none; border: 1px solid rgba(40, 30, 15, 0.3); color: var(--page-ink);
  font-family: var(--serif); font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.book-turn:hover:not(:disabled) { background: var(--page-ink); color: var(--paper); }
.book-turn:disabled { opacity: 0.25; cursor: default; }

/* A lit object on a dark photo (the typewriter): lifts and brightens, edges melt into the dark */
.art-spot-glow .art-spot-lift {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%);
}
.art-spot-glow:hover .art-spot-lift, .art-spot-glow:focus-visible .art-spot-lift { box-shadow: none; filter: brightness(1.35); transform: translateY(-3%) scale(1.09); }
/* A top photo whose background is pure black: let it take the page's own dark tone */
.art-intro-black { background: var(--bg); }
.art-intro-black img { mix-blend-mode: lighten; }
