/* =========================================================================
   Transgalaxy — styles.css
   Organized in sections so the site can grow predictably:
     1. Design tokens (change the brand here)
     2. Base / reset
     3. Layout primitives (.container, .section)
     4. Components (buttons, brand, cards, ...)
     5. Page sections (hero, platform, audiences, intelligence, ...)
     6. Responsive
   When adding new UI, prefer reusing tokens + existing primitives.
   ========================================================================= */

/* 1. DESIGN TOKENS ------------------------------------------------------- */
:root {
  /* Brand */
  --accent: #4f46e5;          /* indigo */
  --accent-2: #06b6d4;        /* cyan   */
  --accent-coral: #ff5a5f;    /* warm highlight, nods to the logo */
  --accent-gradient: linear-gradient(120deg, var(--accent-2), var(--accent));

  /* Ink & surfaces (clean, light) */
  --ink: #0b1220;
  --ink-soft: #334155;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-tint: #eef2ff;
  --line: #e6ebf2;
  --line-strong: #d6deea;

  /* Status */
  --ok: #16a34a;
  --warn: #f59e0b;

  /* Elevation & shape */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 30px 60px -20px rgba(15, 23, 42, 0.25);

  /* Rhythm */
  --container: 1120px;
  --gutter: 24px;
  --section-y: 96px;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Sora", var(--font-sans);

  color-scheme: light;
}

/* 2. BASE / RESET ------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

p {
  margin: 0;
}

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

/* 3. LAYOUT PRIMITIVES -------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section-soft {
  background: var(--bg-soft);
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-top: 14px;
}

.section-head p {
  margin-top: 16px;
  font-size: 19px;
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* 4. COMPONENTS --------------------------------------------------------- */

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.button-primary {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.7);
}
.button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(79, 70, 229, 0.75);
}
.button-ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}
.button-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}
.brand-mark.small {
  width: 28px;
  height: 28px;
}
.brand-mark svg {
  width: 100%;
  height: 100%;
}

/* 5. PAGE SECTIONS ------------------------------------------------------ */

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current] {
  color: var(--accent);
}
.nav-cta {
  margin-left: 4px;
}

/* Hero */
.hero {
  padding-block: clamp(56px, 8vw, 104px);
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(6, 182, 212, 0.1), transparent 70%),
    radial-gradient(50% 40% at 0% 10%, rgba(79, 70, 229, 0.08), transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(40px, 6vw, 64px);
  margin-top: 18px;
}
/* Rotating headline: "Rethink building" + cycling accent word on its own line.
   Reserve a fixed two-line height so short vs. long words never shift the
   paragraphs below (line-height is 1.1, so two lines = 2.2em). */
.rotator {
  display: block;
  margin-top: 2px;
  min-height: 2.2em;
}
.rotator-word {
  display: inline-block;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.rotator-word.is-out {
  opacity: 0;
  transform: translateY(-0.25em);
}
.hero-tagline {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  max-width: 540px;
}
.hero-copy .lede {
  margin-top: 22px;
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 540px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.hero-note {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}

/* Hero preview card */
.hero-visual {
  position: relative;
}
.preview-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.preview-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 13px;
}
.preview-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}
.preview-title {
  color: var(--ink-soft);
  font-weight: 500;
}
.preview-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-tint);
  padding: 4px 10px;
  border-radius: 999px;
}
.preview-body {
  padding: 18px;
  display: grid;
  gap: 16px;
}
.copilot-q {
  font-weight: 600;
  font-size: 15px;
}
.copilot-a {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-soft);
}
.copilot-a p {
  display: flex;
  align-items: center;
  gap: 8px;
}
.copilot-a b {
  color: var(--ink);
}
.tick {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-gradient);
  flex: none;
}
.signal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.signal {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}
.signal-label {
  font-size: 12px;
  color: var(--muted);
}
.signal-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
}
.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-gradient);
}
.bar.warn i {
  background: linear-gradient(90deg, var(--warn), var(--accent-coral));
}
.fill-74 {
  width: 74%;
}
.fill-44 {
  width: 44%;
}
.evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.evidence span {
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
}

