/* ==========================================================
   Star Shows — circus under the Appenzell stars
   ========================================================== */

:root {
  /* palette */
  --ink: #160F1E;
  --ink-2: #221830;
  --red: #C2302A;
  --red-deep: #8E1F1B;
  --gold: #E3B04B;
  --gold-soft: #F0CF86;
  --cream: #F5ECDA;
  --cream-2: #EBDDC1;
  --teal: #18605C;
  --text: #1E1626;
  --text-muted: #4A3F52;
  --on-ink: #F5ECDA;
  --on-ink-muted: #CFC3D6;
  --error: #FF8A7A;
  --error-dark: #A3221C;

  /* type */
  --font-display: "Abril Fatface", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* spacing */
  --s-1: .25rem;
  --s-2: .5rem;
  --s-3: .75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 6rem;
  --gutter: 1rem;

  /* shape */
  --radius-s: 6px;
  --radius-m: 14px;
  --radius-l: 28px;
  --radius-pill: 999px;

  /* shadow */
  --shadow-s: 0 2px 8px rgba(22, 15, 30, .12);
  --shadow-m: 0 14px 40px rgba(22, 15, 30, .22);
  --shadow-glow: 0 0 24px rgba(227, 176, 75, .45);

  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: var(--s-4); top: -60px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-s); font-weight: 700; text-decoration: none;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(76px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 15, 30, .94);
  border-bottom: 1px solid rgba(227, 176, 75, .25);
  color: var(--on-ink);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; color: var(--on-ink); }
.logo__mark { fill: var(--gold); width: 28px; height: 28px; }
.logo__text { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .02em; }

.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; border: 1px solid rgba(227, 176, 75, .5);
  border-radius: var(--radius-s); background: transparent; cursor: pointer;
}
.burger__line { display: block; height: 2px; background: var(--gold); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] .burger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__line:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ink); border-bottom: 1px solid rgba(227, 176, 75, .25);
  opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
}
.nav.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.nav__list { display: flex; flex-direction: column; padding: var(--s-3) var(--gutter) var(--s-5); }
.nav__link { display: block; padding: var(--s-3) 0; text-decoration: none; font-weight: 600; color: var(--on-ink); border-bottom: 1px solid rgba(245, 236, 218, .08); }
.nav__link:hover { color: var(--gold); }
.nav__link--cta { color: var(--gold); border-bottom: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: var(--s-3) var(--s-5);
  border-radius: var(--radius-pill); font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  font-family: var(--font-body);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--ink); box-shadow: var(--shadow-glow); }
.btn--ghost { border-color: rgba(245, 236, 218, .45); color: var(--on-ink); }
.btn--ghost:hover { border-color: var(--gold); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 80% at 50% 110%, #3A1E35 0%, var(--ink) 60%);
  color: var(--on-ink);
  padding: var(--s-7) 0 0;
}
.hero__sky {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, var(--cream) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 42%, var(--cream) 50%, transparent 51%),
    radial-gradient(2px 2px at 47% 12%, var(--gold-soft) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 30%, var(--cream) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 81% 14%, var(--cream) 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 46%, var(--gold-soft) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 7% 62%, var(--cream) 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 58%, var(--cream) 50%, transparent 51%);
}
.hero__beam {
  position: absolute; top: -10%; z-index: -1; width: 46vw; max-width: 520px; height: 120%;
  background: linear-gradient(180deg, rgba(240, 207, 134, .28), rgba(240, 207, 134, 0) 78%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0;
}
.hero__beam--left { left: -8%; transform: rotate(-18deg); animation: sweep-l 9s ease-in-out infinite alternate; }
.hero__beam--right { right: -8%; transform: rotate(18deg); animation: sweep-r 11s ease-in-out infinite alternate; }
@keyframes sweep-l { from { transform: rotate(-24deg); } to { transform: rotate(-8deg); } }
@keyframes sweep-r { from { transform: rotate(24deg); } to { transform: rotate(10deg); } }

.hero__inner { display: grid; gap: var(--s-6); align-items: end; }
.hero__copy { position: relative; z-index: 1; }
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: var(--s-5); }

