/* OpenClaw Geneva — responsive redesign + SEO/GEO cleanup layer
   This file intentionally overrides legacy styles without changing the whole HTML.
   Goals: consistent spacing, stronger visual hierarchy, robust mobile layouts,
   accessible focus states and verified-content emphasis. */

:root {
  --surface-0: #070b14;
  --surface-1: #0c1220;
  --surface-2: #111827;
  --surface-3: #172033;
  --surface-4: #1c2740;
  --line-soft: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.18);
  --brand-red: #ed4e39;
  --brand-red-2: #ff6b57;
  --brand-blue: #5865f2;
  --text-main: #f8fafc;
  --text-muted: #aab4c6;
  --text-dim: #76839b;
  --shadow-card: 0 18px 55px rgba(0,0,0,.28);
  --shadow-red: 0 16px 50px rgba(237,78,57,.20);
  --container-pad: clamp(18px, 4vw, 28px);
}

html { scroll-padding-top: 88px; }
body {
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 8%, rgba(237,78,57,.12), transparent 34rem),
    radial-gradient(circle at 88% 2%, rgba(88,101,242,.10), transparent 34rem),
    linear-gradient(180deg, var(--surface-0), var(--surface-1) 42%, var(--surface-0));
  color: var(--text-main);
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
a { text-underline-offset: .18em; }
:focus-visible { outline: 3px solid rgba(237,78,57,.72); outline-offset: 3px; }
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 10000;
  transform: translateY(-160%); padding: 10px 14px; border-radius: 999px;
  background: var(--brand-red); color: #fff; font-weight: 800; box-shadow: var(--shadow-red);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.container, .nav-inner, .hero-wrap { max-width: 1180px; }
.container, .nav-inner, .hero-wrap { padding-left: var(--container-pad); padding-right: var(--container-pad); }
.section {
  padding: clamp(64px, 8vw, 94px) 0;
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}
.section-label { margin-bottom: 14px; }
.section-h2 { max-width: 860px; text-wrap: balance; }
.section-lead { max-width: 780px; margin-bottom: 34px; color: var(--text-muted); }
.dark-section { background: rgba(255,255,255,.025); }

/* Navigation */
.navbar {
  padding: 10px 0;
  background: rgba(7, 11, 20, .82);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.navbar.scrolled { padding: 8px 0; background: rgba(7, 11, 20, .94); }
.nav-inner { gap: 14px; }
.nav-logo { min-width: fit-content; }
.logo-img { width: 42px; height: 42px; }
.nav-links { gap: 2px; }
.nav-links li a { padding: 8px 10px; font-size: .86rem; }
.nav-btn { padding: 9px 16px !important; }
.lang-toggle { min-height: 38px; }
.burger { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }

.mob-menu { justify-content: flex-start; padding: 96px 24px 32px; background: rgba(7, 11, 20, .985); }
.mob-menu ul { width: min(440px, 100%); gap: 10px; }
.mob-link { width: 100%; border: 1px solid var(--line-soft); border-radius: 16px; background: rgba(255,255,255,.035); padding: 14px 18px; font-size: 1.05rem; text-align: left; }
.mob-btn { background: rgba(88,101,242,.16) !important; color: #fff !important; border-color: rgba(88,101,242,.34); }

/* Hero */
.hero { min-height: auto; padding: 112px 0 70px; }
.hero-wrap { padding-top: 28px; grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr); gap: clamp(28px, 5vw, 64px); }
.hero-left { gap: 24px; }
.hero-tag { max-width: 100%; white-space: normal; }
.hero-h1 { font-size: clamp(2.55rem, 6vw, 5.1rem); text-wrap: balance; }
.hero-p { max-width: 650px; color: var(--text-muted); }
.hero-ctas a { min-height: 48px; }
.hero-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; padding-top: 0; border-top: 0; }
.num-sep { display: none; }
.num-item { min-width: 0; padding: 16px 14px; border: 1px solid var(--line-soft); border-radius: 18px; background: rgba(255,255,255,.04); box-shadow: 0 10px 30px rgba(0,0,0,.16); }
.num-item p { line-height: 1.35; }
.mascot-wrap { width: min(360px, 100%); height: min(360px, 80vw); margin-inline: auto; }
.float-badge { box-shadow: 0 14px 36px rgba(0,0,0,.32); }
.scroll-hint { display: none; }

