/* YSM Infosolution — shared design system */

:root {
  /* Color tokens */
  --bg: oklch(0.985 0.003 80);
  --bg-subtle: oklch(0.96 0.005 80);
  --bg-card: #ffffff;
  --ink: oklch(0.18 0.02 250);
  --ink-2: oklch(0.30 0.02 250);
  --muted: oklch(0.50 0.01 250);
  --muted-2: oklch(0.65 0.01 250);
  --border: oklch(0.92 0.005 250);
  --border-strong: oklch(0.85 0.008 250);
  --brand: oklch(0.48 0.20 255);
  --brand-ink: oklch(0.38 0.22 255);
  --brand-soft: oklch(0.95 0.04 255);
  --brand-band: oklch(0.18 0.10 255);
  --accent: oklch(0.72 0.18 50);  /* warm coral, used sparingly */
  --ok: oklch(0.62 0.15 155);

  /* Type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15,20,40,.06);
  --shadow: 0 6px 24px -8px rgba(15,20,40,.10), 0 2px 6px rgba(15,20,40,.04);
  --shadow-lg: 0 30px 60px -20px rgba(15,20,40,.18), 0 10px 24px -10px rgba(15,20,40,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Typography ===== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.eyebrow.ink { color: var(--ink); }
.eyebrow.ink::before { background: var(--ink); }
.eyebrow.muted { color: var(--muted); }
.eyebrow.muted::before { background: var(--muted-2); }
.eyebrow.invert { color: rgba(255,255,255,.85); }
.eyebrow.invert::before { background: rgba(255,255,255,.85); }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.96;
}
.h-1 { font-size: clamp(32px, 4vw, 56px); font-weight: 700; letter-spacing: -0.03em; }
.h-2 { font-size: clamp(24px, 2.8vw, 36px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; }
.h-3 { font-size: clamp(20px, 1.9vw, 24px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.h-4 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }

.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 400;
  text-wrap: pretty;
  max-width: 60ch;
}

.body-muted { color: var(--muted); }
.body-strong { color: var(--ink); font-weight: 500; }

em.brand, .brand-text { color: var(--brand); font-style: normal; }
.italic-accent { font-style: italic; font-family: "Instrument Serif", "Geist", serif; font-weight: 400; letter-spacing: -0.01em; }

/* ===== Containers ===== */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.section {
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: clamp(48px, 6vw, 88px);
}
.section-tight {
  padding-top: clamp(32px, 4vw, 56px);
  padding-bottom: clamp(32px, 4vw, 56px);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
  color: var(--ink);
}
.logo__img {
  height: 32px;
  width: auto;
  display: block;
}
.logo__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  display: none;
}
@media (min-width: 720px) { .logo__sub { display: inline-flex; align-items: center; }}

.nav {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 960px) { .nav { display: flex; } }
.nav__link {
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background .15s ease, color .15s ease;
}
.nav__link:hover { background: var(--bg-subtle); color: var(--ink); }
.nav__link.active { color: var(--ink); background: var(--bg-subtle); }

/* Dropdown nav */
.nav__group { position: relative; }
.nav__trigger {
  background: transparent;
  border: 0;
  font: inherit;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav__caret {
  font-size: 9px;
  color: var(--muted);
  transition: transform .15s ease;
}
.nav__group.open .nav__caret { transform: rotate(180deg); color: var(--ink); }
.nav__group.open .nav__trigger,
.nav__group.active .nav__trigger { color: var(--ink); background: var(--bg-subtle); }
.nav__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 60;
}
.nav__group.open .nav__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav__menu::before {
  /* invisible bridge so hover doesn't drop */
  content: "";
  position: absolute;
  top: -8px; left: 0; right: 0;
  height: 12px;
}
.nav__item {
  display: flex; flex-direction: column;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: background .12s ease;
}
.nav__item:hover { background: var(--bg-subtle); }
.nav__item-label { font-size: 14.5px; font-weight: 500; letter-spacing: -0.005em; }
.nav__item-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 2px;
}
.nav__item.is-divider {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 14px;
  color: var(--brand);
}
.nav__item.is-divider .nav__item-label { color: var(--brand); font-weight: 500; }

/* Mobile menu — group accordions */
.mobile-menu .m-group {
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.mobile-menu .m-group summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 4px;
  font-size: 17px;
  font-weight: 500;
  display: block;
}
.mobile-menu .m-group summary::-webkit-details-marker { display: none; }
.mobile-menu .m-sub {
  display: block;
  padding: 10px 16px;
  font-size: 15.5px;
  font-weight: 500;
  border-bottom: 0;
  color: var(--ink-2);
}
.mobile-menu .m-sub:last-of-type { padding-bottom: 14px; }

.header-cta { margin-left: auto; }
@media (min-width: 960px) { .header-cta { margin-left: 0; } }

.menu-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
}
@media (min-width: 960px) { .menu-btn { display: none; } }
.menu-btn svg { width: 18px; height: 18px; }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 12px var(--pad) 22px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 12px 4px;
  font-size: 17px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--ink);
  color: var(--bg);
}
.btn--primary:hover { background: var(--brand-ink); }
.btn--brand {
  background: var(--brand);
  color: white;
}
.btn--brand:hover { background: var(--brand-ink); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--bg-subtle); border-color: var(--ink); }
.btn--inverse {
  background: white;
  color: var(--ink);
}
.btn--inverse:hover { background: var(--bg-subtle); }
.btn--lg { padding: 16px 26px; font-size: 16px; }
.btn--sm { padding: 8px 14px; font-size: 13.5px; }
.btn .arrow {
  width: 16px; height: 16px;
  display: inline-block;
  position: relative;
  transition: transform .15s ease;
}
.btn:hover .arrow { transform: translateX(3px); }
.btn .arrow::before {
  content: "→";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 16px;
  line-height: 1;
}