/* marquee bulb frame — the signature element */
.marquee { position: relative; display: inline-block; padding: 26px 22px; margin-bottom: var(--s-5); }
.marquee::before, .marquee::after {
  content: ""; position: absolute; inset: 0; padding: 12px; border-radius: var(--radius-m);
  background: radial-gradient(circle, var(--gold-soft) 0 3px, rgba(227, 176, 75, .35) 4px, transparent 6px) 0 0 / 22px 22px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.marquee::after { background-position: 11px 11px; animation: twinkle 1.6s steps(2, jump-none) infinite; }
@keyframes twinkle { 0% { opacity: .15; } 100% { opacity: 1; } }

.hero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.3rem, 9vw, 4.6rem); line-height: 1.02; letter-spacing: .005em; }
.hero__title em { font-style: normal; color: var(--gold); }
.hero__lede { max-width: 34rem; color: var(--on-ink-muted); font-size: 1.0625rem; margin-bottom: var(--s-6); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* CSS tent */
.tent { position: relative; width: min(100%, 340px); height: 300px; margin-inline: auto; }
.tent__pole { position: absolute; left: 50%; top: 0; width: 4px; height: 60px; margin-left: -2px; background: var(--gold); border-radius: 2px; }
.tent__flag {
  position: absolute; left: 50%; top: 2px; width: 46px; height: 26px; background: var(--red);
  clip-path: polygon(0 0, 100% 50%, 0 100%); transform-origin: 0 50%;
  animation: flutter 2.4s ease-in-out infinite;
}
@keyframes flutter { 0%, 100% { transform: scaleX(1) skewY(0); } 50% { transform: scaleX(.86) skewY(6deg); } }
.tent__roof {
  position: absolute; left: 0; right: 0; top: 52px; height: 130px;
  background: repeating-linear-gradient(90deg, var(--red) 0 34px, var(--cream) 34px 68px);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.tent__body {
  position: absolute; left: 8%; right: 8%; top: 182px; height: 92px;
  background: repeating-linear-gradient(90deg, var(--red-deep) 0 30px, var(--cream-2) 30px 60px);
  border-top: 6px solid var(--gold);
}
.tent__door {
  position: absolute; left: 50%; bottom: 0; width: 64px; height: 76px; margin-left: -32px;
  background: radial-gradient(60% 70% at 50% 100%, rgba(240, 207, 134, .9), #5B2A1E 70%);
  clip-path: polygon(50% 0, 100% 22%, 100% 100%, 0 100%, 0 22%);
}
.tent__ground { position: absolute; left: -20%; right: -20%; bottom: 0; height: 26px; background: radial-gradient(50% 100% at 50% 0, rgba(240, 207, 134, .25), transparent 70%); }

/* ---------- sections ---------- */
.section { padding: var(--s-8) 0; }
.section--cream { background: var(--cream); }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section__head { max-width: 40rem; margin-bottom: var(--s-7); }
.kicker { font-size: .8125rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red-deep); margin-bottom: var(--s-3); }
.kicker--gold { color: var(--gold); }
.section__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 6vw, 3.25rem); margin-bottom: var(--s-4); }
.section__intro { color: var(--text-muted); font-size: 1.0625rem; }
.section__head--light .section__intro { color: var(--on-ink-muted); }

