:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #111827;
  --text: #151515;
  --muted: #667085;
  --line: rgba(17, 24, 39, 0.12);
  --accent: #ff4f18;
  --accent-dark: #d83d0d;
  --radius: 24px;
  --shadow: 0 22px 70px rgba(17, 24, 39, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  min-height: 78vh;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 79, 24, .24), transparent 34%),
    linear-gradient(135deg, #111827 0%, #1f2937 52%, #31130b 100%);
  color: #fff;
  border-bottom-left-radius: 38px;
  border-bottom-right-radius: 38px;
}

.nav {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  letter-spacing: -.04em;
}
.brand strong { display: block; line-height: 1.1; font-size: 1.05rem; }
.brand small { color: rgba(255,255,255,.68); }
.nav-link {
  text-decoration: none;
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.22);
  padding: 10px 16px;
  border-radius: 999px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.lang-button {
  min-width: 42px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,.76);
  font-weight: 900;
  font-size: .78rem;
  letter-spacing: .04em;
  cursor: pointer;
}
.lang-button:hover,
.lang-button.is-active {
  background: #fff;
  color: #111827;
}


.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .7fr);
  gap: 42px;
  align-items: center;
  padding: 70px 0 92px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .76rem;
}
.hero h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(2.35rem, 6vw, 5.9rem);
  line-height: .95;
  letter-spacing: -.07em;
}
.hero-text {
  max-width: 660px;
  color: rgba(255,255,255,.78);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.7;
  margin: 24px 0 30px;
}
.primary-cta, .event-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.primary-cta:hover, .event-button:hover { transform: translateY(-2px); background: var(--accent-dark); }

.hero-card {
  display: grid;
  place-items: center;
}
.ticket-shape {
  width: min(360px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 34px;
  padding: 34px;
  background:
    linear-gradient(160deg, rgba(255,255,255,.92), rgba(255,255,255,.72)),
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(255, 79, 24, .18) 16px 32px);
  color: #111827;
  box-shadow: 0 30px 100px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: rotate(4deg);
}
.ticket-shape span {
  width: fit-content;
  background: #111827;
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}
.ticket-shape strong {
  font-size: 4rem;
  line-height: .9;
  letter-spacing: -.08em;
}
.ticket-shape em { color: var(--accent-dark); font-weight: 800; }

.events-section { padding: 72px 0 40px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 28px;
}
.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: -.06em;
  margin: 0;
}
.section-heading p:last-child { color: var(--muted); margin: 0; max-width: 420px; line-height: 1.6; }

.status {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.62);
  border-radius: 18px;
  color: var(--muted);
  margin-bottom: 22px;
}
.status[hidden] { display: none; }

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.event-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.event-media {
  aspect-ratio: 16 / 10;
  background: #e5e7eb;
  overflow: hidden;
}
.event-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.event-card:hover .event-media img { transform: scale(1.04); }
.event-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.event-date {
  color: var(--accent-dark);
  font-weight: 900;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.event-title {
  font-size: 1.35rem;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -.03em;
}
.event-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}
.event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 8px;
}
.price {
  font-weight: 900;
  color: #111827;
}
.event-button { min-height: 44px; padding-inline: 16px; }

