/* CedriX Solutions company site
   ---------------------------------------------------------------------------
   Related to the Night Agent site by structure and spacing, distinct by
   palette: a slate ink with a teal accent, where Night Agent is navy with a
   cornflower blue. Same cool temperature, different hue — the parent company,
   not another product page.

   No webfont, no CDN, no external request of any kind. The served site sets a
   strict `default-src 'self'` CSP at the edge, so anything external would be
   blocked anyway; keeping to the system font stack is what makes that hold. */

:root {
  --c-primary:      #0d9488;   /* teal-600 — the accent, incl. the wordmark X */
  --c-primary-dark: #0f766e;   /* teal-700 — hover */
  --c-primary-soft: #e6f4f2;   /* teal tint — icon grounds */
  --c-ink:          #0f172a;   /* slate-900 — dark sections, footer, hero */
  --c-ink-soft:     #1e293b;   /* slate-800 */
  --c-text:         #1a2233;
  --c-muted:        #5b6677;
  --c-muted-light:  #94a3b8;   /* slate-400 — muted text on dark */
  --c-bg:           #f4f6f9;
  --c-card:         #ffffff;
  --c-border:       #e2e8f0;   /* slate-200 */
  --c-border-dark:  #2b3a4f;
  --c-success:      #1a7a1a;
  --c-warn:         #c47000;
  --c-error:        #c0392b;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Consolas", "SFMono-Regular", "Courier New", monospace;

  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 2px 10px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .16);

  --wrap:   1160px;
  --gutter: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-card);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--c-primary); }

:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--c-ink); color: #fff;
  padding: .7rem 1.1rem; z-index: 200; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Typography ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); text-wrap: balance; }
h3 { font-size: 1.18rem; letter-spacing: -.01em; }

p { color: var(--c-muted); }
.lede { font-size: 1.12rem; max-width: 62ch; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .76rem;
  font-weight: 700;
  color: var(--c-primary);
}
.eyebrow-light { color: #5eead4; }   /* teal-300, for dark grounds */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-dark { background: var(--c-ink); color: #fff; }
.section-dark p { color: var(--c-muted-light); }
.section-tint { background: var(--c-bg); }

.section-head { max-width: 62ch; margin-bottom: 2.75rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin: .5rem 0 .75rem; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: .72rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn-lg { padding: .95rem 1.8rem; font-size: 1.02rem; }

.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); }

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }

.btn-ghost-light {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,.32);
}
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ── Nav ──────────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--c-border);
}
/* Frosted glass on a pseudo-element BEHIND the content, not on .nav itself:
   backdrop-filter forces a composited layer that the browser resamples, which
   softens text painted inside it. Painting the wordmark on top of the glass
   keeps it crisp. (Same fix as the Night Agent site.) */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.nav-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 70px;
}

.brand {
  display: inline-flex; align-items: baseline; gap: .4rem;
  text-decoration: none;
  font-weight: 700; font-size: 1.32rem; letter-spacing: -.02em;
}
.brand-name { color: var(--c-ink); }
.brand-x { color: var(--c-primary); }
/* Logo artwork, when present (build.py detects it on disk). Height-driven so
   the aspect ratio is the file's own; width follows. Sized to sit comfortably
   in the 70px bar without crowding the links. */
.brand-logo { height: 36px; width: auto; flex: none; object-fit: contain; }
.footer .brand-logo { height: 32px; }
@media (max-width: 640px) {
  .brand-logo { height: 30px; }
  .footer .brand-logo { height: 28px; }
}
.brand-sub {
  color: var(--c-muted); font-weight: 500; font-size: 1.05rem;
  letter-spacing: 0;
}
/* Light variant for the dark footer. */
.brand-light .brand-name { color: #fff; }
.brand-light .brand-sub  { color: var(--c-muted-light); }

.nav-menu {
  margin-left: auto;
  display: flex; align-items: center; gap: 1.75rem;
}
.nav-menu a {
  text-decoration: none; color: var(--c-text);
  font-size: .93rem; font-weight: 500;
}
.nav-menu a:hover { color: var(--c-primary); }
.nav-menu a[aria-current="page"] { color: var(--c-primary); font-weight: 600; }
.nav-cta { color: #fff !important; }

.nav-toggle {
  margin-left: auto;
  display: none;
  width: 42px; height: 42px;
  background: none; border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 10px 9px;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--c-ink); border-radius: 2px;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  background:
    radial-gradient(900px 440px at 80% -10%, rgba(13,148,136,.34), transparent 60%),
    var(--c-ink);
  color: #fff;
  padding: clamp(4rem, 9vw, 7rem) 0;
  overflow: hidden;
}
.hero h1 { margin: .85rem 0 1.1rem; }
.hero-sub {
  font-size: clamp(1.02rem, 1.9vw, 1.19rem);
  color: #cbd5e1;
  max-width: 62ch;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: .85rem;
  margin: 2rem 0 0;
}

/* ── Cards / grids ────────────────────────────────────────────────────────── */

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

.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .55rem; color: var(--c-ink); }
.card p { font-size: .95rem; }

