/* Educart Coaching Meet — shared styles */

:root {
  --brand: #e31d2c;
  --brand-dark: #b8121f;
  --brand-deep: #8f0d17;
  --brand-50: #fff1f2;
  --brand-100: #ffe0e2;
  --brand-200: #ffc2c6;

  --ink: #17181c;
  --ink-2: #3d4049;
  --muted: #6b6f7b;
  --line: #e7e8ec;
  --line-2: #f1f2f5;
  --bg: #f6f7f9;
  --card: #ffffff;
  --success: #12a150;
  --warn: #d97706;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 18, 24, .06);
  --shadow: 0 10px 30px -12px rgba(16, 18, 24, .18), 0 2px 6px rgba(16, 18, 24, .05);
  --shadow-brand: 0 10px 24px -10px rgba(227, 29, 44, .55);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Poppins', var(--font);
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand-200); outline-offset: 2px; }

/* ------------------------------- Top bar ------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { height: 34px; width: auto; }
.brand-divider { width: 1px; height: 26px; background: var(--line); }
.brand-sub { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--brand-50); color: var(--brand-dark);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }

/* -------------------------------- Hero --------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 60%, var(--brand-deep) 100%);
  color: #fff;
  padding: 44px 20px 120px;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), rgba(255,255,255,0) 70%);
}
.hero::before { width: 520px; height: 520px; right: -140px; top: -220px; }
.hero::after { width: 380px; height: 380px; left: -120px; bottom: -220px; }
.hero-grid {
  position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.hero-inner { position: relative; max-width: 820px; margin: 0 auto; text-align: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(26px, 4.6vw, 40px); font-weight: 700; margin: 16px 0 12px; letter-spacing: -.01em; }
.hero p { margin: 0 auto; max-width: 640px; color: rgba(255,255,255,.9); font-size: 15.5px; }
.hero p strong { color: #fff; }

/* ------------------------------ Form shell ----------------------------- */
.shell { max-width: 860px; margin: -88px auto 48px; padding: 0 16px; position: relative; z-index: 2; }
.card {
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow);
  border: 1px solid rgba(16,18,24,.04);
  scroll-margin-top: 80px;
}
.card-pad { padding: 28px; }

