:root {
  --white: #ffffff;
  --offwhite: #f7f8fc;
  --light: #eef1f8;
  --blue: #1a56db;
  --blue2: #1044b5;
  --sky: #3b82f6;
  --ink: #0f172a;
  --slate: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --sans: 'Sora', sans-serif;
  --serif: 'Libre Baskerville', Georgia, serif;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  --shadow2: 0 22px 60px rgba(15, 23, 42, 0.12);
  --site-max: 1320px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: linear-gradient(180deg, #f9fbff 0%, #f4f7fd 46%, #ffffff 100%);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; }

.container {
  width: min(calc(100% - clamp(28px, 5vw, 72px)), var(--site-max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(226,232,240,.9);
}

.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  height: 52px;
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.brand-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.btn-home {
  text-decoration: none;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--slate);
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}

.btn-home:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.hero {
  padding: clamp(44px, 6vw, 80px) 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: clamp(22px, 3vw, 36px);
  align-items: stretch;
}

.hero-copy,
.hero-card,
.section-card,
.form-card {
  background: rgba(255,255,255,.92);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-card,
.section-card,
.form-card,
.access-card,
.hero-point,
.profile-chip,
.mini-stat-card {
  min-width: 0;
}

.hero-copy {
  padding: clamp(28px, 4vw, 46px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(26,86,219,.16);
  background: rgba(26,86,219,.06);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.06;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}

.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}

.hero p {
  font-size: 16px;
  color: var(--slate);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  border: 1px solid var(--blue);
}

.btn-primary:hover {
  background: var(--blue2);
  border-color: var(--blue2);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--slate);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.hero-points {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-point {
  border: 1px solid var(--border);
  background: var(--offwhite);
  border-radius: 16px;
  padding: 16px 18px;
}

.hero-point strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.hero-point span {
  font-size: 13px;
  color: var(--muted);
}

.hero-card {
  padding: clamp(22px, 3vw, 32px);
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.mini-stat {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.mini-stat-card {
  border-radius: 18px;
  background: var(--ink);
  color: var(--white);
  padding: 18px;
}

.mini-stat-card:nth-child(2) {
  background: linear-gradient(135deg, var(--blue), var(--sky));
}

.mini-stat-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 8px;
}

.mini-stat-card span {
  font-size: 12px;
  color: rgba(255,255,255,.75);
}

.profile-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.profile-chip {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 16px;
  padding: 16px 18px;
}

.profile-chip strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.profile-chip span {
  font-size: 13px;
  color: var(--muted);
}

.sections {
  padding: 24px 0 clamp(56px, 7vw, 84px);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-bottom: 28px;
}

.process-card {
  background: rgba(255,255,255,.92);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 3vw, 34px);
  margin-bottom: 28px;
}

.process-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.process-header h2 {
  font-size: 28px;
  letter-spacing: -.02em;
}

.process-header p {
  max-width: 580px;
  font-size: 15px;
  color: var(--muted);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.process-step {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 18px;
  padding: 18px;
}

.process-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(26,86,219,.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.process-step h3 {
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -.01em;
}

.section-card {
  padding: 26px 24px;
}

.section-card h2 {
  font-size: 20px;
  margin-bottom: 10px;
  letter-spacing: -.02em;
}

.section-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.section-card ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.section-card li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--slate);
}

.section-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.form-card {
  padding: clamp(24px, 3vw, 38px);
}

.form-card h2 {
  font-size: 28px;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}

.form-card p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 26px;
}

.access-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.access-card {
  border: 1.5px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 22px;
}

.access-card h3 {
  font-size: 20px;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}

.access-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}

.dashboard-note {
  margin-top: 12px;
  margin-bottom: 0;
}

.request-grid {
  display: grid;
  gap: 12px;
}

.request-status {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid rgba(22,163,74,.18);
  background: rgba(22,163,74,.08);
  color: var(--success);
}

.login-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15,23,42,.56);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.login-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.login-modal {
  width: min(100%, 460px);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow2);
  padding: 28px;
  position: relative;
}

.login-modal h3 {
  font-size: 26px;
  letter-spacing: -.03em;
  margin-bottom: 10px;
}

.login-modal p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.login-grid {
  display: grid;
  gap: 14px;
}

.login-status {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.6;
}

.login-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.login-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.login-close:hover {
  color: var(--ink);
  border-color: var(--blue);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate);
}

.required-mark {
  color: #dc2626;
  margin-left: 4px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--offwhite);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  padding: 13px 14px;
  outline: none;
  transition: all .2s;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,86,219,.08);
}

.form-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.footer {
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--blue);
  text-decoration: none;
}