/* acts */
.acts { display: grid; gap: var(--s-5); }
.act {
  position: relative; padding: var(--s-6) var(--s-5) var(--s-5);
  background: #FFF9EE; border-radius: var(--radius-m); box-shadow: var(--shadow-s);
  border-top: 6px solid var(--red);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.act:nth-child(even) { border-top-color: var(--teal); }
.act:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.act__num { font-family: var(--font-display); font-size: 2.5rem; line-height: 1; color: var(--gold); display: block; margin-bottom: var(--s-3); }
.act__title { font-size: 1.25rem; font-weight: 700; margin-bottom: var(--s-2); }
.act__text { color: var(--text-muted); }

/* occasions */
.occasions__list { display: grid; gap: var(--s-4); }
.occasion {
  position: relative; padding: var(--s-5) var(--s-5) var(--s-5) 4rem;
  border: 1px solid rgba(227, 176, 75, .3); border-radius: var(--radius-m);
  background: linear-gradient(135deg, rgba(24, 96, 92, .28), rgba(34, 24, 48, .2));
}
.occasion__star {
  position: absolute; left: var(--s-5); top: var(--s-5); width: 24px; height: 24px; background: var(--gold);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.occasion__title { font-size: 1.125rem; font-weight: 700; margin-bottom: var(--s-1); }
.occasion__text { color: var(--on-ink-muted); }

/* process ring */
.ring { display: grid; gap: var(--s-5); counter-reset: none; }
.ring__step { position: relative; padding-left: 4.25rem; }
.ring__dot {
  position: absolute; left: 0; top: 0; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 1.4rem;
  color: var(--cream); background: var(--red);
  box-shadow: 0 0 0 5px var(--cream), 0 0 0 7px var(--red);
}
.ring__step:nth-child(even) .ring__dot { background: var(--teal); box-shadow: 0 0 0 5px var(--cream), 0 0 0 7px var(--teal); }
.ring__title { font-size: 1.2rem; font-weight: 700; margin: .4rem 0 var(--s-1); }
.ring__text { color: var(--text-muted); }

/* band */
.band {
  padding: var(--s-8) 0; color: var(--cream);
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 22px, transparent 22px 44px),
    linear-gradient(135deg, var(--red-deep), var(--red));
}
.band__text { font-family: var(--font-display); font-size: clamp(1.5rem, 4.5vw, 2.5rem); line-height: 1.25; max-width: 52rem; }
.band__text strong { font-weight: 400; color: var(--gold-soft); }

/* contact + ticket */
.contact { display: grid; gap: var(--s-6); }
.contact__head { margin-bottom: 0; }
.contact__direct { margin-top: var(--s-4); color: var(--on-ink-muted); }
.contact__direct a { color: var(--gold); font-weight: 600; }

.ticket {
  position: relative; display: grid; border-radius: var(--radius-m); overflow: hidden;
  background: var(--cream); color: var(--text); box-shadow: var(--shadow-m);
}
.ticket__stub {
  display: flex; align-items: baseline; justify-content: center; gap: var(--s-3);
  padding: var(--s-4); background: var(--red); color: var(--cream);
  font-family: var(--font-display); position: relative;
}
.ticket__stub::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 12px;
  background: radial-gradient(circle, var(--cream) 0 5px, transparent 5.5px) 0 0 / 18px 12px repeat-x;
}
.ticket__admit, .ticket__one { font-size: 1.5rem; }
.ticket__no { font-family: var(--font-body); font-size: .8125rem; font-weight: 700; letter-spacing: .12em; color: var(--gold-soft); }

.form { padding: var(--s-6) var(--s-5); display: grid; gap: var(--s-4); }
.form__row { display: grid; gap: var(--s-4); }
.field { display: grid; gap: var(--s-1); }
.field__label { font-weight: 600; font-size: .9375rem; }
.field__opt { font-weight: 400; color: var(--text-muted); }
.field__input {
  width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4); font: inherit; color: var(--text);
  background: #FFFCF5; border: 2px solid var(--cream-2); border-radius: var(--radius-s);
  transition: border-color .2s;
}
.field__input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(24, 96, 92, .2); }
.field__input--area { resize: vertical; min-height: 130px; }
.field__input[aria-invalid="true"] { border-color: var(--error-dark); }
.field__error { min-height: 1.2em; font-size: .875rem; font-weight: 600; color: var(--error-dark); }
.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: var(--s-3); font-size: .9375rem; }
.field--check .field__error { grid-column: 1 / -1; }
.field__check { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--teal); }
.field--check a { color: var(--teal); font-weight: 600; }
.form__submit { justify-self: start; box-shadow: none; background: var(--ink); color: var(--gold); }
.form__success {
  padding: var(--s-4) var(--s-5); border-radius: var(--radius-s);
  background: rgba(24, 96, 92, .12); border-left: 5px solid var(--teal);
}
.form__success-title { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: var(--s-1); color: var(--teal); }
.form__success:focus { outline: none; }

