/* ──────────────────────────────────────────────────────────────
   Technamics marketing site · supplemental styles
   (tokens come from assets/colors_and_type.css)
   ────────────────────────────────────────────────────────────── */

:root {
  --brand-indigo: #2540C7;     /* logo blue, used sparingly */
  --accent: var(--primary-600);
  --accent-hover: var(--primary-500);
  --accent-press: var(--primary-700);
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
}

/* ── Dark theme — overrides the imported light tokens ─────────── */
:root {
  color-scheme: dark;
  --brand-ink: #F1F5F9;        /* display ink (now light) */

  /* Surfaces */
  --bg-canvas:  #0A111E;
  --bg-surface: #111B2D;
  --bg-raised:  #17243B;
  --bg-sunken:  #070C16;
  --bg-inverse: #0D1626;

  /* Foreground */
  --fg-1: #F1F5F9;
  --fg-2: #C3CEDD;
  --fg-3: #93A1B5;
  --fg-4: #677890;
  --fg-on-inverse: #F1F5F9;

  /* Borders */
  --border-subtle: rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.11);
  --border-strong: rgba(255,255,255,0.20);

  /* Neutral ramp — inverted for dark surfaces */
  --neutral-50:  #131E31;
  --neutral-100: #1A2740;
  --neutral-200: #28374F;
  --neutral-300: #3B4B63;
  --neutral-400: #57667E;
  --neutral-500: #7A8699;
  --neutral-600: #9CA8B9;
  --neutral-700: #C3CCD8;
  --neutral-800: #DCE3EC;
  --neutral-900: #F1F5F9;

  /* Primary tints (badges, icon wells) */
  --primary-50:  rgba(51,181,245,0.10);
  --primary-100: rgba(51,181,245,0.22);
  --primary-200: rgba(51,181,245,0.32);

  /* Semantic backgrounds */
  --success-bg: rgba(34,197,94,0.16);
  --warning-bg: rgba(245,158,11,0.16);
  --error-bg:   rgba(239,68,68,0.16);
  --info-bg:    rgba(51,181,245,0.16);
}

html { scroll-behavior: smooth; }
body { overflow-x: clip; }
::selection { background: rgba(33,150,227,0.22); }

/* ── Containers ─────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 inline; margin-inline: auto; padding-inline: var(--gutter); }

/* ── Reveal on scroll ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .07s; }
.reveal[data-d="2"] { transition-delay: .14s; }
.reveal[data-d="3"] { transition-delay: .21s; }
.reveal[data-d="4"] { transition-delay: .28s; }
.no-motion .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes tk-pulse { 50% { box-shadow: 0 0 0 8px rgba(51,181,245,0); } }
@keyframes tk-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes tk-dash  { to { stroke-dashoffset: 0; } }
@keyframes tk-blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes tk-scan  { 0% { transform: translateY(-100%); } 100% { transform: translateY(900%); } }
@keyframes tk-spin  { to { transform: rotate(360deg); } }
@keyframes tk-rise  { from { opacity:0; transform: translateY(8px);} to {opacity:1; transform:none;} }
@keyframes tk-grid  { to { background-position: 40px 40px; } }
@keyframes tk-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.no-motion * { animation: none !important; }

/* ── Scroll-to-top button ───────────────────────────────────── */
.scrolltop { position: fixed; right: clamp(18px, 3vw, 36px); bottom: clamp(18px, 3vw, 36px); z-index: 70;
  width: 46px; height: 46px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--accent); color: #fff; border: none; cursor: pointer; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(14px) scale(0.92); pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard), background var(--duration-fast); }
.scrolltop.show { opacity: 1; transform: none; pointer-events: auto; }
.scrolltop:hover { background: var(--accent-hover); box-shadow: var(--shadow-xl); }
.scrolltop:active { background: var(--accent-press); transform: translateY(1px); }
.scrolltop:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.scrolltop svg { transition: transform var(--duration-base) var(--ease-standard); }
.scrolltop:hover svg { transform: translateY(-2px); }

/* ── Buttons ────────────────────────────────────────────────── */
.tbtn { font-family: var(--font-sans); font-weight: 600; border-radius: var(--radius-md);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; border: 1px solid transparent; transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast), color var(--duration-fast), transform var(--duration-fast), box-shadow var(--duration-fast);
  text-decoration: none; }
