:root {
  /* Surfaces */
  --bg: #0c0c14;
  --bg-card: #161624;
  --bg-elevated: #1e1e30;
  --bg-overlay: #282840;
  --bg-hero: #1a1a2e;

  /* Lines */
  --line: rgba(234, 234, 240, 0.08);
  --line-strong: rgba(234, 234, 240, 0.16);

  /* Text */
  --text: #eaeaf0;
  --text-2: #a8a8b8;
  --text-3: #71718a;
  --text-4: #50506a;

  /* Brand & accents (DESIGN.md tokens) */
  --ember: #ff6a3d;
  --ember-end: #ff3d6a;
  --ember-hover: #e85a2d;
  --ember-subtle: rgba(255, 106, 61, 0.14);
  --brand: #3b7bf6;
  --brand-subtle: rgba(59, 123, 246, 0.14);
  --ai-end: #8b5cf6;
  --coral: #ff4757;

  /* Gradients */
  --gradient-cta: linear-gradient(135deg, var(--ember), var(--ember-end));
  --gradient-ai: linear-gradient(135deg, var(--brand), var(--ai-end));

  --display: "Anton", "Bebas Neue", "Archivo Black", Impact, sans-serif;
  --heavy: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1320px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--ember);
  color: var(--bg);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 32px;
}

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.heavy {
  font-family: var(--heavy);
  font-weight: 800;
  letter-spacing: -0.012em;
}

.label {
  font-family: var(--heavy);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.label.ember { color: var(--ember); }
.label.brand { color: var(--brand); }
.label.white { color: var(--text); }

.ember { color: var(--ember); }
.brand-c { color: var(--brand); }

.ai-text {
  background: var(--gradient-ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(12, 12, 20, 0.6);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: background 220ms ease, border-color 220ms ease;
}
.nav.lit {
  background: rgba(12, 12, 20, 0.92);
  border-bottom-color: var(--line);
}
.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: block;
  flex-shrink: 0;
}
.brand-mark img,
.brand-mark svg { width: 100%; height: 100%; display: block; }

.brand-name {
  font-family: var(--display);
  font-size: 1.4rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.brand-name .slash {
  color: var(--brand);
  margin: 0 4px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-link {
  font-family: var(--heavy);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 8px 4px;
  transition: color 200ms ease;
}
.nav-link:hover { color: var(--text); }

.nav-cta {
  font-family: var(--heavy);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--text);
  padding: 12px 18px;
  transition: background 200ms ease, color 200ms ease;
}
.nav-cta:hover { background: var(--ember); color: var(--bg); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--heavy);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  padding: 4px;
}
.lang-switch a {
  padding: 6px 10px;
  color: var(--text-3);
  transition: color 200ms ease, background 200ms ease;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active {
  background: var(--text);
  color: var(--bg);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 130px 0 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(59, 123, 246, 0.18), transparent 60%),
    radial-gradient(700px 400px at 15% 80%, rgba(255, 106, 61, 0.10), transparent 60%),
    repeating-linear-gradient(
      -14deg,
      transparent 0,
      transparent 80px,
      rgba(255, 255, 255, 0.018) 80px,
      rgba(255, 255, 255, 0.018) 81px
    );
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero-tag-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.hero-tag-row .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-tag-row .divider {
  width: 22px;
  height: 1px;
  background: var(--line-strong);
  display: inline-block;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 0 var(--brand);
  animation: blip 2.4s ease-out infinite;
}
@keyframes blip {
  0% { box-shadow: 0 0 0 0 rgba(59, 123, 246, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(59, 123, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 123, 246, 0); }
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4.2rem, 12vw, 10rem);
  line-height: 0.82;
  letter-spacing: -0.012em;
  text-transform: uppercase;
}
.hero-title .row { display: block; }
.hero-title .row.shift { padding-left: clamp(0px, 5vw, 90px); }
.hero-tail {
  margin-top: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
}

.hero-blurb {
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  line-height: 1.55;
  max-width: 56ch;
  color: var(--text-2);
}
.hero-blurb strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--heavy);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 28px;
  height: 60px;
  position: relative;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.btn:hover { transform: translate(-2px, -2px); }

.btn-primary {
  background: var(--gradient-cta);
  color: var(--text);
  box-shadow: 8px 8px 0 0 rgba(255, 106, 61, 0.22);
}
.btn-primary:hover {
  box-shadow: 10px 10px 0 0 rgba(255, 106, 61, 0.32);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn svg { width: 18px; height: 18px; }

/* ============ SECTIONS ============ */
section { padding-block: clamp(96px, 11vw, 144px); }

.section-head {
  max-width: 980px;
  margin-bottom: 64px;
}
.section-head .label { display: inline-block; margin-bottom: 22px; }
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.86;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  margin: 0;
}
.section-head p {
  margin: 28px 0 0;
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  max-width: 60ch;
  color: var(--text-2);
}

/* ============ FEATURE PILLARS ============ */
.pillars-section {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card) 100%);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
}