.widget-dialog {
  width: min(980px, calc(100% - 24px));
  max-height: min(86vh, 900px);
  border: 0;
  border-radius: 26px;
  padding: 0;
  box-shadow: 0 30px 120px rgba(0,0,0,.42);
  overflow: hidden;
}
.widget-dialog::backdrop { background: rgba(17, 24, 39, .72); backdrop-filter: blur(4px); }
.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 14px;
  border-bottom: 1px solid var(--line);
}
.dialog-header h2 { margin: 0; line-height: 1; letter-spacing: -.04em; }
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.widget-mount {
  padding: 20px 24px;
  overflow: auto;
  max-height: 68vh;
}
.widget-fallback {
  margin: 0;
  padding: 0 24px 24px;
  color: var(--muted);
  font-size: .95rem;
}
.site-footer { padding: 34px 0 48px; color: var(--muted); }

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; padding-top: 42px; }
  .hero-card { display: none; }
  .events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { display: block; }
  .section-heading p:last-child { margin-top: 10px; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 22px, 1180px); }
  .site-header { min-height: auto; border-bottom-left-radius: 24px; border-bottom-right-radius: 24px; }
  .nav { min-height: 72px; align-items: flex-start; padding-top: 14px; }
  .nav-actions { flex-direction: column-reverse; align-items: flex-end; gap: 8px; }
  .nav-link { display: none; }
  .language-switcher { padding: 4px; gap: 4px; }
  .lang-button { min-width: 36px; height: 30px; font-size: .72rem; }
  .brand-mark { width: 42px; height: 42px; border-radius: 14px; }
  .hero { padding: 38px 0 62px; }
  .hero h1 { letter-spacing: -.055em; }
  .events-section { padding-top: 46px; }
  .events-grid { grid-template-columns: 1fr; gap: 18px; }
  .event-body { padding: 18px; }
  .event-footer { align-items: stretch; flex-direction: column; }
  .event-button { width: 100%; }
  .dialog-header { padding: 18px 18px 12px; }
  .widget-mount { padding: 16px 18px; max-height: 70vh; }
}

/* Editable visual settings from admin panel */
:root {
  --hero-text-color: #ffffff;
  --button-text-color: #ffffff;
  --hero-start: #111827;
  --hero-middle: #1f2937;
  --hero-end: #31130b;
  --hero-glow: #ff4f18;
  --ticket-rotation: 4deg;
}
.site-header {
  background:
    radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--hero-glow) 24%, transparent), transparent 34%),
    linear-gradient(135deg, var(--hero-start) 0%, var(--hero-middle) 52%, var(--hero-end) 100%);
  color: var(--hero-text-color);
}
.site-header.has-custom-bg {
  position: relative;
  overflow: hidden;
  background-image: var(--hero-bg-image), linear-gradient(135deg, var(--hero-start) 0%, var(--hero-middle) 52%, var(--hero-end) 100%);
  background-size: cover;
  background-position: center;
}
.site-header.has-custom-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--hero-glow) 26%, transparent), transparent 34%),
    linear-gradient(135deg, rgba(17, 24, 39, var(--hero-overlay, .55)), rgba(31, 41, 55, var(--hero-overlay, .55)), rgba(49, 19, 11, var(--hero-overlay, .55)));
  pointer-events: none;
}
.site-header.has-custom-bg > * { position: relative; z-index: 1; }
.brand-mark.has-logo-image {
  background: transparent;
  overflow: hidden;
  padding: 0;
}
.brand-mark.has-logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.primary-cta, .event-button {
  color: var(--button-text-color);
  border-radius: calc(var(--button-radius, 999) * 1px);
}
.event-card { border-radius: calc(var(--radius) * 1px); }
.event-media img { object-fit: var(--event-image-fit, cover); }
.ticket-shape { transform: rotate(var(--ticket-rotation)); }
.hero-card.is-hidden { display: none; }
.footer-brand::after { content: ''; }

