/* Calibra public site — instrument UI design system */
:root {
  --bg: #0b0f0c;
  --bg-soft: #101410;
  --surface: #141814;
  --surface-up: #1c201d;
  --border: #2a2f2c;
  --border-soft: #222622;
  --accent: #bbff4d;
  --accent-dim: #9ed943;
  --accent-soft: #62bd7c;
  --accent-glow: rgba(187, 255, 77, 0.35);
  --accent-muted: rgba(187, 255, 77, 0.12);
  --text: #f2f5f3;
  --text-secondary: #8b938e;
  --text-tertiary: #6e756f;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 24px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 80px rgba(187, 255, 77, 0.15);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    sans-serif;
  --max: 1080px;
  --nav-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

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

/* Ambient atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% -15%, var(--accent-muted), transparent 50%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(98, 189, 124, 0.06), transparent 45%),
    radial-gradient(ellipse 40% 35% at 0% 100%, rgba(98, 189, 124, 0.04), transparent 40%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a:hover {
  color: #d8ff85;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem) 5rem;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  margin: 0 calc(-1 * clamp(1.25rem, 4vw, 2rem));
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  background: rgba(11, 15, 12, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(42, 47, 44, 0.6);
}

.header-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.5);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  background: rgba(20, 24, 20, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
}

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--bg);
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ——— Typography ——— */
.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 1rem;
}

.display {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0;
}

.lead {
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  max-width: 32em;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0 0 0.6rem;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, filter 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #0a0e0b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 8px 32px var(--accent-glow);
  color: #0a0e0b;
  text-decoration: none;
}

.btn-ghost {
  background: rgba(20, 24, 20, 0.8);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent-soft);
  background: var(--surface-up);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ——— Home hero ——— */
.hero-panel {
  position: relative;
  margin-top: 1.5rem;
  margin-bottom: 4rem;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    linear-gradient(165deg, rgba(28, 32, 29, 0.95) 0%, rgba(16, 20, 16, 0.98) 55%, var(--bg) 100%);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: rise 0.8s var(--ease-out) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.hero-radar {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  width: min(420px, 55vw);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.55;
}

.hero-radar svg {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  max-width: 560px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.hero-icon-wrap {
  margin-bottom: 1.75rem;
}

.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  object-fit: cover;
  display: block;
  animation: float 5s ease-in-out infinite;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    var(--shadow-glow),
    0 28px 56px rgba(0, 0, 0, 0.55);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hero-panel .display {
  margin-bottom: 1rem;
}

.hero-panel .lead {
  margin-bottom: 0;
}

/* ——— Bento tools ——— */
.tools-section {
  margin-bottom: 4rem;
  animation: rise 0.8s 0.1s var(--ease-out) both;
}

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

.bento-cell {
  grid-column: span 2;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface) 0%, var(--bg-soft) 100%);
  transition: border-color 0.25s, transform 0.25s var(--ease-out);
}

.bento-cell:hover {
  border-color: #3d443f;
  transform: translateY(-3px);
}

.bento-cell--wide {
  grid-column: span 3;
}

.bento-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-up);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
}

.bento-icon svg {
  width: 22px;
  height: 22px;
}

.bento-cell h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bento-cell p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

@media (max-width: 800px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .bento-cell,
  .bento-cell--wide {
    grid-column: span 1;
  }
  .hero-radar {
    opacity: 0.25;
    right: -25%;
  }
}

@media (max-width: 480px) {
  .bento {
    grid-template-columns: 1fr;
  }
}

/* ——— Value cards ——— */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 4rem;
  animation: rise 0.8s 0.2s var(--ease-out) both;
}

.value-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.value-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.value-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.value-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .values {
    grid-template-columns: 1fr;
  }
}

/* ——— CTA band ——— */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(187, 255, 77, 0.2);
  background: linear-gradient(
    135deg,
    rgba(187, 255, 77, 0.08) 0%,
    rgba(20, 24, 20, 0.9) 50%
  );
  margin-bottom: 3rem;
}

.cta-band h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.cta-band p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ——— Support page ——— */
.support-hero {
  margin: 2rem 0 2.5rem;
  animation: rise 0.7s var(--ease-out) both;
}

.support-hero .page-title {
  margin-bottom: 0.75rem;
}

.contact-section {
  margin-bottom: 3rem;
}

.contact-blurb {
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(187, 255, 77, 0.2);
  background: linear-gradient(
    160deg,
    rgba(187, 255, 77, 0.08) 0%,
    var(--surface) 45%
  );
}

.contact-blurb p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.contact-blurb a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: #3d443f;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 1.35rem;
  font-weight: 600;
  font-size: 0.975rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-out);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item .faq-body {
  padding: 0 1.35rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.faq-item .faq-body strong {
  color: var(--text);
}

/* ——— Legal prose ——— */
.legal-wrap {
  max-width: 42rem;
}

.legal-wrap h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2.5rem 0 0.65rem;
  letter-spacing: -0.02em;
}

.legal-wrap h2:first-of-type {
  margin-top: 1.5rem;
}

.legal-wrap p,
.legal-wrap li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.legal-wrap ul {
  padding-left: 1.25rem;
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
}

/* ——— Footer ——— */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.site-footer a {
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* ——— Nav mobile ——— */
@media (max-width: 520px) {
  .site-nav a:not([aria-current="page"]) {
    padding: 0.45rem 0.65rem;
  }
}
