/*
  RDM Datalab landing page styles
  Updates:
  - Dark canvas with light surfaces for contrast
  - Hero/layout refinements for stability and hierarchy
  - Dataset preview table responsiveness improved
*/

:root {
  /* Core palette */
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --muted: #f3f5f8;
  --text: #0b1220;
  --subtext: #425466;
  --canvas-text: #0b1220;
  --canvas-subtext: #425466;
  --accent: #193a5a;
  --accent-strong: #112a41;
  --accent-alt: #1f8b86;
  --border: #e1e6ee;
  --border-surface: #e1e6ee;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.12);

  /* Shape + rhythm */
  --radius: 18px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 72px;
  --max-width: 1120px;
}

/* Global reset and base typography */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-size: 17px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* Default link styling */
a {
  color: inherit;
  text-decoration: none;
}

/* Accessible focus styles for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(59, 79, 107, 0.6);
  outline-offset: 2px;
}

/* Width constraint for consistent layout */
.container {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

/* Sticky header with translucent backdrop */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

/* Navigation layout */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: 0.95rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
}

.brand img {
  width: 140px;
  height: auto;
  object-fit: contain;
}

.brand span {
  display: none;
}

@media (max-width: 720px) {
  .brand img {
    width: 120px;
  }
}

.nav-links {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--subtext);
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--text);
}

/* Hero layout */
.hero {
  padding: 80px 0;
}

.hero-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
}

.hero-copy {
  display: grid;
  gap: var(--space-3);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

/* Headings scale */
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.8rem, 4.8vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
}

h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--subtext);
}

.subheadline {
  font-size: 1.1rem;
  color: var(--subtext);
  max-width: 600px;
}

.accent {
  color: var(--accent-alt);
}

/* CTA styling */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.trust-row {
  font-size: 0.95rem;
  color: var(--subtext);
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.button.primary:hover,
.button.primary:focus {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.button.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.button.secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

.text-link:hover,
.text-link:focus {
  color: var(--accent-strong);
}

/* Placeholder card for future visuals */
.hero-preview {
  display: grid;
  place-items: center;
  max-width: none;
}

.hero-visual {
  width: 100%;
  max-width: 820px;
  height: auto;
  display: block;
  background: var(--bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* Section spacing */
.section {
  padding: 72px 0;
}

.section-muted {
  background: var(--muted);
}

.section-head {
  display: grid;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.section-head p {
  color: var(--subtext);
}

/* Card layout */
.card-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-3);
  border: 1px solid var(--border-surface);
  box-shadow: var(--shadow);
  min-height: 140px;
  color: var(--text);
}

/* Split layout for product details */
.section-split {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* List styling */
.list {
  margin: 0;
  padding-left: 20px;
  color: var(--subtext);
}

.callout {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-3);
  border: 1px solid var(--border-surface);
  color: var(--text);
}

/* Consulting layout */
.consulting-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.engagement {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-3);
  border: 1px solid var(--border-surface);
  color: var(--text);
}

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-weight: 600;
  color: var(--accent-strong);
}

/* Credibility layout */
.credibility-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tooling {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-3);
  border: 1px solid var(--border-surface);
  color: var(--text);
}

/* Contact layout */
.contact-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}

.contact-email a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.contact-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-3);
  border: 1px solid var(--border-surface);
  color: var(--text);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: var(--space-2);
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-surface);
  font: inherit;
  background: #fbfaf8;
}

.form-note {
  margin: 0;
  color: var(--subtext);
  font-size: 0.9rem;
}

.hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer styling */
.site-footer {
  padding: var(--space-3) 0 var(--space-4);
  border-top: 1px solid var(--border);
  background: var(--bg);
}


.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--subtext);
  font-size: 0.9rem;
}

.privacy a {
  color: var(--subtext);
}

.privacy a:hover,
.privacy a:focus {
  color: var(--text);
}

/* Product badges and tighter sections */
.section-tight {
  padding: 56px 0;
}

.section-tight .section-head {
  margin-bottom: var(--space-2);
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--accent-alt);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Small-screen adjustments */
@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  .hero {
    padding: 56px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .preview-row {
    grid-template-columns: 1.2fr 1fr 0.6fr 0.7fr;
    grid-auto-rows: auto;
  }

  .preview-row span:nth-child(n + 5) {
    display: none;
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
  }
}

@media (min-width: 1600px) {
  .hero-visual {
    max-width: 980px;
  }

  .hero-grid {
    grid-template-columns: 0.9fr 1.1fr;
  }
}
