:root {
  --bg: #f6f3ff;
  --bg-alt: #ffffff;
  --text: #1d1533;
  --muted: #6c6480;
  --line: rgba(88, 61, 140, 0.12);
  --primary: #7c3aed;
  --primary-dark: #6927d6;
  --secondary: #efe7ff;
  --success: #0f9f6e;
  --success-bg: #e3f7ef;
  --shadow: 0 20px 60px rgba(83, 43, 163, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(167, 139, 250, 0.24), transparent 28%),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 24%),
    linear-gradient(180deg, #faf7ff 0%, #f5f1ff 45%, #f8fbff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.app-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Trabo wordmark: "trab" in Baloo 2 plus the keyhole logo as the "o".
   Baseline alignment sits the logo's bottom on the text baseline; it's drawn a
   little taller than the letters so the keyhole stays visible. */
.brand {
  display: inline-flex;
  align-items: baseline;
  font-family: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}

.brand-o {
  width: 0.62em;
  height: 0.62em;
  margin: 0 0 -0.04em 0.04em;
}

@media (max-width: 640px) {
  .brand {
    font-size: 44px;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav a {
  color: inherit;
  opacity: 0.9;
}

.nav-cta {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.app-header .nav-cta,
.app-body .nav-cta {
  background: var(--primary);
  color: #fff;
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px 72px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-copy h1,
.auth-card h1,
.dashboard-top h1,
.import-card h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p,
.auth-copy,
.dashboard-copy,
.import-card p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn,
button {
  /* inline-block so a link button's padding takes up space instead of
     overlapping the text above it */
  display: inline-block;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary,
button,
.table-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #9f67ff 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.22);
}

.btn-primary:hover,
button:hover,
.table-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--primary-dark) 0%, #8b4fff 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  border: 1px solid rgba(120, 94, 180, 0.12);
}

.hero-card,
.feature-card,
.cta-band,
.auth-card,
.dashboard-table-card,
.empty-state-card,
.import-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(154, 128, 214, 0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  border-radius: 32px;
  padding: 18px;
}

.window-top {
  display: flex;
  gap: 8px;
  padding: 6px 6px 16px;
}

.window-top span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #ddd3f8;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.preview-panel {
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f4eeff 100%);
  padding: 22px;
  min-height: 160px;
}

.preview-panel.tall {
  min-height: 220px;
}

.preview-panel.wide {
  grid-column: 1 / -1;
  min-height: 140px;
}

.preview-panel h3,
.feature-card h2,
.empty-state-card h2,
.cta-band h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.preview-panel p,
.feature-card p,
.empty-state-card p,
.cta-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.demo-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 48px;
  text-align: center;
}

.demo-section h2 {
  margin: 10px 0 22px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.demo-frame {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.demo-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--bg-alt);
  cursor: pointer;
}

.demo-toggle {
  position: absolute;
  right: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: rgba(29, 21, 51, 0.7);
  box-shadow: none;
  color: #fff;
}

.demo-toggle:hover {
  background: rgba(29, 21, 51, 0.9);
  transform: none;
}

.demo-toggle .icon-play,
.demo-toggle.is-paused .icon-pause {
  display: none;
}

.demo-toggle.is-paused .icon-play {
  display: block;
}

.feature-strip {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.cta-band {
  max-width: var(--max);
  margin: 16px auto 70px;
  padding: 30px 28px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-body,
.app-body {
  min-height: 100vh;
}

.auth-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.auth-card {
  margin-top: 40px;
  border-radius: 30px;
  padding: 30px;
}

.auth-card h1 {
  font-size: clamp(30px, 5vw, 44px);
}

.auth-form,
.import-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

label {
  font-weight: 700;
  font-size: 14px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 15px 16px;
  font-size: 16px;
  color: var(--text);
  outline: none;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 15px 16px;
  font-size: 16px;
  color: var(--text);
  outline: none;
}

select:focus,
input:focus {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

input[type="range"] {
  padding: 0;
  border: none;
  background: transparent;
  accent-color: var(--primary);
}

input[type="range"]:focus {
  box-shadow: none;
}

.full {
  width: 100%;
}

.auth-footer,
.back-link {
  margin-top: 18px;
  color: var(--muted);
}

.auth-footer a,
.back-link a,
.jobs-table a {
  color: var(--primary);
  font-weight: 700;
}

.app-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 20px 80px;
}

.narrow-main {
  max-width: 760px;
}

.dashboard-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 26px;
}

.dashboard-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form input[type="date"] {
  padding: 8px 10px;
  font-size: 13px;
}

.dashboard-top h1,
.import-card h1 {
  font-size: clamp(30px, 5vw, 46px);
}

.dashboard-table-card,
.empty-state-card,
.import-card {
  border-radius: 28px;
  padding: 22px;
}

.jobs-table {
  width: 100%;
  border-collapse: collapse;
}

.jobs-table th,
.jobs-table td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(125, 101, 181, 0.12);
  vertical-align: top;
}