/* ===== Cards & surfaces ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .2s ease;
}
.card--hover:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card__tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Stripe placeholder for product screenshots */
.placeholder {
  background:
    repeating-linear-gradient(135deg, var(--bg-subtle) 0 14px, var(--bg) 14px 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 32px;
  min-height: 220px;
}
.placeholder__label {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 100px;
}

/* ===== Stats ===== */
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (min-width: 760px) {
  .stat-row { grid-template-columns: repeat(4, 1fr); }
}
.stat {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.stat__value {
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat__label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: oklch(0.85 0.01 250);
  padding: 80px 0 32px;
  margin-top: 80px;
}
.site-footer .wrap { display: grid; gap: 56px; }
.footer-top {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-lede {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: white;
  text-wrap: balance;
  max-width: 18ch;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(0.7 0.01 250);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  color: oklch(0.85 0.01 250);
  font-size: 14.5px;
}
.footer-col a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid oklch(0.30 0.02 250);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: oklch(0.65 0.01 250);
}

/* ===== Form ===== */
.lead-form {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.field input, .field textarea, .field select {
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink);
  border-radius: 10px;
  outline: none;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px oklch(0.18 0.02 250 / 0.08);
}
.field label .req { color: var(--brand); font-weight: 700; }
.field--row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) {
  .field--row { grid-template-columns: 1fr 1fr; }
}
.field textarea { min-height: 110px; resize: vertical; }

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow-sm);
}

.form-card--dark {
  background: oklch(0.22 0.02 250);
  color: white;
  border-color: oklch(0.28 0.02 250);
}
.form-card--dark .field label { color: oklch(0.75 0.01 250); }
.form-card--dark .field input,
.form-card--dark .form-card--dark .field textarea {
  background: oklch(0.18 0.02 250);
  border-color: oklch(0.30 0.02 250);
  color: white;
}
.form-card--dark .field textarea {
  background: oklch(0.18 0.02 250);
  border-color: oklch(0.30 0.02 250);
  color: white;
}
.form-card--dark .field input::placeholder,
.form-card--dark .field textarea::placeholder { color: oklch(0.55 0.01 250); }
.form-card--dark .field input:focus,
.form-card--dark .field textarea:focus { border-color: white; box-shadow: 0 0 0 4px rgba(255,255,255,.08); }

/* ===== Banner / pill ===== */
.pill-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 6px 14px 6px 6px;
  border-radius: 100px;
  font-size: 13.5px;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.pill-row .badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg);
  padding: 4px 10px;
  border-radius: 100px;
}
.pill-row .badge--brand { background: var(--brand); color: white; }

/* ===== Marquee / trust strip ===== */
.trust-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 32px;
  align-items: center;
}
@media (min-width: 720px) {
  .trust-strip { grid-template-columns: auto 1fr; }
}
.trust-strip__label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.trust-strip__items {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 15px;
}
.trust-strip__items span { opacity: .85; }

/* ===== Generic utilities ===== */
.grid-2 { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
.grid-4 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (min-width: 800px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.flex { display: flex; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* Reveal-on-scroll — visible by default; JS opts elements into hidden-then-fade-in */
.reveal { transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal:not(.in) {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal:not(.in) { opacity: 1; transform: none; transition: none; }
}

/* Form error + footer legal links */
.form-error {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: oklch(0.96 0.04 25);
  border: 1px solid oklch(0.85 0.08 25);
  color: oklch(0.45 0.15 25);
  font-size: 14.5px;
  line-height: 1.45;
}
.form-error a { color: inherit; font-weight: 600; text-decoration: underline; }
.footer-legal a { color: oklch(0.65 0.01 250); }
.footer-legal a:hover { color: white; }

/* Accessibility — visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Mobile responsiveness — global safeguards ===== */
/* Prevent any stray element from forcing horizontal scroll (safe with sticky) */
body { overflow-x: clip; }
/* Long words/headings break instead of overflowing narrow screens */
body, h1, h2, h3, h4, .h-display, .h-1, .h-2, .h-3 { overflow-wrap: break-word; }

@media (max-width: 600px) {
  /* Header stays on one row on small phones */
  .site-header__inner { gap: 12px; }
  .header-cta { white-space: nowrap; }
  /* Long button labels wrap rather than overflow the viewport */
  .btn { white-space: normal; }
  .btn--lg { padding: 14px 20px; font-size: 15px; }
  /* Slightly tighter section rhythm on phones */
  .section { padding-top: clamp(36px, 9vw, 56px); padding-bottom: clamp(36px, 9vw, 56px); }
}
/* Stacked, full-width CTAs on phones — standard, thumb-friendly */
@media (max-width: 520px) {
  .hero__cta { width: 100%; flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
}

/* Dark section helper */
.section--dark {
  background: var(--ink);
  color: white;
}
.section--dark .lede { color: oklch(0.78 0.01 250); }
.section--dark .muted { color: oklch(0.65 0.01 250); }
.section--dark .card {
  background: oklch(0.22 0.02 250);
  border-color: oklch(0.28 0.02 250);
  color: white;
}
.section--dark .card .muted { color: oklch(0.72 0.01 250); }
.section--dark .eyebrow { color: oklch(0.78 0.05 255); }
.section--dark .eyebrow::before { background: oklch(0.78 0.05 255); }
.section--dark .stat { border-color: oklch(0.30 0.02 250); }
.section--dark .stat__label { color: oklch(0.65 0.01 250); }
.section--dark hr.divider { background: oklch(0.30 0.02 250); }
