/* Framework27 — Custom styles
 * Loaded after Tailwind via CDN.
 * Brand colours: deep black #0A0A0A, off-white #FAFAFA, electric blue #0057FF, charcoal #1A1A1A
 * Fonts: Space Grotesk (headings), Inter (body), JetBrains Mono (numbers)
 */

:root {
  --black: #0A0A0A;
  --off-white: #FAFAFA;
  --electric: #0057FF;
  --electric-dark: #0041BD;
  --charcoal: #1A1A1A;
  --grey-100: #F4F4F4;
  --grey-200: #E5E5E5;
  --grey-400: #9A9A9A;
  --grey-600: #5A5A5A;
  --grey-800: #2A2A2A;
}

html {
  scroll-behavior: smooth;
  background: var(--off-white);
  color: var(--charcoal);
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  background: var(--off-white);
  color: var(--charcoal);
  line-height: 1.55;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--black);
}

h1 { letter-spacing: -0.03em; }

.font-mono, .mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: 'ss01', 'zero';
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--electric);
  color: white;
  font-weight: 600;
  padding: 0.95rem 1.6rem;
  border-radius: 0.5rem;
  transition: background 0.15s ease, transform 0.15s ease;
  border: 2px solid var(--electric);
  font-family: 'Inter', sans-serif;
}
.btn-primary:hover {
  background: var(--electric-dark);
  border-color: var(--electric-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--black);
  font-weight: 600;
  padding: 0.95rem 1.6rem;
  border-radius: 0.5rem;
  border: 2px solid var(--black);
  transition: background 0.15s ease, color 0.15s ease;
  font-family: 'Inter', sans-serif;
}
.btn-secondary:hover {
  background: var(--black);
  color: white;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--black);
  font-weight: 600;
  transition: color 0.15s ease;
}
.btn-ghost:hover { color: var(--electric); }

/* On dark backgrounds */
.dark-section .btn-secondary {
  color: white;
  border-color: white;
}
.dark-section .btn-secondary:hover {
  background: white;
  color: var(--black);
}
.dark-section .btn-ghost { color: white; }
.dark-section .btn-ghost:hover { color: var(--electric); }

/* Hero */
.hero-dark {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(0,87,255,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(0,87,255,0.06) 0%, transparent 50%),
    var(--black);
  color: white;
}

.hero-dark h1, .hero-dark h2, .hero-dark h3 { color: white; }

/* Grid background utility */
.bg-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.bg-grid-light {
  background-image:
    linear-gradient(rgba(0,0,0,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Axis ring */
.axis-ring {
  width: 100%;
  max-width: 480px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  position: relative;
}
.axis-ring svg { width: 100%; height: 100%; overflow: visible; }
.axis-ring .tick { stroke: rgba(255,255,255,0.35); stroke-width: 1.5; }
.axis-ring .tick.active { stroke: var(--electric); stroke-width: 2.5; }
.axis-ring .ring-bg { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 1; }
.axis-ring .ring-progress {
  fill: none;
  stroke: var(--electric);
  stroke-width: 2;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
}
.axis-ring .score-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 56px;
  font-weight: 700;
  fill: white;
  text-anchor: middle;
  dominant-baseline: central;
}
.axis-ring .score-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  fill: rgba(255,255,255,0.6);
  text-anchor: middle;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.axis-ring .rotating { animation: spin-slow 90s linear infinite; transform-origin: center; }

/* Section framing */
section { position: relative; }
.container-main { max-width: 1200px; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.container-narrow { max-width: 820px; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

.section-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Cards */
.card {
  background: white;
  border: 1px solid var(--grey-200);
  border-radius: 0.75rem;
  padding: 2rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover {
  border-color: var(--electric);
  transform: translateY(-2px);
}

.card-dark {
  background: var(--grey-800);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 2rem;
  color: rgba(255,255,255,0.85);
}
.card-dark h3, .card-dark h4 { color: white; }

/* 27 grid */
.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .section-grid { grid-template-columns: 1fr; }
}

.section-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: white;
  border: 1px solid var(--grey-200);
  border-radius: 0.5rem;
  transition: all 0.15s ease;
}
.section-item:hover {
  border-color: var(--electric);
  transform: translateX(2px);
}
.section-item .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--electric);
  font-weight: 600;
  min-width: 2rem;
}
.section-item .name {
  font-weight: 500;
  color: var(--black);
  font-size: 0.95rem;
}

/* Phase header */
.phase-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-600);
  margin: 2rem 0 1rem;
  font-weight: 500;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--grey-200);
}

/* Tables */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--grey-200);
  border-radius: 0.75rem;
  overflow: hidden;
}
.pricing-table th,
.pricing-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--grey-200);
  font-size: 0.93rem;
}
.pricing-table th {
  background: var(--grey-100);
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--black);
}
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-table td.center,
.pricing-table th.center { text-align: center; }
.pricing-table td.check { color: var(--electric); font-weight: 700; }
.pricing-table td.miss { color: var(--grey-400); }

