/* ==========================================================================
   Typography & Font Definitions
   ========================================================================== */
@font-face {
  font-family: 'Nexa';
  src: url('./assets/fonts/Nexa-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nexa';
  src: url('./assets/fonts/Nexa-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nexa';
  src: url('./assets/fonts/Nexa-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Design Tokens & Variables
   ========================================================================== */
:root {
  --navy: #12233f;
  --blue: #1b6fae;
  --blue-hover: #15598d;
  --sky: #8fc7ea;
  --sky-light: #f0f7fc;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #16202c;
  --muted: #5a6878;
  --line: #e1e7ef;
  --line-light: #edf2f7;
  --error: #c0392b;
  --radius: 14px;
  --radius-sm: 8px;
  --block-gradient: linear-gradient(135deg, var(--navy) 0%, var(--blue) 60%, var(--sky) 100%);
  --shadow-card: 0 20px 50px rgba(18, 35, 63, 0.08);
  --shadow-subtle: 0 4px 12px rgba(18, 35, 63, 0.03);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Global Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(27, 111, 174, 0.06), transparent 40%),
    radial-gradient(circle at 88% 92%, rgba(143, 199, 234, 0.08), transparent 45%);
  font-family: 'Nexa', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 36px 20px;
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--blue-hover);
  text-decoration: underline;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Card Layout Container
   ========================================================================== */
.card {
  width: 100%;
  max-width: 800px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 40px;
  animation: rise 0.5s ease both;
  transition: var(--transition);
}

.card.card-success {
  max-width: 480px;
  padding: 44px 32px;
  align-self: center;
  margin: auto;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Header & Program Info
   ========================================================================== */
.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.logo-container img {
  max-height: 72px;
  width: auto;
  object-fit: contain;
}

.card-head {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 2px dashed var(--line);
}

.card-head h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin: 0 0 16px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.program-badge {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  background-color: var(--sky-light);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-light);
  margin-bottom: 28px;
}

.info-section {
  margin-bottom: 24px;
}

.info-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--sky-light);
}

.info-section p.sub {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  text-align: justify;
}

.info-section ul.sub {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
}

.info-section ul.sub li {
  margin-bottom: 6px;
}

.info-section ul.sub li:last-child {
  margin-bottom: 0;
}

.details-box {
  background-color: #fafbfc;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 28px 0;
  font-size: 14px;
  color: var(--ink);
  box-shadow: var(--shadow-subtle);
}

.details-box p {
  line-height: 1.8;
}

.contact-section {
  padding-top: 20px;
  border-top: 1px solid var(--line-light);
}

.contact-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
}

.contact-card {
  margin-bottom: 16px;
}

.contact-card:last-child {
  margin-bottom: 0;
}

.contact-card h5 {
  font-size: 14px;
  color: var(--navy);
  margin: 0 0 4px;
  font-weight: 700;
}

/* ==========================================================================
   Form Components
   ========================================================================== */
.reg-form {
  margin-top: 0;
}

.group {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.group:first-of-type {
  border-top: none;
  padding-top: 0;
}

.group-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-light);
}

.field {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.field:last-child {
  margin-bottom: 0;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.row:last-child {
  margin-bottom: 0;
}

.row .field {
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 111, 174, 0.12);
}

.field-error {
  display: none;
  font-size: 12.5px;
  color: var(--error);
  margin-top: 6px;
}

.field-error.visible {
  display: block;
}

/* Radio & Checkbox Styling */
.radio-group,
.checkbox-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-group.vertical,
.checkbox-group.vertical {
  flex-direction: column;
  gap: 10px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"],
.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.radio-option label,
.checkbox-option label {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0;
  cursor: pointer;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 16px;
}

.cf-turnstile {
  margin-bottom: 20px;
}

/* Submit Button & Notes */
button[type="submit"] {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--block-gradient);
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(27, 111, 174, 0.25);
  transition: var(--transition);
}

button[type="submit"]:hover {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(27, 111, 174, 0.35);
}

button[type="submit"]:active {
  transform: translateY(0);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-note {
  text-align: center;
  font-size: 13px;
  color: var(--error);
  margin: 12px 0 0;
  min-height: 0;
}

/* ==========================================================================
   Success State
   ========================================================================== */
.success {
  text-align: center;
  padding: 12px 0;
}

.mark {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 20px;
}

.mark-block {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.mark-block.b1 { background: var(--navy); }
.mark-block.b2 { background: var(--blue); }
.mark-block.b3 { background: var(--blue); opacity: 0.75; }
.mark-block.b4 { background: var(--sky); }

.success h2 {
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin: 12px 0 8px;
}

.success p {
  color: var(--muted);
  margin: 8px 0;
  font-size: 15px;
  text-align: center;
}

.ticket-id {
  font-weight: 700;
  color: var(--blue);
  margin-top: 16px !important;
  font-size: 15px;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 640px) {
  body {
    padding: 16px 12px;
  }

  .card {
    padding: 24px 20px;
    border-radius: 12px;
  }

  .card-head h1 {
    font-size: 20px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
