/* Sedona by Starlight
   Palette comes from the photographs: a blue night sky, red rock lit by city
   lights, and the rust-and-ochre double mat Dennis frames his prints in. */

@font-face {
  font-family: "IM Fell English";
  src: url("/fonts/im-fell-english-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IM Fell English";
  src: url("/fonts/im-fell-english-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("/fonts/alegreya-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("/fonts/alegreya-sans-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("/fonts/alegreya-sans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --night: #0d1533;
  --night-deep: #080e24;
  --dusk: #1c2654;
  --star: #f4ecd6;
  --star-dim: #b6bbd6;
  --rock: #a8452e;
  --rock-lit: #e58a52;
  --ochre: #e0a445;
  --ink: #150d0a;
  --rule: rgba(244, 236, 214, 0.16);

  --display: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: "Alegreya Sans", "Gill Sans", "Trebuchet MS", sans-serif;

  --gutter: clamp(1.1rem, 4.5vw, 3.5rem);
  --measure: 34rem;
  --page: 72rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--star);
  font-family: var(--text);
  font-size: 1.1875rem;
  line-height: 1.55;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); font-style: italic; }
h2 { font-size: clamp(1.9rem, 4.4vw, 2.75rem); }
h3 { font-size: 1.45rem; line-height: 1.2; }

p { margin: 0 0 1.1em; text-wrap: pretty; }

a { color: var(--rock-lit); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ochre); }

:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  background: var(--star); color: var(--ink); padding: 0.5rem 0.9rem;
}
.skip:focus { top: 0.6rem; }

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

.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.35rem 2rem;
  padding: 1.15rem var(--gutter);
  position: relative; z-index: 3;
}
.masthead__name {
  font-family: var(--display); font-style: italic; font-size: 1.45rem;
  color: var(--star); text-decoration: none; white-space: nowrap;
}
.masthead__name:hover { color: var(--star); text-decoration: underline; }
.masthead nav ul {
  display: flex; flex-wrap: wrap; gap: 0.15rem clamp(0.9rem, 3vw, 1.5rem);
  list-style: none; margin: 0; padding: 0;
}
.masthead nav a { color: var(--star); text-decoration: none; padding: 0.3rem 0; display: inline-block; }
.masthead nav a:hover { color: var(--ochre); }
.masthead nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--ochre); text-underline-offset: 0.4em; }

/* ---------- Hero: the sky turning about Polaris ---------- */

/* The hero is as tall as the first screen, but not when a tall capture or
   very tall window would stretch it. */
.hero {
  --pole-x: 70%;
  --pole-y: 23%;
  --sky-start: 20deg;
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(100svh, 56rem);
  display: flex; flex-direction: column;
  background: linear-gradient(to bottom,
    #070c22 0%, #0d1638 38%, #1b2350 62%, #3a3156 78%, #6d4a43 90%, #9b6a3c 100%);
}
.hero .masthead { flex: none; }

.hero__sky {
  position: absolute; z-index: -2;
  left: var(--pole-x); top: var(--pole-y);
  width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax;
  transform: rotate(var(--sky-start));
}
.hero__sky img {
  display: block; width: 100%; height: 100%; max-width: none;
  animation: turn 1800s linear infinite;
  will-change: transform;
}
@keyframes turn { to { transform: rotate(-360deg); } }

.hero__polaris {
  position: absolute; z-index: -1;
  left: var(--pole-x); top: var(--pole-y);
  transform: translate(0.9rem, -1.75rem);
  font-family: var(--display); font-style: italic; font-size: 1rem;
  color: var(--star-dim);
  pointer-events: none;
}

.hero__rocks {
  position: absolute; z-index: -1; left: 0; right: 0; bottom: -1px;
  width: 100%; height: clamp(9rem, 34%, 20rem); max-width: none;
  display: block;
}

.hero__text {
  margin-top: auto; margin-bottom: clamp(11rem, 38vh, 21rem);
  padding: 2rem var(--gutter) 0;
  max-width: 44rem;
}
.hero__text h1 {
  font-size: clamp(3.5rem, 13vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 30px rgba(7, 12, 34, 0.9);
}
.hero__text p {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.4;
  max-width: 27rem; margin: 1.1rem 0 1.5rem;
  text-shadow: 0 1px 16px rgba(7, 12, 34, 0.95);
}

@media (min-width: 54rem) {
  .hero { --pole-x: 66%; --pole-y: 37%; --sky-start: 20deg; }
}

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0; }
.button {
  display: inline-block; padding: 0.7rem 1.15rem;
  font-weight: 700; font-size: 1.05rem; line-height: 1.2;
  text-decoration: none; border-radius: 2px;
  background: var(--ochre); color: var(--ink); border: 1px solid var(--ochre);
}
.button:hover { background: var(--star); border-color: var(--star); color: var(--ink); }
.button--quiet { background: rgba(8, 14, 36, 0.55); color: var(--star); border-color: rgba(244, 236, 214, 0.55); }
.button--quiet:hover { background: var(--star); color: var(--ink); }

/* ---------- Page furniture ---------- */

.band { padding: clamp(3.25rem, 8vw, 6rem) var(--gutter); }
.band + .band { border-top: 1px solid var(--rule); }
.band__inner { max-width: var(--page); margin: 0 auto; }

.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 54rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); }
  .split--flip > :first-child { order: 2; }
}
.split > * { min-width: 0; }

