/* Wax & Wane — a small lamp-lit room at dusk */

@font-face{font-family:'Instrument Serif';src:url('fonts/instrument-serif-latin-400-normal.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Instrument Serif';src:url('fonts/instrument-serif-latin-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-latin-400-normal.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Alegreya Sans';src:url('fonts/alegreya-sans-latin-700-normal.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'Alegreya Sans';src:url('fonts/alegreya-sans-latin-400-italic.woff2') format('woff2');font-weight:400;font-style:italic;font-display:swap}

:root {
  /* palette: one lamp in a dark room, the sea after sunset */
  --night: #241a26;
  --night-raised: #2f2331;
  --groove-dark: #170f18;
  --groove-light: #3a2c3c;
  --lamp: #e9b25a;
  --rose: #d39a92;
  --mist: #bdb6c8;
  --sea: #4d7c80;
  --paper: #f1e7dc;

  /* type: close and literate */
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Alegreya Sans', Optima, 'Segoe UI', sans-serif;
  --display-leading: 0.92;
  --display-tracking: -0.015em;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 34rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--sans);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: var(--display-leading);
  letter-spacing: var(--display-tracking);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }

a { color: inherit; }

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

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--lamp);
  color: var(--night);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 1rem;
}

.link {
  color: var(--lamp);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

/* masthead */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem var(--gutter);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
  color: var(--paper);
}
.amp { font-style: italic; color: var(--lamp); }

.masthead ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
}
.masthead nav a {
  color: var(--mist);
  text-decoration: none;
  font-size: 0.95rem;
}
.masthead nav a:hover { color: var(--paper); }

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--gutter);
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(3rem, 7vw, 6rem);
  min-height: min(88vh, 820px);
}

.hero h1 {
  font-size: clamp(3.4rem, 7.6vw, 7.6rem);
  line-height: 0.92;
  letter-spacing: -0.015em;
  margin-bottom: 1.75rem;
}

.lede {
  max-width: var(--measure);
  color: var(--paper);
  font-size: 1.15em;
}

.hero__meta { color: var(--mist); }

.hero__art { margin: 0; }

.still-life {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.still-life .line * {
  fill: none;
  stroke: var(--lamp);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.still-life .spindle { fill: var(--lamp); stroke: none; }

.lamp-glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: lamp-breathe 9s ease-in-out infinite;
  animation-play-state: paused;
}
.still-life.is-playing .lamp-glow { animation-play-state: running; }

.platter {
  transform-origin: 0 0;
  animation: platter-turn 1.8s linear infinite;
  animation-play-state: paused;
}
.still-life.is-playing .platter { animation-play-state: running; }

.tonearm {
  transform-box: view-box;
  transform-origin: 350px 200px;
  transform: rotate(-20deg);
  transition: transform 1.2s cubic-bezier(.3,.6,.2,1);
}
.still-life.is-playing .tonearm { transform: rotate(0deg); }

@keyframes lamp-breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.94); }
  50%      { opacity: 1;    transform: scale(1.04); }
}

@keyframes platter-turn {
  to { transform: rotate(360deg); }
}

.hero__art figcaption {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.needle-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--groove-light);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.3s ease;
}
.needle-toggle:hover { border-color: var(--lamp); }
.needle-toggle__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--mist);
}
.needle-toggle[aria-pressed="true"] .needle-toggle__dot { background: var(--lamp); }

/* section heads */
.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-head h2 {
  font-size: clamp(2.6rem, 5.5vw, 4.8rem);
  margin-bottom: 1rem;
}
.section-head__note { color: var(--mist); max-width: var(--measure); }

/* this week, in close-up */
.week { padding: clamp(3rem, 7vw, 6rem) var(--gutter); }

.crops {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.crop__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--night-raised);
  margin-bottom: 1.25rem;
}

.crop__disc {
  position: absolute;
  width: 175%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, var(--groove-dark) 0 2px, var(--groove-light) 2px 3px);
}
.crop__disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 20deg, transparent 0 8%, rgb(233 178 90 / 0.22) 12%, transparent 18% 55%, rgb(189 182 200 / 0.14) 62%, transparent 70%);
}

.crop__label {
  position: absolute;
  inset: 33%;
  border-radius: 50%;
  z-index: 1;
}
.crop__label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5%;
  height: 5%;
  border-radius: 50%;
  background: var(--night);
  transform: translate(-50%, -50%);
}

/* each close-up sits on a different part of the disc */
.crop--sea  .crop__disc { left: -95%; top: -20%; }
.crop--mist .crop__disc { left: -10%; top: 15%; }
.crop--rose .crop__disc { left: -55%; top: -75%; }
.crop--sea  .crop__label { background: var(--sea); }
.crop--mist .crop__label { background: var(--mist); }
.crop--rose .crop__label { background: var(--rose); }

