/* Wolf Moon Tattoo Studio: a black book of flash. */

:root {
  --ink: #0d0d0e;
  --leather: #18171a;
  --silver: #b9bcc2;
  --bone: #ece7dc;
  --ash: #a9a49b;
  --ghost: #9be0b0;
  --ghost-hover: #b8ecc6;
  --ghost-press: #80cc97;
  --hair: #2d2c31;
  --display: "Grenze Gotisch", Georgia, serif;
  --text: "Spectral", Georgia, serif;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 1.0625rem/1.6 var(--text);
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 800; font-synthesis: none; }
h2 { font-size: clamp(2rem, 7vw, 3.25rem); line-height: 1; margin-bottom: 18px; text-wrap: balance; }
h3 { font: 600 1.25rem/1.3 var(--text); }
p { text-wrap: pretty; }
a { color: var(--bone); text-decoration: underline; text-decoration-color: var(--silver); text-underline-offset: 4px; cursor: pointer; }
a:hover { text-decoration-color: var(--bone); text-decoration-thickness: 2px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ghost); outline-offset: 3px; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 16px; }
.plate-no, figcaption, .eyebrow, .count, .from, .viewer-note, .viewer-tag { font-style: italic; font-size: 0.9375rem; line-height: 1.4; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px;
  border: 0; border-radius: 2px;
  background: var(--ghost); color: var(--ink);
  font: 600 1.0625rem/1.2 var(--text);
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 120ms, color 120ms;
}
.btn:hover { background: var(--ghost-hover); }
.btn:active { background: var(--ghost-press); }
.btn-outline { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px var(--silver); }
.btn-outline:hover { background: var(--silver); color: var(--ink); }
.btn-outline:active { background: var(--bone); color: var(--ink); }

.skip { position: absolute; left: 16px; top: -120px; z-index: 20; }
.skip:focus { top: 12px; }

/* Frame: two thin silver rules 5px apart */
.frame {
  box-shadow: inset 0 0 0 1px var(--silver), inset 0 0 0 6px var(--ink), inset 0 0 0 7px var(--silver);
  padding: 28px 22px;
}

/* Cover */
#cover { padding-top: 16px; }
.cover {
  min-height: calc(100svh - 32px);
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  position: relative; box-shadow: none;
}
/* The double rule scales in and the content fades in. Only the rule moves, so tap targets keep their size. */
.cover::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--silver), inset 0 0 0 6px var(--ink), inset 0 0 0 7px var(--silver);
  animation: rule-in 600ms ease-out both;
}
.cover > * { animation: fade-in 600ms ease-out both; }
@keyframes rule-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.eyebrow { color: var(--ash); margin-bottom: 10px; }
h1 { line-height: 0.9; --h1: clamp(3rem, 15vw, 6.5rem); }
.h1-a { display: block; font-size: var(--h1); font-weight: 800; }
.h1-b { display: block; font-size: calc(var(--h1) * 0.42); font-weight: 500; line-height: 1.1; margin-top: 0.12em; letter-spacing: 0.02em; }
.tagline { font-size: 1.375rem; font-style: italic; line-height: 1.3; margin-top: 18px; }
.from { display: block; color: var(--ash); margin-top: 2px; }
.open-line { margin-top: 14px; max-width: 28rem; }
.cta { display: grid; gap: 10px; margin-top: 22px; max-width: 28rem; }
.textlinks { display: flex; gap: 8px 24px; margin-top: 10px; }
.textlinks a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }

.cover-plate { width: 300px; max-width: 100%; box-shadow: inset 0 0 0 1px var(--silver); background: var(--leather); padding: 8px; }
figcaption, .plate-cap { display: flex; flex-direction: column; gap: 1px; padding: 10px 4px 4px; }
.plate-no { color: var(--ash); }
.plate-title { font: 600 1rem/1.3 var(--text); font-style: normal; color: var(--bone); }
.cover-plate figcaption { color: var(--ash); }

/* Sections */
.section { padding-top: 56px; }
.section::before {
  content: ""; display: block; height: 5px; margin-bottom: 30px;
  border-top: 1px solid var(--silver); border-bottom: 1px solid var(--silver);
}
main { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 16px; }
.intro { color: var(--ash); max-width: 36rem; }

/* Flash book */
.chips { margin-top: 22px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 2px;
  background: transparent; color: var(--bone);
  box-shadow: inset 0 0 0 1px var(--silver);
  transition: background-color 120ms, color 120ms;
}
.chip:hover { background: var(--hair); }
.chip[aria-pressed="true"] { background: var(--bone); color: var(--ink); box-shadow: none; }
.count { color: var(--ash); margin-top: 12px; min-height: 1.4em; }

.plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.plate {
  display: flex; flex-direction: column; padding: 8px;
  background: var(--leather); color: var(--bone); text-decoration: none; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--silver);
  transition: box-shadow 120ms;
}
.plate:hover, .plate:focus-visible { box-shadow: inset 0 0 0 1px var(--bone); }
.plate-pic { flex: 1; display: flex; align-items: center; }
.plate img { width: 100%; max-width: 540px; margin-inline: auto; }
.plate[data-slug="aztec"] img { max-width: 800px; }