/* Tier cards */
.tier-card {
  background: white;
  border: 1px solid var(--grey-200);
  border-radius: 0.75rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tier-card.featured {
  border: 2px solid var(--electric);
  background: linear-gradient(180deg, white 0%, rgba(0,87,255,0.02) 100%);
  position: relative;
}
.tier-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -0.75rem;
  left: 2rem;
  background: var(--electric);
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
}
.tier-card .tier-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--black);
}
.tier-card .tier-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1;
  margin: 1rem 0 0.5rem;
}
.tier-card .tier-price-note {
  font-size: 0.85rem;
  color: var(--grey-600);
  margin-bottom: 1.5rem;
}
.tier-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  flex-grow: 1;
}
.tier-card ul li {
  padding: 0.55rem 0;
  font-size: 0.93rem;
  color: var(--grey-800);
  position: relative;
  padding-left: 1.5rem;
  border-bottom: 1px solid var(--grey-200);
}
.tier-card ul li:last-child { border-bottom: none; }
.tier-card ul li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--electric);
  font-weight: 700;
}
.tier-card ul li.miss { color: var(--grey-400); }
.tier-card ul li.miss::before { content: '–'; color: var(--grey-400); }

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--grey-200);
}
.faq-item summary {
  padding: 1.5rem 0;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--black);
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--electric);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-body {
  padding: 0 0 1.5rem;
  color: var(--grey-800);
  line-height: 1.6;
}

/* Navigation */
nav.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grey-200);
}
nav.top-nav.dark-nav {
  background: rgba(10,10,10,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
nav .nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--black);
}
nav.dark-nav .nav-logo { color: white; }
nav .nav-links a {
  font-size: 0.92rem;
  color: var(--grey-800);
  font-weight: 500;
  transition: color 0.15s ease;
}
nav .nav-links a:hover { color: var(--electric); }
nav.dark-nav .nav-links a { color: rgba(255,255,255,0.75); }
nav.dark-nav .nav-links a:hover { color: white; }

/* Footer */
footer.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
}
footer.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 768px) {
  footer.site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
footer h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
  font-weight: 500;
}
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { padding: 0.35rem 0; }
footer a {
  color: rgba(255,255,255,0.7);
  font-size: 0.93rem;
  transition: color 0.15s ease;
}
footer a:hover { color: var(--electric); }
footer .footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
footer .footer-tagline {
  font-size: 0.93rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 24rem;
}
footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* Waveform (Axis) */
.waveform {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  height: 24px;
}
.waveform span {
  display: block;
  width: 3px;
  background: var(--electric);
  border-radius: 2px;
  animation: wave 1.4s ease-in-out infinite;
}
.waveform span:nth-child(1) { animation-delay: 0s; height: 60%; }
.waveform span:nth-child(2) { animation-delay: 0.1s; height: 100%; }
.waveform span:nth-child(3) { animation-delay: 0.2s; height: 40%; }
.waveform span:nth-child(4) { animation-delay: 0.3s; height: 80%; }
.waveform span:nth-child(5) { animation-delay: 0.4s; height: 50%; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* Assessment styles */
.assess-card {
  background: white;
  border: 1px solid var(--grey-200);
  border-radius: 1rem;
  padding: 3rem 2.5rem;
  max-width: 700px;
  margin: 0 auto;
}
.assess-progress {
  height: 4px;
  background: var(--grey-200);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.assess-progress-fill {
  height: 100%;
  background: var(--electric);
  transition: width 0.3s ease;
  width: 0;
}
.assess-phase {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--electric);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.assess-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  color: var(--grey-600);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.assess-question {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 1rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.assess-anchor {
  font-size: 0.9rem;
  color: var(--grey-600);
  background: var(--grey-100);
  padding: 0.85rem 1rem;
  border-radius: 0.4rem;
  margin-bottom: 2rem;
  line-height: 1.5;
  border-left: 3px solid var(--electric);
}
.assess-scale {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.assess-scale button {
  flex: 1 1 0;
  min-width: 48px;
  height: 52px;
  border: 2px solid var(--grey-200);
  background: white;
  border-radius: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--grey-800);
  cursor: pointer;
  transition: all 0.15s ease;
}
.assess-scale button:hover,
.assess-scale button.selected {
  border-color: var(--electric);
  background: var(--electric);
  color: white;
  transform: translateY(-2px);
}
.assess-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--grey-400);
  margin-top: -1.4rem;
  margin-bottom: 2rem;
}

.assess-result-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 5rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.assess-result-grade {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--electric);
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  border-radius: 0.3rem;
  font-weight: 600;
}

/* Spacing helpers */
.sec-pad { padding-top: 6rem; padding-bottom: 6rem; }
.sec-pad-sm { padding-top: 4rem; padding-bottom: 4rem; }

@media (max-width: 768px) {
  .sec-pad { padding-top: 4rem; padding-bottom: 4rem; }
  .sec-pad-sm { padding-top: 3rem; padding-bottom: 3rem; }
  .assess-card { padding: 2rem 1.25rem; }
  .assess-question { font-size: 1.25rem; }
  .assess-scale button { height: 44px; font-size: 0.9rem; }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Body spacing */
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.prose-body p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--grey-800);
}
.prose-body strong { color: var(--black); font-weight: 600; }
.prose-body a { color: var(--electric); text-decoration: underline; text-underline-offset: 3px; }

/* Legal pages */
.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-200);
}
.legal-content h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.legal-content h3 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}
.legal-content p, .legal-content li {
  font-size: 0.98rem;
  color: var(--grey-800);
  line-height: 1.7;
}
.legal-content ul { margin: 1rem 0 1.5rem 1.5rem; }
.legal-content ul li { padding: 0.25rem 0; list-style: disc; }
