html {
  font-size: clamp(14px, 1.2vw, 16px);
}

:root {
  --bg: #ffffff;
  --bg-dark: #0f172a;
  /* Slate 900 */
  --text: #0f172a;
  --text-muted: #64748b;
  /* Slate 500 */
  --accent-teal: #14b8a6;
  --accent-blue: #3b82f6;
  --accent-lavender: #8b5cf6;
  --charcoal: #334155;
  /* Slate 700 */
  --slate: #f8fafc;
  /* Slate 50 */
  --border: #e2e8f0;
  /* Slate 200 */
  --error: #ef4444;
  --font-main: 'Inter', -apple-system, system-ui, sans-serif;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

button,
.choice-item,
.scale-item {
  min-height: 48px;
}

.problem-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.roles-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
}

.page-section {
  display: none;
  width: 100%;
}

.page-section.active {
  display: block;
}

/* Layout Utilities */
.content-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

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

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

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

/* Hero Section */
.hero-section {
  padding: 8rem 0;
  background: radial-gradient(circle at top right, #f1f5f9 0%, #ffffff 100%);
  text-align: left;
}

.logo-img {
  width: 120px;
}

.hero-section .content-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: var(--max-width);
}

.hero-content h1 {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 1.5rem 0;
}

.typewriter-container {
  display: inline-block;
  position: relative;
}

.hero-content h1 span.typewriter {
  display: inline-block;
  color: var(--accent-blue);
  overflow: hidden;
  border-right: 3px solid var(--accent-blue);
  white-space: nowrap;
  margin: 0;
  width: auto;
  max-width: 100%;
  vertical-align: bottom;
  animation:
    typing 1.5s steps(18, end) forwards,
    blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0
  }

  to {
    width: 8.2em;
    /* Approximately matches "Scale intelligence." across font sizes */
  }
}

@keyframes blink-caret {

  from,
  to {
    border-color: transparent
  }

  50% {
    border-color: var(--accent-blue);
  }
}

/* Responsiveness */
@media (max-width: 1024px) {
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-subheading {
    font-size: 1.125rem;
    margin-bottom: 2rem;
  }

  .nav-links {
    display: none;
  }

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

  .step:not(:last-child)::after {
    display: none;
  }

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

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

  .section-header h2,
  .problem-section h2,
  .how-it-works h2,
  .use-cases h2,
  .cta-bottom h2 {
    font-size: 1.75rem;
  }

  .form-wrapper {
    padding: 6rem 1.5rem;
  }

  .question-text {
    font-size: 1.5rem;
  }

  .nav-footer {
    padding: 1rem 1.5rem;
  }

  .hero-content h1 span.typewriter {
    border-right-width: 2px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.85rem;
  }

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

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .hero-actions button {
    width: 100%;
  }

  .modal-content {
    padding: 2rem;
  }

  .content-container {
    padding: 0 1rem;
  }
}

.hero-subheading {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 3rem;
  max-width: 540px;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--slate);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-teal);
  letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
}

.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* Problem Section */
.problem-section {
  padding: 2rem 0;
  background: var(--slate);
}

.problem-section h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 4rem;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.problem-card {
  padding: 2.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: var(--transition);
}

.problem-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.problem-icon {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.problem-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.problem-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Features Section */
.features-section {
  padding: 8rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-header h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.feature-item {
  display: flex;
  gap: 1.5rem;
}

.feature-marker {
  width: 4px;
  height: 48px;
  background: var(--accent-teal);
  border-radius: 2px;
  flex-shrink: 0;
}

.feature-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-content p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* How It Works */
.how-it-works {
  padding: 8rem 0;
  background: var(--bg-dark);
  color: #fff;
}

.how-it-works h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  position: relative;
}

.step {
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 2rem;
  right: -1.5rem;
  width: 1rem;
  height: 1rem;
  border-top: 2px solid var(--accent-blue);
  border-right: 2px solid var(--accent-blue);
  transform: rotate(45deg);
  opacity: 0.2;
}

.step-number {
  font-size: 3rem;
  font-weight: 800;
  opacity: 0.1;
  margin-bottom: 1rem;
}

.step h4 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent-blue);
}