.jobs-table th {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.description-row {
  background: rgba(244, 238, 255, 0.58);
  color: #4d4567;
  line-height: 1.6;
}

.description-row summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
  outline: none;
}

.description-row details[open] summary {
  margin-bottom: 6px;
}

.table-btn {
  padding: 10px 16px;
  border-radius: 999px;
}

.table-btn.danger {
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  box-shadow: 0 14px 30px rgba(225, 29, 72, 0.22);
}

.table-btn.danger:hover {
  background: linear-gradient(135deg, #be123c 0%, #e11d48 100%);
}

.empty-state-card {
  text-align: center;
  padding: 44px 24px;
}

.empty-state-card .btn {
  margin-top: 22px;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

/* Full-screen overlay shown by loading.js while a slow form submits. */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(29, 21, 51, 0.35);
  backdrop-filter: blur(4px);
}

.loading-box {
  max-width: 380px;
  padding: 32px 28px;
  border-radius: var(--radius-xl);
  background: var(--bg-alt);
  box-shadow: var(--shadow);
  text-align: center;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border: 4px solid var(--secondary);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: loading-spin 0.9s linear infinite;
}

.loading-heading {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.loading-detail {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation-duration: 2.5s;
  }
}

.error {
  color: #c81e5b;
  font-weight: 700;
  margin: 10px 0 0;
}

/* Sits under its input inside a gridded form; the slight negative margin only
   tightens the form's gap so the hint reads as belonging to the field above. */
.field-hint {
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.45;
  margin: -4px 4px 4px;
}

@media (max-width: 980px) {
  .hero,
  .feature-strip,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 16px;
  }

  .dashboard-top,
  .cta-band {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-header,
  .app-header,
  .app-main,
  .auth-shell,
  .hero,
  .feature-strip {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-card,
  .feature-card,
  .cta-band,
  .auth-card,
  .dashboard-table-card,
  .empty-state-card,
  .import-card {
    border-radius: 22px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-panel.wide {
    grid-column: auto;
  }

  .jobs-table {
    font-size: 14px;
  }
}
/* ---- Resume page: status, next steps, upload dropzone ---- */

.resume-status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.status-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
}

.import-card h1.status-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
}

.import-card p.status-meta {
  margin: 4px 0 0;
  font-size: 15px;
}

.next-heading {
  margin: 34px 0 14px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.next-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.next-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.next-card:hover,
.next-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: var(--shadow);
}

.next-card-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #9f67ff 100%);
  border-color: transparent;
  color: #fff;
}

.next-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--secondary);
  color: var(--primary);
}

.next-card-primary .next-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.next-title {
  font-size: 17px;
  font-weight: 700;
}

.next-copy {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.next-card-primary .next-copy {
  color: rgba(255, 255, 255, 0.85);
}

.replace-resume {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.replace-resume summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 20px;
  border: 2px dashed rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-lg);
  background: rgba(239, 231, 255, 0.35);
  color: var(--primary);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover,
.dropzone:focus-within {
  border-color: var(--primary);
  background: rgba(239, 231, 255, 0.7);
}

.dropzone-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.dropzone-hint {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

/* The real file input covers the whole dropzone, so clicking or dropping a file anywhere works. */
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

@media (max-width: 640px) {
  .next-steps {
    grid-template-columns: 1fr;
  }
}

/* ---- Dashboard: tailored resume cell and ATS keyword report ---- */

.resume-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.keyword-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.keyword-badge.is-good {
  background: var(--success-bg);
  color: var(--success);
}

.link-btn {
  padding: 0;
  background: none;
  box-shadow: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}

.link-btn:hover {
  background: none;
  color: var(--primary);
  transform: none;
}

.keyword-details {
  margin-top: 10px;
}

.keyword-label {
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keyword-list li {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  font-size: 13px;
}

.keyword-list li.is-matched {
  border-color: transparent;
  background: var(--success-bg);
  color: var(--success);
}

.keyword-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.paste-posting {
  margin-top: 10px;
}

.paste-form {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin-top: 8px;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  resize: vertical;
  outline: none;
}

textarea:focus {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}
