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

:root {
  --cd-ink: #0a0e1a;
  --cd-brand: #1a56db;
  --cd-brand-glow: #60a5fa;
  --cd-success: #22c55e;
  --cd-success-dark: #16a34a;
  --cd-bg: #ffffff;
  --cd-surface: #fafafa;
  --cd-surface-2: #f5f5f7;
  --cd-border: #e5e7eb;
  --cd-text: #374151;
  --cd-text-strong: #111827;
  --cd-text-muted: #6b7280;
  --cd-radius: 12px;
  --cd-gradient-hero: radial-gradient(1200px 600px at 20% -10%, rgba(37, 99, 235, 0.35), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(59, 130, 246, 0.25), transparent 60%),
    linear-gradient(180deg, #0f172a, #020617);
  --cd-gradient-brand: linear-gradient(135deg, #2563eb, #3b82f6);
  --cd-shadow-card: 0 1px 2px rgba(10, 14, 26, 0.04), 0 8px 24px -12px rgba(10, 14, 26, 0.12);
  --cd-shadow-elevated: 0 24px 60px -20px rgba(10, 14, 26, 0.25);
}

/* ── Frappe web template reset (prevent leaking styles) ── */
body.cortexdesk-landing-page {
  margin: 0 !important;
  font-family: Inter, system-ui, sans-serif !important;
  color: var(--cd-text) !important;
  background: var(--cd-bg) !important;
  -webkit-font-smoothing: antialiased;
}

body.cortexdesk-landing-page .navbar,
body.cortexdesk-landing-page .web-footer,
body.cortexdesk-landing-page .page-footer,
body.cortexdesk-landing-page .page-breadcrumbs,
body.cortexdesk-landing-page .page-header-wrapper,
body.cortexdesk-landing-page header.navbar,
body.cortexdesk-landing-page .container,
body.cortexdesk-landing-page .page_content > .container {
  display: none !important;
}

body.cortexdesk-landing-page main,
body.cortexdesk-landing-page .page-content-wrapper,
body.cortexdesk-landing-page .page_content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

body.cortexdesk-landing-page h1,
body.cortexdesk-landing-page h2,
body.cortexdesk-landing-page h3,
body.cortexdesk-landing-page .cd-hero__title,
body.cortexdesk-landing-page .cd-section__title,
body.cortexdesk-landing-page .cd-workflows__title {
  font-family: Outfit, Inter, sans-serif !important;
  letter-spacing: -0.02em;
}

.cd-landing {
  min-height: 100vh;
  background: var(--cd-bg);
}

/* ── Nav ── */
.cd-nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
  padding: 24px 32px;
  box-sizing: border-box;
  color: #fff;
}

.cd-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Outfit, Inter, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff !important;
  text-decoration: none;
}

.cd-logo__img {
  display: block;
  height: 100px;
  width: auto;
  max-width: none;
  object-fit: contain;
  border-radius: var(--cd-radius);
}

.cd-logo--dark {
  color: var(--cd-text-strong) !important;
}

.cd-nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cd-nav__links a {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
}

.cd-nav__links a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08);
}

/* ── Buttons ── */
.cd-btn-success {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--cd-radius);
  background: var(--cd-success) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 10px 30px -10px rgba(34, 197, 94, 0.55);
}

.cd-btn-success:hover {
  filter: brightness(1.08);
  color: #fff !important;
}

.cd-btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--cd-radius);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  backdrop-filter: blur(8px);
}

.cd-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

/* ── Hero ── */
.cd-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: var(--cd-gradient-hero);
}

.cd-hero__mesh {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  mix-blend-mode: screen;
}

.cd-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

.cd-hero__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 160px 24px 112px;
}

.cd-hero__copy {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.cd-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(8px);
}

.cd-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cd-success);
}

.cd-hero__title {
  margin: 24px auto 0;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff !important;
}

.cd-hero__title-main {
  display: inline;
  color: #fff !important;
}

.cd-gradient-text {
  display: inline;
  background: var(--cd-gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}

.cd-hero__lead {
  margin: 24px auto 0;
  max-width: 42rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7) !important;
}