.tbtn:active { transform: translateY(1px); }
.tbtn-lg { font-size: 16px; padding: 14px 22px; }
.tbtn-md { font-size: 14.5px; padding: 11px 18px; }
.tbtn-sm { font-size: 13px; padding: 8px 14px; }
.tbtn-primary { background: var(--accent); color: #fff; }
.tbtn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-sm); }
.tbtn-primary:active { background: var(--accent-press); }
.tbtn-secondary { background: var(--primary-50); color: var(--primary-700); border-color: var(--primary-200); }
.tbtn-secondary:hover { background: var(--primary-100); }
.tbtn-ghost { background: transparent; color: var(--fg-1); border-color: var(--border-default); }
.tbtn-ghost:hover { background: var(--neutral-50); border-color: var(--border-strong); }
.tbtn-inverse { background: rgba(255,255,255,0.10); color: #fff; border-color: rgba(255,255,255,0.22); }
.tbtn-inverse:hover { background: rgba(255,255,255,0.18); }
.tbtn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* ── Link with arrow ────────────────────────────────────────── */
.tlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent);
  font-family: var(--font-sans); font-size: 14.5px; cursor: pointer; background: none; border: none; padding: 0; }
.tlink svg { transition: transform var(--duration-base) var(--ease-standard); }
.tlink:hover svg { transform: translateX(4px); }

/* ── Nav ────────────────────────────────────────────────────── */
.nav-link { font-family: var(--font-sans); font-weight: 500; font-size: 14.5px; color: var(--fg-2);
  text-decoration: none; padding: 8px 4px; cursor: pointer; background: none; border: none; position: relative; }
.nav-link:hover { color: var(--fg-1); }
.nav-link::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 2px; height: 2px;
  background: var(--accent); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform var(--duration-base) var(--ease-standard); }
.nav-link:hover::after { transform: scaleX(1); }

/* ── Solution pill nav (scrollspy) ──────────────────────────── */
.solpill { font-family: var(--font-sans); font-weight: 600; font-size: 13.5px; color: var(--fg-3);
  padding: 8px 16px; border-radius: var(--radius-pill); cursor: pointer; background: transparent;
  border: 1px solid transparent; white-space: nowrap; transition: all var(--duration-fast) var(--ease-standard); display:inline-flex; align-items:center; gap:8px; }
.solpill:hover { color: var(--fg-1); background: var(--neutral-100); }
.solpill.active { color: #fff; background: var(--accent); }
.solpill .dot { width:7px; height:7px; border-radius:9999px; background: currentColor; opacity:.5; }
.solpill.active .dot { opacity: 1; background:#fff; }

/* ── Feature card ───────────────────────────────────────────── */
.fcard { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: var(--space-6); box-shadow: var(--shadow-xs); transition: border-color var(--duration-base), box-shadow var(--duration-base), transform var(--duration-base); }
.fcard:hover { border-color: var(--primary-300); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.fcard .ficon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--primary-50); color: var(--accent); border: 1px solid var(--primary-100); margin-bottom: var(--space-4); }
.fcard:hover .ficon { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Grids ──────────────────────────────────────────────────── */
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sol-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.sol-grid.rev { direction: rtl; } .sol-grid.rev > * { direction: ltr; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 40px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }

@media (max-width: 940px) {
  .sol-grid, .hero-grid { grid-template-columns: 1fr; }
  .sol-grid.rev { direction: ltr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
}
@media (max-width: 560px) {
  .feat-grid { grid-template-columns: 1fr; }
}

/* ── Mobile nav ─────────────────────────────────────────────── */
.nav-desktop { display: flex; }
.nav-burger { display: none; }
@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ── Dotted backdrop (DS-approved) ──────────────────────────── */
.dotgrid { background-image: radial-gradient(var(--neutral-200) 1px, transparent 1px); background-size: 24px 24px; }

/* ── Misc ───────────────────────────────────────────────────── */
.mono { font-family: var(--font-mono); }

/* ── Per-slide box containers ───────────────────────────────── */
#top > section,
#top > footer {
  border: 1px solid var(--accent) !important;
  border-radius: 6px;
  margin: 50px clamp(12px, 3vw, 28px);
  overflow: hidden;
}
.overline { font-size: var(--fs-overline); line-height: var(--lh-overline); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; }
pre { margin: 0; }
/* Native Chrome-style vertical scrollbar (dark) */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #0c1422; }
::-webkit-scrollbar-thumb { background: #2c3a52; border-radius: 8px; border: 4px solid #0c1422; }
::-webkit-scrollbar-thumb:hover { background: #3a4a63; }
::-webkit-scrollbar-thumb:active { background: #46587a; }
.code-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-color: transparent; }
