/* ninetaileddeer — deliberately plain, early-web gallery styling */

:root {
  --header-height: 64px;
  --fg: #000;
  --bg: #fff;
  --rule: #000;
  --link: #00f;
  --alert: #e00;
  --muted: gray;
  --yellow: #ffe600;
  --helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body.dark {
  --fg: #fff;
  --bg: #000;
  --rule: #fff;
  --link: #fff;
}

/* gallery pages: the flag wallpaper fixed behind everything, text on solid black */
body.wallpaper {
  --fg: #fff;
  --bg: #000;
  --rule: #fff;
  --link: #fff;
  --muted: #c8c8c8;
}

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

html, body {
  margin: 0;
  font-family: Times, "Times New Roman", serif;
  color: var(--fg);
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* a fixed layer instead of background-attachment: fixed, which iOS Safari ignores */
html:has(body.wallpaper) { background: #000; }
body.wallpaper { background: transparent; }
body.wallpaper::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #000 url("../design/wallpaper.jpg") center / cover no-repeat;
}

body.wallpaper .nav a,
body.wallpaper .footer > * {
  align-self: flex-start;
  background: #000;
  padding: 0 .3rem;
}

body.wallpaper .label {
  margin-top: 0;
  padding: .55rem .6rem .65rem;
  background: #000;
}

a { color: var(--link); }
a:hover { text-underline-offset: .3rem; }
img { display: block; max-width: 100%; }

/* ---------- header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: flex-end;
  height: var(--header-height);
  margin: 0 .5rem;
  border-bottom: 2px solid var(--rule);
}

.wordmark {
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.2;
}

.wordmark small {
  font-size: .9rem;
  font-weight: 400;
  font-style: italic;
  margin-left: .4rem;
}

.header-ctas {
  margin-left: auto;
  margin-bottom: .3rem;
  display: flex;
  gap: 1rem;
}

.header-ctas a { text-decoration: none; text-transform: uppercase; }
.header-ctas a:hover { text-decoration: underline; }

/* ---------- vertical nav ---------- */

.nav {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  margin: 1rem .5rem 1.5rem;
  text-transform: uppercase;
}

@media (min-width: 768px) { .nav { font-size: 18px; } }

.nav a { text-decoration: none; }
.nav .home-link { font-style: italic; text-transform: none; }
.nav a:hover, .nav a.active { text-decoration: underline; text-underline-offset: .3rem; }

/* ---------- home menu ---------- */

.home-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  margin: 1.5rem .5rem 3rem;
}

.home-menu a {
  padding: .08em .2em;
  font-size: clamp(2.4rem, 10vw, 4.25rem);
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: #000;
}

.home-menu a:hover { color: var(--yellow); }

.home-menu small {
  margin-left: .3em;
  font-size: .32em;
  font-style: italic;
  text-transform: none;
  vertical-align: middle;
  color: var(--yellow);
}

/* ---------- music ---------- */

.coming-soon {
  display: inline-block;
  margin: 1rem .5rem 3rem;
  padding: .1em .15em;
  font-family: var(--helvetica);
  font-weight: 700;
  font-size: clamp(3.5rem, 16vw, 10rem);
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--yellow);
  background: #000;
}

/* ---------- home banner ---------- */

.banner {
  --banner-h: 60vh;
  position: relative;
  height: var(--banner-h);
  margin: .5rem .5rem 0;
  overflow: hidden;
  background: #000;
}

@media (max-width: 45em) { .banner { --banner-h: 55vh; } }
/* on desktop keep the banner short enough that the whole home menu fits on screen */
@media (min-width: 45em) { body[data-page="home"] .banner { --banner-h: 45vh; } }

