@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Permanent+Marker&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0d0509;
  --bg-2: #170810;
  --primary: #ff2e93;
  --primary-2: #ff7cc0;
  --secondary: #ffffff;
  --accent: #ffd23f;

  --surface: #1a0a12;
  --surface-2: #241019;
  --border: rgba(255, 130, 190, 0.16);
  --text: #fff5fa;
  --text-dim: #d9a8bf;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);

  --font-display: 'Baloo 2', 'Inter', sans-serif;
  --font-script: 'Permanent Marker', cursive;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in srgb, var(--primary) 55%, transparent); color: #fff; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }

.script {
  font-family: var(--font-script);
  color: var(--primary-2);
  font-weight: 400;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary-2);
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--primary-2); border-radius: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #c2137e);
  color: #fff;
  box-shadow: 0 10px 30px rgba(255, 46, 147, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(255, 46, 147, 0.5); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 4, 8, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled {
  background: rgba(10, 4, 8, 0.86);
  border-bottom-color: var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--secondary);
}
.brand img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a:not(.btn) {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.nav-links a:not(.btn):hover { color: var(--secondary); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { position: fixed; top: 72px; left: 0; right: 0; background: rgba(10,4,8,0.98); flex-direction: column; align-items: stretch; padding: 20px 24px 28px; gap: 16px; border-bottom: 1px solid var(--border); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all 0.2s ease; }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a.btn { align-self: flex-start; }
  .nav-toggle { display: block; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../assets/hero-bows-web.webp');
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.03);
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,4,8,0.55) 0%, rgba(10,4,8,0.45) 40%, rgba(10,4,8,0.92) 100%),
    radial-gradient(circle at 50% 0%, rgba(255,46,147,0.18), transparent 60%);
}
.sparkle-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.sparkle {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  animation: twinkle 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.6); } 50% { opacity: 0.9; transform: scale(1.15); } }

.hero-content { position: relative; z-index: 2; text-align: center; width: 100%; }
.hero-content .eyebrow { justify-content: center; margin-bottom: 18px; }
.hero-content h1 {
  font-size: clamp(46px, 8.5vw, 96px);
  line-height: 0.98;
  letter-spacing: 0.5px;
  text-shadow: 0 6px 30px rgba(0,0,0,0.4);
}
.hero-content h1 .script {
  display: block;
  font-size: 0.42em;
  margin: 6px 0;
}
.hero-content p.sub {
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--text-dim);
  font-size: 17px;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 46px;
  flex-wrap: wrap;
}
.countdown .unit {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  min-width: 84px;
  backdrop-filter: blur(6px);
}
.countdown .unit strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--secondary);
}
.countdown .unit span {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2px;
}

.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- sections ---------- */

section { position: relative; padding: 100px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(30px, 4.5vw, 46px); margin-top: 14px; }
.section-head p { color: var(--text-dim); margin-top: 14px; font-size: 16px; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* about */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: center;
}
.about-card .icon { font-size: 34px; margin-bottom: 14px; }
.about-card h3 { font-size: 19px; margin-bottom: 8px; }
.about-card p { color: var(--text-dim); font-size: 14.5px; margin: 0; }

/* two cards instead of three: centered pair */
.about-pair { grid-template-columns: repeat(2, 1fr); max-width: 820px; margin-left: auto; margin-right: auto; }

/* register: ECYSA (free, password) vs. outside teams (paid) */
.register-grid { grid-template-columns: repeat(2, 1fr); max-width: 820px; margin-left: auto; margin-right: auto; }
.register-grid .about-card { display: flex; flex-direction: column; align-items: center; }
.register-grid .about-card p { flex: 1; margin-bottom: 22px; }

@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

/* divisions */
.divisions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 860px) { .divisions-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .divisions-grid { grid-template-columns: 1fr; } }
.division-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
}
.division-card::after {
  content: '';
  position: absolute; top: -40%; right: -40%;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(255,46,147,0.35), transparent 70%);
}
.division-card .age { font-family: var(--font-display); font-size: 15px; color: var(--primary-2); letter-spacing: 0.5px; }
.division-card h3 { font-size: 24px; margin: 6px 0 10px; }
.division-card p { color: var(--text-dim); font-size: 14px; margin: 0; }
.div-facts { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border); display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13.5px; position: relative; z-index: 1; }
.div-facts dt { color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.div-facts dd { margin: 0; color: var(--text); line-height: 1.45; }
.div-facts .level-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.div-facts .level-tags span { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.08); color: var(--text); }
.div-cutoff { text-align: center; color: var(--text-dim); font-size: 14.5px; margin: 22px auto 0; }
.div-cutoff strong { color: var(--text); }
.levels-panel {
  margin-top: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
}
.levels-panel h3 { font-size: 24px; margin: 0 0 6px; }
.levels-panel p { color: var(--text-dim); font-size: 14px; margin: 0; }
.division-card .level-tags, .levels-panel .level-tags { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.division-card .level-tags span, .levels-panel .level-tags span {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.08); color: var(--text-dim);
}
.levels-panel .level-tags { justify-content: center; margin-top: 16px; gap: 8px; }
.levels-panel .level-tags span { font-size: 13px; padding: 6px 14px; color: var(--text); }

