/* =========================================================
   XCAILEX — Brand & Landing  (Bright Futurism v2)
   ========================================================= */

:root {
  /* ---- Theme: LIGHT (default) ---- */
  --bg: #F2EFE6;
  --bg-2: #EBE8DD;
  --bg-3: #DCD8CA;
  --line: rgba(14, 14, 16, 0.10);
  --line-strong: rgba(14, 14, 16, 0.22);
  --fg: #0E0E10;
  --fg-2: #3D3D42;
  --fg-3: #6B6B73;
  --fg-4: #9E9DA3;
  --accent: #FF5C2E;          /* vivid tangerine */
  --accent-ink: #0E0E10;
  --accent-2: #C8FF45;         /* electric lime */
  --pulse: oklch(0.72 0.21 35);

  /* ---- Type ---- */
  --display: "Space Grotesk", "Inter Tight", -apple-system, system-ui, sans-serif;
  --sans: "Manrope", "Inter Tight", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;

  /* ---- Scale ---- */
  --r: 6px;
  --r-lg: 14px;
  --maxw: 1320px;
  --pad: clamp(20px, 4vw, 56px);
}

[data-theme="dusk"] {
  --bg: #14141A;
  --bg-2: #1B1B22;
  --bg-3: #25252E;
  --line: rgba(238, 235, 226, 0.10);
  --line-strong: rgba(238, 235, 226, 0.24);
  --fg: #EEEBE2;
  --fg-2: #B6B2A6;
  --fg-3: #7C7A72;
  --fg-4: #4F4D48;
}

[data-theme="bloom"] {
  /* peach-warm light variant */
  --bg: #FFEFE2;
  --bg-2: #FFE5D2;
  --bg-3: #FFD8BD;
  --line: rgba(40, 20, 10, 0.12);
  --line-strong: rgba(40, 20, 10, 0.26);
  --fg: #1E110A;
  --fg-2: #4A2E1F;
  --fg-3: #7A5640;
  --fg-4: #A88971;
}

/* =========================================================
   Reset + base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
  overflow-x: hidden;
  transition: background 400ms ease, color 400ms ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

/* =========================================================
   Typography
   ========================================================= */
.display { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; }
.mono    { font-family: var(--mono); font-weight: 400; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; font-family: var(--display); }

.italic { font-style: italic; }
.em { font-weight: 600; }
.accent { color: var(--accent); }
.accent-bg { background: var(--accent); color: #fff; }
.muted { color: var(--fg-3); }
.hl {
  background: linear-gradient(180deg, transparent 60%, var(--accent-2) 60%);
  padding: 0 4px;
  margin: 0 -4px;
}

/* =========================================================
   Layout primitives
   ========================================================= */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section { position: relative; padding: clamp(72px, 10vw, 160px) 0; }
.section + .section { border-top: 1px solid var(--line); }

.row { display: flex; align-items: center; gap: 16px; }
.col { display: flex; flex-direction: column; }

.divider { height: 1px; background: var(--line); width: 100%; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: all 220ms cubic-bezier(.2,.7,.2,1);
  font-weight: 600;
  white-space: nowrap;
  font-family: var(--sans);
}
.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn .arrow { display: inline-block; transition: transform 240ms ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  padding: 18px 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: all 240ms ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  transition: color 200ms;
}
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
@media (max-width: 880px) { .nav-links { display: none; } }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 86svh;
  padding-top: 64px;
  padding-bottom: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  opacity: 0.7;
  will-change: transform;
}
.hero-orb {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  right: -20vmax;
  top: -10vmax;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent) 75%, transparent), transparent 60%);
  filter: blur(40px);
  opacity: 0.55;
  animation: orb-drift 18s ease-in-out infinite alternate;
}
@keyframes orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, 60px) scale(1.1); }
}
.hero-orb-2 {
  position: absolute;
  width: 36vmax; height: 36vmax;
  left: -10vmax; bottom: -14vmax;
  z-index: 0;
  background: radial-gradient(circle at 60% 60%, color-mix(in oklab, var(--accent-2) 80%, transparent), transparent 60%);
  filter: blur(50px);
  opacity: 0.55;
  animation: orb-drift 22s ease-in-out infinite alternate-reverse;
}
.hero-content { position: relative; z-index: 2; }
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-meta-cell { min-width: 160px; }
.hero-meta-cell .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.12em;
}
.hero-meta-cell .label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  margin-top: 6px;
  letter-spacing: -0.015em;
}
.hero-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 4.8vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 20ch;
}
.hero-title .em { font-weight: 700; }
.hero-title .accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 600;
}