.banner-images {
  display: flex;
  gap: .5rem;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.banner-images::-webkit-scrollbar { display: none; }
.banner-images img { height: 100%; width: auto; max-width: none; flex: none; }

.banner-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
  color: var(--yellow);
  font-family: var(--helvetica);
  font-weight: 700;
  font-size: calc(var(--banner-h) / 8.5);
  line-height: 1.3;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.banner-row { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.banner-row.reverse { animation-direction: reverse; }
.banner-row:nth-child(3n) { animation-duration: 45s; }

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

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

/* ---------- series hero ---------- */

/* design images are small, so show them near their real size instead of stretching them full width */
.hero img { height: 50vh; width: auto; max-width: calc(100% - 1rem); object-fit: cover; margin: 0 .5rem; }

.tagline {
  margin: .75rem .5rem 1rem;
  color: var(--alert);
  font-style: italic;
}

/* ---------- grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem .75rem;
  margin: .5rem .5rem 4rem;
}

@media (min-width: 45em) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 3rem 1.25rem; }
}

@media (min-width: 70em) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

.grid-item {
  display: block;
  color: var(--fg);
  text-decoration: none;
}

/* every photo gets the same 3:4 frame so the row lines up */
.grid-img {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #eee;
}

.grid-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .35s ease, transform .6s ease;
}

.grid-img img.alt { opacity: 0; }

@media (hover: hover) {
  .grid-item:hover .grid-img img.alt { opacity: 1; }
  .grid-item:hover .grid-img img { transform: scale(1.02); }
}

/* small wall label under each piece */
.label {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin-top: .6rem;
  font-size: .9rem;
  line-height: 1.25;
}

.label-title { text-transform: uppercase; letter-spacing: .02em; }
.label-status { color: var(--muted); }
.label-status.sold { color: var(--alert); font-style: italic; }

.grid-item:hover .label-title { text-decoration: underline; text-underline-offset: .25rem; }

.empty { margin: 0 .5rem 2rem; font-style: italic; }

/* ---------- artwork page ---------- */

.work h1 {
  font-size: 1.2rem;
  font-weight: 400;
  margin: 1.5rem .5rem 1rem;
}

.work-images {
  display: flex;
  gap: .6rem;
  height: 90vw;
  max-height: min(666px, 70vh);
  margin: 0 0 1rem .5rem;
  overflow-x: scroll;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.work-images::-webkit-scrollbar { display: none; }
.work-images img { height: 100%; width: auto; max-width: none; }
.work-images.one-image { height: auto; max-height: none; margin-right: .5rem; }
.work-images.one-image img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; }

.work-info {
  max-width: 40rem;
  text-align: center;
  margin-bottom: 4rem;
}

.work-meta { margin: 0 0 1rem; line-height: 1.5; }

.work-status {
  font-size: 1.1rem;
  font-style: italic;
  margin: 1rem 0;
}

.work-status.sold { color: var(--alert); }

.work-price {
  font-size: 2.2rem;
  font-weight: 700;
  margin: .5rem 0 0;
}

.buy {
  display: inline-block;
  margin: 1rem auto;
  padding: .25rem .75rem;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}

.buy:hover { text-decoration: underline; text-underline-offset: .3rem; }

.details-toggle {
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  text-transform: uppercase;
}

.details-toggle:hover { text-decoration: underline; text-underline-offset: .3rem; }
.details { padding: 1rem; line-height: 1.5; white-space: pre-line; }

.buy-note { margin: 0 0 1.5rem; font-style: italic; line-height: 1.4; }
.buy-note a { color: inherit; }

.back { display: inline-block; margin: 0 .5rem 2rem; font-style: italic; }

/* ---------- info page ---------- */

body.info {
  --fg: var(--yellow);
  --rule: var(--yellow);
  --link: var(--yellow);
  --bg: #000;
  background:
    linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, .45)),
    #000 url("../design/forest-figures.webp") center / cover fixed;
}

body.info .header { background: transparent; }

.info-body {
  max-width: 40rem;
  margin: 3rem auto 2rem;
  padding: 0 2rem;
  text-align: center;
  color: var(--fg);
}

.info-body p { font-size: 1.1rem; line-height: 1.4; }
.info-body h2 { font-size: 1.1rem; font-weight: 400; text-transform: uppercase; margin-top: 3rem; }
.info-body h3 { font-size: 1.1rem; margin: 2rem 0 0; }
.info-body h3 + p { margin-top: .25rem; }

/* ---------- stories ---------- */

.story-list {
  list-style: none;
  margin: 0 .5rem 4rem;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1.6;
}

.story-list a { color: var(--fg); }

/* sized for reading on a phone: big type, short lines, plenty of line spacing */
.story {
  max-width: 34rem;
  margin: 1.5rem auto 3rem;
  padding: 0 1.25rem;
  font-size: 1.2rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (min-width: 45em) { .story { font-size: 1.3rem; margin-top: 3rem; } }

.story h1 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  margin: 0 0 2rem;
}

.story p {
  margin: 0 0 1.2em;
  white-space: pre-line;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.story h1:has(+ .story-byline) { margin-bottom: .5rem; }
.story .story-byline { text-align: center; font-style: italic; margin: 0 0 2rem; }

.story-end { text-align: center; margin-top: 2.5rem; }

/* ---------- footer ---------- */

.footer {
  margin-top: auto;
  display: flex;
  gap: 1rem;
  padding: 1rem;
  font-size: .9rem;
}

.footer a { color: var(--fg); }