.step p {
  opacity: 0.7;
  line-height: 1.6;
}

/* Use Cases */
.use-cases {
  padding: 8rem 0;
}

.use-cases h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 5rem;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.role-card {
  padding: 3rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--slate);
}

.role-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.role-pain {
  font-weight: 600;
  margin-bottom: 1rem;
}

.role-solution {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.role-outcome {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-radius: 12px;
  font-weight: 700;
  color: var(--accent-teal);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Differentiation */
.differentiation {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}

.diff-header {
  margin-bottom: 4rem;
  text-align: center;
}

.diff-header p {
  margin-top: 1rem;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.diff-item {
  padding: 2.5rem;
  background: var(--slate);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.diff-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-lavender);
}

.diff-item h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--accent-lavender);
}

/* Buttons */
.btn-primary {
  background: var(--bg-dark);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--charcoal);
  transform: translateY(-2px);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.modal.active {
  opacity: 1;
}

.modal-content {
  background: #fff;
  padding: 4rem;
  border-radius: 24px;
  max-width: 500px;
  width: 90%;
  position: relative;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-content h2 {
  margin-bottom: 0.5rem;
}

.modal-content p {
  margin-bottom: 2rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.close-modal {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-muted);
}

.success-view-inline {
  text-align: center;
  padding: 1rem 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-teal);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-reassurance {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

/* Footer Improvements */
.main-footer {
  padding: 8rem 0 4rem;
  background: var(--slate);
  border-top: 1px solid var(--border);
}

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

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.link-column h4 {
  margin-bottom: 1.5rem;
}

.link-column a {
  display: block;
  text-decoration: none;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

/* CTA Bottom */
.cta-bottom {
  padding: 0 0 8rem 0;
  text-align: center;
  background: var(--bg);
}

.cta-bottom h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.cta-bottom p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.cta-muted {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Get Started Page Specific Styles (Restored & Refined) */

#get-started {
  background-color: var(--slate);
  min-height: 100vh;
}

.form-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 2rem;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.question-container {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

.question-container.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.question-number {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.question-text {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--bg-dark);
}

.input-field {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  padding: 1.5rem 0;
  font-size: 1.5rem;
  color: var(--text);
  transition: var(--transition);
  outline: none;
}

.input-field:focus {
  border-color: var(--accent-blue);
}

.choices-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.choices-grid.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.choice-item {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
}

.choice-item:hover {
  border-color: var(--accent-blue);
  background: var(--slate);
  transform: translateX(5px);
}

.choice-item.selected {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

.choice-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 1.5rem;
  color: var(--text-muted);
}

.choice-item.selected .choice-key {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.choice-item input {
  display: none;
}

.scale-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.scale-item {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.scale-item.selected {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.scale-item input {
  display: none;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
}

.scale-labels span:last-child {
  text-align: right;
}

.nav-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 100;
}

.progress-info {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.footer-controls {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

.keyboard-hint {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-left: 0.5rem;
}

.error-message {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 1rem;
  display: none;
}

.success-view {
  text-align: center;
  display: none;
}

.success-view h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.home-icon-link {
  position: fixed;
  top: 2rem;
  left: 2rem;
  color: var(--text-muted);
  transition: var(--transition);
  z-index: 1000;
  padding: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-icon-link:hover {
  color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 1024px) {

  .hero-section .content-container,
  .problem-grid,
  .steps-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 6vw, 4rem);
  }

  .logo-flex {
    gap: 2rem;
    flex-wrap: wrap;
  }

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

@media (max-width: 768px) {
  section {
    padding: 4rem 0 !important;
  }
}