:root {
  --primary: #1c2044;       /* Cerdyn indigo (from logo wordmark) */
  --primary-dark: #12142c;  /* darker indigo for hover states */
  --accent: #f59e0b;        /* Cerdyn amber (from logo accent line) */
  --accent-dark: #d97f06;
  --danger: #dc2626;
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 30px;
  display: block;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.nav-link:hover { color: var(--primary); }

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

h1 { margin-top: 0; }

.subtitle { color: var(--muted); margin-bottom: 24px; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--primary-dark); }
.btn-small { padding: 8px 14px; font-size: 0.85rem; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-save {
  width: 100%;
  text-align: center;
  margin: 20px 0;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
}
.btn-save:hover { background: var(--accent-dark); }

.form-card {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row { display: flex; gap: 16px; }
.form-row label { flex: 1; }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

input {
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}
input:focus { outline: 2px solid var(--primary); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.card-tile {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.card-tile:hover { border-color: var(--primary); }

.tile-logo {
  width: 48px; height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
}
.tile-logo-frame {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
}
.tile-logo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.tile-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.tile-info { display: flex; flex-direction: column; }
.tile-info span { color: var(--muted); font-size: 0.85rem; }

.empty-state { color: var(--muted); }

.card-view {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
}

.card-logo-frame {
  width: 140px;
  height: 100px;
  margin: 0 auto 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.card-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.job-title { color: var(--muted); margin: 4px 0 0; }
.company { color: var(--muted); margin: 2px 0 0; }

.details-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.details-list a { color: var(--text); text-decoration: none; }
.details-list a:hover { color: var(--primary); }

.qr-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.qr-image {
  width: 200px; height: 200px;
  image-rendering: pixelated;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}
.qr-caption { color: var(--muted); font-size: 0.8rem; }

.owner-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 12px;
}

.card-comms-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.exchange-block {
  margin-top: 24px;
  padding: 20px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.exchange-block h2 { font-size: 1.05rem; margin-bottom: 4px; }

/* Integrations page */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.integration-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.integration-card-header { display: flex; justify-content: space-between; align-items: baseline; }
.integration-category { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.integration-status { font-size: 0.75rem; font-weight: 600; }
.integration-status.on { color: #16a34a; }
.integration-status.off { color: var(--muted); }
.integration-card form.inline-config { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.integration-card input[type="text"],
.integration-card input[type="url"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
}

.form-narrow { max-width: 380px; margin: 0 auto; }

.switch-auth { text-align: center; color: var(--muted); margin-top: 16px; }
.switch-auth a { color: var(--primary); font-weight: 600; text-decoration: none; }

.current-logo-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.current-logo-thumb-frame {
  width: 44px; height: 36px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  flex-shrink: 0;
}
.current-logo-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.field-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: -2px;
}

.flash-wrap { margin-bottom: 16px; }
.flash {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-success { background: #dcfce7; color: #166534; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 20px;
}

/* ------------------------------------------------------------------ */
/* Landing page                                                        */
/* ------------------------------------------------------------------ */

.landing-container { max-width: 1080px; }

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding: 64px 0 40px;
}
.hero-eyebrow {
  display: inline-block;
  color: var(--accent-dark);
  background: #fff7e8;
  border: 1px solid #fde3ad;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 3rem;
  line-height: 1.08;
  margin: 0 0 20px;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero-sub {
  max-width: 460px;
  margin: 0 0 32px;
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.btn-hero {
  padding: 16px 32px;
  font-size: 1.05rem;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
}
.btn-hero:hover { background: var(--accent-dark); }
.btn-hero-secondary {
  padding: 16px 32px;
  font-size: 1.05rem;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-hero-secondary:hover { background: var(--primary); color: #fff; }
.hero-note { color: var(--muted); font-size: 0.85rem; max-width: 420px; }

/* ---- Hero visual: a small fanned pair of card mockups ---- */
.hero-visual {
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock-card {
  position: absolute;
  width: 280px;
  height: 168px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -12px rgba(28, 32, 68, 0.25);
  padding: 22px;
}
.mock-card-back {
  transform: rotate(8deg) translate(18px, 10px);
  background: #eef0f8;
  opacity: 0.9;
}
.mock-card-front {
  transform: rotate(-4deg);
}
.mock-qr {
  width: 42px;
  height: 42px;
  border: 3px solid var(--primary);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  padding: 5px;
  margin-bottom: 16px;
}
.mock-qr span { background: var(--primary); border-radius: 2px; }
.mock-qr span:nth-child(3) { background: var(--accent); }
.mock-name {
  width: 60%;
  height: 12px;
  border-radius: 4px;
  background: var(--primary);
  margin-bottom: 10px;
}
.mock-line { height: 8px; border-radius: 4px; background: var(--border); margin-bottom: 8px; }
.mock-line-wide { width: 85%; }
.mock-line-narrow { width: 55%; }
.mock-line.accent { background: var(--accent); opacity: 0.9; }

/* ---- Stat strip ---- */
.stat-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: var(--primary);
  border-radius: 18px;
  padding: 28px 24px;
  margin: 16px 0 56px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; align-items: center; color: #fff; }
.stat strong { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.stat span { font-size: 0.85rem; color: #cfd2e6; margin-top: 2px; }
.stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.2); }

/* ---- Shared section heading style ---- */
.section-eyebrow {
  display: block;
  text-align: center;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  text-align: center;
  font-size: 1.85rem;
  color: var(--primary);
  margin: 0 0 40px;
  font-weight: 800;
}
.section-sub {
  max-width: 620px;
  margin: -24px auto 36px;
  text-align: center;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ---- Feature highlight cards ---- */
.features { padding: 32px 0 60px; }
.integrations-section {
  background: #f7f8fc;
  border-radius: 24px;
  padding: 48px 32px 56px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -16px rgba(28, 32, 68, 0.22);
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 24px; height: 24px; }
.icon-indigo { background: #eef0f8; color: var(--primary); }
.icon-amber { background: #fff3dc; color: var(--accent-dark); }
.feature-card h3 { margin: 0 0 8px; color: var(--text); font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ---- How it works: connected step track ---- */
.how-it-works {
  background: #f8f5ef;
  border-radius: 28px;
  padding: 52px 32px;
  margin-bottom: 60px;
}
.steps-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.steps-track::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--accent) 0, var(--accent) 8px, transparent 8px, transparent 16px);
}
.step { text-align: center; padding: 0 12px; position: relative; }
.step-number {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px #f8f5ef;
}
.step h3 { margin: 0 0 8px; font-size: 1.02rem; color: var(--text); }
.step p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

/* ---- Use cases: icon cards ---- */
.use-cases { padding: 0 0 60px; }
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.use-case-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.use-case-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 32px -18px rgba(28, 32, 68, 0.2);
}
.use-case-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.use-case-icon svg { width: 20px; height: 20px; }
.use-case-card h3 { margin: 0 0 6px; color: var(--primary); font-size: 1.02rem; }
.use-case-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* ---- Final CTA ---- */
.final-cta {
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, #2a2f66 100%);
  color: #fff;
  border-radius: 24px;
  padding: 56px 24px;
  margin: 0 0 48px;
}
.final-cta h2 { margin: 0 0 12px; font-size: 1.85rem; }
.final-cta p { margin: 0 0 28px; color: #cfd2e6; font-size: 1.05rem; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-note { margin-left: auto; margin-right: auto; }
  .hero-visual { height: 220px; margin-top: 12px; }
  .mock-card { width: 220px; height: 132px; padding: 16px; }
  .steps-track { grid-template-columns: 1fr 1fr; gap: 32px 0; }
  .steps-track::before { display: none; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 2.1rem; }
  .hero-sub { font-size: 1rem; }
  .stat-strip { gap: 20px; }
  .steps-track { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ */
/* Pricing page                                                        */
/* ------------------------------------------------------------------ */

.pricing-hero { text-align: center; padding: 48px 0 8px; }
.pricing-title { font-size: 2.2rem; color: var(--primary); font-weight: 800; margin: 0 0 12px; }
.pricing-sub { color: var(--muted); font-size: 1.05rem; max-width: 480px; margin: 0 auto; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  padding: 40px 0;
}
.pricing-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
}
.pricing-card-featured {
  border: 2px solid var(--accent);
  box-shadow: 0 20px 40px -20px rgba(28, 32, 68, 0.3);
  transform: translateY(-8px);
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 5px 14px;
  border-radius: 999px;
}
.pricing-plan-name { margin: 0 0 4px; font-size: 1.3rem; color: var(--primary); }
.pricing-plan-tagline { margin: 0 0 18px; color: var(--muted); font-size: 0.9rem; }
.pricing-amount { font-size: 2.2rem; font-weight: 800; color: var(--text); margin-bottom: 20px; }
.pricing-amount span { font-size: 0.95rem; font-weight: 400; color: var(--muted); margin-left: 4px; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 28px; flex-grow: 1; }
.pricing-features li {
  padding: 8px 0 8px 26px;
  position: relative;
  color: var(--text);
  font-size: 0.92rem;
  border-top: 1px solid var(--border);
}
.pricing-features li:first-child { border-top: none; }
.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-dark);
  font-weight: 700;
}
.pricing-cta { width: 100%; text-align: center; display: block; }
.pricing-cta.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.pricing-enterprise-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #f8f5ef;
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.pricing-enterprise-banner h3 { margin: 0 0 4px; color: var(--primary); }
.pricing-enterprise-banner p { margin: 0; color: var(--muted); }

@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card-featured { transform: none; }
}

/* ------------------------------------------------------------------ */
/* Billing dashboard                                                    */
/* ------------------------------------------------------------------ */

.billing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 24px;
}
.billing-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}
.billing-card-header h2 { margin: 4px 0 0; color: var(--text); }
.billing-plan-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.billing-plan-free { background: #eef0f8; color: var(--primary); }
.billing-plan-business { background: #fff3dc; color: var(--accent-dark); }
.billing-plan-enterprise { background: var(--primary); color: #fff; }
.billing-seat-usage { text-align: right; }
.billing-seat-usage strong { display: block; font-size: 1.3rem; color: var(--primary); }
.billing-seat-usage span { color: var(--muted); font-size: 0.8rem; }
.billing-status { color: var(--muted); font-size: 0.9rem; margin: 8px 0 20px; }
.billing-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.muted-note { color: var(--muted); font-size: 0.9rem; }

.invite-link-row { margin: 16px 0 20px; }
.invite-link-row input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--bg);
}

.member-list { list-style: none; padding: 0; margin: 0; }
.member-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.member-list li:first-child { border-top: none; }
.member-list em { color: var(--muted); font-style: normal; font-size: 0.8rem; }

/* ------------------------------------------------------------------ */
/* Legal pages (Terms of Use / Privacy Policy)                         */
/* ------------------------------------------------------------------ */

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 0 64px;
}
.legal-page h1 { color: var(--primary); font-size: 2rem; margin-bottom: 4px; }
.legal-updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 32px; }
.legal-page h2 {
  color: var(--primary);
  font-size: 1.2rem;
  margin: 36px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.legal-page h2:first-of-type { border-top: none; padding-top: 0; }
.legal-page p, .legal-page li { color: var(--text); line-height: 1.65; font-size: 0.95rem; }
.legal-page ul, .legal-page ol { padding-left: 22px; margin: 12px 0; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--primary); }
.legal-entity-note {
  background: #eef0f8;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 32px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.8rem; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }

.terms-ack {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  margin: 4px 0 0;
}
.terms-ack a { color: var(--muted); text-decoration: underline; }