.hero-sub {
  max-width: 56ch;
  font-size: clamp(15px, 1.3vw, 18px);
  color: var(--fg-2);
  line-height: 1.55;
  margin-top: 22px;
}

.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* live status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.06em;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pulse);
  box-shadow: 0 0 0 0 var(--pulse);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--pulse) 60%, transparent); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* =========================================================
   Marquee
   ========================================================= */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 24px 0;
  background: var(--fg);
  color: var(--bg);
}
.marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: scroll 50s linear infinite;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.02em;
}
.marquee-track > span { display: inline-flex; align-items: center; gap: 64px; white-space: nowrap; }
.marquee-track .star { color: var(--accent); font-style: normal; }
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* =========================================================
   Section header
   ========================================================= */
.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: start;
}
.section-head .num { font-family: var(--mono); font-size: 12px; color: var(--fg-3); letter-spacing: 0.12em; }
.section-head h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  max-width: 22ch;
}
.section-head h2 .em { font-weight: 700; }
.section-head h2 .accent { color: var(--accent); font-style: italic; }
.section-head .lede {
  margin-top: 18px;
  color: var(--fg-2);
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
}

/* =========================================================
   Capabilities
   ========================================================= */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cap-card {
  background: var(--bg-2);
  border-radius: var(--r-lg);
  padding: 32px 32px 28px;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1), background 280ms ease;
  cursor: default;
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cap-card:hover { background: var(--fg); color: var(--bg); transform: translateY(-2px); }
.cap-card:hover .desc { color: color-mix(in oklab, var(--bg) 80%, transparent); }
.cap-card:hover .num { color: color-mix(in oklab, var(--bg) 60%, transparent); }
.cap-card:hover .tag { border-color: color-mix(in oklab, var(--bg) 30%, transparent); color: var(--bg); }
.cap-card:hover .cap-glyph { color: var(--accent-2); transform: rotate(45deg); }
.cap-card .num { font-family: var(--mono); font-size: 12px; color: var(--fg-3); letter-spacing: 0.12em; transition: color 280ms ease; }
.cap-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-top: 20px;
  max-width: 16ch;
}
.cap-card h3 .em { font-weight: 700; }
.cap-card h3 .accent { color: var(--accent); }
.cap-card:hover h3 .accent { color: var(--accent-2); }
.cap-card .desc { color: var(--fg-2); margin-top: 16px; max-width: 44ch; line-height: 1.55; font-size: 15px; transition: color 280ms ease; }
.cap-card .deliverables {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: all 280ms ease;
}
.cap-glyph {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  color: var(--fg-3);
  transition: color 280ms ease, transform 600ms cubic-bezier(.2,.7,.2,1);
}
@media (max-width: 720px) { .cap-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Ecosystem (external product links)
   ========================================================= */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.eco-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg-2);
  border-radius: var(--r-lg);
  padding: 32px;
  min-height: 220px;
  color: inherit;
  text-decoration: none;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1), background 280ms ease;
}
.eco-card:hover { background: var(--fg); color: var(--bg); transform: translateY(-2px); }
.eco-top { display: flex; align-items: center; justify-content: space-between; }
.eco-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  transition: color 280ms ease;
}
.eco-card:hover .eco-tag { color: color-mix(in oklab, var(--bg) 60%, transparent); }
.eco-arrow {
  width: 22px;
  height: 22px;
  color: var(--fg-3);
  transition: transform 420ms cubic-bezier(.2,.7,.2,1), color 280ms ease;
}
.eco-card:hover .eco-arrow { color: var(--accent-2); transform: translate(4px, -4px); }
.eco-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.eco-card .desc {
  color: var(--fg-2);
  margin-top: 14px;
  max-width: 42ch;
  line-height: 1.55;
  font-size: 15px;
  transition: color 280ms ease;
}
.eco-card:hover .desc { color: color-mix(in oklab, var(--bg) 80%, transparent); }
.eco-cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent);
  transition: color 280ms ease;
}
.eco-card:hover .eco-cta { color: var(--accent-2); }
@media (max-width: 720px) { .eco-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Manifesto strip
   ========================================================= */
.manifesto {
  padding: clamp(80px, 12vw, 180px) 0;
  position: relative;
  background: var(--fg);
  color: var(--bg);
}
.manifesto-text {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 5.4vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 22ch;
}
.manifesto-text .em { font-weight: 700; }
.manifesto-text .accent { color: var(--accent); font-style: italic; }
.manifesto-text .muted { color: color-mix(in oklab, var(--bg) 50%, transparent); }
.manifesto .eyebrow { color: color-mix(in oklab, var(--bg) 60%, transparent); }

/* =========================================================
   Process
   ========================================================= */
.process {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
.process-step {
  padding: 32px 8px 32px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 32px;
  align-items: start;
  transition: padding-left 320ms cubic-bezier(.2,.7,.2,1), background 220ms ease;
  position: relative;
}
.process-step::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent);
  transition: width 320ms cubic-bezier(.2,.7,.2,1);
}
.process-step:hover { padding-left: 18px; }
.process-step:hover::before { width: 4px; }
.process-step .num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--fg-3); padding-top: 10px;}
.process-step h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.process-step h3 .em { font-weight: 700; }
.process-step h3 .accent { color: var(--accent); font-style: italic; }
.process-step .body { color: var(--fg-2); line-height: 1.55; max-width: 48ch; font-size: 15px; }
.process-step .body .out {
  display: block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
}
@media (max-width: 820px) {
  .process-step { grid-template-columns: 1fr; gap: 12px; }
}

