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

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --border: #e6e3dc;
  --ink: #15171c;
  --body: #3d424d;
  --muted: #6b7180;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  /* The house gradient: charcoal in from the left, warming to indigo. Nav, buttons,
     contact card and the mobile menu all use it so the site reads as one piece. */
  --grad: linear-gradient(100deg, #11131a 0%, #1c1f2a 40%, #2e2e5c 75%, #4f46e5 100%);
  --grad-glass: linear-gradient(100deg, rgba(17, 19, 26, 0.88) 0%, rgba(28, 31, 42, 0.84) 40%, rgba(46, 46, 92, 0.8) 75%, rgba(79, 70, 229, 0.8) 100%);
  /* 12px dock gutter + 64px floating island + 8px breathing room */
  --nav-h: 84px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* ---------- Site nav (floating island, same build as the other sites) ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  margin-bottom: calc(-1 * var(--nav-h));
  pointer-events: none;
}
.site-nav > * { pointer-events: auto; }

/* Frosted glass in the house gradient */
.nav-island {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: var(--grad-glass);
  background-origin: border-box;
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 4px 14px -4px rgba(17, 19, 26, 0.3);
  transition: box-shadow 260ms ease;
}
.nav-island.is-scrolled { box-shadow: 0 12px 30px -10px rgba(17, 19, 26, 0.5); }

