/* Colours from the We Are Okay! Tour '26 poster artwork (.ai) */
:root {
  --mustard: #F5D822;   /* poster ground */
  --ground: #F5D822;
  --sky: #DCD786;       /* khaki sky, used for panels */
  --sky-deep: #CFC86A;
  --rose: #AF4653;      /* lettering */
  --maroon: #5A1A2A;    /* lettering shadow, body text */
  --vine: #377116;      /* dark vine green from the border: selection, focus */
  --vine-deep: #1F430B; /* its shadow */
  --leaf: #2F6B2E;      /* vines */
  --line: rgba(90, 26, 42, 0.28);
  --error: #8E1230;

  --display: "Shrikhand", "Cooper Black", Georgia, serif;
  --body: "Alegreya", Georgia, "Times New Roman", serif;

  --frame: clamp(16px, 3.2vw, 36px);
  --gutter: clamp(1.1rem, 4vw, 3rem);
  --measure: 66ch;

  /* print grain, laid over the page and the hero art alike */
  --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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .28 0 0 0 0 0 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* The poster's title lettering: a rose outline set down-right of each
   letter, with a mustard gap between. Needs data-text="same text". */
.outlined { position: relative; isolation: isolate; }
.outlined::before {
  content: attr(data-text);
  position: absolute; inset: 0; z-index: -1;
  transform: translate(0.055em, 0.055em);
  color: transparent;
  -webkit-text-stroke: 0.03em var(--rose);
  text-shadow: none;
  pointer-events: none;
}
.outlined {
  text-shadow:
    0.022em 0 0 var(--ground), -0.022em 0 0 var(--ground), 0 0.022em 0 var(--ground), 0 -0.022em 0 var(--ground),
    0.016em 0.016em 0 var(--ground), -0.016em 0.016em 0 var(--ground), 0.016em -0.016em 0 var(--ground), -0.016em -0.016em 0 var(--ground);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--maroon);
  font: 400 1.075rem/1.6 var(--body);
  padding: 0;
}

a { color: inherit; text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--vine); outline-offset: 3px; }

/* The page is the poster: floral frame round the whole screen, mustard
   ground and print grain edge to edge, content centred on a sheet. */
.poster {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  border: var(--frame) solid transparent;
  border-image: url("img/frame.webp") 40 round;
  background-color: var(--ground);
  background-image: var(--grain);
}

.sheet { max-width: 1140px; margin: 0 auto; }

/* Hero: the poster illustration, then the lettering */
.hero {
  --art-gap: clamp(14px, 3.5vw, 36px); /* breathing room inside the floral border */
  text-align: center; padding: var(--art-gap) 0 clamp(1.5rem, 5vw, 3rem);
}
/* Full width on phones and tablets; on wide, short screens it's capped at
   about 60% of the screen height so the title and shows stay in view. */
.hero-print {
  position: relative; margin: 0 auto; overflow: hidden;
  width: min(100% - 2 * var(--art-gap), max(75vh, 560px));
  border-radius: clamp(12px, 2vw, 22px);
}
/* Same grain as the page, so the art's mustard meets the ground without a seam */
.hero-print::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); pointer-events: none; }
.hero-art { display: block; width: 100%; height: auto; }
.hero h1 {
  font: 400 clamp(2.3rem, 9.4vw, 6.2rem)/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--rose);
  margin: clamp(1.4rem, 4vw, 2.6rem) var(--gutter) 0;
}
.tour {
  display: flex; justify-content: center; align-items: center; gap: 0.9rem;
  font: 400 clamp(1.4rem, 4.2vw, 2.5rem)/1 var(--display);
  text-transform: uppercase;
  color: var(--rose);
  margin: 0.9rem 0 0;
}
.tour img { width: clamp(22px, 4vw, 34px); height: auto; }
.lede { font-size: clamp(1.1rem, 2.4vw, 1.3rem); font-style: italic; font-weight: 700; margin: 1.1rem var(--gutter) 0; }

/* Layout */
.shop, .returning, .done { padding: 0 var(--gutter); }
.loading { padding: 0 var(--gutter); margin: 2rem 0; font-style: italic; }
.step { padding: 2.4rem 0; border-top: 2px dashed var(--line); }
.step h2 {
  display: flex; align-items: center; gap: 0.75rem;
  font: 400 clamp(1.35rem, 3.2vw, 1.9rem)/1.15 var(--display);
  color: var(--rose);
  margin: 0 0 0.4rem;
}
.num {
  display: inline-grid; place-items: center; flex: none;
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  background: var(--rose); color: var(--mustard);
  font: 400 1.05rem/1 var(--display); text-shadow: none;
  box-shadow: 2px 2px 0 var(--maroon);
}
.hint { margin: 0 0 1.4rem; }