/* =========================================================
   Sectors
   ========================================================= */
.sectors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.sector {
  background: var(--bg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  position: relative;
  transition: background 220ms ease;
}
.sector:hover { background: var(--accent); color: #fff; }
.sector:hover .desc, .sector:hover .id { color: rgba(255,255,255,0.85); }
.sector .name { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.05; letter-spacing: -0.02em; }
.sector .desc { color: var(--fg-2); font-size: 14px; line-height: 1.5; max-width: 32ch; transition: color 220ms ease; }
.sector .id { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--fg-3); transition: color 220ms ease; }
@media (max-width: 720px) { .sectors { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .sectors { grid-template-columns: 1fr; } }

/* =========================================================
   Stack
   ========================================================= */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stack-item {
  background: var(--bg);
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  text-align: center;
  transition: color 220ms ease, background 220ms ease;
}
.stack-item:hover { color: #fff; background: var(--fg); }
@media (max-width: 820px) { .stack-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }

.stack-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.stack-categories button {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  text-transform: uppercase;
  transition: all 200ms;
}
.stack-categories button:hover { color: var(--fg); border-color: var(--fg-3); }
.stack-categories button.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* =========================================================
   Cases
   ========================================================= */
.cases {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
.case-card {
  display: grid;
  grid-template-columns: 220px 1fr 320px;
  gap: 48px;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  transition: padding-left 320ms ease, background 220ms ease;
  position: relative;
}
.case-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent);
  transition: width 320ms cubic-bezier(.2,.7,.2,1);
}
.case-card:hover { padding-left: 20px; }
.case-card:hover::before { width: 4px; }
.case-card .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--fg-3); }
.case-card .meta div + div { margin-top: 8px; }
.case-card .title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.case-card .title .em { font-weight: 700; }
.case-card .title .accent { color: var(--accent); font-style: italic; }
.case-card .stat {
  display: flex; flex-direction: column; gap: 6px;
  border-left: 1px solid var(--line-strong);
  padding-left: 24px;
}
.case-card .stat .v {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(40px, 4.2vw, 60px);
  letter-spacing: -0.04em; line-height: 1;
  color: var(--accent);
}
.case-card .stat .l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--fg-3); }
@media (max-width: 920px) {
  .case-card { grid-template-columns: 1fr; gap: 18px; padding: 32px 0; }
  .case-card .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-strong); padding-top: 18px; }
}

/* =========================================================
   Team
   ========================================================= */