/* in-page editor (cms-service): show every FAQ answer while editing */
.faq-a:has([contenteditable="true"]) { max-height: none !important; }

/* rules & scoring */
.rules-actions { justify-content: center; margin-top: 22px; }
.rules-judges { margin-top: 0; }
.rules-table-wrap { margin-top: 26px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.rules-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14.5px; }
.rules-table caption { caption-side: top; text-align: left; padding: 18px 20px 4px; color: var(--text-dim); font-size: 13px; }
.rules-table th, .rules-table td { padding: 12px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.rules-table thead th { font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-dim); }
.rules-table tbody tr:last-child th, .rules-table tbody tr:last-child td { border-bottom: 0; }
.rules-table tbody th { white-space: nowrap; }
.rules-table td { font-variant-numeric: tabular-nums; }
.rules-table a, .rules-note a, .rules-deductions a { color: var(--primary-2); }
.rules-links { white-space: nowrap; }
.rules-note { color: var(--text-dim); font-size: 14px; text-align: center; max-width: 760px; margin: 18px auto 0; }
.deduction-list { list-style: none; padding: 0; margin: 18px auto 0; max-width: 720px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; text-align: left; }
.deduction-list li { display: flex; gap: 12px; align-items: baseline; color: var(--text); font-size: 14.5px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.deduction-list strong { min-width: 34px; color: var(--primary-2); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .deduction-list { grid-template-columns: 1fr; } }

/* pricing / info strip */
.info-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  text-align: center;
}
.info-strip .stat strong { display: block; font-family: var(--font-display); font-size: 30px; color: var(--secondary); }
.info-strip .stat span { display: block; font-size: 12px; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }
@media (max-width: 760px) { .info-strip { grid-template-columns: repeat(2, 1fr); } }

/* schedule */
.schedule-list { max-width: 640px; margin: 0 auto; border-left: 2px solid var(--border); padding-left: 28px; }
.schedule-item { position: relative; padding-bottom: 30px; }
.schedule-item:last-child { padding-bottom: 0; }
.schedule-item::before {
  content: ''; position: absolute; left: -34px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 4px rgba(255,46,147,0.2);
}
.schedule-item time { font-family: var(--font-display); font-size: 15px; color: var(--primary-2); }
.schedule-item h4 { font-size: 18px; margin: 4px 0 4px; }
.schedule-item p { color: var(--text-dim); font-size: 14px; margin: 0; }

/* venue */
.venue-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.venue-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.venue-card h3 { font-size: 24px; margin-bottom: 12px; }
.venue-card ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.venue-card li { display: flex; gap: 10px; color: var(--text-dim); font-size: 14.5px; }
.venue-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); height: 320px; }
.venue-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.2) invert(0.92) contrast(0.9); }
@media (max-width: 860px) { .venue-grid { grid-template-columns: 1fr; } .venue-map { height: 260px; } }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, #c2137e, #ff2e93 55%, #ff7cc0);
  border-radius: 28px;
  padding: 60px 40px;
  text-align: center;
  margin: 0 24px;
  max-width: 1132px;
  margin-inline: auto;
}
.cta-banner h2 { font-size: clamp(28px, 4.5vw, 42px); color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.9); margin-top: 12px; }
.cta-banner .btn-primary { background: #fff; color: #c2137e; box-shadow: 0 10px 30px rgba(0,0,0,0.25); margin-top: 26px; }
.cta-banner .btn-primary:hover { box-shadow: 0 16px 36px rgba(0,0,0,0.35); }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; color: var(--text);
  padding: 20px 24px; font-family: var(--font-body); font-weight: 700; font-size: 15.5px;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer; gap: 16px;
}
.faq-q .plus { font-size: 20px; color: var(--primary-2); transition: transform 0.2s ease; flex-shrink: 0; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-a p { color: var(--text-dim); font-size: 14.5px; padding: 0 24px 20px; margin: 0; }

/* footer */
.site-footer { padding: 50px 0 30px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text-dim); font-size: 14px; }
.footer-grid a:hover { color: var(--secondary); }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 18px; margin-bottom: 10px; }
.footer-brand img { width: 34px; height: 34px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--text-dim); font-size: 13px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.demo-banner {
  background: #241019; color: #ffd23f; border-bottom: 1px solid var(--border);
  text-align: center; font-size: 13px; font-weight: 600; padding: 10px 16px;
  position: fixed; top: 72px; left: 0; right: 0; z-index: 99;
}