/* ---------- footer ---------- */
.site-footer { background: #0E0914; color: var(--on-ink); padding: var(--s-7) 0 var(--s-6); border-top: 4px solid var(--gold); }
.site-footer__top { display: grid; gap: var(--s-4); padding-bottom: var(--s-6); border-bottom: 1px solid rgba(245, 236, 218, .12); }
.site-footer__tag { color: var(--on-ink-muted); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.site-footer__nav a { text-decoration: none; font-weight: 600; color: var(--on-ink); }
.site-footer__nav a:hover { color: var(--gold); }
.legal { padding-top: var(--s-5); display: grid; gap: var(--s-2); font-size: .8125rem; line-height: 1.6; color: #D9CFE0; }
.legal a { color: var(--gold-soft); }
.legal__bottom { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-2); }

/* ---------- legal pages ---------- */
.page-hero { background: var(--ink); color: var(--on-ink); padding: var(--s-8) 0 var(--s-7); position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(90deg, var(--red) 0 34px, var(--cream) 34px 68px);
}
.page-hero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 7vw, 3.75rem); margin-bottom: var(--s-3); }
.page-hero__meta { color: var(--on-ink-muted); }
.prose { max-width: 46rem; padding: var(--s-7) 0 var(--s-8); }
.prose h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin: var(--s-6) 0 var(--s-3); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin-bottom: var(--s-4); color: var(--text-muted); }
.prose ul { list-style: disc; padding-left: 1.25rem; }
.prose li { margin-bottom: var(--s-2); }
.prose a { color: var(--teal); font-weight: 600; }
.prose strong { color: var(--text); }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: var(--s-8) 0; background: radial-gradient(80% 60% at 50% 0, #3A1E35, var(--ink) 70%); color: var(--on-ink); }
.notfound__code { font-family: var(--font-display); font-size: clamp(5rem, 24vw, 10rem); line-height: 1; color: var(--gold); }
.notfound__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 5vw, 2.4rem); margin: var(--s-3) 0; }
.notfound__text { color: var(--on-ink-muted); max-width: 30rem; margin: 0 auto var(--s-6); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- breakpoints ---------- */
@media (min-width: 480px) {
  :root { --gutter: 1.5rem; }
  .form { padding: var(--s-6); }
  .form__row { grid-template-columns: 1fr 1fr; }
  .tent { height: 320px; }
}

@media (min-width: 768px) {
  .acts { grid-template-columns: 1fr 1fr; }
  .occasions__list { grid-template-columns: 1fr 1fr; }
  .ring { grid-template-columns: 1fr 1fr; gap: var(--s-6) var(--s-7); }
  .site-footer__top { grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-6); }
  .ticket { grid-template-columns: 140px 1fr; }
  .ticket__stub { flex-direction: column; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); }
  .ticket__stub::after { left: auto; top: 0; bottom: 0; right: auto; left: -6px; width: 12px; height: auto; background: radial-gradient(circle, var(--cream) 0 5px, transparent 5.5px) 0 0 / 12px 18px repeat-y; }
}

@media (min-width: 1024px) {
  :root { --gutter: 2rem; --header-h: 76px; }
  .burger { display: none; }
  .nav { position: static; opacity: 1; transform: none; pointer-events: auto; visibility: visible; background: none; border: 0; }
  .nav__list { flex-direction: row; align-items: center; gap: var(--s-6); padding: 0; }
  .nav__link { border: 0; padding: var(--s-2) 0; }
  .nav__link--cta { padding: var(--s-2) var(--s-5); border: 2px solid var(--gold); border-radius: var(--radius-pill); }
  .nav__link--cta:hover { background: var(--gold); color: var(--ink); }
  .hero { padding-top: var(--s-9); }
  .hero__inner { grid-template-columns: 1.25fr 1fr; gap: var(--s-7); }
  .tent { width: 420px; height: 360px; }
  .tent__roof { height: 160px; }
  .tent__body { top: 212px; height: 122px; }
  .tent__door { width: 80px; height: 100px; margin-left: -40px; }
  .section { padding: var(--s-9) 0; }
  .acts { grid-template-columns: repeat(4, 1fr); }
  .occasions { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--s-8); align-items: start; }
  .occasions .section__head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + var(--s-6)); }
  .ring { grid-template-columns: repeat(4, 1fr); position: relative; }
  .ring::before { content: ""; position: absolute; left: 26px; right: 26px; top: 26px; border-top: 2px dashed var(--gold); z-index: 0; }
  .ring__step { padding-left: 0; padding-top: 4.75rem; }
  .ring__dot { z-index: 1; }
  .contact { grid-template-columns: 1fr 1.5fr; gap: var(--s-8); align-items: start; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee::after { opacity: .6; }
}
