/* OpenClaw Main Website — Brand Theme */
/* Palette: ultramarine #4169E1, gold/amber accent, dark #0d1117 bg */
/* Fonts: self-hosted (no external font requests — GDPR-safe) */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

:root {
  --ultramarine: #4169E1;
  --ultramarine-light: #5b7ee8;
  --ultramarine-dark: #3456c4;
  --gold: #d4a843;
  --gold-light: #e8be5a;
  --amber: #c9952e;
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-card: #1c2333;
  --border: #2d3548;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  --success: #3fb950;
  --warning: #d29922;
  --danger: #f85149;
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 960px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(13, 17, 23, 0.9);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

.logo img {
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-list a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--text);
  background: rgba(65, 105, 225, 0.1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* Main content */
main {
  flex: 1;
}

/* Hero section */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(65, 105, 225, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(65, 105, 225, 0.1);
  border: 1px solid rgba(65, 105, 225, 0.2);
  color: var(--ultramarine-light);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  color: var(--ultramarine);
}

.hero h1 .highlight-gold {
  color: var(--gold);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--ultramarine);
  color: #fff;
}

.btn-primary:hover {
  background: var(--ultramarine-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--ultramarine);
  color: var(--ultramarine-light);
}

/* Sections */
.section {
  padding: 4rem 0;
}

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

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* What We Build grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--ultramarine);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  margin-top: 0.75rem;
}

.tag-experimental {
  background: rgba(210, 153, 34, 0.1);
  color: var(--warning);
  border: 1px solid rgba(210, 153, 34, 0.2);
}

/* Story section */
.story-content {
  max-width: 680px;
  margin: 0 auto;
}

.story-content p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.story-content p:first-of-type {
  font-size: 1.15rem;
  color: var(--text);
}

.story-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ultramarine);
  text-decoration: none;
  font-weight: 500;
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.story-link:hover {
  color: var(--ultramarine-light);
}

/* Principles list */
.principles {
  list-style: none;
  margin: 1.5rem 0;
}

.principles li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.principles li:last-child {
  border-bottom: none;
}

.principles .check {
  color: var(--success);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* Contact page */
.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 640px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.contact-card:hover {
  border-color: var(--ultramarine);
  transform: translateY(-2px);
}

.contact-card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.contact-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Services page */
.service-section {
  margin-bottom: 3rem;
}

.service-section:last-child {
  margin-bottom: 0;
}

.service-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ultramarine);
}

.service-section h3 .emoji {
  margin-right: 0.5rem;
}

.service-section > p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.service-details {
  list-style: none;
  margin: 0;
}

.service-details li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.service-details li:last-child {
  border-bottom: none;
}

.service-details .bullet {
  color: var(--ultramarine);
  flex-shrink: 0;
}

/* Legal pages */
.legal-content {
  max-width: 680px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.legal-content strong {
  color: var(--text);
}

/* Page header */
.page-header {
  padding: 4rem 0 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.page-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Content body */
.content-body {
  padding-bottom: 4rem;
}

.content-body .container {
  max-width: 680px;
}

/* Divider */
.divider {
  width: 60px;
  height: 3px;
  background: var(--ultramarine);
  border-radius: 2px;
  margin: 0 auto 1.5rem;
}

/* Stats / numbers */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
  margin: 2rem 0;
}

.stat {
  padding: 1.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ultramarine);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand img {
  border-radius: 50%;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--ultramarine-light);
}

.footer-social {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  align-items: flex-start;
}

.footer-social a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.25rem;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--ultramarine);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .contact-methods {
    grid-template-columns: 1fr;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .nav-toggle {
    display: block;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem;
  }

  .nav-list.open {
    display: flex;
  }

  .nav-list a {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero, .section, .page-header {
  animation: fadeInUp 0.6s ease-out;
}

/* Honesty badge */
.honesty-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: rgba(139, 148, 158, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

/* X thread embed callout */
.callout {
  background: var(--bg-card);
  border-left: 3px solid var(--ultramarine);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.callout p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.callout a {
  color: var(--ultramarine);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Code / tech detail */
.tech-note {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  background: rgba(139, 148, 158, 0.05);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1rem 0;
}