/* ═══════════════════════════════════════════════════════
   CloudTaser Beta — Editorial Design System
   Inspired by The Verge's bold grid + magazine aesthetic
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens ── */
:root {
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --black: #000000;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #0a0a0a;

  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #dbeafe;
  --coral: #ef4444;
  --coral-light: #fef2f2;
  --green: #059669;
  --green-light: #ecfdf5;
  --amber: #d97706;
  --amber-light: #fffbeb;

  --nav-height: 56px;
  --container-max: 1280px;
  --container-pad: 20px;
  --grid-gap: 1px;
  --card-pad: 24px;
  --border: 1px solid var(--gray-200);
  --border-dark: 1px solid var(--gray-300);

  --radius-sm: 0;
  --radius-md: 0;
  --shadow-card: none;
  --transition: 150ms ease;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

.label {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.label-blue { color: var(--blue); }
.label-coral { color: var(--coral); }
.label-green { color: var(--green); }
.label-amber { color: var(--amber); }

.deck {
  font-size: 1.125rem;
  color: var(--gray-600);
  line-height: 1.5;
  max-width: 640px;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  color: var(--white);
  border-bottom: 3px solid var(--blue);
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand .logo-mark {
  width: 28px;
  height: 28px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  opacity: 0.7;
  transition: opacity var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
}

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

.nav-cta {
  background: var(--blue);
  color: var(--white);
  padding: 8px 16px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background var(--transition);
}

.nav-cta:hover { background: var(--blue-dark); }

/* Mobile nav */
.nav-toggle {
  display: none;
  width: 28px;
  height: 28px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: transform var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--black);
    flex-direction: column;
    padding: 16px var(--container-pad);
    border-bottom: 3px solid var(--blue);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 1rem; }
}

/* ── Container ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ── Hero (Verge-style asymmetric grid) ── */
.hero {
  border-bottom: var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}

.hero-featured {
  border-right: var(--border);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--gray-950);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(37, 99, 235, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(239, 68, 68, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-featured > * { position: relative; }

.hero-featured .label { margin-bottom: 16px; }
.hero-featured h1 { margin-bottom: 16px; }

.hero-featured .deck {
  color: rgba(255,255,255,0.7);
  max-width: 520px;
}

.hero-featured .hero-meta {
  margin-top: 24px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

.hero-sidebar {
  display: flex;
  flex-direction: column;
}

.hero-sidebar-card {
  flex: 1;
  padding: var(--card-pad);
  border-bottom: var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background var(--transition);
}

.hero-sidebar-card:last-child { border-bottom: none; }
.hero-sidebar-card:hover { background: var(--gray-50); }

.hero-sidebar-card .label { margin-bottom: 8px; }
.hero-sidebar-card h3 { margin-bottom: 8px; }

.hero-sidebar-card p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-featured {
    border-right: none;
    border-bottom: var(--border);
    padding: 32px 20px;
    min-height: 360px;
  }
  .hero-sidebar-card { padding: 20px; }
}

/* ── Section ── */
.section {
  padding: 64px 0;
  border-bottom: var(--border);
}

.section-header {
  margin-bottom: 40px;
}

.section-header .label { margin-bottom: 12px; display: block; }
.section-header h2 { margin-bottom: 12px; }

.section-alt { background: var(--gray-50); }

/* ── Content Grid (Verge-style bordered cards) ── */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: var(--border);
  border-bottom: none;
}

.story-card {
  padding: var(--card-pad);
  border-bottom: var(--border);
  border-right: var(--border);
  transition: background var(--transition);
}

.story-card:hover { background: var(--gray-50); }
.story-card:nth-child(3n) { border-right: none; }

.story-card .label { margin-bottom: 12px; display: block; }
.story-card h3 { margin-bottom: 12px; }

.story-card p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.story-card-featured {
  grid-column: span 2;
  padding: 40px;
}

.story-card-featured h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

/* Highlight list inside cards */
.card-highlights {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-hl {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.card-hl-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 2px;
}

.card-hl-warn .card-hl-icon { color: var(--coral); }
.card-hl-ok .card-hl-icon { color: var(--green); }

@media (max-width: 960px) {
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .story-card:nth-child(3n) { border-right: var(--border); }
  .story-card:nth-child(2n) { border-right: none; }
  .story-card-featured { grid-column: span 2; }
}

@media (max-width: 600px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-card { border-right: none !important; }
  .story-card-featured { grid-column: span 1; padding: var(--card-pad); }
}

/* ── Feature Banner (full-width callout) ── */
.banner {
  padding: 48px 0;
  border-bottom: var(--border);
  background: var(--gray-950);
  color: var(--white);
}

.banner-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.banner .label { margin-bottom: 12px; display: block; }
.banner h2 { margin-bottom: 16px; }
.banner .deck { color: rgba(255,255,255,0.65); }

.banner-visual {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 24px;
  overflow-x: auto;
  white-space: pre;
}

.banner-visual .hl { color: var(--blue); }
.banner-visual .hl-green { color: #34d399; }
.banner-visual .hl-amber { color: #fbbf24; }
.banner-visual .hl-dim { color: rgba(255,255,255,0.25); }

@media (max-width: 768px) {
  .banner-inner { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Comparison Table ── */
.table-wrap {
  overflow-x: auto;
  border: var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 12px 16px;
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: var(--border);
  vertical-align: top;
}

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

.table-check { color: var(--green); font-weight: 700; }
.table-cross { color: var(--coral); }
.table-partial { color: var(--amber); }

/* ── Stat Row ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: var(--border);
  border-top: 3px solid var(--blue);
}

.stat-item {
  padding: var(--card-pad);
  border-right: var(--border);
  text-align: center;
}

.stat-item:last-child { border-right: none; }

.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

@media (max-width: 600px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(-n+2) { border-bottom: var(--border); }
}

/* ── Install Section ── */
.install-block {
  background: var(--gray-950);
  color: var(--white);
  padding: 48px;
  border: 3px solid var(--blue);
  margin: 40px 0;
}

.install-block h3 {
  margin-bottom: 16px;
}

.install-cmd {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 16px 20px;
  margin-top: 16px;
  color: #e2e8f0;
  overflow-x: auto;
  position: relative;
}

.install-cmd .prompt { color: var(--blue); user-select: none; }

/* ── Timeline ── */
.timeline {
  border-left: 3px solid var(--blue);
  margin-left: 20px;
  padding-left: 32px;
}

.timeline-item {
  padding-bottom: 32px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -39px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--blue);
  border: 3px solid var(--white);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-date {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: 4px;
}

.timeline-item h4 { margin-bottom: 4px; }

.timeline-item p {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ── Two-column layout ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Callout ── */
.callout {
  border-left: 4px solid var(--blue);
  padding: 20px 24px;
  background: var(--blue-light);
  margin: 24px 0;
}

.callout-coral {
  border-left-color: var(--coral);
  background: var(--coral-light);
}

.callout-green {
  border-left-color: var(--green);
  background: var(--green-light);
}

.callout h4 { margin-bottom: 4px; }

.callout p {
  font-size: 0.9375rem;
  color: var(--gray-600);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 24px;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover { background: var(--blue-dark); }

.btn-outline {
  border: 2px solid var(--gray-900);
  color: var(--gray-900);
}

.btn-outline:hover {
  background: var(--gray-900);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--gray-900);
}

.btn-white:hover { background: var(--gray-100); }

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Footer ── */
footer {
  background: var(--gray-950);
  color: var(--white);
  padding: 48px 0 32px;
  border-top: 3px solid var(--blue);
}

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

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 300px;
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.4);
}

.footer-links a {
  display: block;
  padding: 4px 0;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.35);
}

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

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

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ── Problem Toggle ── */
.problem-tabs {
  display: flex;
  border: var(--border);
  border-bottom: none;
  margin-bottom: 0;
}

.problem-tab {
  flex: 1;
  padding: 14px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  text-align: center;
  border-right: var(--border);
  background: var(--gray-50);
  transition: all var(--transition);
  cursor: pointer;
}

.problem-tab:last-child { border-right: none; }

.problem-tab.active {
  background: var(--white);
  color: var(--blue);
}

.problem-panel {
  border: var(--border);
  padding: 32px;
}

.problem-panel-hidden { display: none; }

/* ── Regulatory table ── */
.reg-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid;
}

.reg-active { color: var(--green); border-color: var(--green); }
.reg-pending { color: var(--amber); border-color: var(--amber); }
.reg-planned { color: var(--gray-400); border-color: var(--gray-300); }

/* ── Flow Steps ── */
.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: var(--border);
  border-bottom: none;
}

.flow-step {
  padding: var(--card-pad);
  border-right: var(--border);
  border-bottom: var(--border);
}

.flow-step:last-child { border-right: none; }

.flow-step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 12px;
}

.flow-step h4 { margin-bottom: 8px; }

.flow-step p {
  font-size: 0.875rem;
  color: var(--gray-500);
}

@media (max-width: 768px) {
  .flow-steps { grid-template-columns: repeat(2, 1fr); }
  .flow-step:nth-child(2) { border-right: none; }
}

@media (max-width: 480px) {
  .flow-steps { grid-template-columns: 1fr; }
  .flow-step { border-right: none !important; }
}

/* ── Contact Cards ── */
.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: var(--border);
}

.contact-card {
  padding: 40px;
  border-right: var(--border);
}

.contact-card:last-child { border-right: none; }
.contact-card .label { margin-bottom: 12px; display: block; }
.contact-card h3 { margin-bottom: 12px; }

.contact-card p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.contact-card .btn { margin-top: 20px; }

@media (max-width: 600px) {
  .contact-cards { grid-template-columns: 1fr; }
  .contact-card { border-right: none; border-bottom: var(--border); }
  .contact-card:last-child { border-bottom: none; }
}

/* ── News/Timeline items ── */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: var(--border);
  border-bottom: none;
}

.news-item {
  padding: var(--card-pad);
  border-bottom: var(--border);
  border-right: var(--border);
  transition: background var(--transition);
}

.news-item:nth-child(2n) { border-right: none; }
.news-item:hover { background: var(--gray-50); }

.news-date {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.news-item h4 { margin-bottom: 6px; }

.news-item p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-item { border-right: none !important; }
}

/* ── Metric badges ── */
.metrics-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}

.metric-badge .metric-val { color: #34d399; font-weight: 500; }

/* ── Print ── */
@media print {
  nav, footer, .nav-toggle { display: none; }
  body { color: #000; background: #fff; }
  .hero-featured { background: #f5f5f5; color: #000; }
  .banner { background: #f5f5f5; color: #000; }
}