.cd-hero__actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cd-hero__note {
  margin-top: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5) !important;
}

/* ── App preview mock ── */
.cd-preview-wrap {
  position: relative;
  max-width: 72rem;
  margin: 80px auto 0;
}

.cd-preview-glow {
  position: absolute;
  inset: -40px -40px -40px;
  z-index: 0;
  border-radius: 2rem;
  opacity: 0.6;
  filter: blur(48px);
  background: var(--cd-gradient-brand);
}

.cd-preview {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  backdrop-filter: blur(8px);
  box-shadow: var(--cd-shadow-elevated);
}

.cd-preview__shell {
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--cd-border);
  background: #fff;
  color: var(--cd-text-strong);
}

.cd-preview__titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--cd-border);
  background: var(--cd-surface);
  font-size: 12px;
  color: var(--cd-text-muted);
}

.cd-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cd-dot--red { background: #ff5f57; }
.cd-dot--yellow { background: #febc2e; }
.cd-dot--green { background: #28c840; }

.cd-preview__url {
  margin-left: 8px;
  font-family: ui-monospace, monospace;
}

.cd-preview__body {
  display: grid;
  grid-template-columns: 200px 1fr;
}

.cd-preview__sidebar {
  border-right: 1px solid var(--cd-border);
  background: var(--cd-surface);
  padding: 12px;
  font-size: 12px;
}

.cd-preview__brand {
  font-family: Outfit, Inter, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.cd-preview__nav-label {
  margin: 20px 8px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cd-text-muted);
}

.cd-preview__nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cd-preview__nav li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 8px;
  color: rgba(17, 24, 39, 0.7);
}

.cd-preview__nav li.is-active {
  background: #eff6ff;
  color: var(--cd-brand);
  font-weight: 500;
}

.cd-preview__nav--muted li {
  color: rgba(17, 24, 39, 0.7);
}

.cd-preview__pill {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--cd-brand);
  color: #fff;
  font-size: 10px;
}

.cd-preview__main {
  padding: 20px;
}

.cd-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cd-preview__header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--cd-text-strong) !important;
}

.cd-preview__header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--cd-text-muted) !important;
}

.cd-preview__count {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--cd-surface-2);
  font-size: 12px;
  font-weight: 500;
  color: var(--cd-text-muted);
}

.cd-preview__new-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--cd-success);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.cd-preview__table {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--cd-border);
  border-radius: 8px;
}

.cd-preview__table-head,
.cd-preview__row {
  display: grid;
  grid-template-columns: 60px 1fr 120px 90px 70px;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
}

.cd-preview__table-head {
  border-bottom: 1px solid var(--cd-border);
  background: var(--cd-surface);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cd-text-muted);
}

.cd-preview__row:nth-child(odd) {
  background: #fff;
}

.cd-preview__row:nth-child(even) {
  background: rgba(250, 250, 250, 0.8);
}

.cd-preview__row span:first-child {
  font-family: ui-monospace, monospace;
  color: var(--cd-text-muted);
}

.cd-preview__row span:nth-child(2) {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cd-preview__row span:nth-child(3) {
  color: var(--cd-text-muted);
}

.cd-preview__row span:last-child {
  text-align: right;
  font-family: ui-monospace, monospace;
  color: var(--cd-text-muted);
}

/* ── Status pills ── */
.cd-status {
  display: inline-flex;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  text-transform: capitalize;
}

.cd-status--urgent {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.cd-status--open {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
}

.cd-status--waiting {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
}

.cd-preview .cd-status--urgent { color: #dc2626; }
.cd-preview .cd-status--open { color: #2563eb; }
.cd-preview .cd-status--waiting { color: #ca8a04; }

/* ── Sections ── */
.cd-section {
  max-width: 80rem;
  margin: 0 auto;
  padding: 96px 24px;
}

.cd-section--border {
  max-width: none;
  padding: 40px 24px;
  border-block: 1px solid var(--cd-border);
  background: var(--cd-surface);
}

.cd-section__title {
  margin: 12px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--cd-text-strong) !important;
}

.cd-section__title-muted {
  color: var(--cd-text-muted) !important;
}

.cd-kicker {
  font-size: 14px;
  font-weight: 600;
  color: var(--cd-brand) !important;
}

.cd-kicker--glow {
  color: var(--cd-brand-glow) !important;
}

/* ── Logos ── */
.cd-logos {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cd-text-muted);
}

.cd-logos strong {
  font-family: Outfit, Inter, sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
  color: rgba(17, 24, 39, 0.35);
}

/* ── Features ── */
.cd-features {
  margin-top: 48px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cd-feature {
  padding: 24px;
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius);
  background: #fff;
  box-shadow: var(--cd-shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cd-feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--cd-shadow-elevated);
}

.cd-feature--brand .cd-feature__icon {
  background: var(--cd-gradient-brand);
  color: #fff;
}

.cd-feature h3 {
  margin: 16px 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--cd-text-strong) !important;
}

.cd-feature p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cd-text-muted) !important;
}

