@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* Theme: MELWA – modern red & white */
:root {
  --bg: #f6f6f8;
  --card: #ffffff;
  --card-2: #ffffff;
  --ink: #18181b;
  --ink-2: #52525b;
  --muted: #8b8b94;
  --line: #e6e6eb;
  --red: #ed1c24;          /* MELWA red */
  --red-deep: #b3111a;
  --red-soft: #fff0f0;
  --gold: var(--red);      /* accent aliases used by dashboard */
  --gold-2: var(--red-deep);
  --gold-deep: var(--red-deep);
  --accent: var(--red);
  --accent-ink: #ffffff;
  --accent-soft: var(--red-soft);
  --good: #15803d;
  --bad: #d11a22;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 12px 32px -8px rgba(24,24,27,.10);
  --serif: "Cinzel", Georgia, serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Tamil", "Tamil Sangam MN", "Noto Sans Sinhala", "Sinhala Sangam MN", "Noto Sans Devanagari", "Kohinoor Devanagari", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---------- Progress bar ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: rgba(237,28,36,.12); z-index: 20; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), #ff5a5f); border-radius: 0 4px 4px 0; transition: width .35s ease; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 40px 20px 96px;
  background:
    radial-gradient(520px 320px at 105% -10%, rgba(237,28,36,.16), transparent 70%),
    radial-gradient(460px 300px at -10% 20%, rgba(237,28,36,.10), transparent 70%),
    #fff;
}
/* curved bottom edge with a red line */
.hero::after {
  content: ""; position: absolute; left: -15%; right: -15%; bottom: -60px; height: 120px;
  background: var(--bg); border-radius: 50%;
  border-top: 3px solid var(--red);
  box-shadow: 0 -10px 30px -12px rgba(237,28,36,.35);
  z-index: 1;
}
.hero > * { position: relative; z-index: 2; }
/* language switcher */
.langs {
  display: inline-flex; gap: 2px; padding: 4px; margin: 0 auto 18px; border-radius: 999px;
  background: rgba(255,255,255,.9); border: 1px solid var(--line); box-shadow: 0 4px 14px -8px rgba(24,24,27,.2);
}
.langs button {
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2);
  border: 0; background: transparent; padding: 7px 12px; border-radius: 999px; cursor: pointer; min-height: 34px;
}
.langs button[aria-pressed="true"] { background: var(--red); color: #fff; box-shadow: 0 4px 10px -4px rgba(237,28,36,.6); }
.langs button:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.brand { display: flex; width: max-content; flex-direction: column; align-items: center; margin: 0 auto 16px; }
.brand img { height: 50px; width: auto; display: block; }
.brand .cg { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: .02em; margin-top: 2px; }
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--red-soft); color: var(--red-deep);
  font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
}
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pill.staff { background: var(--ink); color: #fff; }
.chip.staff-chip { border-color: #f5b5b8; background: var(--red-soft); }
.chip.staff-chip b { color: var(--red-deep); }
.event-title {
  font-family: var(--serif); font-weight: 800; margin: 12px 0 6px;
  font-size: clamp(34px, 9vw, 54px); line-height: 1; letter-spacing: .02em; text-transform: uppercase;
  background: linear-gradient(180deg, #ff3b42 0%, var(--red) 45%, var(--red-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.event-title small { display: block; font-size: .36em; letter-spacing: .5em; color: var(--ink); -webkit-text-fill-color: var(--ink); margin-bottom: 4px; }
.tagline { font-size: 15px; color: var(--ink-2); margin: 4px auto 14px; max-width: 420px; }
/* ---------- Live countdown ---------- */
.cd-title { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 4px 0 10px; }
.cd { display: flex; justify-content: center; gap: 10px; margin: 0 auto 22px; }
.cd-box {
  width: 76px; padding: 12px 0 10px; border-radius: 16px; text-align: center;
  background: linear-gradient(160deg, #ff4148 0%, var(--red) 45%, var(--red-deep) 100%);
  color: #fff; box-shadow: 0 12px 24px -12px rgba(237,28,36,.75), inset 0 1px 0 rgba(255,255,255,.25);
  position: relative; overflow: hidden;
}
.cd-box::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.12); }
.cd-box b { display: block; font-size: 32px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cd-box small { display: block; margin-top: 6px; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.cd-box b.flip { animation: flip .35s ease; }
@keyframes flip { 0% { transform: translateY(-30%); opacity: .2; } 100% { transform: none; opacity: 1; } }
.cd-live { padding: 14px 20px; border-radius: 14px; background: var(--red); color: #fff; font-weight: 800; }
.cd.cd-sm { margin: 14px auto 6px; gap: 8px; }
.cd.cd-sm .cd-box { width: 64px; padding: 9px 0 8px; border-radius: 12px; }
.cd.cd-sm .cd-box b { font-size: 24px; }
.cd.cd-sm .cd-box small { font-size: 9px; margin-top: 4px; }

/* sticky mini countdown – appears when the big one scrolls away */
.cd-sticky {
  position: fixed; top: 12px; left: 50%; z-index: 30;
  transform: translate(-50%, -150%); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(24,24,27,.92); color: #fff; backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.35); font-size: 13px;
  transition: transform .3s ease, opacity .3s ease;
}
.cd-sticky.show { transform: translate(-50%, 0); opacity: 1; }
.cd-sticky b { font-variant-numeric: tabular-nums; font-weight: 800; color: #ff6b70; }
.cd-sticky .to { opacity: .8; }
.cd-sticky .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(237,28,36,.25); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(237,28,36,.05); } }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; margin: 0 auto; text-align: left; }
.chip {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 14px -6px rgba(24,24,27,.10);
}
.chip.wide { grid-column: span 2; }
.chip svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chip b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; }

/* ---------- Layout & cards ---------- */
.wrap { max-width: 600px; margin: -10px auto 48px; padding: 0 16px; position: relative; z-index: 3; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  margin-bottom: 16px;
}
.card h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 800; margin: 0 0 18px; color: var(--ink); letter-spacing: -.01em;
}
.card h2 .num {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; font-size: 13px; font-weight: 800;
  background: linear-gradient(135deg, #ff4d53, var(--red-deep)); color: #fff;
  box-shadow: 0 4px 10px -2px rgba(237,28,36,.45);
}
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
label.lbl { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--ink); }
label.lbl .req { color: var(--red); }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.hint b { color: var(--ink-2); }
input[type=text], input[type=tel], input[type=password], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fafafb;
  color: var(--ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ed1c24' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
input::placeholder, textarea::placeholder { color: #a9a9b2; }
select:disabled { opacity: .6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); background-color: #fff; box-shadow: 0 0 0 4px rgba(237,28,36,.12); }
.choices { display: grid; gap: 10px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 12px 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fafafb;
  cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  transition: all .15s ease;
}
.choice span:hover { border-color: #f5a3a6; background: #fff; }
.choice input:checked + span {
  border-color: var(--red); background: var(--red); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(237,28,36,.6);
}
.choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(237,28,36,.2); }
.hidden { display: none !important; }
.rules { margin: 0 0 16px; padding: 16px 16px 16px 36px; background: #fafafb; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; color: var(--ink-2); max-height: 300px; overflow-y: auto; }
.rules li { margin-bottom: 9px; padding-left: 4px; }
.rules li:last-child { margin-bottom: 0; }
.rules li::marker { color: var(--red); font-weight: 800; }
.agree { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1.5px solid #f7c1c3; border-radius: 14px; background: var(--red-soft); cursor: pointer; font-size: 14px; }
.agree input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--red); }
.agree b { color: var(--red-deep); }
.agree .req { color: var(--red); }
.btn {
  display: inline-block;
  width: 100%;
  padding: 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff4148, var(--red) 40%, var(--red-deep));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(237,28,36,.7);
  transition: transform .1s ease, box-shadow .15s ease;
}
.btn:hover { box-shadow: 0 14px 28px -10px rgba(237,28,36,.8); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.secondary { background: #fff; color: var(--red); border: 1.5px solid var(--red); box-shadow: none; }
.btn.secondary:hover { background: var(--red-soft); }
.err { color: var(--bad); font-size: 13px; margin: 0 0 12px; font-weight: 600; padding: 10px 12px; background: var(--red-soft); border-radius: 10px; }
.banner { padding: 10px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 16px; background: #fff8e6; color: #7a5600; border: 1px solid #f3dea6; }
.done { text-align: center; padding: 40px 22px; }
.done .tick {
  width: 72px; height: 72px; border-radius: 50%; font-size: 36px; line-height: 72px; margin: 0 auto 16px;
  background: linear-gradient(135deg, #ff4d53, var(--red-deep)); color: #fff;
  box-shadow: 0 0 0 10px var(--red-soft);
}
.done h2 { justify-content: center; font-size: 22px; }
.done p { color: var(--ink-2); }
.summary { text-align: left; background: #fafafb; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 18px 0; font-size: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.summary div:last-child { border-bottom: 0; }
.summary div span { color: var(--muted); }
.summary div b { font-weight: 700; text-align: right; }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 14px; }

/* ---------- Phone ---------- */
@media (max-width: 480px) {
  .hero { padding: 30px 14px 84px; }
  .brand img { height: 40px; }
  .brand .cg { font-size: 12px; }
  .pill { font-size: 10px; letter-spacing: .16em; }
  .tagline { font-size: 14px; }
  .chips { gap: 8px; }
  .chip { padding: 10px 12px; }
  .chip b { font-size: 13px; }
  .wrap { padding: 0 12px; }
  .langs button { padding: 7px 10px; font-size: 12.5px; }
  .cd { gap: 8px; }
  .cd-box { width: 70px; }
  .cd-box b { font-size: 28px; }
  .cd-sticky { font-size: 12px; padding: 7px 14px; }
  .card { padding: 20px 16px; border-radius: 18px; }
  .rules { max-height: 240px; font-size: 13px; padding: 12px 12px 12px 30px; }
  .btn { padding: 17px; font-size: 17px; }
}

/* Tamil / Sinhala / Hindi: no letter-spacing (it breaks joined letters), slightly larger small labels */
html:not([lang="en"]) .pill,
html:not([lang="en"]) .cd-title,
html:not([lang="en"]) .cd-box small,
html:not([lang="en"]) .chip small,
html:not([lang="en"]) .card h2 { letter-spacing: 0; text-transform: none; }
html:not([lang="en"]) .pill { font-size: 12px; }
html:not([lang="en"]) .cd-title { font-size: 13px; }
html:not([lang="en"]) .cd-box small { font-size: 11px; }
html:not([lang="en"]) .chip small { font-size: 11px; }

/* already registered */
.done .tick.info { background: linear-gradient(135deg, #ffb020, #e07b00); box-shadow: 0 0 0 10px #fff4e0; font-weight: 800; }
.hr-note { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--red-soft); border: 1.5px solid #f7c1c3; color: var(--red-deep); text-align: center; font-size: 15px; }
.hr-note div { margin-top: 4px; font-weight: 700; color: var(--ink); }

.site-foot { text-align: center; padding: 22px 16px 32px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 8px; }
.call-btn { display: inline-block; margin-top: 10px; padding: 10px 18px; border-radius: 999px; background: var(--red); color: #fff !important; font-weight: 800; text-decoration: none; box-shadow: 0 6px 14px -6px rgba(237,28,36,.6); }
.hr-note div .call-btn { display: block; width: max-content; margin: 10px auto 0; }
