/* ============================================================
   ConsultKit Design System — Shared Stylesheet
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Brand palette */
  --ck-navy:    #0f172a;
  --ck-slate:   #1e293b;
  --ck-muted:   #64748b;
  --ck-light:   #f8fafc;
  --ck-white:   #ffffff;
  --ck-border:  #e2e8f0;

  /* Per-app accent (overridden per page) */
  --accent:        #6366f1;
  --accent-light:  #eef2ff;
  --accent-dark:   #4338ca;

  /* App-specific colors */
  --clarify-bg:  #d3f5f0;
  --clarify-fg:  #0a8f7c;
  --referee-bg:  #e0e7ff;
  --referee-fg:  #4338ca;
  --testify-bg:  #fef3c7;
  --testify-fg:  #92400e;

  /* Typography scale — increased for readability */
  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1.0625rem;
  --text-lg:   1.1875rem;
  --text-xl:   1.3125rem;
  --text-2xl:  1.5625rem;
  --text-3xl:  1.9375rem;
  --text-4xl:  2.375rem;
  --text-5xl:  3.125rem;
  --text-6xl:  3.875rem;

  /* Spacing */
  --space-section: 6rem;
  --radius-sm:  0.375rem;
  --radius-md:  0.75rem;
  --radius-lg:  1.25rem;
  --radius-xl:  2rem;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:  0 20px 40px rgba(0,0,0,.1), 0 8px 16px rgba(0,0,0,.05);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--ck-navy);
  background: var(--ck-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */
.display { font-size: clamp(2.5rem, 5vw, var(--text-6xl)); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.headline { font-size: clamp(1.9375rem, 3.5vw, var(--text-4xl)); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
.subhead  { font-size: clamp(1.3125rem, 2.5vw, var(--text-2xl)); font-weight: 600; line-height: 1.3; }
.body-lg  { font-size: var(--text-lg); line-height: 1.7; color: var(--ck-muted); }
.label    { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section { padding-block: var(--space-section); }
.section--dark { background: var(--ck-navy); color: var(--ck-white); }
.section--light { background: var(--ck-light); }
.section--accent { background: var(--accent-light); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ck-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--ck-navy);
}

.nav__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  display: grid;
  place-items: center;
  color: white;
  font-size: var(--text-sm);
  font-weight: 800;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ck-muted);
  transition: color .15s;
}

.nav__links a:hover { color: var(--ck-navy); }

.nav__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: white;
}
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent); }

.btn--outline {
  background: transparent;
  color: var(--ck-navy);
  border: 1.5px solid var(--ck-border);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

.btn--lg {
  padding: 0.875rem 2rem;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.btn--ghost {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,.3);
}
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }

/* ---------- Hero ---------- */
.hero {
  padding-block: 7rem 5rem;
  background: linear-gradient(135deg, var(--ck-navy) 0%, color-mix(in srgb, var(--accent) 40%, var(--ck-navy)) 100%);
  color: white;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 60% 50%, color-mix(in srgb, var(--accent) 20%, transparent), transparent);
  pointer-events: none;
}

.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; }

.hero__title { margin-bottom: 1.25rem; }
.hero__subtitle { font-size: var(--text-xl); line-height: 1.5; color: rgba(255,255,255,.9); margin-bottom: 1rem; font-weight: 500; }
.hero__desc { font-size: var(--text-base); line-height: 1.7; color: rgba(255,255,255,.65); margin-bottom: 2.5rem; }
.hero__trial-note { font-size: var(--text-sm); color: rgba(255,255,255,.5); margin-top: 1rem; font-style: italic; }

