/* ===== Colegio Brains · CNY 2027 ========================================
   Palette, imagery & mood drawn from the event poster drafts:
   warm red/gold/orange, lanterns, cherry blossom, traditional architecture. */

:root {
  --red-deep: #5c0f14;
  --red: #8a1620;
  --red-bright: #c8292f;
  --orange: #e8542a;
  --gold: #e3b341;
  --gold-soft: #f3d98b;
  --cream: #fff6e8;
  --ink: #2a1210;
  --ink-soft: #5a3a35;

  --font-display: "Playfair Display", "Noto Serif SC", serif;
  --font-body: "Noto Sans", "Noto Sans SC", system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --max-width: 1140px;

  --shadow-soft: 0 10px 30px rgba(42, 18, 16, 0.18);
  --shadow-strong: 0 18px 50px rgba(42, 18, 16, 0.32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.4em; color: var(--red-deep); }
p { margin: 0 0 1em; }

a { color: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.8em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--red-bright));
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-strong); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255, 246, 232, 0.7);
  color: var(--cream);
}
.btn-ghost:hover { background: rgba(255, 246, 232, 0.12); }
.btn-wide { width: 100%; }

/* ===== petals ===== */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -5vh;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, var(--gold-soft), var(--orange) 70%);
  border-radius: 60% 0 60% 0;
  animation-name: petal-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes petal-fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 20px), 110vh, 0) rotate(360deg); }
}

/* ===== header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: linear-gradient(to bottom, rgba(42, 18, 16, 0.55), transparent);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(42, 18, 16, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--cream);
}
.brand-mark {
  font-family: var(--font-display);
  background: var(--gold);
  color: var(--red-deep);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.brand-text { font-weight: 700; font-size: 1.05rem; }
.brand-text small { display: block; font-weight: 500; font-size: 0.7rem; opacity: 0.85; letter-spacing: 0.08em; }

.main-nav {
  display: flex;
  gap: 1.6rem;
}
.main-nav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.9;
}
.main-nav a:hover { opacity: 1; }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.lang-toggle {
  background: rgba(255, 246, 232, 0.12);
  border: 1px solid rgba(255, 246, 232, 0.4);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.4em 0.9em;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.lang-toggle [data-lang-chip] { opacity: 0.55; }
.lang-toggle [data-lang-chip].active { opacity: 1; text-decoration: underline; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--cream); border-radius: 2px; }

/* ===== hero ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--cream);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(28, 10, 10, 0.92) 0%, rgba(42, 15, 14, 0.45) 45%, rgba(42, 15, 14, 0.15) 75%),
    linear-gradient(to right, rgba(28, 10, 10, 0.35), transparent 60%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1.25rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-soft);
  margin-bottom: 0.9rem;
}
.lantern-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px var(--orange);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}
.hero h1 {
  color: var(--cream);
  font-size: clamp(2.1rem, 7vw, 4rem);
  font-weight: 900;
  max-width: 14ch;
  margin-bottom: 0.5rem;
}
.hero-sub {
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  max-width: 44ch;
  color: rgba(255, 246, 232, 0.9);
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.fact {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
  font-size: 1rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; }

.scroll-cue {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-cue span {
  display: block;
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255, 246, 232, 0.6);
  border-radius: 999px;
  position: relative;
}
.scroll-cue span::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  background: var(--gold-soft);
  border-radius: 999px;
  transform: translateX(-50%);
  animation: scroll-cue 1.6s ease-in-out infinite;
}
@keyframes scroll-cue {
  0% { opacity: 1; top: 6px; }
  70% { opacity: 0; top: 18px; }
  100% { opacity: 0; top: 6px; }
}

/* ===== reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== stats strip ===== */
.stats-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  background: var(--red-deep);
  color: var(--cream);
  padding: 2rem 1.25rem;
  text-align: center;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-soft);
}
.stat span { font-size: 0.85rem; opacity: 0.85; }

/* ===== sections ===== */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 860px) {
  .section { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .program .section-copy { order: 1; }
  .program .section-media { order: 2; }
}

.section-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red-bright);
  margin-bottom: 0.5rem;
}
.kicker.light { color: var(--gold-soft); }

.about h2, .program h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }

.hosts {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}
.hosts-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  background: rgba(138, 22, 32, 0.08);
  padding: 0.3em 0.7em;
  border-radius: 999px;
}

.badge {
  display: inline-block;
  background: var(--gold);
  color: var(--red-deep);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.program-note { color: var(--ink-soft); font-size: 0.95rem; }

.program-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  counter-reset: act;
  display: grid;
  gap: 0.6rem;
}
.program-list li {
  counter-increment: act;
  display: flex;
  align-items: baseline;
  gap: 0.8em;
  padding: 0.65em 0.9em;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(42, 18, 16, 0.08);
  font-weight: 600;
}
.program-list li::before {
  content: counter(act, decimal-leading-zero);
  font-family: var(--font-display);
  color: var(--gold);
  font-weight: 700;
  min-width: 1.6em;
}

/* ===== signup ===== */
.signup {
  position: relative;
  max-width: none;
  display: block;
  padding: 0;
  color: var(--cream);
}
.signup-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.signup-bg img { width: 100%; height: 100%; object-fit: cover; }
.signup-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, rgba(28, 10, 10, 0.95) 10%, rgba(92, 15, 20, 0.92) 60%, rgba(28, 10, 10, 0.96));
}
.signup-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}
.signup h2 { color: var(--cream); font-size: clamp(1.8rem, 5vw, 2.6rem); }
.signup-intro { max-width: 60ch; color: rgba(255, 246, 232, 0.88); }

.tracks {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 2rem 0 3rem;
}
.track-card {
  background: rgba(255, 246, 232, 0.08);
  border: 1px solid rgba(255, 246, 232, 0.18);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.track-card h3 { color: var(--gold-soft); font-size: 1.1rem; }
.track-card p { font-size: 0.9rem; color: rgba(255, 246, 232, 0.82); margin-bottom: 0; }

.signup-form {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  background: rgba(255, 246, 232, 0.06);
  border: 1px solid rgba(255, 246, 232, 0.18);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--gold-soft); }
.field input, .field select, .field textarea {
  background: rgba(255, 246, 232, 0.95);
  border: none;
  border-radius: 10px;
  padding: 0.75em 0.9em;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.signup-form .btn { grid-column: 1 / -1; margin-top: 0.4rem; }
.form-status { grid-column: 1 / -1; margin: 0; font-weight: 600; min-height: 1.2em; }
.form-status.success { color: var(--gold-soft); }
.form-status.error { color: #ffb4a8; }

/* ===== closing ===== */
.closing { position: relative; }
.closing img { width: 100%; max-height: 70vh; object-fit: cover; }
.closing-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 10, 10, 0.25);
}
.closing-overlay p {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  text-align: center;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  margin: 0;
}

/* ===== footer ===== */
.site-footer {
  background: var(--ink);
  color: rgba(255, 246, 232, 0.75);
  text-align: center;
  padding: 2.5rem 1.25rem;
  font-size: 0.85rem;
}
.site-footer p { margin: 0.3em 0; }
.credits { color: var(--gold-soft); font-weight: 600; }

/* ===== responsive nav ===== */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 300px);
    background: var(--red-deep);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 39;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1.2rem; }
}
