/* ============================================================
   C1R Investor Portal - Clean, Light, Data-Focused
   Inspiration: 70% Wikipedia, 20% Stripe, 10% Anthropic
   ============================================================ */

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

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --blue-muted: #93c5fd;
  --text: #1a1a2e;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --bg: #ffffff;
  --bg-subtle: #f9fafb;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --green: #059669;
  --green-light: #ecfdf5;
  --red: #dc2626;
  --red-light: #fef2f2;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-w: 800px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* --- Layout --- */

.page-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border-light);
}

.section:last-of-type {
  border-bottom: none;
}

/* --- Nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--blue);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

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

.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
}

/* --- Mobile Nav (hamburger) --- */

.nav-toggle {
  display: none;
}

.nav-hamburger {
  display: none;
  width: 28px;
  height: 28px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: none;
  background: none;
  z-index: 60;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.25s ease;
}

/* Animate hamburger to X when open */
.nav-toggle:checked ~ .nav-inner .nav-hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(2.5px, 2.5px);
}
.nav-toggle:checked ~ .nav-inner .nav-hamburger span:nth-child(2) {
  opacity: 0;
}
.nav-toggle:checked ~ .nav-inner .nav-hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* Mobile nav panel */
.nav-toggle:checked ~ .nav-inner .nav-right {
  display: flex;
}

/* --- Typography --- */

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

.text-muted {
  color: var(--text-muted);
}

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

/* --- Hero --- */

.hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border-light);
}

.hero h1 {
  margin-bottom: 20px;
}