/* Stepper */
.stepper { padding: 22px 28px 0; }
.steps { display: flex; justify-content: space-between; list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before {
  content: ''; position: absolute; left: 22px; right: 22px; top: 17px; height: 3px;
  background: var(--line-2); border-radius: 3px;
}
.steps-fill {
  position: absolute; left: 22px; top: 17px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  transition: width .45s cubic-bezier(.2,.8,.2,1);
}
.step {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.steps-fill { list-style: none; }
.step:nth-child(2) { align-items: flex-start; }
.step:last-child { align-items: flex-end; }
.step-num {
  width: 37px; height: 37px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line); color: var(--muted);
  font-weight: 700; font-size: 14px; font-family: var(--font-head);
  transition: all .3s ease;
}
.step-label { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; transition: color .3s; }
.step.is-active .step-num { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 5px var(--brand-50); transform: scale(1.06); }
.step.is-active .step-label { color: var(--ink); }
.step.is-done .step-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.is-done .step-num span { display: none; }
.step.is-done .step-num::after {
  content: ''; width: 12px; height: 7px; border: solid #fff; border-width: 0 0 2.5px 2.5px;
  transform: rotate(-45deg) translate(1px, -1px);
}
.step-meta { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px 0; font-size: 13px; color: var(--muted); }
.step-meta strong { color: var(--ink); }

/* Panels */
.panel { display: none; padding: 8px 28px 4px; }
.panel.is-active { display: block; animation: panelIn .45s cubic-bezier(.2,.8,.2,1); }
.panel.is-back { animation-name: panelInBack; }
@keyframes panelIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes panelInBack { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.panel-head { padding: 18px 0 6px; }
.panel-head h2 { font-size: 21px; font-weight: 700; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* Question blocks */
.q { padding: 20px 0; border-top: 1px dashed var(--line); }
.panel-head + .q { border-top: 0; }
.q-title { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.q-no {
  flex: none; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: 13px; font-family: var(--font-head);
}
.q-text { font-weight: 600; font-size: 15.5px; padding-top: 3px; }
.q-hint { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* Option chips */
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt label {
  display: flex; align-items: center; gap: 12px; min-height: 52px;
  padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: border-color .2s, background .2s, transform .15s, box-shadow .2s;
  user-select: none;
}
.opt label:hover { border-color: var(--brand-200); background: #fffafa; }
.opt label:active { transform: scale(.98); }
.opt .box {
  flex: none; width: 22px; height: 22px; border-radius: 7px;
  border: 2px solid #cdd0d6; background: #fff;
  display: grid; place-items: center; transition: all .2s;
}
.opt .box::after {
  content: ''; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.4px 2.4px;
  transform: rotate(-45deg) scale(0); transition: transform .2s cubic-bezier(.3,1.6,.5,1); margin-top: -2px;
}
.opt input:checked + label { border-color: var(--brand); background: var(--brand-50); color: var(--ink); box-shadow: 0 0 0 3px rgba(227,29,44,.08); }
.opt input:checked + label .box { background: var(--brand); border-color: var(--brand); }
.opt input:checked + label .box::after { transform: rotate(-45deg) scale(1); }
.opt input:focus-visible + label { outline: 3px solid var(--brand-200); outline-offset: 2px; }
.opt small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }

.other-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease, margin .3s; }
.other-wrap > div { overflow: hidden; }
.other-wrap.is-open { grid-template-rows: 1fr; margin-top: 10px; }

/* Fields */
.field { margin-bottom: 16px; }
.field label.lbl { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink-2); }
.field .req { color: var(--brand); }
.field .opt-tag { color: var(--muted); font-weight: 400; font-size: 12px; }
.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff;
  transition: border-color .2s, box-shadow .2s;
  font-size: 15px;
}
textarea.input { min-height: 100px; resize: vertical; }
.input::placeholder { color: #a3a7b1; }
.input:hover { border-color: #d5d7dd; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(227,29,44,.1); }
.field.has-error .input { border-color: var(--brand); background: #fffafa; }
.field-error { display: none; color: var(--brand-dark); font-size: 12.5px; margin-top: 6px; font-weight: 500; }
.field.has-error .field-error { display: block; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.input-icon { position: relative; }
.input-icon .input { padding-left: 42px; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #9a9ea8; pointer-events: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.counter { text-align: right; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: #cfd2d8; background: #fafafb; }
.btn-soft { background: var(--brand-50); color: var(--brand-dark); }
.btn-soft:hover:not(:disabled) { background: var(--brand-100); }
.btn-lg { padding: 15px 26px; font-size: 15.5px; border-radius: 14px; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 28px 24px; margin-top: 8px; border-top: 1px solid var(--line-2);
}
.form-nav .spacer { flex: 1; }
.save-note { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.save-note::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

/* ------------------------------- Preview ------------------------------- */
.view { animation: panelIn .45s cubic-bezier(.2,.8,.2,1); }
.preview-head { display: flex; gap: 16px; align-items: center; padding: 26px 28px 8px; }
.preview-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.preview-icon svg { width: 24px; height: 24px; }
.preview-head h2 { font-size: 21px; }
.preview-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.pv-section { margin: 14px 28px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pv-section-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fafafb; border-bottom: 1px solid var(--line); }
.pv-section-head h3 { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.pv-section-head h3 .q-no { min-width: 26px; height: 26px; font-size: 12px; border-radius: 8px; }
.pv-row { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
.pv-row:last-child { border-bottom: 0; }
.pv-q { color: var(--muted); font-size: 13px; }
.pv-a { font-size: 14px; font-weight: 500; white-space: pre-wrap; word-break: break-word; }
.pv-a.empty { color: #a3a7b1; font-weight: 400; font-style: italic; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand-dark); font-size: 12.5px; font-weight: 600; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 28px 0; padding: 14px 16px; border-radius: 12px; background: #fafafb; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.preview-actions { display: flex; gap: 12px; justify-content: space-between; padding: 22px 28px 26px; flex-wrap: wrap; }

/* ------------------------------- Success ------------------------------- */
.success { text-align: center; padding: 40px 28px 34px; position: relative; overflow: hidden; }
.success-badge {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 10px var(--brand-50), 0 0 0 20px rgba(227,29,44,.05);
  animation: pop .6s cubic-bezier(.3,1.6,.5,1);
}
.success-badge svg { width: 40px; height: 40px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .35s forwards; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h2 { font-size: 26px; }
.success > p { color: var(--muted); max-width: 520px; margin: 8px auto 0; }
.code-card {
  margin: 26px auto 0; max-width: 460px; padding: 22px 20px;
  border-radius: 18px; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff;
  box-shadow: var(--shadow-brand); position: relative; overflow: hidden;
}
.code-card::after { content: ''; position: absolute; width: 220px; height: 220px; right: -80px; top: -110px; border-radius: 50%; background: rgba(255,255,255,.1); }
.code-label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; opacity: .85; }
.code-chars { display: flex; justify-content: center; gap: 12px; margin: 14px 0 6px; }
.code-chars span {
  width: 72px; height: 86px; border-radius: 16px; display: grid; place-items: center;
  background: #fff; color: var(--brand-dark);
  font-family: var(--font-mono); font-size: 48px; font-weight: 700;
  animation: flipIn .5s backwards cubic-bezier(.3,1.4,.5,1);
}
@keyframes flipIn { from { transform: rotateX(90deg) translateY(10px); opacity: 0; } }
.code-note { font-size: 12.5px; opacity: .85; margin-top: 8px; position: relative; z-index: 1; }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.success-meta { margin: 22px auto 0; max-width: 460px; text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; }
.success-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.success-meta div:last-child { border-bottom: 0; }
.success-meta span { color: var(--muted); }
.success-meta b { text-align: right; font-weight: 600; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; opacity: .9; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(720px) rotate(720deg); opacity: 0; } }
.thanks-line { margin-top: 26px; font-size: 13.5px; color: var(--muted); }
.thanks-line strong { color: var(--brand); }

.notice {
  display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap;
  margin: 0 28px 4px; padding: 12px 16px; border-radius: 12px;
  background: #fff8e6; border: 1px solid #f7dfa0; color: #7a5300; font-size: 13.5px;
}

/* -------------------------------- Toast -------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow); max-width: calc(100vw - 32px);
  transition: all .3s cubic-bezier(.2,.8,.2,1);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--brand-dark); }

.site-footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 0 16px 32px; }
.site-footer a { color: var(--brand); text-decoration: none; font-weight: 600; }

/* ------------------------------ Responsive ----------------------------- */
@media (max-width: 720px) {
  .card-pad, .panel, .stepper, .step-meta, .form-nav, .preview-head, .preview-actions { padding-left: 18px; padding-right: 18px; }
  .pv-section, .consent, .notice { margin-left: 18px; margin-right: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .pv-row { grid-template-columns: 1fr; gap: 4px; }
  .options { grid-template-columns: 1fr; }
  .hero { padding: 32px 16px 110px; }
  .brand-divider, .brand-sub { display: none; }
  .preview-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