/* Audiences strip */
.strip {
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
}
.strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 48px;
  padding-block: 22px;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
}

/* Platform cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}
.card p {
  font-size: 15px;
  color: var(--muted);
}
.card-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--bg-tint);
  position: relative;
}
.card-icon::before {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--accent-gradient);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
/* Simple geometric glyphs via mask shapes */
.icon-memory::before {
  border-radius: 4px;
  background: var(--accent-gradient);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.9);
}
.icon-design::before {
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent-2), var(--accent), var(--accent-2));
}
.icon-copilot::before {
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.icon-signal::before {
  border-radius: 2px;
  clip-path: polygon(0 100%, 0 60%, 35% 60%, 35% 30%, 70% 30%, 70% 0, 100% 0, 100% 100%);
}

/* Products / projects (rendered from js/content.js) */
.products-grid {
  grid-template-columns: repeat(3, 1fr);
}
.product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.product-head h3 {
  margin: 0;
  font-size: 19px;
}
.product-card p {
  font-size: 15px;
  color: var(--muted);
}
.status-pill {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-pill.is-live {
  color: #047857;
  background: #d1fae5;
}
.status-pill.is-beta {
  color: var(--accent);
  background: var(--bg-tint);
}
.status-pill.is-soon {
  color: #92600a;
  background: #fef3c7;
}
.status-pill.is-neutral {
  color: var(--muted);
  background: var(--bg-soft);
}
.card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
}
.card-link:hover {
  text-decoration: underline;
}

/* Audience grid */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.audience {
  padding: 26px 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 3px solid transparent;
  border-image: var(--accent-gradient) 1;
  border-image-slice: 1;
}
.audience {
  /* keep only the top edge gradient; reset the rest to a clean line */
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.audience h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.audience p {
  font-size: 15px;
  color: var(--muted);
}

/* Intelligence */
.intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.intel-copy h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-top: 14px;
}
.intel-copy > p {
  margin-top: 16px;
  font-size: 19px;
  color: var(--muted);
}
.check-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--ink-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gradient);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Console mockup */
.console {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}
.console-head b {
  color: var(--accent-2);
}
.console-tabs {
  display: flex;
  gap: 6px;
  padding: 14px 20px 0;
  flex-wrap: wrap;
}
.console-tabs span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
}
.console-tabs .active {
  color: var(--accent);
  background: var(--bg-tint);
}
.console-explain {
  padding: 18px 20px 6px;
}
.console-explain h4 {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.console-explain p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}
.console-spark {
  padding: 8px 12px 16px;
}
.console-spark svg {
  width: 100%;
  height: 120px;
}

/* Stats */
.stats {
  background: var(--ink);
  color: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-block: 64px;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 15px;
}

/* CTA / contact */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: clamp(36px, 5vw, 56px);
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(6, 182, 212, 0.16), transparent 70%),
    var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.cta-copy {
  max-width: 540px;
}
.cta-copy h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-top: 12px;
}
.cta-copy p {
  margin-top: 14px;
  font-size: 18px;
  color: var(--ink-soft);
}
.email-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.email-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.email-link small {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.mail-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-gradient);
  flex: none;
  position: relative;
}
.mail-icon::before {
  content: "";
  position: absolute;
  inset: 13px 11px;
  border: 2px solid #fff;
  border-radius: 3px;
}
.mail-icon::after {
  content: "";
  position: absolute;
  inset: 15px 13px auto;
  height: 10px;
  border-left: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: skewX(0);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: #fff;
}
.email-arrow {
  color: var(--accent);
  font-size: 22px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding-block: 32px;
}
.footer-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.footer-links a {
  font-size: 15px;
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--accent);
}
.copyright {
  width: 100%;
  font-size: 13px;
  color: var(--muted);
}

/* 6. RESPONSIVE -------------------------------------------------------- */
@media (max-width: 960px) {
  :root {
    --section-y: 72px;
  }
  .hero-grid,
  .intel-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .card-grid,
  .audience-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .nav-links {
    display: none;
  }
  .card-grid,
  .audience-grid {
    grid-template-columns: 1fr;
  }
  .cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .email-link {
    width: 100%;
  }
}

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