.hero__ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__visual {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

/* ---------- Problem ---------- */
.problem { text-align: center; }
.problem__intro { max-width: 720px; margin-inline: auto; margin-bottom: 3.5rem; }
.problem__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.problem__card {
  padding: 2rem;
  background: white;
  border: 1px solid var(--ck-border);
  border-radius: var(--radius-lg);
  text-align: left;
  transition: box-shadow .2s, transform .2s;
}

.problem__card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.problem__icon {
  width: 52px;
  height: 52px;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.problem__card h3 { font-size: var(--text-base); font-weight: 700; margin-bottom: 0.625rem; }
.problem__card p { font-size: var(--text-sm); color: var(--ck-muted); line-height: 1.65; }

/* ---------- Demo / Product Preview ---------- */
.demo { text-align: center; }
.demo__intro { max-width: 640px; margin-inline: auto; margin-bottom: 2rem; }

.demo__frame {
  background: var(--ck-light);
  border: 1px solid var(--ck-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  margin-inline: auto;
}

.demo__bar {
  background: white;
  border-bottom: 1px solid var(--ck-border);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.demo__dot { width: 12px; height: 12px; border-radius: 50%; }
.demo__dot--red   { background: #ef4444; }
.demo__dot--yellow{ background: #eab308; }
.demo__dot--green { background: #22c55e; }

.demo__url {
  flex: 1;
  background: var(--ck-light);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.75rem;
  font-size: var(--text-xs);
  color: var(--ck-muted);
  margin-inline: 0.5rem;
  text-align: center;
}

.demo__screen {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-light), white);
  position: relative;
  overflow: hidden;
}

/* ---------- App Feature Cards (Section 4) ---------- */
.app-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.app-card {
  padding: 2rem;
  background: white;
  border: 1.5px solid var(--ck-border);
  border-radius: var(--radius-xl);
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}

.app-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.app-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.app-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 1.375rem;
}

.app-card__icon--clarify  { background: var(--clarify-bg); color: var(--clarify-fg); }
.app-card__icon--referee   { background: var(--referee-bg); color: var(--referee-fg); }
.app-card__icon--testify   { background: var(--testify-bg); color: var(--testify-fg); }

.app-card__badge {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
}

.app-card__badge--clarify  { background: var(--clarify-bg); color: var(--clarify-fg); }
.app-card__badge--referee  { background: var(--referee-bg); color: var(--referee-fg); }
.app-card__badge--testify  { background: var(--testify-bg); color: var(--testify-fg); }

.app-card__headline {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.app-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.app-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: var(--text-sm);
  color: var(--ck-muted);
  line-height: 1.55;
}

.app-card__features li::before {
  content: '\2713';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.app-card__pricing-note {
  font-size: var(--text-xs);
  color: var(--ck-muted);
  font-style: italic;
}

.app-card__pricing-note:empty { display: none; }
.app-card__pricing-note::before { content: none; }

.app-card__cta { margin-top: auto; }

/* ---------- Flow Diagram (Section 5) ---------- */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: flex-start;
  max-width: 1000px;
  margin-inline: auto;
}

.flow__step {
  background: white;
  border: 1px solid var(--ck-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: left;
  transition: box-shadow .2s;
}

.flow__step:hover { box-shadow: var(--shadow-md); }

.flow__number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-size: var(--text-base);
  font-weight: 800;
  margin-bottom: 1rem;
}

.flow__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.flow__heading {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.flow__copy {
  font-size: var(--text-sm);
  color: var(--ck-muted);
  line-height: 1.65;
}

.flow__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--ck-border);
  font-weight: 300;
  padding-top: 3rem;
}

/* ---------- Social Proof (placeholder) ---------- */
.proof { text-align: center; }
.proof__intro { max-width: 640px; margin-inline: auto; margin-bottom: 2.5rem; }
.proof__placeholder { text-align: center; }

/* ---------- Pricing ---------- */
.pricing { text-align: center; }
.pricing__intro { max-width: 680px; margin-inline: auto; margin-bottom: 3.5rem; }

.pricing__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 960px; margin-inline: auto; }

.pricing__card {
  padding: 2.5rem 2rem 2rem;
  background: white;
  border: 1.5px solid var(--ck-border);
  border-radius: var(--radius-xl);
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing__card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pricing__price {
  display: flex;
  align-items: baseline;
  gap: 0.125rem;
  margin-bottom: 0.25rem;
}

.pricing__currency {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--ck-navy);
}

.pricing__amount {
  font-size: var(--text-5xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ck-navy);
}

.pricing__period {
  font-size: var(--text-sm);
  color: var(--ck-muted);
  margin-left: 0.25rem;
}

.pricing__starting {
  font-size: var(--text-xs);
  color: var(--ck-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.pricing__divider {
  height: 1px;
  background: var(--ck-border);
  margin-bottom: 1.5rem;
}

.pricing__included-label,
.pricing__usage-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ck-slate);
  margin-bottom: 0.75rem;
}

.pricing__usage-label {
  margin-top: 1.25rem;
}

.pricing__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pricing__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.pricing__features li::before {
  content: '\2713';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing__usage {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pricing__usage li {
  font-size: var(--text-sm);
  color: var(--ck-muted);
  line-height: 1.5;
  padding-left: 1.5rem;
  position: relative;
}

.pricing__usage li::before {
  content: '+';
  position: absolute;
  left: 0.375rem;
  color: var(--ck-muted);
  font-weight: 600;
}

.pricing__example {
  font-size: var(--text-xs);
  color: var(--ck-muted);
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 0.625rem 0.875rem;
  background: var(--ck-light);
  border-radius: var(--radius-sm);
}

.pricing__trial-note {
  font-size: var(--text-xs);
  color: var(--ck-muted);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

.pricing__footer-note {
  max-width: 700px;
  margin: 3rem auto 0;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ck-muted);
  line-height: 1.7;
}

.pricing__footer-note strong { color: var(--ck-navy); }

/* ---------- CTA Footer ---------- */
.cta-footer {
  background: linear-gradient(135deg, var(--ck-navy), color-mix(in srgb, var(--accent) 50%, var(--ck-navy)));
  color: white;
  text-align: center;
  padding-block: 7rem;
}

.cta-footer h2 { margin-bottom: 1.25rem; color: white; }
.cta-footer p { color: rgba(255,255,255,.7); max-width: 540px; margin-inline: auto; margin-bottom: 3rem; font-size: var(--text-lg); }

.cta-footer__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
footer {
  background: var(--ck-navy);
  color: rgba(255,255,255,.5);
  border-top: 1px solid rgba(255,255,255,.07);
}

.footer__inner {
  padding-block: 3rem 2rem;
  display: grid;
  grid-template-columns: 1.5fr repeat(2, 1fr);
  gap: 3rem;
}

.footer__brand p { font-size: var(--text-sm); margin-top: 0.75rem; line-height: 1.6; }

.footer__col h4 { font-size: var(--text-sm); font-weight: 700; color: white; margin-bottom: 1.25rem; }
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.footer__col ul li a { font-size: var(--text-sm); color: rgba(255,255,255,.5); transition: color .15s; }
.footer__col ul li a:hover { color: white; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-block: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--text-xs);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.w-full { width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .app-cards { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .flow { grid-template-columns: 1fr; gap: 1.5rem; }
  .flow__arrow { transform: rotate(90deg); padding-top: 0; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --space-section: 4rem; }
  .hero { padding-block: 5rem 3rem; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .problem__grid { grid-template-columns: 1fr; }
  .pricing__grid { grid-template-columns: 1fr; max-width: 400px; }
  .nav__links { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .cta-footer { padding-block: 5rem; }
  .cta-footer__actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; }
  .pricing__grid { max-width: 100%; }
}
