@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

@font-face {
  font-family: 'Benova';
  src: url('/fonts/Benova-Thin.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Monda';
  src: url('/fonts/Monda.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-soft: #f4f4f1;
  --text: #1a1a1a;
  --text-muted: #555555;
  --line: #e5e5e5;
  --line-strong: #d8d8d2;
  --yellow: #f6cd17;
  --yellow-deep: #e0b915;
  --dark: #0a0a0a;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-soft: 0 16px 40px rgba(10, 10, 10, 0.05);
  --shadow-hover: 0 24px 50px rgba(10, 10, 10, 0.09);
  --max-width: 1220px;
  --transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--yellow);
  color: var(--dark);
}

a {
  color: inherit;
}

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 56px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.02;
  background-image: radial-gradient(#000 0.6px, transparent 0.7px);
  background-size: 12px 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(10px);
}

.topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(229, 229, 229, 0.8);
}

.brandmark {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brandmark__word {
  display: grid;
  gap: 3px;
}

.brandmark__word strong {
  font-family: 'Benova', 'Monda', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

.brandmark__word em {
  font-size: 0.78rem;
  font-style: normal;
  color: var(--text-muted);
}

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

.portal-nav__link {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.portal-nav__link:hover,
.portal-nav__link.is-active {
  color: var(--text);
}

.topbar__actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.chip-soft {
  background: rgba(246, 205, 23, 0.18);
  color: var(--dark);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--yellow);
  color: var(--dark);
  box-shadow: 0 10px 24px rgba(246, 205, 23, 0.28);
}

.button-primary:hover {
  background: var(--yellow-deep);
}

.button-secondary {
  background: var(--dark);
  color: var(--bg);
  box-shadow: 0 16px 32px rgba(10, 10, 10, 0.14);
}

.button-ghost {
  min-height: 36px;
  padding: 0 14px;
  background: rgba(10, 10, 10, 0.05);
  color: var(--text);
}

.mono-label {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dashboard-page,
.login-page,
.agent-page {
  display: grid;
  gap: 26px;
  padding-top: 32px;
}

.hero-section,
.content-slab,
.login-panel,
.detail-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-section,
.content-slab,
.login-panel {
  border-radius: var(--radius-xl);
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 38px 34px 34px;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 205, 23, 0.4), transparent 70%);
  pointer-events: none;
}

.display-stack {
  margin: 18px 0 0;
  font-family: 'Benova', 'Monda', sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 0.92;
}

.display-stack span {
  display: block;
  font-size: clamp(2.6rem, 8vw, 7rem);
}

.display-stack .highlight {
  color: var(--yellow);
}

.display-stack--compact span {
  font-size: clamp(2.3rem, 7vw, 5.4rem);
}

.hero-lead,
.agent-hero__body,
.section-copy,
.login-copy,
.agent-card__summary,
.agent-card__role,
.detail-card li,
.opportunity-card p,
.mini-card p {
  color: var(--text-muted);
  line-height: 1.65;
}

.hero-lead {
  max-width: 62ch;
  margin: 20px 0 0;
  font-size: 1.02rem;
}

.hero-stats,
.hero-grid,
.agent-grid,
.opportunity-grid,
.agent-columns {
  display: grid;
  gap: 16px;
}

.hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.stat-card {
  padding: 18px 18px 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: 'Benova', 'Monda', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.06em;
}

.stat-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.content-slab {
  padding: 30px;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-header h2,
.split-copy h2,
.login-panel h2 {
  margin: 10px 0 0;
  font-family: 'Benova', 'Monda', sans-serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0.06em;
  line-height: 0.98;
}

.agent-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agent-card,
.opportunity-card,
.mini-card,
.detail-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.agent-card:hover,
.opportunity-card:hover,
.detail-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}

.agent-card {
  padding: 26px;
}

.agent-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cfcfcf;
}

.tone-yellow .status-dot {
  background: var(--yellow);
  box-shadow: 0 0 0 6px rgba(246, 205, 23, 0.2);
}

.tone-orange .status-dot {
  background: #ff9d63;
  box-shadow: 0 0 0 6px rgba(255, 157, 99, 0.18);
}

.tone-green .status-dot {
  background: #91c58a;
  box-shadow: 0 0 0 6px rgba(145, 197, 138, 0.18);
}

.agent-card h3,
.agent-card h2,
.opportunity-card h3 {
  margin: 18px 0 10px;
  font-family: 'Benova', 'Monda', sans-serif;
  letter-spacing: 0.06em;
  line-height: 0.98;
}

.agent-card h2 {
  font-size: 2.3rem;
}

.agent-card__summary {
  margin: 0 0 16px;
}

.agent-card__role {
  min-height: 72px;
  margin: 0 0 22px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: start;
}

.opportunity-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.opportunity-card {
  padding: 22px;
}

.opportunity-card h3 {
  font-size: 1.32rem;
}

.login-page {
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  align-items: start;
}

.login-page--quiet {
  grid-template-columns: minmax(320px, 480px);
  justify-content: center;
  min-height: calc(100vh - 140px);
  align-content: start;
  padding-top: 72px;
}

.login-panel {
  padding: 30px;
}

.login-panel--quiet {
  box-shadow: 0 22px 48px rgba(10, 10, 10, 0.06);
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  font: inherit;
  color: var(--text);
}

.login-form input:focus {
  outline: 2px solid rgba(246, 205, 23, 0.5);
  outline-offset: 2px;
}

.alert {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(10, 10, 10, 0.06);
  color: var(--text);
}

.login-note {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.mini-card {
  padding: 18px;
  background: var(--surface-soft);
}

.mini-card span {
  display: inline-block;
  margin-bottom: 8px;
  font-family: 'Benova', 'Monda', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.agent-hero {
  padding: 32px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--text);
}

.agent-hero__summary {
  margin: 18px 0 0;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
}

.agent-hero__body {
  max-width: 62ch;
  margin-top: 14px;
}

.agent-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-card {
  padding: 24px;
}

.detail-card ul {
  margin: 0;
  padding-left: 18px;
}

.detail-card li + li {
  margin-top: 12px;
}

@media (max-width: 1080px) {
  .login-page,
  .split-layout,
  .agent-grid,
  .opportunity-grid,
  .agent-columns,
  .hero-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    padding-bottom: 16px;
  }

  .portal-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 0 14px 44px;
  }

  .hero-section,
  .content-slab,
  .login-panel,
  .agent-hero,
  .detail-card {
    padding: 22px 18px;
  }

  .brandmark__word em,
  .chip {
    display: none;
  }

  .topbar__actions {
    margin-left: auto;
  }

  .login-page--quiet {
    min-height: auto;
    padding-top: 36px;
  }
}