.hero .subtitle {
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  padding: 12px 24px;
  background: var(--blue);
  color: white;
}
.btn-primary:hover {
  background: var(--blue-dark);
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  padding: 12px 24px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #d1d5db;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* --- Metric Cards --- */

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-card {
  padding: 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.metric-detail {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Content Cards --- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.card > *:last-child {
  margin-top: auto;
}

.section > .card {
  margin-top: 16px;
}

.card-grid {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid > .card {
  height: 100%;
}

.card-icon {
  width: 36px;
  height: 36px;
  background: var(--blue-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 14px;
}

/* --- Stat highlight --- */

.stat-highlight {
  text-align: center;
  padding: 40px;
  background: var(--blue-light);
  border: 1px solid #dbeafe;
  border-radius: var(--radius);
  margin: 32px 0;
}

.stat-highlight .big-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-highlight p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.stat-highlight .comparison {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 14px;
  background: var(--red-light);
  border: 1px solid #fecaca;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--red);
}

/* --- Testimonials --- */

.testimonial {
  padding: 24px;
  border-left: 3px solid var(--blue);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.testimonial + .testimonial {
  margin-top: 12px;
}

.testimonial blockquote {
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 12px;
}

.testimonial-author {
  font-size: 0.85rem;
  font-weight: 700;
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.testimonial-result {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 100px;
}

/* --- Data Table --- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table .num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table .accent {
  color: var(--blue);
  font-weight: 700;
}

/* --- Progress Bars --- */

.progress-track {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 4px;
  transition: width 1s ease;
}

/* --- Revenue Mix --- */

.mix-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.mix-year {
  width: 56px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.mix-bar-track {
  flex: 1;
  height: 28px;
  background: var(--bg-subtle);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
}

.mix-bar-service {
  height: 100%;
  background: #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: width 1s ease;
}

.mix-bar-product {
  height: 100%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  transition: width 1s ease;
}

.mix-mrr {
  width: 80px;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

/* --- Term Sheet Layout --- */

.terms-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.terms-row:last-child {
  border-bottom: none;
}

.terms-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.terms-value {
  font-size: 0.9rem;
  font-weight: 700;
}

.terms-value.accent {
  color: var(--blue);
}

/* --- Fund Allocation --- */

.fund-item {
  margin-bottom: 18px;
}

.fund-item:last-child {
  margin-bottom: 0;
}

.fund-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.fund-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.fund-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
}

/* --- ROI Cards --- */

.roi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.roi-card {
  text-align: center;
  padding: 28px 20px;
}

.roi-scenario {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.roi-multiple {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1.1;
}

.roi-valuation {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.roi-timeline {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* --- FAQ / Accordion --- */

.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 18px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.faq-a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Interest Form --- */

.interest-form {
  max-width: 440px;
  margin: 32px 0;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

/* --- Footer --- */

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

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

.footer .confidential {
  margin-top: 6px;
  font-size: 0.7rem;
  opacity: 0.6;
}

/* --- Access Badge (shown on token pages) --- */

.access-bar {
  background: var(--blue-light);
  border-bottom: 1px solid #dbeafe;
  padding: 8px 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--blue);
  font-weight: 500;
}

.access-bar strong {
  font-weight: 700;
}

/* --- Fade In --- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Moat items --- */

.moat-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.moat-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.moat-num {
  width: 28px;
  height: 28px;
  background: var(--blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.moat-text h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.moat-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Milestone Timeline --- */

.milestones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.milestone {
  padding: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.milestone .time {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 10px;
}

.milestone li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  list-style: none;
  padding-left: 16px;
  position: relative;
}

.milestone li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
}

/* --- Print styles --- */

@media print {
  .nav, .access-bar, .hero-ctas, .footer { display: none; }
  body { font-size: 12px; }
  .section { padding: 24px 0; }
}

/* --- Responsive --- */

/* Tablet + small laptop */
@media (max-width: 768px) {
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.3rem; }
  .section { padding: 48px 0; }
  .hero { padding: 48px 0 40px; }
  .page-wrapper { padding: 0 20px; }
  .footer { padding: 24px 0; }

  /* Nav: hamburger on mobile */
  .nav-hamburger { display: flex; }
  .nav-inner { padding: 12px 20px; flex-wrap: wrap; }
  .nav-right {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border-light);
  }
  .nav-link {
    font-size: 0.9rem;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
  }
  .nav-link:last-child { border-bottom: none; }
  .nav-badge {
    margin-top: 10px;
    align-self: flex-start;
    font-size: 0.7rem;
  }

  /* Grids collapse */
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .card-grid-2, .card-grid-3, .roi-grid, .milestones {
    grid-template-columns: 1fr;
  }

  /* Buttons stack */
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; justify-content: center; }

  /* Tables scroll horizontally */
  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Mix-row: keep inline, just tighten */
  .mix-row { gap: 8px; }
  .mix-year { width: 48px; font-size: 0.75rem; }
  .mix-bar-track { min-width: 0; }
  .mix-mrr { width: 60px; font-size: 0.75rem; }
}

/* Large phone / small tablet */
@media (max-width: 640px) {
  /* Terms rows: stack label above value */
  .terms-row {
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
  }
}

/* Phone */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.15rem; }
  .subtitle { font-size: 1rem; }
  .page-wrapper { padding: 0 16px; }

  /* Spacing: tighten everything */
  .section { padding: 32px 0; }
  .hero { padding: 32px 0 24px; }
  .card { padding: 20px; }
  .stat-highlight { padding: 24px 16px; }
  .testimonial { padding: 16px; }

  /* Typography: scale down big elements */
  .stat-highlight .big-number { font-size: 2.5rem; }

  /* Metrics: single column */
  .metrics-row { grid-template-columns: 1fr; }
  .metric-card { padding: 14px; }
  .metric-value { font-size: 1.4rem; }

  /* Moat items: tighter */
  .moat-item { gap: 10px; padding: 12px; }
  .moat-num { width: 24px; height: 24px; font-size: 0.65rem; }
  .moat-text h4 { font-size: 0.8rem; }

  /* FAQ: tighter */
  .faq-item { padding: 14px 0; }

  /* Buttons: slightly smaller */
  .btn { font-size: 0.85rem; }
  .btn-primary, .btn-secondary { padding: 10px 20px; }

  /* ROI cards */
  .roi-multiple { font-size: 1.75rem; }

  /* Nav: tighter on small phone */
  .nav-inner { padding: 10px 16px; }
  .nav-logo { font-size: 1rem; }

  /* Access bar */
  .access-bar { font-size: 0.65rem; padding: 6px 16px; }
}