.team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.member {
  background: var(--bg-2);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 220ms ease;
}
.member:hover { transform: translateY(-2px); }
.avatar {
  aspect-ratio: 1;
  background:
    repeating-linear-gradient(45deg, var(--bg) 0 8px, var(--bg-3) 8px 16px);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.avatar::after {
  content: "";
  position: absolute; inset: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
}
.avatar-initials {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.member:hover .avatar-initials { color: var(--accent); }
.member .name { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.1; letter-spacing: -0.02em; }
.member .name .em { font-weight: 700; }
.member .role { color: var(--fg-2); font-size: 13px; }
.member .role .dot-sep { color: var(--fg-4); margin: 0 6px; }
@media (max-width: 920px) { .team { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   Insights / blog
   ========================================================= */
.insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.insight {
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
}
.insight-thumb {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
  transition: transform 320ms ease;
}
.insight:nth-child(2) .insight-thumb {
  background: linear-gradient(135deg, var(--accent-2) 0%, #65d8ff 100%);
}
.insight:nth-child(3) .insight-thumb {
  background: linear-gradient(135deg, #ffd24a 0%, var(--accent) 100%);
}
.insight-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 8px, transparent 8px 18px);
}
.insight:hover .insight-thumb { transform: translateY(-3px); }
.insight .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--fg-3); display: flex; gap: 14px; }
.insight h3 {
  font-family: var(--display); font-weight: 500;
  font-size: 24px; line-height: 1.15; letter-spacing: -0.02em;
  transition: color 200ms;
}
.insight h3 .em { font-weight: 700; }
.insight h3 .accent { color: var(--accent); font-style: italic; }
.insight:hover h3 .accent { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.insight .desc { color: var(--fg-2); font-size: 14px; line-height: 1.55; }
@media (max-width: 820px) { .insights { grid-template-columns: 1fr; } }

/* =========================================================
   FAQ
   ========================================================= */
.faq-list { border-top: 1px solid var(--line); }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  cursor: pointer;
  transition: padding-left 240ms ease;
}
.faq-item:hover { padding-left: 8px; }
.faq-q {
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  font-family: var(--display); font-weight: 500;
  font-size: clamp(20px, 2vw, 26px); line-height: 1.2;
  letter-spacing: -0.02em;
}
.faq-q .em { font-weight: 700; }
.faq-q .accent { color: var(--accent); font-style: italic; }
.faq-q .icon {
  color: var(--fg-3);
  transition: transform 320ms cubic-bezier(.2,.7,.2,1), background 220ms, color 220ms;
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.faq-item.open .faq-q .icon { transform: rotate(45deg); background: var(--accent); color: #fff; }
.faq-a {
  color: var(--fg-2);
  max-height: 0;
  overflow: hidden;
  transition: max-height 360ms cubic-bezier(.2,.7,.2,1), margin-top 240ms ease;
  font-size: 16px;
  line-height: 1.6;
  max-width: 64ch;
}
.faq-item.open .faq-a {
  max-height: 320px;
  margin-top: 16px;
}

/* =========================================================
   CTA final
   ========================================================= */
.cta {
  padding: clamp(80px, 14vw, 200px) 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 80% 30%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 50%),
    radial-gradient(ellipse at 20% 80%, color-mix(in oklab, var(--accent-2) 25%, transparent), transparent 50%);
  position: relative;
  overflow: hidden;
}
.cta-text {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(44px, 7.4vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.cta-text .em { font-weight: 700; }
.cta-text .accent { color: var(--accent); font-style: italic; }
.cta-actions { margin-top: 48px; display: flex; gap: 12px; flex-wrap: wrap; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer .col-title {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--fg-2); font-size: 14px; transition: color 200ms; }
.footer ul a:hover { color: var(--accent); }
.footer ul .footer-static { color: var(--fg-2); font-size: 14px; }
.footer-funding {
  margin: 8px 0 28px;
  padding: 16px 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex;
  justify-content: center;
}
.footer-funding img { width: 100%; max-width: 780px; height: auto; display: block; }
@media (max-width: 520px) { .footer-funding { padding: 12px 14px; } }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  flex-wrap: wrap;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* =========================================================
   Big wordmark footer
   ========================================================= */
.megamark {
  padding: clamp(40px, 6vw, 80px) 0 0;
  overflow: hidden;
}
.megamark-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(120px, 26vw, 460px);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--fg);
  white-space: nowrap;
  display: block;
  user-select: none;
}
.megamark-text .accent { color: var(--accent); }

/* =========================================================
   Reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms cubic-bezier(.2,.7,.2,1), transform 800ms cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
/* GSAP drives the entrance for these — disable the CSS transition so the
   two engines don't fight over opacity/transform. */
.reveal.gsap-reveal { transition: none; will-change: transform, opacity; }

/* =========================================================
   Lang toggle
   ========================================================= */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.lang-toggle button {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--fg-3);
  transition: all 200ms;
}
.lang-toggle button.active {
  background: var(--fg);
  color: var(--bg);
}

/* logo sun spin on hover */
.xcx-logo:hover .xcx-symbol { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   Legal pages (aviso legal, privacidad, cookies)
   ========================================================= */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.legal-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.legal-logo { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.04em; color: var(--fg); }
.legal-logo span { color: var(--accent); }
.legal-back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  transition: color 200ms;
}
.legal-back:hover { color: var(--accent); }

.legal { padding: clamp(44px, 7vw, 96px) 0 72px; }
.legal-wrap { max-width: 860px; }
.legal-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.legal-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
  color: var(--fg);
}
.legal-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-3);
  margin: 0 0 12px;
}
.legal-updated {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-4);
  margin: 0 0 48px;
}
.legal-body { color: var(--fg-2); font-size: 16px; line-height: 1.72; }
.legal-body h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 27px);
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 52px 0 14px;
}
.legal-body h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  color: var(--fg);
  margin: 30px 0 10px;
}
.legal-body p { margin: 0 0 16px; }
.legal-body ul { margin: 0 0 18px; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }
.legal-body li { line-height: 1.6; }
.legal-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal-body strong { color: var(--fg); font-weight: 600; }
.legal-divider { height: 1px; background: var(--line); border: 0; margin: 44px 0; }