/* ── Product cards ────────────────────────────────────────────────────────── */

.product-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
/* A single product should not stretch edge to edge; cap it and centre. */
.product-grid:has(> .product-card:only-child) {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

.product-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.9rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  scroll-margin-top: 90px;
}
.product-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.1rem;
}
.product-mark {
  width: 48px; height: 48px; flex: none;
  border-radius: 12px;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  display: grid; place-items: center;
}
.product-mark svg { width: 26px; height: 26px; }
.product-name { color: var(--c-ink); font-size: 1.32rem; margin-bottom: .2rem; }
.product-tagline {
  color: var(--c-primary-dark); font-weight: 600; font-size: .96rem;
  margin-bottom: .85rem;
}
.product-body { font-size: .96rem; margin-bottom: 1.4rem; }
/* Push the CTA to the bottom so cards of differing text length align. */
.product-cta { margin-top: auto; }
.product-cta-soon { color: var(--c-muted); font-weight: 600; font-size: .92rem; }

/* Status badges */
.status-badge {
  display: inline-flex; align-items: center; flex: none;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  padding: .28rem .62rem; border-radius: 100px;
  border: 1px solid transparent; white-space: nowrap;
}
.status-available   { background: #e7f6e7; color: #14601a; border-color: #a8d5a8; }
.status-early-access{ background: #fff2d6; color: #8a5300; border-color: #f0c878; }
.status-coming-soon { background: #eef1f6; color: #5b6677; border-color: #d5dbe4; }

/* ── CTA band ─────────────────────────────────────────────────────────────── */

.cta-band {
  background: var(--c-ink);
  color: #fff;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.cta-inner {
  display: flex; flex-wrap: wrap; gap: 2rem;
  align-items: center; justify-content: space-between;
}
.cta-inner h2 { margin-bottom: .6rem; }
.cta-inner p { color: var(--c-muted-light); max-width: 46ch; }
.cta-actions { text-align: right; }
.cta-note { font-size: .84rem; margin-top: .6rem; color: var(--c-muted-light); }
.cta-note a { color: #5eead4; }

/* ── Page header ──────────────────────────────────────────────────────────── */

.page-head {
  background:
    radial-gradient(800px 360px at 85% -20%, rgba(13,148,136,.28), transparent 60%),
    var(--c-ink);
  color: #fff;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.page-head h1 { margin: .7rem 0 1rem; font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
.page-head p { color: #cbd5e1; max-width: 62ch; font-size: 1.06rem; }

/* ── Prose (About) ────────────────────────────────────────────────────────── */

.prose { max-width: 68ch; }
.prose p { color: var(--c-muted); font-size: 1.02rem; margin-bottom: 1.15rem; }
.prose p:last-child { margin-bottom: 0; }

/* ── Contact ──────────────────────────────────────────────────────────────── */

.contact-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 860px; margin-inline: auto;
}
.contact-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.9rem;
  box-shadow: var(--shadow);
}
.contact-card h2 { font-size: 1.15rem; color: var(--c-ink); margin-bottom: .5rem; }
.contact-email { font-size: 1.1rem; font-weight: 600; margin-top: .6rem; }
.contact-links { list-style: none; display: grid; gap: 1rem; margin-top: .4rem; }
.contact-links a { font-weight: 600; text-decoration: none; }
.contact-links a:hover { text-decoration: underline; }
.contact-link-note {
  display: block; color: var(--c-muted); font-size: .88rem; margin-top: .15rem;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer {
  background: var(--c-ink); color: #fff;
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--c-border-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: 2.5rem;
}
.footer .brand { font-size: 1.32rem; }
.footer-tagline { color: #fff; font-weight: 600; margin: .9rem 0 .4rem; }
.footer-note { color: var(--c-muted-light); font-size: .89rem; max-width: 36ch; }
.footer-col h2 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--c-muted-light); margin-bottom: .9rem; font-weight: 700;
}
.footer-col ul { list-style: none; display: grid; gap: .55rem; }
.footer-col a {
  color: #dbe6f2; text-decoration: none; font-size: .92rem;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--c-border-dark);
  display: grid; gap: .6rem;
}
.footer-bottom p { color: var(--c-muted-light); font-size: .84rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .cta-actions { text-align: left; }

  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    padding: .5rem var(--gutter) 1.25rem;
    box-shadow: var(--shadow);
  }
  .nav[data-open] .nav-menu { display: flex; }
  .nav-menu a { padding: .8rem 0; border-bottom: 1px solid var(--c-border); }
  .nav-cta { margin-top: .9rem; text-align: center; border-bottom: 0 !important; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Print ────────────────────────────────────────────────────────────────── */

@media print {
  .nav, .cta-band, .footer, .skip-link { display: none; }
  body { background: #fff; }
  .hero, .page-head, .section-dark { background: #fff !important; color: #000 !important; }
}
