/* CPMS homepage — design tokens from agent-os/product/DESIGN.md */

:root {
  --navy: #0F172A;
  --navy-hover: #020617;
  --slate: #64748B;
  --slate-2: #475569;
  --sage: #059669;
  --sage-dark: #047857;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --border-2: #F1F5F9;
  --success: #22C55E;
  --warning: #EAB308;
  --error: #EF4444;
  --info: #0EA5E9;

  --r-sm: 4px;
  --r: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-full: 9999px;

  --sh-sm: 0 1px 3px rgba(15,23,42,.03);
  --sh: 0 2px 6px rgba(15,23,42,.05);
  --sh-md: 0 4px 16px rgba(15,23,42,.07);
  --sh-lg: 0 8px 32px rgba(15,23,42,.10);

  --ff-head: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --ff-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --ff-mono: 'Fira Code', ui-monospace, SFMono-Regular, monospace;

  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--ff-head); margin: 0; color: var(--navy); }
p { margin: 0; color: var(--slate-2); }
a { color: var(--sage); text-decoration: none; }
a:hover { color: var(--sage-dark); }
code { font-family: var(--ff-mono); font-size: .9em; background: var(--border-2); padding: 1px 6px; border-radius: var(--r-sm); color: var(--navy); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 768px) { .container { padding: 0 16px; } }

/* TYPOGRAPHY */
.display { font-size: 56px; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 16px; }
.h2 { font-size: 36px; line-height: 1.18; font-weight: 700; letter-spacing: -.01em; margin: 0 0 16px; }
.h3 { font-size: 20px; line-height: 1.3; font-weight: 600; margin: 0 0 8px; }
.h4 { font-size: 16px; line-height: 1.35; font-weight: 600; margin: 0 0 6px; }
.lead { font-size: 18px; line-height: 1.6; color: var(--slate-2); }
.section-lead { font-size: 18px; line-height: 1.6; color: var(--slate-2); max-width: 720px; margin-top: 12px; }
.eyebrow {
  font-family: var(--ff-body);
  font-size: 12px; font-weight: 600; color: var(--sage);
  text-transform: uppercase; letter-spacing: .12em;
  margin: 0 0 12px;
}
.eyebrow--light { color: #5EEAD4; }
.h2--light, .h3--light { color: #F8FAFC; }
.lead--light { color: #CBD5E1; }

@media (max-width: 768px) {
  .display { font-size: 36px; }
  .h2 { font-size: 28px; }
}

/* CHIPS / BADGES */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; letter-spacing: .05em;
  padding: 4px 12px; border-radius: var(--r-sm);
  text-transform: uppercase;
  font-family: var(--ff-body);
}
.chip--info {
  background: rgba(14,165,233,.08); color: #0369A1;
  border: 1px solid rgba(14,165,233,.15);
}
.chip--ok { background: rgba(34,197,94,.10); color: #16A34A; }
.chip--warn { background: rgba(234,179,8,.12); color: #CA8A04; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: var(--r-full); }
.badge--ok { background: rgba(34,197,94,.10); color: #16A34A; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ff-head); font-weight: 600;
  border-radius: var(--r); cursor: pointer; transition: all .15s ease;
  text-decoration: none; border: 1px solid transparent; white-space: nowrap;
  padding: 10px 22px; font-size: 14px; height: 42px;
}
.btn--lg { padding: 14px 28px; font-size: 16px; height: 52px; }
.btn--full { width: 100%; }
.btn--primary { background: var(--navy); color: #fff; box-shadow: var(--sh-sm); }
.btn--primary:hover { background: var(--navy-hover); color: #fff; box-shadow: var(--sh); transform: translateY(-1px); }
.btn--secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--secondary:hover { background: rgba(15,23,42,.04); color: var(--navy); }
.btn--ghost { background: transparent; color: var(--slate-2); }
.btn--ghost:hover { background: var(--border-2); color: var(--navy); }
.btn--ghost-light { color: #CBD5E1; }
.btn--ghost-light:hover { background: rgba(255,255,255,.08); color: #fff; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248,250,252,.85);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.nav.is-scrolled { border-color: var(--border); box-shadow: var(--sh-sm); }
.nav__row {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--navy); font-family: var(--ff-head); font-weight: 800; font-size: 18px;
  letter-spacing: -.01em;
}
.nav__brand:hover { color: var(--navy); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--r);
  background: var(--navy); color: #fff;
}
.brand-text { letter-spacing: .04em; }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  color: var(--slate-2); font-weight: 500; font-size: 14px;
  font-family: var(--ff-body);
}
.nav__links a:hover { color: var(--navy); }
.nav__cta { display: flex; align-items: center; gap: 8px; }
.nav__burger {
  display: none;
  width: 40px; height: 40px; border: 0; background: transparent;
  cursor: pointer; padding: 8px;
}
.nav__burger span {
  display: block; width: 100%; height: 2px;
  background: var(--navy); margin: 4px 0; border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__drawer {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
  flex-direction: column; gap: 12px;
}
.nav__drawer.is-open { display: flex; }
.nav__drawer a { color: var(--navy); padding: 10px 8px; font-weight: 500; }

/* Lang switcher */
.lang {
  display: inline-flex; padding: 3px;
  background: var(--border-2); border-radius: var(--r);
  border: 1px solid var(--border);
}
.lang__btn {
  border: 0; background: transparent;
  font-family: var(--ff-head); font-weight: 600; font-size: 12px;
  padding: 6px 10px; border-radius: 5px; cursor: pointer;
  color: var(--slate-2); letter-spacing: .04em;
}
.lang__btn:hover { color: var(--navy); }
.lang__btn.is-active { background: var(--navy); color: #fff; box-shadow: var(--sh-sm); }
.lang--drawer { align-self: flex-start; }

@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__cta .btn--ghost { display: none; }
}
@media (max-width: 768px) {
  .nav__cta { display: none; }
  .nav__burger { display: block; }
}

/* HERO */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 96px;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(5,150,105,.10), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(14,165,233,.08), transparent 60%),
    var(--bg);
}
.hero__grid {
  display: grid; grid-template-columns: 1fr; gap: 56px;
}
/* Desktop: headline left, lead + CTAs + bullets right; screenshots full width below. */
.hero__copy {
  display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 64px; align-items: start;
}
.hero__copy > .chip { grid-column: 1; grid-row: 1; justify-self: start; }
.hero__copy > .display { grid-column: 1; grid-row: 2 / span 3; margin-bottom: 0; }
.hero__copy > .lead { grid-column: 2; grid-row: 2; margin-top: 12px; }
.hero__copy > .hero__ctas { grid-column: 2; grid-row: 3; }
.hero__copy > .hero__bullets { grid-column: 2; grid-row: 4; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 24px; }
.hero__bullets { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.hero__bullets li {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--slate-2); font-weight: 500;
}
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--sage); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Hero visual — real app screenshot */
.hero__visual { position: relative; }
.shot {
  margin: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); overflow: hidden;
}
.shot img { display: block; width: 100%; height: auto; }
.carousel__frame { position: relative; }
.carousel__stage { position: relative; aspect-ratio: 2 / 1; background: var(--bg); }
.carousel__slide {
  position: absolute; inset: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .6s ease;
}
.carousel__slide.is-active { opacity: 1; }
.carousel__slide img { width: 100%; height: 100%; object-fit: contain; }
.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.carousel__dot {
  width: 8px; height: 8px; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--r-full); background: var(--border);
  transition: width .3s ease, background .3s ease;
}
.carousel__dot[aria-current="true"] { width: 22px; background: var(--sage); }
.carousel__dot:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .carousel__slide, .carousel__dot { transition: none; } }

