/* Pink October – Beyond the Ribbon Symposium — theme taken from the certificate design */
:root {
  --bg: #f6e3e9;          /* certificate background */
  --band: #f284b5;        /* top band of the certificate */
  --pink: #e64892;        /* bold text on the certificate */
  --pink-strong: #d13a80;
  --pink-soft: #f282b0;   /* headings / "OCTOBER" */
  --pink-dim: rgba(230, 72, 146, 0.28);
  --pink-faint: rgba(230, 72, 146, 0.08);
  --surface: #ffffff;
  --surface-2: #fdf5f8;
  --border: #f0cad9;
  --text: #4a2a3a;
  --muted: #8e6478;
  --error: #c0283d;
  --error-bg: #fdeaec;
  --success: #1f8a5b;
  --success-bg: #e6f6ee;
  --warn: #b26a00;
  --warn-bg: #fff4e0;
  --radius: 14px;
  --font: "Montserrat", "Segoe UI", "Noto Sans Arabic", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Background: the faint triangle mesh from the left edge of the certificate */
.bg {
  position: fixed; inset: 0; z-index: -1; background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='121' viewBox='0 0 140 121'%3E%3Cg fill='none' stroke='%23e9a9c4' stroke-opacity='.35' stroke-width='1'%3E%3Cpath d='M0 0h140L70 121z M0 121L70 0l70 121 M0 0l70 121L140 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 140px 121px;
  -webkit-mask-image: linear-gradient(100deg, #000 0%, rgba(0,0,0,.35) 22%, transparent 45%);
  mask-image: linear-gradient(100deg, #000 0%, rgba(0,0,0,.35) 22%, transparent 45%);
}

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Top band with partner logos, like the certificate header */
.topbar { background: var(--band); padding: 14px 0; box-shadow: 0 6px 24px -14px rgba(209, 58, 128, .6); }
.topbar-inner { display: flex; align-items: center; justify-content: center; gap: 20px; }
.partners { height: auto; width: min(360px, 82vw); display: block; }

/* Hero */
.hero { text-align: center; padding: 28px 0 8px; }
.hero-title { margin: 0 auto; max-width: 720px; }
.hero-title img { display: block; width: 100%; height: auto; }
.hero-theme {
  margin: 14px auto 0; max-width: 720px;
  font-size: clamp(1rem, 2.3vw, 1.2rem); font-weight: 600; color: var(--pink); line-height: 1.45;
}
.hero-meta {
  list-style: none; padding: 0; margin: 20px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.hero-meta li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: .92rem;
}
.hero-meta svg { width: 18px; height: 18px; fill: none; stroke: var(--pink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Card */
.card {
  max-width: 720px; margin: 32px auto 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 40px);
  box-shadow: 0 30px 70px -36px rgba(209, 58, 128, .45);
}
.card-head h2 {
  margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; color: var(--pink-soft); letter-spacing: .2px;
}
.card-head p { margin: 6px 0 24px; color: var(--muted); }

/* Form */
.grid { display: grid; grid-template-columns: 1fr; gap: 4px 18px; }
@media (min-width: 640px) {
  .grid { grid-template-columns: 210px 1fr; }
  .col-full { grid-column: 1 / -1; }
}
.field { margin-bottom: 14px; min-width: 0; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.req { color: var(--pink); }
.opt { color: var(--muted); font-weight: 400; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: .84rem; }
.field-error { margin: 6px 0 0; color: var(--error); font-size: .86rem; min-height: 0; }
.field-error:empty { display: none; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=datetime-local], select {
  width: 100%; height: 48px;
  padding: 0 14px;
  font: inherit; color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, background .15s;
  appearance: none; -webkit-appearance: none;
}
input::placeholder { color: #bb98a8; }
input:hover, select:hover { border-color: #e7a6c3; }
input:focus, select:focus {
  outline: none; border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(230, 72, 146, .18);
  background: var(--surface);
}
[aria-invalid=true] { border-color: var(--error) !important; }
[aria-invalid=true]:focus { box-shadow: 0 0 0 3px rgba(192, 40, 61, .15) !important; }

.select { position: relative; }
.select::after {
  content: ""; position: absolute; right: 15px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--pink); border-bottom: 2px solid var(--pink); transform: rotate(45deg); pointer-events: none;
}
.select select { padding-right: 38px; cursor: pointer; }
option { background: var(--surface); color: var(--text); }

.phone { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }
.phone .select select { color: transparent; }
.phone .select select:focus { color: transparent; }
.phone .code-display {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  pointer-events: none; font-variant-numeric: tabular-nums; color: var(--text);
}

/* Live certificate preview */
.preview {
  margin: 2px 0 16px; padding: 14px 16px; border-radius: 12px;
  border: 1px dashed var(--pink-dim); background: var(--bg); text-align: center;
}
.preview-label { display: block; font-size: .74rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.preview-name { display: block; margin-top: 4px; font-size: clamp(1.15rem, 3.4vw, 1.5rem); font-weight: 700; color: var(--pink); word-break: break-word; }

/* Honeypot */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 52px; margin-top: 8px; padding: 0 22px;
  font: inherit; font-size: 1.02rem; font-weight: 700; letter-spacing: .2px;
  color: #fff; background: var(--pink);
  border: 0; border-radius: 12px; cursor: pointer;
  box-shadow: 0 12px 28px -14px rgba(230, 72, 146, .8);
  transition: background .15s, transform .05s, box-shadow .15s;
}
.btn:hover { background: var(--pink-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--pink-soft); outline-offset: 2px; }
.btn[disabled] { opacity: .75; cursor: progress; }
.spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.fine { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: .8rem; }
.link-btn { padding: 0; margin-top: 8px; background: none; border: 0; color: var(--pink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; }
.alert p { margin: 2px 0 0; }
.alert svg { flex: none; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alert-success { background: var(--success-bg); border: 1px solid #b5e3cb; color: var(--success); }
.alert-success p { color: var(--text); }
.alert-error { background: var(--error-bg); border: 1px solid #f3b9c1; color: var(--error); }

/* Footer */
.footer { margin-top: auto; padding: 8px 0 28px; text-align: center; color: var(--muted); font-size: .88rem; }
.footer p { margin: 4px 0 0; }
.ribbon { width: 28px; height: 36px; fill: none; stroke: var(--pink-soft); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 640px) {
  .hero { padding-top: 16px; }
  .hero-theme { margin-top: 10px; font-size: .92rem; }
  /* Compact date / location / certificate chips so the form sits higher */
  .hero-meta { margin-top: 12px; gap: 6px; }
  .hero-meta li { gap: 5px; padding: 4px 10px; font-size: .76rem; line-height: 1.3; }
  .hero-meta svg { width: 14px; height: 14px; }
  .card { margin-top: 16px; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0s !important; }
}

/* Steps indicator */
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 14px 0 22px; counter-reset: s; flex-wrap: wrap; }
.steps li {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px;
  font-size: .88rem; color: var(--muted); border: 1px solid var(--border); background: var(--surface-2);
}
.steps li span {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: .78rem; font-weight: 700; border: 1px solid var(--border); color: var(--muted); background: var(--surface);
}
.steps li.is-current { color: var(--text); border-color: var(--pink); }
.steps li.is-current span { background: var(--pink); color: #fff; border-color: var(--pink); }
.steps li.is-done span { background: var(--pink-faint); color: var(--pink); border-color: var(--pink-dim); }

.form-intro { margin: 0 0 18px; color: var(--muted); }
.small { font-size: .86rem; color: var(--muted) !important; margin-top: 6px !important; }

.alert-info { background: var(--bg); border: 1px solid var(--pink-dim); color: var(--pink); }
.alert-info p { color: var(--text); }

/* Verification step */
.verify-intro { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.verify-intro > svg { flex: none; width: 44px; height: 44px; padding: 9px; border-radius: 12px; background: var(--bg); border: 1px solid var(--pink-dim);
  fill: none; stroke: var(--pink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.verify-intro h3 { margin: 0 0 4px; font-size: 1.2rem; }
.verify-intro p { margin: 0; color: var(--muted); }
.verify-intro strong { color: var(--text); word-break: break-all; }
input.code-input {
  height: 60px; text-align: center; font-size: 1.9rem; font-weight: 700; letter-spacing: .45em; padding-left: .45em;
  font-variant-numeric: tabular-nums; max-width: 320px; display: block; color: var(--pink);
}
.verify-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.verify-actions form { margin: 0; }
.verify-actions .link-btn { margin: 0; }
.link-btn[disabled] { color: var(--muted); cursor: default; text-decoration: none; }
@media (max-width: 440px) {
  .steps { gap: 5px; }
  .steps li { font-size: .76rem; gap: 5px; padding: 4px 8px 4px 4px; }
  .steps li span { width: 20px; height: 20px; font-size: .7rem; }
}
.btn-another { width: auto; min-height: 42px; margin-top: 12px; padding: 0 18px; font-size: .95rem; text-decoration: none; box-shadow: none; }
