/* ============ TROISTECH SHARED STYLES ============ */
:root {
  --bg: #0A0A0B;
  --bg-2: #101013;
  --bg-3: #16161A;
  --surface: rgba(255,255,255,0.025);
  --surface-2: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.07);
  --border-2: rgba(255,255,255,0.12);
  --border-bright: rgba(255,255,255,0.2);
  --text: #FAFAFA;
  --text-2: #B4B4B8;
  --text-3: #8B8B91;
  --text-4: #5A5A60;
  --accent: #7DD3FC;
  --accent-2: #38BDF8;
  --green: #4ADE80;
  --warm: #FCD34D;

  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  --container: 1200px;
  --radius: 12px;
  --radius-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: -0.005em;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(56,189,248,0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 2;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
.display {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.display em, .h2 em, .page-h em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.015em;
}
.h2 {
  font-size: clamp(2.1rem, 4.3vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.h3 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}
.page-h {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.04;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(125,211,252,0.08);
  border: 1px solid rgba(125,211,252,0.2);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}
.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--text-2);
  line-height: 1.6;
  max-width: 58ch;
  font-weight: 400;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: #FAFAFA;
  color: #0A0A0B;
}
.btn-primary:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(255,255,255,0.15);
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-2);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--border-bright);
}
.btn-arrow { display: inline-block; transition: transform 0.25s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: all 0.3s ease;
  padding: 18px 0;
}
.nav.scrolled {
  background: rgba(10,10,11,0.75);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; letter-spacing: -0.025em;
}
.logo-mark { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  font-size: 14px; color: var(--text-2);
  padding: 8px 14px; border-radius: 8px;
  transition: all 0.2s ease; font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }
.nav-mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  align-items: center; justify-content: center;
  color: var(--text);
}
.nav-mobile-toggle svg { width: 18px; height: 18px; }
.nav-cta-desktop { display: inline-flex; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-cta-desktop { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
}

/* MOBILE MENU */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(10,10,11,0.98);
  backdrop-filter: blur(20px);
  z-index: 99;
  padding: 100px 28px 40px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu ul { list-style: none; }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu a {
  display: block;
  padding: 18px 0;
  font-size: 17px;
  color: var(--text);
  font-weight: 500;
}
.mobile-menu a.active { color: var(--accent); }
.mobile-menu .btn { margin-top: 32px; width: 100%; justify-content: center; }

/* PAGE HEADER (for sub-pages) */
.page-header {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-header::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(125,211,252,0.12), transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.page-header-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}
.page-header .eyebrow { margin-bottom: 24px; }
.page-header .page-h { margin-bottom: 20px; }
.page-header .lede { margin: 0 auto; }

/* SECTIONS */
section { position: relative; z-index: 2; }
.section { padding: 100px 0; }
.section-sm { padding: 80px 0; }
.section-head {
  margin-bottom: 64px;
  text-align: center;
  max-width: 720px;
  margin-left: auto; margin-right: auto;
}
.section-head .eyebrow { margin-bottom: 22px; }
.section-head .h2 { margin-bottom: 18px; }
.section-head .lede { margin: 0 auto; }

/* PROSE (article-style content) */
.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-2);
}
.prose h2 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  color: var(--text);
  margin: 56px 0 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.prose h3 {
  font-size: 1.25rem;
  color: var(--text);
  margin: 40px 0 14px;
  font-weight: 600;
}
.prose p { margin-bottom: 22px; }
.prose ul, .prose ol {
  margin: 0 0 22px 22px;
}
.prose li { margin-bottom: 10px; }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(125,211,252,0.3); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose strong { color: var(--text); font-weight: 600; }
.prose em.serif { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 24px;
  margin: 32px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text);
  line-height: 1.5;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 64px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
.footer-brand p {
  color: var(--text-3);
  font-size: 14px;
  margin-top: 18px;
  max-width: 32ch;
  line-height: 1.6;
}
.footer-col h5 {
  font-size: 12px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--text-2);
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-3);
}
.footer-bottom .ecosystem {
  font-size: 12.5px;
  color: var(--text-4);
}
.socials { display: flex; gap: 12px; }
.socials a {
  width: 34px; height: 34px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-3);
  transition: all 0.2s ease;
}
.socials a:hover {
  border-color: var(--border-bright);
  color: var(--text);
  background: var(--surface);
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

::selection { background: var(--accent); color: #000; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

a, button { -webkit-tap-highlight-color: transparent; }

/* FORM ELEMENTS (shared) */
.form-group { margin-bottom: 22px; }
.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.form-label .req { color: var(--accent); }
.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-3);
  box-shadow: 0 0 0 4px rgba(125,211,252,0.08);
}
.form-textarea { resize: vertical; min-height: 130px; font-family: inherit; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-4); }
.form-help { font-size: 12.5px; color: var(--text-4); margin-top: 6px; }

/* CTA section (used on multiple pages) */
.cta {
  padding: 140px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(125,211,252,0.18), transparent 60%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(125,211,252,0.08), transparent 50%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(125,211,252,0.08), transparent 50%);
  filter: blur(40px);
}
.cta-mesh {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.5;
}
.cta-content { position: relative; z-index: 3; max-width: 720px; margin: 0 auto; }
.cta .h2 { margin-bottom: 20px; }
.cta-lede { color: var(--text-2); margin-bottom: 40px; font-size: 1.1rem; line-height: 1.5; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.cta-meta {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  color: var(--text-3);
  font-size: 13px;
  flex-wrap: wrap;
  justify-content: center;
}
.cta-meta-item { display: flex; align-items: center; gap: 6px; }
.cta-meta-item::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
}
.flow-line {
  stroke-dasharray: 4 8;
  animation: flowDash 5s linear infinite;
}
@keyframes flowDash { to { stroke-dashoffset: -120; } }