.badge-floater {
  position: absolute;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-full); padding: 8px 14px;
  font-size: 12px; font-weight: 600; color: var(--navy);
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--sh-md);
}
.badge-floater svg { stroke: var(--sage); }
.badge-floater--a { bottom: -14px; right: -18px; }
.badge-floater--b { bottom: -14px; left: -18px; }

@media (max-width: 1024px) {
  .hero { padding: 56px 0 72px; }
  .hero__grid { gap: 40px; }
  .hero__copy { display: block; max-width: 640px; }
  .badge-floater--a { right: 8px; }
  .badge-floater--b { left: 8px; }
}

/* SCREENSHOTS */
.shots { padding: 96px 0; background: var(--surface); border-top: 1px solid var(--border-2); }
.shots__grid { display: grid; gap: 48px; margin-top: 40px; }
.shots__item { margin: 0; display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; align-items: center; }
.shots__item figcaption p { font-size: 16px; line-height: 1.6; color: var(--slate-2); margin-top: 8px; }
.shots__item--wide { grid-template-columns: 1fr; gap: 20px; }
.shots__item--wide figcaption { max-width: 720px; }
@media (max-width: 1024px) { .shots__item { grid-template-columns: 1fr; gap: 18px; } }
@media (max-width: 640px) { .shots { padding: 64px 0; } }