/* Cities: the poster's date blocks */
.cities { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 760px) { .cities { grid-template-columns: repeat(4, 1fr); } }
.city {
  font: inherit; color: var(--rose); cursor: pointer; text-align: center;
  background: transparent; border: 2px solid var(--rose); border-radius: 14px;
  padding: 1rem 0.6rem 0.9rem; display: grid; gap: 0.2rem; justify-items: center;
  transition: background-color 0.15s, color 0.15s;
}
.city:hover { background: rgba(55, 113, 22, 0.1); }
.city-code { font: 400 clamp(1.9rem, 5vw, 2.5rem)/1 var(--display); }
.city-date, .city-venue { font: 400 0.95rem/1.25 var(--display); text-transform: uppercase; letter-spacing: 0.02em }
.city-venue { font-size: 0.82rem; }
.city[aria-checked="true"] { background: var(--vine); border-color: var(--vine); color: var(--mustard); box-shadow: 4px 4px 0 var(--vine-deep); }
.city[aria-checked="true"] .city-code { text-shadow: 2px 2px 0 var(--vine-deep); }
.city:disabled { cursor: not-allowed; opacity: 0.45; }

/* Designs */
.designs { display: grid; gap: 1.5rem; margin-top: 1.4rem; }
@media (min-width: 720px) { .designs { grid-template-columns: 1fr 1fr; } }
.design {
  background: var(--sky); border-radius: 22px; padding: 1.2rem;
  display: grid; gap: 0.85rem; align-content: start;
  box-shadow: 5px 5px 0 var(--leaf);
}
/* Photos are 1000 x 1094; the drawn fallback tee sits in the same frame */
.art { position: relative; aspect-ratio: 1000 / 1094; border-radius: 14px; background: var(--mustard); display: grid; place-items: center; overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; }
.flip {
  position: absolute; left: 50%; bottom: 0.8rem; transform: translateX(-50%);
  display: flex; padding: 0.2rem; gap: 0.2rem;
  background: rgba(255, 255, 255, 0.85); border-radius: 999px; box-shadow: 0 1px 4px rgba(90, 26, 42, 0.2);
}
.flip button {
  font: 700 0.95rem var(--body); color: var(--maroon); cursor: pointer;
  border: 0; border-radius: 999px; background: transparent; padding: 0.4rem 1rem; min-height: 2.25rem;
}
.flip button[aria-pressed="true"] { background: var(--vine); color: #fff; }
.art svg { width: 70%; height: auto; }
.design-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.design h3 { font: 400 1.35rem/1.2 var(--display); color: var(--rose); margin: 0; }
.price { font-weight: 700; font-size: 1.25rem; white-space: nowrap; }
.was { font-weight: 400; font-size: 1rem; opacity: 0.7; margin-left: 0.3rem; }
.deal { margin: 0; font-weight: 700; color: var(--leaf); }
.blurb { margin: 0; max-width: var(--measure); }
.sizes { display: flex; flex-wrap: wrap; gap: 0.5rem; border: 0; padding: 0; margin: 0; }
.sizes legend { font-weight: 700; margin-bottom: 0.45rem; padding: 0; }
.size {
  min-width: 3.1rem; height: 3rem; padding: 0 0.7rem;
  border-radius: 12px; border: 2px solid var(--line); background: var(--mustard);
  font: 700 1.05rem var(--body); color: var(--maroon); cursor: pointer;
}
.size:hover { border-color: var(--maroon); }
.size[aria-pressed="true"] { background: var(--vine); border-color: var(--vine); color: #fff; }
.size:disabled { text-decoration: line-through; opacity: 0.45; cursor: not-allowed; }
.left { font-size: 0.95rem; font-style: italic; margin: 0; }
.left:empty { display: none; }
.add {
  justify-self: start; cursor: pointer;
  font: 400 1rem var(--display); letter-spacing: 0.01em;
  border: 2px solid var(--rose); background: transparent; color: var(--rose);
  border-radius: 999px; padding: 0.7rem 1.4rem;
}
.add:hover { background: var(--vine); border-color: var(--vine); color: var(--mustard); }
.msg { margin: 0; font-size: 0.98rem; min-height: 1.5em; }
.msg.err { color: var(--error); font-weight: 700; }

.chart { margin-top: 1.5rem; background: var(--sky); border-radius: 16px; padding: 0.9rem 1.2rem; }
.chart summary { cursor: pointer; font-weight: 700; }
.chart table { border-collapse: collapse; margin-top: 0.8rem; min-width: 280px; }
.chart th, .chart td { text-align: left; padding: 0.35rem 1.2rem 0.35rem 0; border-bottom: 1px solid var(--line); }
.chart-scroll { overflow-x: auto; }

/* Checkout */
.checkout { display: grid; gap: 1.5rem; margin-top: 1.4rem; }
@media (min-width: 860px) { .checkout { grid-template-columns: 1fr 1fr; align-items: start; } }
.summary { background: var(--sky); border-radius: 22px; padding: 1.4rem; box-shadow: 5px 5px 0 var(--leaf); }
.summary h3 { margin: 0 0 0.2rem; font: 400 1.25rem/1.2 var(--display); color: var(--rose); }
.pickup { margin: 0 0 1rem; font-style: italic; }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; padding: 0.8rem 0; border-top: 1px solid var(--line); }
.line-name { font-weight: 700; }
.line-price { text-align: right; }
.qty { display: flex; align-items: center; gap: 0.35rem; }
.qty button {
  width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--line);
  background: var(--mustard); font: 700 1.1rem var(--body); color: var(--maroon); cursor: pointer;
}
.qty button:hover:not(:disabled) { border-color: var(--maroon); }
.qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.qty output { min-width: 1.6rem; text-align: center; font-weight: 700; }
.remove { background: none; border: 0; padding: 0; font: inherit; font-size: 0.95rem; color: var(--maroon); text-decoration: underline; cursor: pointer; justify-self: end; align-self: center; }
.saved { margin: 0.5rem 0 0; text-align: right; font-weight: 700; color: var(--leaf); }
.total { display: flex; justify-content: space-between; border-top: 2px solid var(--maroon); padding-top: 0.9rem; margin: 0.2rem 0 0; font-weight: 700; font-size: 1.25rem; }
.empty { margin: 0; font-style: italic; }