.crop__artist {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 0.4rem;
}
.crop__title {
  font-size: clamp(1.9rem, 2.6vw, 2.5rem);
  margin-bottom: 0.3rem;
}
.crop__year {
  font-family: var(--serif);
  font-style: italic;
  color: var(--lamp);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.crop__note { color: var(--paper); opacity: 0.88; max-width: 24rem; }

/* two chairs */
.chairs {
  background: var(--night-raised);
  padding: clamp(3.5rem, 8vw, 7rem) var(--gutter);
}
.chairs__title {
  font-size: clamp(2.8rem, 6.4vw, 6rem);
  max-width: 22ch;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.chairs__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}
/* two seats facing the same record: each panel lit from the inner side */
.chairs__grid article {
  border-top: 1px solid var(--lamp);
  border-radius: 999px 999px 0 0 / 3rem 3rem 0 0;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3.5vw, 3rem);
  background: radial-gradient(90% 70% at 100% 0%, rgb(233 178 90 / 0.14), transparent 70%), var(--night);
}
.chairs__grid .chairs__table {
  background: radial-gradient(90% 70% at 0% 0%, rgb(233 178 90 / 0.14), transparent 70%), var(--night);
}
.chairs__grid h3 {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  margin-bottom: 1rem;
}
.chairs__grid p { max-width: var(--measure); }
.chairs__time {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 10vw, 8.5rem);
  line-height: 0.85;
  color: var(--lamp);
  margin-bottom: 1rem;
}
.chairs__table h3 + p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--rose);
}
.chairs__small { color: var(--mist); }

/* hours and address */
.visit {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--gutter);
  padding: clamp(3rem, 7vw, 6rem) var(--gutter);
}
.visit h2 {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  margin-bottom: 2rem;
}

.week-strip {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--groove-light);
}
.week-strip li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 0.6rem 0.9rem 0;
  border-bottom: 1px solid var(--groove-light);
}
.week-strip .day { font-family: var(--serif); font-size: 1.6rem; line-height: 1; }
.week-strip .time { font-size: 0.9rem; color: var(--mist); }
.week-strip .flag { font-size: 0.8rem; color: var(--lamp); }
.week-strip .is-closed .day,
.week-strip .is-closed .time { color: rgb(189 182 200 / 0.55); }
.week-strip .is-session { border-bottom-color: var(--lamp); }

.visit__plain { color: var(--mist); font-size: 0.95rem; }

address {
  font-style: normal;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

/* letters */
.letters {
  margin: 0 var(--gutter) clamp(3rem, 7vw, 6rem);
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--groove-light);
  border-radius: 2px;
  background: radial-gradient(120% 140% at 100% 0%, rgb(233 178 90 / 0.12), transparent 60%);
}
.letters h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  max-width: 18ch;
  margin-bottom: 1rem;
}
.letters > p { color: var(--mist); }

.letters__form { margin-top: 1.5rem; max-width: 36rem; }
.letters__form label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 0.5rem;
}
.letters__row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.letters__row input {
  flex: 1 1 16rem;
  min-width: 0;
  font: inherit;
  color: var(--paper);
  background: var(--night);
  border: 1px solid var(--mist);
  border-radius: 2px;
  padding: 0.8rem 1rem;
}
.letters__row input::placeholder { color: rgb(189 182 200 / 0.6); }
.letters__row input[aria-invalid="true"] { border-color: var(--rose); }
.letters__row button {
  font: inherit;
  font-weight: 700;
  color: var(--night);
  background: var(--lamp);
  border: 0;
  border-radius: 2px;
  padding: 0.8rem 1.4rem;
  cursor: pointer;
}
.letters__row button:hover { background: var(--paper); }
.letters__status { margin: 0.9rem 0 0; min-height: 1.5em; color: var(--rose); }
.letters__status.is-done { color: var(--lamp); }

/* footer */
.foot {
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--groove-light);
  color: var(--mist);
  font-size: 0.9rem;
}
.wordmark--small { font-size: 1.3rem; margin-bottom: 0.5rem; }

/* narrow screens */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__art { max-width: 32rem; }
  .crops { grid-template-columns: 1fr; }
  .crop__frame { max-width: 26rem; }
  .chairs__grid,
  .visit { grid-template-columns: 1fr; }
  .week-strip { grid-template-columns: 1fr; }
  .week-strip li {
    flex-direction: row;
    align-items: baseline;
    gap: 1rem;
    padding: 0.7rem 0;
  }
  .week-strip .day { width: 3.5rem; }
  .week-strip .flag { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lamp-glow,
  .platter { animation: none; }
  .tonearm,
  .needle-toggle { transition: none; }
}