.prose { max-width: var(--measure); }
.prose h2 { margin-bottom: 1.1rem; }
.prose > :last-child { margin-bottom: 0; }

.greeting {
  font-family: var(--display); font-size: clamp(1.45rem, 3vw, 1.85rem); line-height: 1.32;
}
.byline { font-family: var(--display); font-style: italic; font-size: 1.35rem; color: var(--star-dim); }

.facts { list-style: none; padding: 0; margin: 0 0 1.4rem; border-top: 1px solid var(--rule); }
.facts li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }

.page-head {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--night-deep) url("/images/sky.svg") 62% 46% / 150rem no-repeat;
  border-bottom: 1px solid var(--rule);
}
.page-head__text { padding: clamp(2rem, 7vw, 4.5rem) var(--gutter) clamp(2.25rem, 6vw, 4rem); max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; }
.page-head__text p { max-width: 32rem; margin: 1rem 0 0; font-size: 1.3rem; line-height: 1.4; color: var(--star); text-shadow: 0 1px 14px var(--night-deep); }
.page-head__text h1 { text-shadow: 0 2px 24px var(--night-deep); }

/* ---------- The matted print ---------- */

.print {
  display: block; width: fit-content; max-width: 100%;
  margin: 0;
  padding: clamp(0.9rem, 9%, 2.6rem);
  background-color: var(--rock);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 1.4rem 2.6rem -1.2rem rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.print img {
  display: block;
  border: clamp(4px, 1.6vw, 8px) solid var(--ochre);
  outline: 1px solid var(--ink); outline-offset: -1px;
  box-shadow: 0 0 0 1px var(--ink);
  background: var(--ink);
}
a.print { text-decoration: none; }
a.print:hover { box-shadow: 0 1.4rem 2.6rem -1.2rem rgba(0, 0, 0, 0.85), 0 0 0 2px var(--ochre); }

.plain-photo { margin: 0; }
.plain-photo img { display: block; box-shadow: 0 1.4rem 2.6rem -1.2rem rgba(0, 0, 0, 0.85); }
figcaption { color: var(--star-dim); font-size: 1rem; line-height: 1.45; margin-top: 0.9rem; }

/* ---------- Home: a row of prints ---------- */

.print-row {
  display: grid; gap: clamp(1.25rem, 3vw, 2.25rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center; margin: 2.2rem 0;
}
@media (min-width: 54rem) { .print-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.print-row .print { width: auto; }
.print-row .print img { width: 100%; }

.pull {
  margin: 0; max-width: 46rem;
  font-family: var(--display); font-size: clamp(1.6rem, 3.6vw, 2.35rem); line-height: 1.22;
}
.pull p { margin-bottom: 0.9em; }
.pull footer { font-family: var(--text); font-size: 1.1875rem; line-height: 1.55; }

/* ---------- Gallery ---------- */

.collection + .collection { margin-top: clamp(3.5rem, 8vw, 6rem); }
.collection h2 { margin-bottom: 0.4rem; }
.collection > p { color: var(--star-dim); max-width: var(--measure); }

.wall {
  display: grid; gap: clamp(2.25rem, 4.5vw, 3.5rem) clamp(1.5rem, 3.5vw, 3rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  align-items: start; margin-top: 2rem; padding: 0; list-style: none;
}
.plate { margin: 0; scroll-margin-top: 1.5rem; }
.wall > li { min-width: 0; }
.plate .print { width: auto; }
.plate .print img { width: 100%; }
.plate--tall .print { max-width: 16rem; }
.plate figcaption { margin-top: 1.05rem; }
.plate h3 { color: var(--star); margin-bottom: 0.3rem; }
.plate__no { color: var(--ochre); margin-right: 0.35em; }

.viewer {
  border: 0; padding: 0; background: transparent; color: var(--star);
  max-width: min(100vw - 1.5rem, 44rem); max-height: calc(100dvh - 1.5rem);
  overflow: auto;
}
.viewer::backdrop { background: rgba(4, 7, 20, 0.92); }
.viewer .print { margin: 0 auto; padding: clamp(1.1rem, 8vw, 3.5rem); }
.viewer__caption { max-width: 34rem; margin: 1.3rem auto 0; text-align: left; }
.viewer__caption h2 { font-size: 1.7rem; margin-bottom: 0.35rem; }
.viewer__caption p { color: var(--star-dim); font-size: 1.05rem; margin: 0; }
.viewer__bar { display: flex; justify-content: space-between; gap: 0.6rem; max-width: 34rem; margin: 1.2rem auto 0.25rem; }
.viewer__bar button {
  font: inherit; font-size: 1rem; color: var(--star); background: transparent;
  border: 1px solid rgba(244, 236, 214, 0.45); border-radius: 2px; padding: 0.45rem 0.9rem; cursor: pointer;
}
.viewer__bar button:hover { background: var(--star); color: var(--ink); }

/* ---------- Essay ---------- */

.essay { max-width: 36rem; font-size: 1.28rem; line-height: 1.62; }
.essay p:first-of-type::first-letter {
  font-family: var(--display); font-size: 3.9em; line-height: 0.82;
  float: left; padding: 0.06em 0.09em 0 0; color: var(--ochre);
}
.essay .byline { margin-top: 2rem; }
.essay figure { margin: 2.5rem 0; }

/* ---------- Prints: price sheet ---------- */

.prices { width: 100%; border-collapse: collapse; margin: 1.75rem 0 1rem; font-variant-numeric: tabular-nums; }
.prices caption { text-align: left; font-family: var(--display); font-size: 1.45rem; padding-bottom: 0.7rem; }
.prices th, .prices td { text-align: left; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prices thead th { font-weight: 400; color: var(--star-dim); font-size: 1rem; border-bottom-color: rgba(244, 236, 214, 0.4); }
.prices tbody th { font-weight: 700; }
.prices .num { text-align: right; padding-right: 0; padding-left: 1rem; white-space: nowrap; }
.prices small { display: block; color: var(--star-dim); font-size: 1rem; font-weight: 400; }

@media (max-width: 40rem) {
  .prices thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .prices, .prices caption, .prices tbody, .prices tr, .prices th, .prices td { display: block; }
  .prices tr { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
  .prices th, .prices td { border: 0; padding: 0.12rem 0; }
  .prices tbody th { font-size: 1.25rem; margin-bottom: 0.35rem; }
  .prices td { display: flex; justify-content: space-between; gap: 1rem; }
  .prices td::before { content: attr(data-label); color: var(--star-dim); }
  .prices .num { text-align: right; padding-left: 0; }
}

.address { font-style: normal; font-family: var(--display); font-size: 1.5rem; line-height: 1.3; margin: 0.6rem 0 1.4rem; }
.note { color: var(--star-dim); font-size: 1.05rem; }

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

.colophon { background: var(--night-deep); border-top: 1px solid var(--rule); padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 2.25rem; }
.colophon__inner { max-width: var(--page); margin: 0 auto; display: grid; gap: 1.75rem 3rem; }
@media (min-width: 46rem) { .colophon__inner { grid-template-columns: 1.3fr 1fr 1fr; } }
.colophon h2 { font-size: 1.7rem; font-style: italic; margin-bottom: 0.3rem; }
.colophon p { margin: 0 0 0.35rem; }
.colophon address { font-style: normal; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: 0.3rem; }
.colophon a { color: var(--star); }
.colophon a:hover { color: var(--ochre); }
.colophon .tel { font-family: var(--display); font-size: 1.6rem; text-decoration: none; white-space: nowrap; }
.colophon .small { color: var(--star-dim); font-size: 1rem; }
.colophon .colophon__legal { max-width: var(--page); margin: 2.25rem auto 0; padding-top: 1.1rem; border-top: 1px solid var(--rule); color: var(--star-dim); font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__sky img { animation: none; }
}