.legal-foot {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.legal-foot .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.legal-foot a { color: var(--fg-3); transition: color 200ms; }
.legal-foot a:hover { color: var(--accent); }

/* =========================================================
   Generated imagery (Nano Banana 2)
   ========================================================= */
/* Hero key visual */
.hero-visual {
  position: absolute;
  top: 50%;
  right: -2vw;
  transform: translateY(-50%);
  width: min(62vw, 880px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.92;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 40%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 40%, #000 100%);
}
@media (max-width: 900px) {
  .hero-visual { width: 100vw; right: -8vw; opacity: 0.2; }
}

/* Insights covers */
.insight-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ecosystem product banners */
.eco-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-3);
}
.eco-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 420ms cubic-bezier(.2,.7,.2,1);
}
.eco-card:hover .eco-thumb img { transform: scale(1.04); }

/* Sector thumbnails */
.sector-thumb {
  width: 76px;
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--bg-3);
}
.sector-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Team abstract avatars */
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 2;
}

/* Insights -> blog links */
.insight-link { text-decoration: none; color: inherit; display: block; }
.insight-link h3 { transition: color .18s ease; }
.insight-link:hover h3 { color: var(--accent); }
.insights-all { display: flex; justify-content: center; margin-top: 44px; }

/* =======================================================
   AI Chat widget (Aria)
   ======================================================= */
.chat-root { position: fixed; right: 22px; bottom: 22px; z-index: 999; }

.chat-launcher {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-family: var(--sans); font-weight: 600; font-size: 14.5px;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 34px rgba(0,0,0,0.22);
  transition: transform .18s ease, box-shadow .18s ease;
}
.chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,0.28); }
.chat-launcher svg { flex: 0 0 auto; }

.chat-panel {
  position: absolute; right: 0; bottom: 0;
  width: min(388px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 110px));
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.30);
  opacity: 0; transform: translateY(16px) scale(.98);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.chat-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; background: var(--fg); color: var(--bg);
}
.chat-head-id { display: flex; align-items: center; gap: 11px; }
.chat-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent-2, #C8FF45);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2, #C8FF45) 28%, transparent);
}
.chat-title { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.chat-sub { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .65; margin-top: 2px; }
.chat-close { color: var(--bg); opacity: .7; display: flex; }
.chat-close:hover { opacity: 1; }

.chat-body {
  flex: 1; overflow-y: auto; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-2);
}
.chat-msg {
  max-width: 84%; padding: 10px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word;
  font-family: var(--sans);
}
.chat-msg.is-bot { align-self: flex-start; background: var(--bg); color: var(--fg); border: 1px solid color-mix(in srgb, var(--fg) 9%, transparent); border-bottom-left-radius: 5px; }
.chat-msg.is-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }

.chat-typing { display: inline-flex; gap: 5px; align-items: center; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-4); animation: chatBlink 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chatBlink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-input {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 11px 12px; background: var(--bg);
  border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
}
.chat-input textarea {
  flex: 1; resize: none; max-height: 110px;
  border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
  border-radius: 12px; padding: 10px 12px;
  font-family: var(--sans); font-size: 14px; line-height: 1.4;
  background: var(--bg-2); color: var(--fg); outline: none;
}
.chat-input textarea:focus { border-color: var(--accent); }
.chat-send {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: opacity .15s ease, transform .15s ease;
}
.chat-send:hover:not(:disabled) { transform: translateY(-1px); }
.chat-send:disabled { opacity: .4; cursor: default; }

@media (max-width: 520px) {
  .chat-root { right: 14px; bottom: 14px; }
  .chat-launcher span { display: none; }
  .chat-launcher { padding: 14px; }
}