.cd-feature__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--cd-brand);
  font-size: 18px;
}

/* ── Workflows ── */
.cd-workflows {
  border-block: 1px solid var(--cd-border);
  background: var(--cd-ink);
  color: #fff;
}

.cd-workflows__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 96px 24px;
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .cd-workflows__inner {
    grid-template-columns: 1fr 1fr;
  }
}

.cd-workflows__title {
  margin: 12px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff !important;
}

.cd-workflows__lead {
  margin: 20px 0 0;
  max-width: 36rem;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7) !important;
}

.cd-workflows__list {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.cd-workflows__list li {
  position: relative;
  padding-left: 28px;
}

.cd-workflows__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cd-success);
  font-weight: 700;
}

.cd-workflows__panel {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  backdrop-filter: blur(8px);
}

.cd-workflows__panel-inner {
  border-radius: 0.75rem;
  background: #151b2e;
  padding: 24px;
}

.cd-workflows__panel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.cd-workflows__panel-url {
  margin-left: 8px;
  font-family: ui-monospace, monospace;
}

.cd-workflows__tickets {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cd-workflows__ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.cd-workflows__ticket div {
  min-width: 0;
}

.cd-workflows__ticket strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cd-workflows__ticket span {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.cd-workflows__ticket-id {
  font-family: ui-monospace, monospace;
  color: rgba(255, 255, 255, 0.4) !important;
  margin-bottom: 2px;
}

/* ── Metrics ── */
.cd-metrics {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--cd-border);
  border-radius: 1rem;
  background: var(--cd-border);
}

@media (min-width: 768px) {
  .cd-metrics {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cd-metrics > div {
  background: #fff;
  padding: 32px;
}

.cd-metrics strong {
  display: block;
  font-family: Outfit, Inter, sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  background: var(--cd-gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cd-metrics span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--cd-text-muted);
}

/* ── CTA ── */
.cd-cta {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: 80px 32px;
  text-align: center;
  color: #fff;
  background: var(--cd-gradient-hero);
}

.cd-cta h2 {
  color: #fff !important;
  margin: 16px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

.cd-cta p {
  margin: 16px auto 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.7) !important;
}

.cd-cta__actions {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Footer ── */
.cd-footer {
  border-top: 1px solid var(--cd-border);
  background: var(--cd-surface);
  padding: 40px 24px;
}

.cd-footer__inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--cd-text-muted);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .cd-preview__body {
    grid-template-columns: 1fr;
  }

  .cd-preview__sidebar {
    display: none;
  }

  .cd-preview__table-head,
  .cd-preview__row {
    grid-template-columns: 52px 1fr 80px;
  }

  .cd-preview__table-head span:nth-child(3),
  .cd-preview__table-head span:nth-child(4),
  .cd-preview__table-head span:nth-child(5),
  .cd-preview__row span:nth-child(3),
  .cd-preview__row span:nth-child(4),
  .cd-preview__row span:nth-child(5) {
    display: none;
  }
}

@media (max-width: 640px) {
  .cd-nav {
    padding: 16px;
  }

  .cd-nav__links a:not(:last-child) {
    display: none;
  }

  .cd-hero__inner {
    padding-top: 120px;
  }
}
