/* CtrlSpace — shared styles for the standalone marketing pages.
   DS tokens are imported here so each page only links this one stylesheet.
   (@import keeps each token file's own relative font URLs intact.)
   Pages run in the dark scope: <body class="cs-dark">. */
@import url('../_ds/ctrlspace-design-system-04f09e0c-d673-440a-8811-2ac38b51d9a6/tokens/fonts.css');
@import url('../_ds/ctrlspace-design-system-04f09e0c-d673-440a-8811-2ac38b51d9a6/tokens/colors.css');
@import url('../_ds/ctrlspace-design-system-04f09e0c-d673-440a-8811-2ac38b51d9a6/tokens/typography.css');
@import url('../_ds/ctrlspace-design-system-04f09e0c-d673-440a-8811-2ac38b51d9a6/tokens/spacing.css');
@import url('../_ds/ctrlspace-design-system-04f09e0c-d673-440a-8811-2ac38b51d9a6/tokens/effects.css');

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-body);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease-out); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--ink-900); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 999px; border: 3px solid var(--ink-900); }

@keyframes csPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes csFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- layout primitives ---------- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 40px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.divider { height: 1px; background: var(--border-subtle); margin: 0; border: 0; }

.eb {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); display: inline-block;
}
.eb--muted { color: var(--text-faint); }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; font-weight: 700; color: var(--text-strong); margin: 0; }
.h1 { font-size: clamp(38px, 6vw, 80px); line-height: 1.02; }
.h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.06; }
.h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.12; }
.lead { font-family: var(--font-body); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; color: var(--gray-300); }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }

.placeholder { color: var(--text-muted); }
.placeholder::before { content: ""; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 12px; cursor: pointer;
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  border: 1px solid transparent; transition: transform .15s var(--ease-out), background .15s, border-color .15s, color .15s;
  text-decoration: none; line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn--cta { background: var(--cta-fill); color: var(--cta-text); }
.btn--cta:hover { color: var(--cta-text); filter: brightness(1.06); }
.btn--ghost { background: transparent; color: var(--text-strong); border-color: var(--border-default); }
.btn--ghost:hover { color: var(--text-strong); border-color: var(--accent); }
.btn--sm { padding: 10px 16px; font-size: 13px; }

/* ---------- chips / tags / pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px; border: 1px solid var(--border-default);
  font-family: var(--font-body); font-size: 13px; color: var(--text-body); background: transparent;
  cursor: default;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-default);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--pulse-500); box-shadow: var(--glow-pulse); }
.dot--live { animation: csPulse 1.8s var(--ease-in-out) infinite; }

/* ---------- cards + grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface-raised); border: 1px solid var(--border-subtle);
  border-radius: 18px; padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease-out), box-shadow .18s, border-color .18s;
}
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-default); }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  margin-bottom: 18px;
}
.card__title { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--text-strong); margin: 0 0 8px; }
.card__text { font-family: var(--font-body); font-size: 15px; line-height: 1.55; color: var(--text-body); margin: 0; }

.imgslot {
  position: relative; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, var(--ink-700), var(--ink-800));
  border: 1px solid var(--ink-600);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  text-align: center; padding: 16px;
}

/* ---------- page hero ---------- */
.page-hero { padding: 150px 0 64px; position: relative; overflow: hidden; }
.page-hero .eb { margin-bottom: 16px; }
.page-hero .lead { margin-top: 22px; max-width: 620px; }
.page-hero__glow {
  position: absolute; top: -30%; right: -10%; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(192,161,94,.16), transparent 62%); pointer-events: none; z-index: 0;
}
.page-hero > .container { position: relative; z-index: 1; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--ink-900) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-700);
}
/* The header rail is wider than the 1160px content rail on purpose: the nav has to
   hold eight links plus the CTA on ONE line. Everything below stays at 1160. */
.site-header__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px; height: 70px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: .9; flex: none; }
.brand span { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.brand__ctrl { color: var(--text-strong); }
.brand__space { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; flex: none; }
/* nowrap on the links is what actually keeps the bar one line high - without it
   "Case studies" and "Book a design session" break mid-label and the bar grows. */
.site-nav a { white-space: nowrap; flex: none; }
.site-nav a:not(.btn) {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); padding: 8px 9px; border-radius: 8px;
}
.site-nav a:not(.btn):hover { color: var(--text-strong); }
.site-nav a.is-active { color: var(--accent); }
.site-nav .btn { margin-left: 6px; }
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border-default); color: var(--text-strong);
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer; font-size: 18px; line-height: 1;
}

/* Hand over to the hamburger while the inline bar still fits on one line.
   Brand + eight links + CTA need ~1120px of viewport, so 1160 leaves a margin. */
@media (max-width: 1160px) {
  .site-nav {
    position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--ink-900); border-bottom: 1px solid var(--ink-700); padding: 12px 20px 20px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px; font-size: 12px; }
  .site-nav .btn { margin: 8px 0 0; justify-content: center; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--ink-900); border-top: 1px solid var(--ink-700); }
.site-footer__cols {
  max-width: 1160px; margin: 0 auto; padding: 64px 40px 40px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px;
}
.site-footer__blurb { font-family: var(--font-body); font-size: 14px; color: var(--text-muted); max-width: 260px; margin-top: 16px; }
.site-footer__h { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.site-footer__links { display: flex; flex-direction: column; gap: 10px; }
.site-footer__links a { font-family: var(--font-body); font-size: 14px; color: var(--text-body); }
.site-footer__links a:hover { color: var(--accent); }
.site-footer__bar {
  max-width: 1160px; margin: 0 auto; padding: 20px 40px 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--ink-700);
}
.site-footer__bar span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }

/* ---------- responsive grids ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 132px 0 52px; }
  .section { padding: 80px 0; }
  .cta-band { padding: 44px 28px !important; }
}
@media (max-width: 620px) {
  .container { padding: 0 22px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .site-footer__cols { grid-template-columns: 1fr; }
  .site-header__inner, .site-footer__cols, .site-footer__bar { padding-left: 22px; padding-right: 22px; }
  .section { padding: 64px 0; }
  .page-hero { padding: 120px 0 48px; }
}