/* Cards and grids */
.marquee-bar { padding: 12px 0; background: rgba(255,255,255,.025); }
.grid-4, .stats-grid, .personas-grid, .values-grid { gap: 18px; }
.card, .proj-card, .persona-card, .stat-card, .value, .newsletter-box, .contact-form, .faq-item, .about-split, .join-item, .event-row {
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border-color: var(--line-soft); box-shadow: 0 12px 36px rgba(0,0,0,.18);
}
.card:hover, .proj-card:hover, .persona-card:hover, .stat-card:hover, .join-item:hover, .event-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.about-split { padding: clamp(26px, 5vw, 48px); }
.term-body { min-height: 190px; }
.tech-tag, .proj-tech span, .persona-tag { white-space: normal; }

/* Premium icon treatment: replace emoji-like pictograms with crisp vector icons */
.card-icon, .proj-icon, .stat-icon, .persona-icon, .ji-icon, .dh-icon, .cinfo-icon, .value i {
  position: relative;
  isolation: isolate;
  background: linear-gradient(145deg, rgba(237,78,57,.18), rgba(255,255,255,.045));
  border: 1px solid rgba(237,78,57,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 34px rgba(0,0,0,.22);
}
.card-icon::after, .proj-icon::after, .stat-icon::after, .persona-icon::after, .ji-icon::after, .dh-icon::after, .cinfo-icon::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.16), transparent 42%);
  pointer-events: none;
  z-index: -1;
}
.persona-icon { font-size: 1.35rem; color: var(--brand-red-2); }
.persona-icon i { line-height: 1; filter: drop-shadow(0 6px 14px rgba(237,78,57,.22)); }
.persona-icon-open { background: linear-gradient(145deg, rgba(88,101,242,.18), rgba(237,78,57,.08)) !important; border-color: rgba(88,101,242,.32) !important; color: #aeb7ff; }
.event-body h3 i { color: var(--brand-red-2); margin-right: .45rem; font-size: .9em; }
.toast strong i { margin-right: .45rem; }

/* Verified stats */
.stats-section { padding-top: clamp(64px, 7vw, 84px); padding-bottom: clamp(56px, 6vw, 76px); }
.stats-section::before { opacity: .7; }
.stats-grid { margin-top: 28px; }
.stat-card { padding: clamp(22px, 3vw, 30px) 20px; display: flex; flex-direction: column; }
.stat-number strong { font-size: clamp(2.1rem, 4vw, 2.75rem); }
.stat-card > p { min-height: 2.6em; display: flex; align-items: center; justify-content: center; line-height: 1.3; }
.stat-fill { transition: width .85s ease; }

/* Events */
.events-list { gap: 16px; }
.event-row { grid-template-columns: 86px minmax(0, 1fr) auto; align-items: stretch; padding: clamp(20px, 3vw, 28px); }
.event-date { justify-content: center; min-height: 92px; }
.event-body p { max-width: 820px; }
.event-details { gap: 10px 16px; }
.event-details span { line-height: 1.35; }
.event-btn { align-self: center; justify-content: center; min-height: 44px; }
.featured-row { box-shadow: 0 18px 54px rgba(237,78,57,.12); }
.event-chip.chip-urgent { animation: none; }

/* Join/contact/footer */
.join-wrap, .contact-wrap { gap: clamp(28px, 5vw, 56px); }
.discord-hero { padding: clamp(22px, 4vw, 32px); }
.join-item { min-height: 76px; }
.socials a, .foot-socials a { min-width: 40px; min-height: 40px; }
.footer { padding-top: 58px; }
.footer-top { gap: 28px; }
.footer-col a[aria-disabled="true"] { opacity: .58; pointer-events: none; }
.discord-float { right: 18px; bottom: 74px; }
.back-to-top { left: 18px; bottom: 22px; }

@media (max-width: 1120px) {
  .nav-links li a { padding-inline: 8px; }
  .nav-links li a:not(.nav-btn) { font-size: .82rem; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero { padding-top: 96px; }
  .hero-wrap { grid-template-columns: 1fr; text-align: left; }
  .hero-left { align-items: stretch; }
  .hero-tag { width: fit-content; }
  .hero-right { order: 0; }
  .mascot-wrap { width: 240px; height: 240px; }
  .mascot-img { width: 178px; height: 178px; }
  .ring-1 { width: 210px; height: 210px; }
  .ring-2 { width: 250px; height: 250px; }
  .float-badge { display: none; }
  .event-row { grid-template-columns: 78px minmax(0, 1fr); }
  .event-btn { grid-column: 2; justify-self: start; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .section { padding: 58px 0; }
  .section-lead { margin-bottom: 26px; }
  .logo-words { display: none; }
  .hero { padding-top: 86px; padding-bottom: 52px; }
  .hero-h1 { font-size: clamp(2.35rem, 13vw, 3.45rem); }
  .hero-ctas { flex-direction: column; }
  .hero-ctas a { width: 100%; justify-content: center; }
  .hero-nums { grid-template-columns: 1fr; }
  .num-item { flex-direction: row; justify-content: space-between; align-items: center; gap: 14px; }
  .num-item p { text-align: right; max-width: 11rem; }
  .stats-grid, .grid-4, .personas-grid, .values-grid { grid-template-columns: 1fr; }
  .stat-card > p { min-height: 0; }
  .event-row { grid-template-columns: 1fr; gap: 16px; }
  .event-date { display: flex; flex-direction: row; justify-content: flex-start; width: fit-content; min-height: 0; gap: 8px; padding: 10px 12px; }
  .event-date span { margin-top: 0; align-self: end; padding-bottom: 2px; }
  .event-btn { grid-column: auto; width: 100%; justify-self: stretch; }
  .about-split, .contact-form, .newsletter-box, .forwho-cta { padding: 24px 18px; }
  .discord-hero { flex-direction: column; align-items: stretch; text-align: left; }
  .dh-btn { width: 100%; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { align-items: flex-start; text-align: left; }
  .discord-float { bottom: 18px; right: 18px; }
  .back-to-top { display: none; }
  .hero-noise { display: none; }
  .orb { filter: blur(64px); opacity: .7; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 420px) {
  .section-h2 { font-size: 1.9rem; }
  .hero-h1 { letter-spacing: -.055em; }
  .num-item strong, .hero-nums .num-item strong { font-size: 2rem; }
  .stat-number strong { font-size: 2rem; }
  .faq-item summary { padding: 17px 16px; }
  .faq-item p { padding-left: 16px; padding-right: 16px; }
}

/* Community values redesign: cleaner premium cards with real icon badges */
#community.dark-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(237,78,57,.10), transparent 28rem),
    radial-gradient(circle at 90% 20%, rgba(88,101,242,.08), transparent 30rem),
    rgba(255,255,255,.018);
}
#community .section-lead {
  max-width: 820px;
}
.values-grid {
  margin-top: 42px;
  padding-top: 0;
  border-top: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.value {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 26px 24px 24px;
  min-height: 210px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.026)),
    radial-gradient(circle at 22% 0%, rgba(237,78,57,.16), transparent 12rem);
  box-shadow: 0 18px 48px rgba(0,0,0,.24);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease, background .28s ease;
}
.value::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-red), rgba(255,107,87,.35), transparent);
  opacity: .9;
}
.value::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -38px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: rgba(237,78,57,.08);
  filter: blur(2px);
  pointer-events: none;
}
.value:hover {
  transform: translateY(-6px);
  border-color: rgba(237,78,57,.30);
  box-shadow: 0 24px 64px rgba(0,0,0,.34), 0 0 34px rgba(237,78,57,.10);
  background:
    linear-gradient(145deg, rgba(255,255,255,.090), rgba(255,255,255,.032)),
    radial-gradient(circle at 22% 0%, rgba(237,78,57,.20), transparent 12rem);
}
.value > i {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 16px;
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-red-2);
  font-size: 1.28rem;
  background: linear-gradient(145deg, rgba(237,78,57,.20), rgba(255,255,255,.045));
  border: 1px solid rgba(237,78,57,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 14px 32px rgba(0,0,0,.22);
}
.value h3 {
  margin-bottom: 8px;
  font-size: 1.02rem;
  letter-spacing: -.01em;
}
.value p {
  max-width: 24ch;
  color: var(--text-muted);
  line-height: 1.65;
}
@media (max-width: 1120px) {
  .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value { min-height: 190px; }
}
@media (max-width: 700px) {
  .values-grid { grid-template-columns: 1fr; margin-top: 30px; }
  .value { min-height: auto; padding: 22px 20px; }
  .value p { max-width: none; }
}

/* Equal-size cards: prevents the last card/box from looking smaller on wrapped grids */
.grid-4, .stats-grid, .personas-grid, .values-grid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}
.card, .proj-card, .persona-card, .stat-card, .value {
  height: 100%;
}
.stat-card {
  min-height: 232px;
}
.persona-card {
  min-height: 260px;
}
.persona-card:last-child {
  border-style: solid !important;
  border-color: rgba(88,101,242,.34) !important;
  background: linear-gradient(180deg, rgba(88,101,242,.09), rgba(255,255,255,.025)) !important;
}
@media (max-width: 640px) {
  .personas-grid { grid-template-columns: 1fr; }
  .persona-card { min-height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