@media (min-width: 1480px) {
  .hero h1 {
    max-width: 12ch;
  }

  .hero-copy {
    padding: 52px;
  }

  .hero-card {
    padding: 34px;
  }
}

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .process-grid,
  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .form-grid,
  .access-grid {
    grid-template-columns: 1fr;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .process-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .process-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-copy,
  .hero-card,
  .form-card {
    padding: 28px 22px;
  }

  .hero-actions a {
    flex: 1 1 220px;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    min-height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .brand {
    width: 100%;
  }

  .btn-home {
    width: 100%;
    text-align: center;
  }

  .hero h1 {
    font-size: clamp(30px, 9vw, 44px);
  }

  .hero p,
  .form-card p,
  .section-card p {
    font-size: 14px;
  }

  .hero-actions,
  .hero-points,
  .mini-stat {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions a,
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .process-card,
  .access-card,
  .section-card {
    padding: 20px 18px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--site-max));
  }

  .topbar-inner {
    min-height: 66px;
  }

  .brand img {
    height: 42px;
  }

  .hero {
    padding-top: 34px;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-name {
    font-size: 14px;
  }

  .brand-sub {
    font-size: 9px;
    letter-spacing: .1em;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: .12em;
    padding: 6px 12px;
  }

  .hero-copy,
  .hero-card,
  .form-card {
    border-radius: 20px;
    padding: 22px 18px;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .field input,
  .field textarea,
  .field select {
    font-size: 16px;
  }

  .mini-stat-card strong {
    font-size: 24px;
  }

  .footer {
    padding: 22px 0 34px;
  }
}
#chat-toggle {
  position: fixed; bottom: 28px; right: 28px; z-index: 300;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--blue); color: white; border: none;
  cursor: pointer; box-shadow: 0 6px 28px rgba(26,86,219,.45);
  display: flex; align-items: center; justify-content: center;
  transition: all .25s;
}
#chat-toggle:hover { background: var(--blue2); transform: scale(1.08); }
#chat-toggle.chat-pulse { animation: chatPulse 1s ease-in-out 3; }
@keyframes chatPulse { 0%,100% { transform: scale(1); box-shadow: 0 6px 28px rgba(26,86,219,.45); } 50% { transform: scale(1.15); box-shadow: 0 6px 36px rgba(26,86,219,.65); } }
#chat-toggle svg { width: 26px; height: 26px; fill: white; }
#chat-window {
  position: fixed; bottom: 100px; right: 28px; z-index: 300;
  width: min(380px, calc(100vw - 24px)); max-height: 540px;
  background: white; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(15,23,42,.18), 0 0 0 1.5px var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.97);
  pointer-events: none; transition: all .3s cubic-bezier(.34,1.56,.64,1);
}
#chat-window.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.chat-header {
  background: var(--blue); padding: 18px 20px;
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.chat-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: white;
}
.chat-name { font-size: 14.5px; font-weight: 700; color: white; }
.chat-status { font-size: 11.5px; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 5px; }
.chat-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }
.chat-close {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.65); font-size: 22px; line-height: 1; padding: 0 2px;
  transition: color .2s;
}
.chat-close:hover { color: white; }
#chat-messages {
  flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
#chat-messages::-webkit-scrollbar { width: 4px; }
#chat-messages::-webkit-scrollbar-track { background: transparent; }
#chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.msg {
  max-width: 82%; padding: 12px 16px; border-radius: 16px;
  font-size: 14px; line-height: 1.6; word-break: break-word;
}
.msg.bot {
  background: var(--offwhite); color: var(--ink); border: 1px solid var(--border);
  border-bottom-left-radius: 4px; align-self: flex-start;
}
.msg.bot p { margin: 0; }
.msg.bot ul, .msg.bot ol { padding-left: 18px; margin: 6px 0; }
.msg.user {
  background: var(--blue); color: white;
  border-bottom-right-radius: 4px; align-self: flex-end;
}
.msg-typing { gap: 5px; display: flex; align-items: center; padding: 14px 18px; }
.msg-typing .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted);
  animation: bounce 1.2s infinite;
}
.msg-typing .dot:nth-child(2) { animation-delay: .2s; }
.msg-typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }
.chat-input-row {
  padding: 14px 16px; border-top: 1.5px solid var(--border);
  display: flex; gap: 10px; align-items: flex-end; flex-shrink: 0;
  background: white;
}
#chat-input {
  flex: 1; background: var(--offwhite); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 11px 15px;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  outline: none; resize: none; max-height: 100px; line-height: 1.5;
  transition: border-color .2s;
}
#chat-input:focus { border-color: var(--blue); }
#chat-input::placeholder { color: var(--muted); }
#chat-send {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  background: var(--blue); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
#chat-send:hover { background: var(--blue2); }
#chat-send svg { width: 18px; height: 18px; fill: white; }
@media (max-width: 720px) {
  #chat-window { right: 12px; left: 12px; bottom: 88px; width: auto; max-height: 70vh; }
  #chat-toggle { bottom: 20px; right: 20px; width: 52px; height: 52px; }
  .chat-input-row { padding: 12px; }
}