.details { display: grid; gap: 1rem; }
.details label { display: grid; gap: 0.35rem; font-weight: 700; }
.details input {
  font: 400 1.05rem var(--body); color: var(--maroon);
  background: #FBF3C4; border: 2px solid var(--line); border-radius: 12px;
  padding: 0.8rem 1rem; width: 100%;
}
.details input::placeholder { color: rgba(90, 26, 42, 0.5); }
.details input:focus-visible { border-color: var(--vine); outline-offset: 1px; }
.details input[aria-invalid="true"] { border-color: var(--error); }
.form-error { color: var(--error); margin: 0; min-height: 1.5em; font-weight: 700; }
.pay {
  cursor: pointer;
  font: 400 1.2rem var(--display); letter-spacing: 0.01em;
  background: var(--rose); color: var(--mustard); border: 0; border-radius: 999px;
  padding: 1rem 1.6rem;
  box-shadow: 4px 4px 0 var(--maroon);
  transition: transform 0.08s, box-shadow 0.08s;
}
.pay:hover:not(:disabled) { background: var(--vine); color: #fff; }
.pay:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--maroon); }
.pay:disabled { opacity: 0.5; cursor: not-allowed; }
.fine { margin: 0; font-size: 0.92rem; }

/* Sticky order bar on small screens */
.bar {
  position: fixed; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--rose); color: var(--mustard); text-decoration: none;
  border-radius: 999px; padding: 0.85rem 1.4rem; font-weight: 700;
  box-shadow: 4px 4px 0 var(--maroon);
}
.bar span:last-child { font-family: var(--display); font-weight: 400; }
@media (min-width: 860px) { .bar { display: none; } }

/* Returning buyer note */
.returning > * { margin: 0; }
.returning {
  background: var(--sky); border-radius: 16px; padding: 1rem 1.2rem; margin: 0 var(--gutter) 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem;
}
.returning button { background: none; border: 0; font: inherit; text-decoration: underline; color: var(--maroon); cursor: pointer; }

/* Confirmation */
.done { padding-bottom: 3rem; text-align: center; }
.done h2 {
  font: 400 clamp(2rem, 7vw, 3.8rem)/1.05 var(--display); text-transform: uppercase;
  color: var(--rose); margin: 0 0 1.4rem;
}
.ticket {
  background: var(--sky); border: 2px dashed var(--rose); border-radius: 22px;
  padding: clamp(1.4rem, 4vw, 2.2rem); max-width: 560px; margin: 0 auto; text-align: left;
  box-shadow: 5px 5px 0 var(--leaf);
}
.ticket-label { margin: 0; font-style: italic; }
.code { font: 400 clamp(2rem, 8vw, 3rem)/1.1 var(--display); color: var(--rose); letter-spacing: 0.04em; margin: 0.2rem 0 1.1rem; word-break: break-all; }
.ticket ul { margin: 0.4rem 0 1rem; padding-left: 1.2rem; }
.again { margin-top: 1.5rem; }

/* Footer */
.foot { margin: 2rem var(--gutter) 0; padding: 1.6rem 0 6.5rem; border-top: 2px dashed var(--line); font-size: 0.98rem; text-align: center; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; margin-bottom: 0.5rem; }
.foot p { margin: 0; font-style: italic; }
.foot .credit { margin-top: 0.6rem; font-style: normal; font-size: 0.92rem; }
@media (min-width: 860px) { .foot { padding-bottom: 2.4rem; } }

/* Policy pages */
.doc { padding: 2.5rem var(--gutter); text-align: center; }
.doc .back { display: inline-block; margin-bottom: 1.8rem; font-weight: 700; }
.doc h1 {
  font: 400 clamp(2rem, 6.5vw, 3.4rem)/1.05 var(--display); text-transform: uppercase;
  color: var(--rose); margin: 0 0 1.5rem;
}
.doc h2 { font: 400 1.2rem/1.3 var(--display); color: var(--rose); margin: 2rem 0 0.4rem; }
.doc p, .doc ul { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.doc li { list-style-position: inside; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pay { transition: none; }
}