/* TRUST */
.trust {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
}
.trust__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 28px;
}
.trust__col {
  padding: 24px; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg);
}
.trust__col:last-child {
  background: var(--navy); border-color: var(--navy);
}
.trust__col:last-child .h4 { color: #F8FAFC; }
.trust__col:last-child p { color: #CBD5E1; }

@media (max-width: 900px) {
  .trust__grid { grid-template-columns: 1fr; }
}

/* FEATURES */
.features { padding: 96px 0; }
.features__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 40px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.feature .h3 { margin-top: 16px; }
.feature__new { margin-left: 8px; vertical-align: top; }
.feature p { font-size: 15px; line-height: 1.6; }
.card:hover { box-shadow: var(--sh-md); border-color: #CBD5E1; transform: translateY(-2px); }
.feature__ic {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r);
  background: rgba(5,150,105,.08);
}
.feature__ic svg { width: 22px; height: 22px; fill: none; stroke: var(--sage); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1024px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features__grid { grid-template-columns: 1fr; } .features { padding: 64px 0; } }

/* USPs */
.usps {
  background: var(--navy);
  color: #F8FAFC;
  padding: 96px 0;
  background-image:
    radial-gradient(800px 500px at 100% 0%, rgba(5,150,105,.15), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(14,165,233,.12), transparent 60%);
}
.usps__grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
  margin-top: 40px;
}
.usp {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r);
  padding: 24px;
}
.usp p { color: #CBD5E1; font-size: 14px; }
.usp__num {
  display: inline-block;
  font-family: var(--ff-mono); font-size: 12px;
  color: #5EEAD4; letter-spacing: .1em;
  margin-bottom: 16px;
}
@media (max-width: 1200px) { .usps__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .usps__grid { grid-template-columns: 1fr; } .usps { padding: 64px 0; } }

/* HOW IT WORKS */
.how { padding: 96px 0; background: var(--surface); }
.how__steps {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  counter-reset: step;
}
.step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  position: relative;
}
.step__num {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: var(--navy); color: #fff;
  font-family: var(--ff-head); font-weight: 700; font-size: 16px;
  margin-bottom: 16px;
}
.step p { font-size: 14px; line-height: 1.6; }
@media (max-width: 1024px) { .how__steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .how__steps { grid-template-columns: 1fr; } .how { padding: 64px 0; } }

/* COMPLIANCE */
.compliance {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--bg) 0%, #fff 100%);
}
.compliance__row {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px;
  align-items: center;
}
.compliance__list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.compliance__list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  font-size: 14px;
}
.compliance__list strong {
  display: inline-block;
  color: var(--navy);
  font-family: var(--ff-head); font-weight: 700;
  margin-right: 6px;
}
@media (max-width: 900px) {
  .compliance__row { grid-template-columns: 1fr; gap: 32px; }
  .compliance__list { grid-template-columns: 1fr; }
}

/* PRICING */
.pricing { padding: 96px 0; }
.pricing__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 40px;
}
.plan { display: flex; flex-direction: column; position: relative; }
.plan__head { margin-bottom: 16px; }
.plan__for { color: var(--slate-2); font-size: 14px; margin-top: 4px; }
.plan__price { margin: 8px 0 20px; }
.plan__price .amt {
  font-family: var(--ff-head); font-weight: 800; font-size: 40px;
  color: var(--navy); letter-spacing: -.02em;
}
.plan__price .per { color: var(--slate); font-size: 14px; margin-left: 6px; }
.plan__feats {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: grid; gap: 10px; flex: 1;
}
.plan__feats li {
  position: relative; padding-left: 26px; font-size: 14px; color: var(--slate-2);
}
.plan__feats li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px;
  background: rgba(5,150,105,.12);
  border-radius: var(--r-full);
}
.plan__feats li::after {
  content: ""; position: absolute; left: 4px; top: 11px;
  width: 8px; height: 4px;
  border-left: 2px solid var(--sage); border-bottom: 2px solid var(--sage);
  transform: rotate(-45deg);
}
.plan--featured {
  border: 2px solid var(--navy);
  box-shadow: var(--sh-md);
  position: relative;
}
.plan__ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff;
  font-family: var(--ff-head); font-weight: 600; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--r-full);
}
@media (max-width: 1024px) { .pricing__grid { grid-template-columns: 1fr; } .pricing { padding: 64px 0; } }

/* FINAL CTA */
.cta {
  background: var(--navy);
  color: #fff;
  padding: 96px 0;
  background-image:
    radial-gradient(900px 500px at 100% 100%, rgba(5,150,105,.20), transparent 60%),
    radial-gradient(800px 500px at 0% 0%, rgba(14,165,233,.12), transparent 60%);
}
.cta__inner { text-align: center; max-width: 720px; margin: 0 auto; }
.cta__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 28px 0 16px; }
.cta__meta { color: #94A3B8; font-size: 14px; }

@media (max-width: 768px) { .cta { padding: 64px 0; } }

/* FOOTER */
.footer { background: #020617; color: #94A3B8; padding: 56px 0 24px; }
.footer__row {
  display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer .nav__brand { color: #fff; }
.footer .brand-mark { background: var(--navy); }
.footer__tag { color: #94A3B8; font-size: 14px; margin-top: 12px; max-width: 360px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer__cols h4 {
  font-family: var(--ff-head); font-size: 12px; color: #fff;
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px;
}
.footer__cols a {
  display: block; color: #94A3B8; font-size: 14px; padding: 4px 0;
}
.footer__cols a:hover { color: #fff; }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 13px; gap: 16px; flex-wrap: wrap;
}
.footer__legal a { color: #94A3B8; }
.footer__legal a:hover { color: #fff; }

@media (max-width: 900px) {
  .footer__row { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}

/* RTL placeholder — Turkish uses LTR, but keep latitude */
[lang="ar"], [lang="he"] { direction: rtl; }

/* Focus visibility */
a:focus-visible, button:focus-visible, .btn:focus-visible, .lang__btn:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