/* What they do */
.lists { display: grid; gap: 32px; }
.lists h3 { margin-bottom: 8px; }
.lists ul { list-style: none; padding: 0; }
.lists li { padding: 9px 0 9px 22px; border-bottom: 1px solid var(--hair); position: relative; }
.lists li::before {
  content: ""; position: absolute; left: 3px; top: 1.1em; width: 6px; height: 6px;
  background: var(--silver); transform: rotate(45deg);
}
.words { font-style: italic; margin-top: 28px; padding-left: 16px; border-left: 1px solid var(--silver); }

/* Artists */
.lede { font-size: 1.25rem; line-height: 1.5; max-width: 38rem; margin-bottom: 26px; }
#artists .btn { width: 100%; }

/* Reviews */
.quotes { display: grid; gap: 14px; }
.quote { padding: 26px 22px 22px; background: var(--leather); box-shadow: inset 0 0 0 1px var(--silver); display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.quote p { font-size: 1.1875rem; line-height: 1.45; }
.quote p::before { content: "\201C"; font: 800 4.5rem/0 var(--display); color: var(--silver); display: block; height: 0.4em; margin-bottom: 8px; }
.quote p::after { content: "\201D"; }
.quote figcaption { color: var(--ash); padding: 0; }
.rating { margin-top: 28px; font-style: italic; color: var(--ash); }
.score { font: 800 2.5rem/1 var(--display); font-style: normal; color: var(--bone); margin-right: 6px; }

/* Visit */
.visit { display: grid; gap: 28px; }
address { font-style: normal; font-size: 1.375rem; line-height: 1.35; max-width: 20rem; }
.hours { margin-top: 12px; }
.good { margin-top: 4px; color: var(--ash); }
.visit-btns { display: grid; gap: 10px; max-width: 28rem; }

/* Footer */
footer { margin-top: 64px; padding-top: 0; padding-bottom: 56px; color: var(--ash); font-size: 0.9375rem; }
footer::before {
  content: ""; display: block; height: 5px; margin-bottom: 26px;
  border-top: 1px solid var(--silver); border-bottom: 1px solid var(--silver);
}
footer p + p { margin-top: 4px; }
.concept { color: var(--bone); font-weight: 600; font-size: 1.125rem; line-height: 1.2; margin-bottom: 10px; }

/* Viewer dialog */
dialog {
  width: min(calc(100vw - 24px), 62rem); max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; border: 0; overflow: auto;
  background: var(--leather); color: var(--bone);
  box-shadow: inset 0 0 0 1px var(--silver), inset 0 0 0 6px var(--leather), inset 0 0 0 7px var(--silver);
}
dialog[open] { animation: fade-in 150ms ease-out; }
dialog::backdrop { background: rgba(0, 0, 0, 0.84); }
.viewer-in { position: relative; padding: 20px 18px 22px; display: grid; gap: 18px; }
.viewer-close {
  position: absolute; top: 20px; right: 18px; z-index: 2;
  min-width: 44px; min-height: 44px; padding: 0 14px;
  background: var(--ink); color: var(--bone); border: 0; border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--silver);
  transition: background-color 120ms, color 120ms;
}
.viewer-close:hover { background: var(--silver); color: var(--ink); }
.viewer-pic { background: var(--ink); display: flex; justify-content: center; }
.viewer-pic img {
  width: auto; max-width: 100%; max-height: 60dvh; object-fit: contain;
  color: var(--ash); font-style: italic;
}
.viewer-pic.broken { min-height: 8rem; align-items: center; padding: 16px; text-align: center; }
.viewer-info h3 { margin: 2px 0 4px; font-size: 1.5rem; }
.viewer-tag { color: var(--ash); }
.viewer-note { color: var(--ash); margin-top: 4px; }
.viewer-actions { display: grid; gap: 10px; margin-top: 18px; }
.viewer-step { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.viewer-step .btn { min-height: 48px; padding: 0 12px; }
.viewer-info .viewer-actions + .viewer-step + .viewer-note { margin-top: 16px; }

/* Tablet */
@media (min-width: 768px) {
  .wrap, main { padding-inline: 32px; }
  .frame { padding: 40px 40px; }
  .cover { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: center; align-content: center; }
  .cover-plate { justify-self: end; }
  h1 { --h1: clamp(3rem, 7.6vw, 6.5rem); }
  .plates { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .lists { grid-template-columns: 1fr 1fr; gap: 48px; }
  #artists .btn { width: auto; }
  .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .visit { grid-template-columns: 1fr 22rem; gap: 48px; align-items: start; }
  .viewer-in { grid-template-columns: minmax(0, 1fr) 19rem; gap: 28px; padding: 28px; align-items: start; }
  .viewer-close { top: 28px; right: 28px; }
  .viewer-pic img { max-height: calc(100dvh - 100px); }
  .viewer-info { padding-top: 54px; }
}

/* Desktop */
@media (min-width: 1024px) {
  .cover { grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; }
  .cover-plate { width: 420px; }
  .plates { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .section { padding-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
