/* =========================================================================
   Rain City Front Row: site styles
   Mobile-first. No framework. Brand tokens live in :root below.
   Contrast notes (WCAG 2.x, checked):
     ink   #F2F2EE on bg #111111  ~16.8:1
     blue  #2E9BFF on bg #111111  ~6.5:1  (AA for all text sizes)
     bg    #111111 on blue        ~6.5:1  (use for text on blue buttons)
     ink   #F2F2EE on blue        ~2.6:1  FAILS, never put light text on blue
     blue  on paper (#F2F2EE)     ~2.6:1  FAILS, so links on paper are dark
                                          with a blue underline instead
   ========================================================================= */

/* ---------- Fonts (self-hosted, Latin subset, SIL OFL; see /fonts) ---------- */
@font-face {
  font-family: "Anton";
  src: url("/fonts/anton-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #111111;
  --ink: #F2F2EE;
  --blue: #2E9BFF;
  --muted: #A6A6A0;        /* secondary text on bg, ~7.7:1 */
  --line: #3A3A38;         /* decorative rules only */

  --font-display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 5vw, 2.5rem);
  --measure: 38rem;        /* comfortable line length for prose */
  --wide: 68rem;

  /* Photocopier grain, used as a page overlay. Pure SVG, ~400 bytes. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.2 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Speckle mask that "distresses" big display type, like worn screen-print ink. */
  --distress: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='d'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -16 0 0 0 11.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23d)'/%3E%3C/svg%3E");

  /* Torn-paper edges for the About block (top edge; bottom is the same shape flipped). */
  --torn-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='14'%3E%3Cpath d='M0 14V7l5 2 4-6 6 4 5-5 4 7 6-3 5 4 4-6 6 5 5-2 4 3 6-3V14z'/%3E%3C/svg%3E");
  --torn-bottom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='14'%3E%3Cpath d='M0 0V7l5-2 4 6 6-4 5 5 4-7 6 3 5-4 4 6 6-5 5 2 4-3 6 3V0z'/%3E%3C/svg%3E");
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;           /* 18px: readable in a dark bar */
  line-height: 1.55;
}

/* The tilted venue strip bleeds past the edges; clip it here, not on body
   (body overflow propagates to the viewport, where mobile Safari still pans). */
main { overflow-x: clip; }

/* Grain overlay over the whole page. Decorative; ignores pointer input. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.07;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 4px; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;              /* Anton only ships one weight */
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0;
}

p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -10rem;
  z-index: 200;
  background: var(--blue);
  color: var(--bg);
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.5rem var(--gutter);
  border-bottom: 2px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { width: 1.6rem; height: 2.2rem; color: var(--blue); }
.brand-text { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.06em; }

.nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.7rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
}
.nav li:last-child a { padding-right: 0; }
.nav a:hover { color: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 4.5rem) var(--gutter) clamp(2.5rem, 8vw, 5rem);
  text-align: center;
}

.hero-mark {
  width: clamp(5.5rem, 26vw, 9rem);
  height: auto;
  aspect-ratio: 524 / 712;
  margin: 0 auto 1.25rem;
  color: var(--blue);
}

.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wordmark-line {
  display: block;
  font-size: clamp(3.6rem, 18.5vw, 9.5rem);
  line-height: 0.92;
  -webkit-mask-image: var(--distress);
  mask-image: var(--distress);
}
.wordmark-sub {
  display: block;
  margin-top: 0.6em;
  margin-right: -0.6em;          /* cancel trailing letter-spacing so it centers */
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.1rem, 5.2vw, 2rem);
  letter-spacing: 0.6em;
  color: var(--blue);
}

.pitch {
  max-width: 22ch;
  margin: 1.75rem auto 2rem;
  font-size: clamp(1.35rem, 5.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

/* Rubber stamp. Purely decorative (aria-hidden in the HTML). */
.stamp {
  position: absolute;
  top: clamp(1.25rem, 5vw, 3rem);
  right: var(--gutter);
  margin: 0;
  padding: 0.05em 0.3em 0;
  border: 4px solid var(--blue);
  color: var(--blue);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 7vw, 2.75rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: rotate(12deg);
  -webkit-mask-image: var(--distress);
  mask-image: var(--distress);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* The big gallery button. Dark text on blue (light text on blue fails contrast). */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
  max-width: 26rem;
  min-height: 4rem;
  padding: 0.6rem 1.5rem;
  background: var(--blue);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 7vw, 2.1rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 3px solid var(--bg);
  box-shadow: 6px 6px 0 var(--ink);
}
.btn:hover { text-decoration: none; }
.btn:active { box-shadow: 2px 2px 0 var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 80ms ease-out, box-shadow 80ms ease-out; }
  .btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
  .btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }
}

.link-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--blue);
}