/* Advanced admin design controls */
:root {
  --page-bg-composed: #f7f5f0;
  --page-bg-image: none;
  --page-bg-image-opacity: 0;
  --page-bg-image-size: cover;
  --page-bg-image-position: center center;
  --page-overlay-color: rgba(255,255,255,0);
  --hero-gradient-angle: 135deg;
  --hero-fourth: #120a24;
  --hero-bg-image-opacity: 1;
  --hero-bg-size: cover;
  --hero-bg-position: center center;
  --hero-bg-blend: normal;
  --ticket-width: 360px;
  --ticket-aspect-w: 4;
  --ticket-aspect-h: 5;
  --ticket-padding: 34px;
  --ticket-radius: 34px;
  --ticket-x: 0px;
  --ticket-y: 0px;
  --ticket-scale: 1;
  --ticket-bg: linear-gradient(160deg, rgba(255,255,255,.92), rgba(255,255,255,.72)), repeating-linear-gradient(45deg, transparent 0 16px, rgba(255,79,24,.18) 16px 32px);
  --ticket-bg-size: cover;
  --ticket-bg-position: center center;
  --ticket-text-color: #111827;
  --ticket-badge-bg: #111827;
  --ticket-badge-text: #ffffff;
  --ticket-brand-color: #d83d0d;
  --ticket-shadow-opacity: .35;
  --ticket-title-size: 64px;
  --ticket-badge-size: 16px;
  --ticket-brand-size: 18px;
}
body {
  background: var(--page-bg-composed, var(--bg));
  isolation: isolate;
  min-height: 100vh;
}
body.has-page-bg::before,
body.has-page-bg::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body.has-page-bg::before {
  z-index: 0;
  background-image: var(--page-bg-image);
  background-size: var(--page-bg-image-size);
  background-position: var(--page-bg-image-position);
  background-repeat: no-repeat;
  opacity: var(--page-bg-image-opacity);
}
body.has-page-bg::after {
  z-index: 0;
  background: var(--page-overlay-color);
}
body.has-page-bg > * { position: relative; z-index: 1; }
.site-header {
  background:
    radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--hero-glow) 24%, transparent), transparent 34%),
    linear-gradient(var(--hero-gradient-angle), var(--hero-start) 0%, var(--hero-middle) 38%, var(--hero-end) 70%, var(--hero-fourth) 100%);
}
.site-header.has-custom-bg {
  background:
    radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--hero-glow) 24%, transparent), transparent 34%),
    linear-gradient(var(--hero-gradient-angle), var(--hero-start) 0%, var(--hero-middle) 38%, var(--hero-end) 70%, var(--hero-fourth) 100%);
}
.site-header.has-custom-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg-image);
  background-size: var(--hero-bg-size);
  background-position: var(--hero-bg-position);
  background-repeat: no-repeat;
  background-blend-mode: var(--hero-bg-blend);
  opacity: var(--hero-bg-image-opacity);
  pointer-events: none;
  z-index: 0;
}
.site-header.has-custom-bg::before { z-index: 1; }
.site-header.has-custom-bg > * { z-index: 2; }
.hero-card {
  transform: translate(var(--ticket-x), var(--ticket-y)) scale(var(--ticket-scale));
  transform-origin: center;
}
.ticket-shape {
  width: min(var(--ticket-width), 100%);
  aspect-ratio: var(--ticket-aspect-w) / var(--ticket-aspect-h);
  border-radius: var(--ticket-radius);
  padding: var(--ticket-padding);
  background: var(--ticket-bg);
  background-size: var(--ticket-bg-size);
  background-position: var(--ticket-bg-position);
  color: var(--ticket-text-color);
  box-shadow: 0 30px 100px rgba(0,0,0,var(--ticket-shadow-opacity));
}
.ticket-shape span {
  background: var(--ticket-badge-bg);
  color: var(--ticket-badge-text);
  font-size: var(--ticket-badge-size);
}
.ticket-shape strong { font-size: var(--ticket-title-size); }
.ticket-shape em { color: var(--ticket-brand-color); font-size: var(--ticket-brand-size); }
@media (max-width: 940px) {
  .hero-card.show-on-mobile { display: grid; }
}


/* Ticket admin fixes: empty text fields must really disappear, and full-image mode must not add panel text over the uploaded image. */
.ticket-shape span:empty,
.ticket-shape strong:empty,
.ticket-shape em:empty {
  display: none !important;
}
.ticket-shape.ticket-image-full > span,
.ticket-shape.ticket-image-full > strong,
.ticket-shape.ticket-image-full > em {
  display: none !important;
}