.nav-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 12px 0 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo:hover { opacity: 0.88; }
/* The <twc/> code logo */
.code-logo {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: #ffffff;
}
.code-logo .bracket { color: rgba(255, 255, 255, 0.45); }
.code-logo .slash { color: #a5b4fc; }
.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-trigger {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}
.nav-trigger:hover { color: #ffffff; background: rgba(255, 255, 255, 0.12); }
.nav-actions { margin-left: auto; display: flex; align-items: center; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  background: #ffffff;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.nav-cta:hover { background: #f4f3ff; transform: translateY(-1px); box-shadow: 0 12px 26px -12px rgba(17, 19, 26, 0.8); }
.nav-burger {
  display: none;
  margin-left: auto;
  padding: 8px;
  border-radius: 10px;
  color: #ffffff;
  background: none;
  border: 0;
  cursor: pointer;
  transition: background 160ms ease;
}
.nav-burger:hover { background: rgba(255, 255, 255, 0.14); }

/* Mobile takeover */
.nav-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--grad);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), visibility 300ms;
}
.nav-sheet.is-open { transform: translateX(0); visibility: visible; }
.nav-sheet .nav-burger { display: block; }
.nav-sheet-head { display: flex; align-items: center; height: 76px; padding: 12px 24px 0 29px; }
.nav-sheet-body { flex: 1; overflow-y: auto; padding: 8px 24px 32px; }
.nav-sheet-link {
  display: block;
  padding: 18px 4px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.nav-sheet-link:hover { opacity: 0.85; }
.nav-sheet-actions { margin-top: 32px; }
.nav-sheet-actions .nav-cta { width: 100%; padding: 14px; font-size: 1rem; }

@media (max-width: 760px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: block; }
  .nav-bar { padding: 0 8px 0 14px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 96px) 24px 96px;
  text-align: center;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(79, 70, 229, 0.14), transparent 70%),
    radial-gradient(600px 300px at 90% 30%, rgba(46, 46, 92, 0.08), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 880px;
  margin: 0 auto 24px;
}
.hero h1 span {
  background: linear-gradient(100deg, #2e2e5c 0%, #4f46e5 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.btn-primary { background: var(--grad); color: #ffffff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -14px rgba(17, 19, 26, 0.7); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: #cfcbc2; transform: translateY(-1px); }

/* ---------- Sections ---------- */
section { padding: 96px 24px; }
.wrap { max-width: 1160px; margin: 0 auto; }
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 14px;
}
.section-sub { font-size: 17px; color: var(--muted); max-width: 560px; line-height: 1.7; }
.section-head { margin-bottom: 48px; }

/* Companies */
.companies-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.company-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.company-card:hover {
  transform: translateY(-3px);
  border-color: #d7d3ca;
  box-shadow: 0 22px 40px -26px rgba(17, 19, 26, 0.35);
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.card-logo { height: 52px; display: flex; align-items: center; }
.card-logo img { height: 100%; width: auto; max-width: 180px; object-fit: contain; display: block; }
.card-logo.tile img { border-radius: 12px; }
.card-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}
.card-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.card-desc { font-size: 15px; color: var(--muted); line-height: 1.7; flex: 1; }
.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.card-link .arrow { color: var(--accent); transition: transform 200ms ease; }
.company-card:hover .arrow { transform: translate(3px, -3px); }

/* Approach */
.approach { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.principle { padding: 28px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); }
.principle-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--grad);
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 16px;
}
.principle h3 { font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.01em; }
.principle p { font-size: 15px; color: var(--muted); line-height: 1.7; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.about-body p { font-size: 17px; color: var(--body); line-height: 1.85; }
.about-body p + p { margin-top: 18px; }
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.stat { background: var(--surface); padding: 30px; }
.stat-number { font-size: 40px; font-weight: 900; letter-spacing: -0.03em; color: var(--ink); line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* Contact */
.contact { padding-top: 0; }
.contact-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px;
  border-radius: 24px;
  color: #ffffff;
  background: var(--grad);
}
.contact-card .section-label { color: #a5b4fc; }
.contact-card .section-title { color: #ffffff; }
.contact-card .section-sub { color: rgba(255, 255, 255, 0.72); }
.contact-details { display: flex; flex-direction: column; gap: 14px; }
.contact-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
}
a.contact-row:hover { background: rgba(255, 255, 255, 0.12); }
.contact-row small { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.contact-row span { font-size: 16px; font-weight: 600; color: #ffffff; }

/* Partnerships */
.partner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.partner-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.partner-card h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.partner-card > p { font-size: 15px; color: var(--muted); line-height: 1.7; }
.partner-list { list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1; margin-top: 4px; }
.partner-list li { position: relative; padding-left: 26px; font-size: 15px; color: var(--body); line-height: 1.6; }
.partner-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 4px;
  background: var(--grad);
}
.partner-card .btn { align-self: flex-start; margin-top: 8px; }
.partner-note { margin-top: 24px; font-size: 14px; color: var(--muted); text-align: center; }
.partner-note a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 32px 24px; }
.footer-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 14px; }
.footer-brand .code-logo { color: var(--ink); font-size: 15px; }
.footer-brand .code-logo .bracket { color: #9aa0ab; }
.footer-brand .code-logo .slash { color: var(--accent); }
.footer-links { display: flex; gap: 4px 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 14px; font-weight: 600; color: var(--body); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .principles { grid-template-columns: 1fr; }
  .about-grid, .contact-card { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 700px) {
  section { padding: 72px 16px; }
  .contact { padding-top: 0; }
  .hero { padding: calc(var(--nav-h) + 64px) 16px 72px; }
  .companies-grid, .partner-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .company-card, .partner-card { padding: 24px; }
  .contact-card { padding: 32px 22px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-sheet, .nav-cta, .btn, .company-card, .card-link .arrow { transition: none; }
}

/* ---------- Inner pages (privacy, terms, press, 404) ---------- */
.page-head {
  padding: calc(var(--nav-h) + 72px) 24px 48px;
  background:
    radial-gradient(900px 360px at 50% -20%, rgba(79, 70, 229, 0.12), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-head .section-title { font-size: clamp(34px, 5vw, 54px); }
.page-head a, .contact-card .section-sub a { color: inherit; font-weight: 600; text-underline-offset: 3px; }
.doc-section { padding-top: 56px; }
.doc > * { max-width: 760px; }
.doc h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); margin: 40px 0 12px; }
.doc p, .doc li { font-size: 16px; line-height: 1.8; color: var(--body); }
.doc p + p { margin-top: 12px; }
.doc ul { margin: 12px 0 0 22px; display: flex; flex-direction: column; gap: 8px; }
.doc a { color: var(--accent); font-weight: 600; text-decoration: none; }
.doc a:hover { text-decoration: underline; }

.press-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.press-block { padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.press-block h2, .press-h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); margin-bottom: 14px; }
.press-h2 { margin: 56px 0 18px; }
.press-block p { font-size: 16px; line-height: 1.8; }
.press-facts { display: flex; flex-direction: column; gap: 12px; }
.press-facts div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 15px; }
.press-facts dt { font-weight: 700; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 3px; }
.press-facts dd { color: var(--ink); }
.press-facts a, .press-logo-meta a, .press-note a { color: var(--accent); font-weight: 600; text-decoration: none; }
.press-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.press-logo { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.press-logo-art { height: 130px; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.press-logo-art img { max-height: 72px; max-width: 100%; object-fit: contain; }
.press-logo-meta { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; font-size: 14px; }
.press-logo-meta strong { color: var(--ink); }
.press-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.swatch { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--ink); }
.swatch span { height: 72px; border-radius: 14px; border: 1px solid var(--border); margin-bottom: 8px; }
.swatch code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--muted); }
.press-note { margin-top: 32px; font-size: 14px; color: var(--muted); }

.not-found { min-height: 70vh; border-bottom: 0; }

@media (max-width: 800px) {
  .press-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .page-head { padding: calc(var(--nav-h) + 48px) 16px 36px; }
  .doc-section { padding-top: 40px; }
  .press-block { padding: 24px; }
  .press-facts div { grid-template-columns: 1fr; gap: 2px; }
}
