:root {
  --ink: #1F2229;
  --ink-soft: #3A3D45;
  --grey-50: #F7F7F8;
  --grey-100: #EEF0F3;
  --grey-200: #E3E5E9;
  --grey-300: #C7CBD1;
  --muted: #6B7078;
  --orange: #FF7A3D;
  --orange-dark: #E85D24;
  --orange-soft: #FFEEE4;
  --line: #E3E5E9;
  --white: #ffffff;
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 14px;
  --shadow-soft: 0 8px 30px rgba(30,32,36,.07);
  --shadow-glow: 0 0 0 4px rgba(255,122,61,.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--grey-100);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; color: var(--ink); letter-spacing: -.01em; }
a { color: inherit; }
button { font-family: inherit; }

/* ---- animations ---- */
@keyframes hd-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hd-pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,122,61,.35); }
  50% { box-shadow: 0 0 0 8px rgba(255,122,61,0); }
}
@keyframes hd-spin { to { transform: rotate(360deg); } }
@keyframes hd-pop-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
.hd-animate-in { animation: hd-fade-up .5s ease both; }

/* ---- layout shell ---- */
.hd-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.hd-logo { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.hd-logo .accent { color: var(--orange); }
.hd-topbar-actions { display: flex; gap: 10px; align-items: center; }

/* ---- buttons ---- */
.hd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.hd-btn:active { transform: scale(.97); }
.hd-btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff;
  box-shadow: 0 6px 18px rgba(232,93,36,.3);
}
.hd-btn-primary:hover { box-shadow: 0 8px 24px rgba(232,93,36,.42); }
.hd-btn-ghost { background: var(--white); color: var(--ink-soft); border-color: var(--line); }
.hd-btn-ghost:hover { border-color: var(--grey-300); }
.hd-btn-danger { background: #FDECEC; color: #A32E2E; }
.hd-btn[disabled] { opacity: .5; cursor: not-allowed; }
.hd-btn-block { width: 100%; }

/* ---- glowing form fields ---- */
.hd-field { margin-bottom: 18px; }
.hd-field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.hd-field input[type="text"],
.hd-field input[type="email"],
.hd-field input[type="tel"],
.hd-field select,
.hd-field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--grey-50);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.hd-field input:focus, .hd-field select:focus, .hd-field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--white);
  box-shadow: var(--shadow-glow);
}
.hd-field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---- auth card ---- */
.hd-auth-wrap { min-height: calc(100vh - 70px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.hd-auth-card {
  width: 100%; max-width: 420px;
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: var(--shadow-soft);
  animation: hd-fade-up .5s ease both;
}
.hd-auth-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; margin-bottom: 20px;
  animation: hd-pulse-glow 2.4s infinite;
}
.hd-auth-card h1 { font-size: 22px; margin-bottom: 8px; }
.hd-auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }

/* ---- alerts ---- */
.hd-alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 10px; font-size: 13.5px; margin-bottom: 18px; }
.hd-alert-error { background: #FDECEC; color: #A32E2E; }
.hd-alert-success { background: #E9F8EF; color: #1B8A3D; }
.hd-alert-info { background: var(--orange-soft); color: #A8471E; }

/* ---- checked-your-email state ---- */
.hd-check-email { text-align: center; }
.hd-check-email .envelope {
  width: 72px; height: 72px; margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--orange-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange-dark);
  animation: hd-pop-in .4s ease both;
}

/* ---- spinner ---- */
.hd-spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: hd-spin .7s linear infinite;
  display: inline-block;
}
.hd-spinner-dark { border: 2.5px solid var(--grey-300); border-top-color: var(--orange); }

/* ---- responsive ---- */
@media (max-width: 640px) {
  .hd-topbar { padding: 14px 18px; }
  .hd-auth-card { padding: 30px 24px; border-radius: 16px; }
}