.pillar {
  padding: 56px 28px 40px;
  border-right: 1px solid var(--line);
  position: relative;
  background: var(--bg);
  transition: background 200ms ease;
}
.pillar:last-child { border-right: none; }
.pillar:hover { background: var(--bg-elevated); }

.pillar .corner {
  position: absolute;
  top: 18px;
  left: 18px;
  font-family: var(--display);
  font-size: 0.86rem;
  color: var(--text-4);
}

.pillar h3 {
  margin: 0 0 16px;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  line-height: 0.95;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.pillar p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ============ AI CHIP ============ */
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--heavy);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px 5px 8px;
  background: var(--gradient-ai);
  color: var(--text);
  line-height: 1;
  align-self: center;
}
.ai-chip svg { width: 12px; height: 12px; }

/* ============ TWO APPS ============ */
.apps-section {
  position: relative;
  overflow: hidden;
}
.apps-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 400px at 10% 20%, rgba(59, 123, 246, 0.08), transparent 60%);
  pointer-events: none;
}
.apps-section > * { position: relative; }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
}

.app-card {
  padding: 40px 32px;
  border-right: 1px solid var(--line);
  position: relative;
  background: var(--bg);
  transition: background 200ms ease;
}
.app-card:last-child { border-right: none; }
.app-card:hover { background: var(--bg-elevated); }

.app-card .label { display: block; margin-bottom: 18px; }

.app-card h3 {
  margin: 0 0 24px;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.app-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.app-card li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  font-size: 0.94rem;
  color: var(--text-2);
}
.app-card li::before {
  content: "+";
  color: var(--brand);
  font-family: var(--heavy);
  font-weight: 700;
  font-size: 0.86rem;
}

.app-card.trainer {
  background: linear-gradient(180deg, var(--brand-subtle), transparent 60%), var(--bg);
}
.app-card.trainer h3 { color: var(--brand); }

.app-card.customer {
  background: linear-gradient(180deg, var(--ember-subtle), transparent 60%), var(--bg);
}
.app-card.customer h3 { color: var(--ember); }
.app-card.customer li::before { color: var(--ember); }

/* ============ END / CTA ============ */
.end {
  position: relative;
  padding-block: clamp(120px, 16vw, 200px);
  background:
    radial-gradient(900px 500px at 50% 100%, rgba(255, 106, 61, 0.18), transparent 70%),
    radial-gradient(700px 400px at 10% 0%, rgba(59, 123, 246, 0.12), transparent 70%),
    var(--bg);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.end::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -14deg,
    transparent 0,
    transparent 80px,
    rgba(255, 255, 255, 0.02) 80px,
    rgba(255, 255, 255, 0.02) 81px
  );
  pointer-events: none;
}
.end > * { position: relative; }

.end-line {
  font-family: var(--display);
  font-size: clamp(3.2rem, 11vw, 11rem);
  line-height: 0.86;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  margin: 0 0 56px;
  max-width: 18ch;
}

.end-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.mail-row {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.mail-cell {
  padding: 32px;
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  transition: background 200ms ease;
}
.mail-cell:last-child { border-right: none; }
.mail-cell:hover { background: var(--bg-card); }
.mail-cell .label { display: block; margin-bottom: 6px; }
.mail-cell .addr {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1;
  text-transform: lowercase;
}
.mail-cell:hover .addr { color: var(--ember); }
.mail-cell .arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  transition: transform 200ms ease, color 200ms ease;
}
.mail-cell:hover .arrow { transform: translate(4px, -4px); color: var(--ember); }

.end-note {
  text-align: center;
  color: var(--text-3);
  font-size: 0.82rem;
  margin-top: 32px;
}

/* ============ FOOTER ============ */
footer {
  padding-block: 36px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.footer-grid .meta {
  font-family: var(--heavy);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.footer-grid .center { text-align: center; }
.footer-grid .right { text-align: right; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillar:nth-child(2) { border-right: none; }
  .pillar:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 920px) {
  .wrap { padding-inline: 24px; }
  .hero { padding-top: 110px; min-height: auto; }
  .hero-tail {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 32px;
  }
  .apps-grid { grid-template-columns: 1fr; }
  .app-card { border-right: none; border-bottom: 1px solid var(--line); }
  .app-card:last-child { border-bottom: none; }
  .mail-row { grid-template-columns: 1fr; }
  .mail-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .mail-cell:last-child { border-bottom: none; }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .footer-grid .center, .footer-grid .right { text-align: left; }
}

@media (max-width: 540px) {
  .nav-link { display: none; }
  .nav-cta { padding: 10px 14px; font-size: 0.7rem; }
  .hero-title .row.shift { padding-left: 0; }
  .pillars { grid-template-columns: 1fr; }
  .pillar { border-right: none; border-bottom: 1px solid var(--line); }
  .pillar:last-child { border-bottom: none; }
  .btn {
    width: 100%;
    height: 56px;
  }
}

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