/* ---------- Venue strip (looks like a strip of tape / a show bill) ---------- */
.bill {
  background: var(--blue);
  color: var(--bg);
  transform: rotate(-2deg);
  margin: 1rem -2rem;
  padding: 0.55rem 2rem 0.45rem;
}
.bill-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: 0.6em;
  row-gap: 0.1em;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 5.5vw, 2.1rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
}
.bill-inner span { white-space: nowrap; }
/* Each venue after the first carries its own leading "x", so a wrapped line
   never ends on a dangling separator. Child 1 is the screen-reader label. */
.bill-inner span:nth-child(n+3)::before { content: "\00D7\00A0"; opacity: 0.7; }

/* ---------- Sections ---------- */
.section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(3rem, 10vw, 6rem) var(--gutter);
}

/* Section titles look like a strip of paper label stuck on at an angle. */
.section h2 {
  display: inline-block;
  margin-bottom: 2rem;
  padding: 0.12em 0.3em 0.05em;
  background: var(--ink);
  color: var(--bg);
  font-size: clamp(2.4rem, 11vw, 4.25rem);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

/* How it works */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 2rem;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;  /* number's extra height goes to the text row, not the heading */
  column-gap: 1rem;
  align-items: start;
  align-content: start;          /* li's stretch to the tallest sibling; keep their rows packed */
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 15vw, 5rem);
  line-height: 0.85;
  color: var(--blue);
}
.steps h3 {
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  margin: 0.1em 0 0.35em;
}
.steps p { margin: 0; max-width: var(--measure); }

@media (min-width: 56rem) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .steps li { grid-template-columns: 1fr; grid-template-rows: none; }
  .steps li::before { grid-row: auto; margin-bottom: 0.5rem; }
}

/* About: an off-white "paper" block with torn top/bottom edges. */
.section-about {
  max-width: none;
  background: var(--ink);
  color: var(--bg);
  padding-top: clamp(4rem, 11vw, 6.5rem);
  padding-bottom: clamp(4rem, 11vw, 6.5rem);
  -webkit-mask:
    var(--torn-top) top left / 60px 14px repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 26px) no-repeat,
    var(--torn-bottom) bottom left / 60px 14px repeat-x;
  mask:
    var(--torn-top) top left / 60px 14px repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 26px) no-repeat,
    var(--torn-bottom) bottom left / 60px 14px repeat-x;
}
.section-about > * {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}
.section-about h2 {
  display: table;               /* keeps the label's width snug while centered in the column */
  background: var(--bg);
  color: var(--ink);
}
/* Blue text fails on paper, so links here are dark with a blue underline. */
.section-about a {
  color: var(--bg);
  font-weight: 700;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 3px;
}
.section-about a:focus-visible { outline-color: var(--bg); }
.prose .lede {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  text-transform: uppercase;
  line-height: 1.05;
}
.prose .callout {
  margin: 1.5em 0;
  padding-left: 0.9rem;
  border-left: 8px solid var(--blue);
  font-weight: 700;
  font-size: 1.3em;
  line-height: 1.25;
}

/* Contact */
.contact-cards {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 48rem) {
  .contact-cards { grid-template-columns: 1fr 1fr; }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  padding: 1.25rem 1.25rem 1.4rem;
  border: 3px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 6px 6px 0 var(--line);
}
.card:hover { box-shadow: 6px 6px 0 var(--ink); }
.card-accent { border-color: var(--blue); }
.card-accent:hover { box-shadow: 6px 6px 0 var(--blue); }

.card-kicker {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 2.6rem);
  text-transform: uppercase;
  line-height: 1;
}
.card-accent .card-kicker { color: var(--blue); }
.card-addr {
  font-weight: 700;
  font-size: clamp(1.05rem, 4.6vw, 1.3rem);
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}
.card-note { color: var(--muted); }

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.social a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}
.site-footer strong { color: var(--ink); }
.site-footer p { margin: 0 0 0.35em; }
.footer-mark { width: 1.75rem; height: 2.4rem; margin: 0 auto 1rem; color: var(--blue); }

/* ---------- 404 page ---------- */
.lost {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem var(--gutter);
  text-align: center;
}
.lost .lost-code {
  font-family: var(--font-display);
  font-size: clamp(7rem, 42vw, 14rem);
  line-height: 0.85;
  color: var(--blue);
  -webkit-mask-image: var(--distress);
  mask-image: var(--distress);
}
.lost h1 { font-size: clamp(2.2rem, 10vw, 4rem); max-width: 16ch; text-wrap: balance; }
.nowrap { white-space: nowrap; }
.lost p { max-width: 30ch; margin: 0; color: var(--muted); text-wrap: balance; }
.lost .hero-actions { margin-top: 0.5rem; width: 100%; }

/* ---------- Print: plain and legible ---------- */
@media print {
  body { background: #fff; color: #000; }
  body::before, .bill, .stamp, .skip-link { display: none; }
  .section-about { -webkit-mask: none; mask: none; background: none; }
}
