/* 
  ClaimVox Premium Design System 
  Inspiration: McKinsey, High-End Editorial
*/

:root {
  /* Palette */
  --navy-dark: #051123;
  /* Deepest Navy (Background) */
  --navy-light: #0A2342;
  /* Lighter Navy (Cards/Sections) */
  --white: #FFFFFF;
  /* Text & Accents */
  --off-white: #E6E9ED;
  /* Secondary Text */
  --electric: #2E5BFF;
  /* Primary Action/Link Color */
  --electric-dim: rgba(46, 91, 255, 0.15);
  --gold: #D4AF37;
  /* Subtle Premium Accent (optional) */
  --border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing & Layout */
  --container-width: 1200px;
  --radius: 4px;
  /* Sharper, more professional corners */
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--navy-dark);
  color: var(--off-white);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  color: var(--white);
  font-weight: 400;
  /* Elegant, not heavy */
  line-height: 1.2;
}

a {
  color: var(--electric);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
  display: block;
}

/* Utilities */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

.text-serif {
  font-family: var(--font-serif);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background-color: #1a45e6;
}

.btn-ghost {
  background-color: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn-ghost:hover {
  background-color: var(--white);
  color: var(--navy-dark);
}

/* Header */
header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(5, 17, 35, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 32px;
  /* Understated, premium sizing */
  width: auto;
}

nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

nav a {
  color: var(--off-white);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

nav a:hover {
  color: var(--white);
}

.nav-cta {
  padding: 8px 20px;
  background: var(--white);
  color: var(--navy-dark) !important;
  font-weight: 600;
}

.nav-cta:hover {
  background: #f0f0f0;
}

/* Mobile Nav */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--white);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 860px) {
  .hdr {
    flex-direction: row;
    /* Keep logo and burger inline */
    justify-content: space-between;
    align-items: center;
  }

  .hamburger {
    display: block;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(5, 17, 35, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    z-index: 150;
  }

  nav.active {
    right: 0;
  }

  nav a {
    font-size: 1.5rem;
    margin: 15px 0;
  }
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  position: relative;
}

.hero-content {
  max-width: 900px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.4;
}

.hero p {
  font-size: 1.25rem;
  color: #a0aab5;
  max-width: 700px;
  margin-bottom: 40px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 40px;
  font-size: 0.9rem;
  color: #8895a7;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Section Standard */
.section {
  padding: 100px 0;
}

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

.section-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #a0aab5;
  max-width: 700px;
}

/* Cards / Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  /* Thin gap for "grid lines" look */
  background: var(--border);
  /* Creates the lines */
  border: 1px solid var(--border);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
}

.card {
  background: var(--navy-dark);
  padding: 40px;
  transition: background 0.3s ease;
}

.card:hover {
  background: var(--navy-light);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--white);
}

.card p {
  font-size: 1rem;
  color: #a0aab5;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--electric);
  margin-bottom: 12px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .card {
    border-bottom: 1px solid var(--border);
  }
}

/* Feature Strip (The "Story" section) */
.feature-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature-content {
  padding: 80px;
}

.feature-image {
  height: 100%;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  border-left: 1px solid var(--border);
}

@media (max-width: 900px) {
  .feature-strip {
    grid-template-columns: 1fr;
  }

  .feature-image {
    border-left: none;
    border-top: 1px solid var(--border);
    min-height: 300px;
  }

  .feature-content {
    padding: 40px 20px;
  }
}

/* Footer */
footer {
  background: var(--navy-dark);
  border-top: 1px solid var(--border);
  padding: 60px 0;
  font-size: 0.9rem;
  color: #6b7c93;
}

footer a {
  color: #8895a7;
}

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

/* =========================================
   Phase 3 Enhancements
   ========================================= */

/* Demo / Hero Redesign */
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 100%;
  text-align: left;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.hero-actions {
  justify-content: flex-start;
}

/* Demo Interface Card */
.demo-card {
  background: rgba(10, 35, 66, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  /* Padding handled by children */
  box-shadow: var(--shadow);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.demo-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

.demo-header h3 {
  font-size: 1.2rem;
  margin: 0;
  color: var(--white);
}

/* Demo Content Area */
.demo-content {
  flex-grow: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* View: Chat (Default) */
#demo-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
}

.chat-window {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
}

.message {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

.msg-agent {
  background: rgba(255, 255, 255, 0.1);
  color: var(--off-white);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.msg-user {
  background: var(--electric);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Control Bar Wrapper */
.demo-controls-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Row 1: Chat Input */
.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  color: var(--white);
  font-family: var(--font-sans);
}

.btn-chat-send {
  background: var(--electric);
  color: var(--white);
  border: none;
  border-radius: 4px;
  width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Row 2: Actions (Voice & Text) */
.demo-actions-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Voice Button with Mini Waveform */
.btn-voice-start {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  color: var(--white);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-voice-start:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--electric);
}

.mini-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.mini-waveform span {
  width: 3px;
  background: var(--electric);
  border-radius: 2px;
  height: 100%;
  animation: miniWave 1s infinite ease-in-out;
}

.mini-waveform span:nth-child(1) {
  animation-delay: 0s;
}

.mini-waveform span:nth-child(2) {
  animation-delay: 0.1s;
}

.mini-waveform span:nth-child(3) {
  animation-delay: 0.2s;
}

.mini-waveform span:nth-child(4) {
  animation-delay: 0.3s;
}

@keyframes miniWave {

  0%,
  100% {
    height: 40%;
    opacity: 0.6;
  }

  50% {
    height: 100%;
    opacity: 1;
  }
}

/* Text Me Container */
.text-me-container {
  flex-grow: 1;
}

.text-input-wrapper {
  display: flex;
  gap: 6px;
}

.text-input-wrapper input {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px;
  color: var(--white);
  font-size: 0.9rem;
}

.text-input-wrapper button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--off-white);
  border-radius: 4px;
  padding: 0 12px;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.text-input-wrapper button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

/* View: Voice (Overlay) */
#demo-voice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 17, 35, 0.95);
  backdrop-filter: blur(5px);
  display: none;
  /* Hidden by default */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.visualizer-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 60px;
  margin-bottom: 30px;
}

.bar {
  width: 6px;
  background: var(--electric);
  border-radius: 4px;
  animation: soundWave 1s ease-in-out infinite;
}

.bar:nth-child(1) {
  height: 20px;
  animation-delay: 0.0s;
}

.bar:nth-child(2) {
  height: 40px;
  animation-delay: 0.1s;
}

.bar:nth-child(3) {
  height: 50px;
  animation-delay: 0.2s;
}

.bar:nth-child(4) {
  height: 30px;
  animation-delay: 0.3s;
}

.bar:nth-child(5) {
  height: 40px;
  animation-delay: 0.4s;
}

.bar:nth-child(6) {
  height: 20px;
  animation-delay: 0.5s;
}

@keyframes soundWave {

  0%,
  100% {
    height: 10px;
    opacity: 0.5;
  }

  50% {
    height: 50px;
    opacity: 1;
  }
}

.transcript-container {
  width: 80%;
  height: 100px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  text-align: center;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.transcript-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.transcript-line {
  font-size: 1.1rem;
  color: var(--off-white);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.5s forwards;
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* View: Text (Overlay) */
#demo-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 17, 35, 0.95);
  backdrop-filter: blur(5px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 10;
}

.text-me-group {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
}

.text-me-input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
}

.btn-text-submit {
  background: var(--electric);
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 0 20px;
  font-weight: 600;
  cursor: pointer;
}

.text-success-msg {
  color: #4CAF50;
  font-size: 0.9rem;
  margin-top: 15px;
  display: none;
  align-items: center;
  gap: 6px;
}

/* Section: Run Leaner (Stats) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.stat-item {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--electric);
  line-height: 1;
  margin-bottom: 16px;
  display: block;
}

.stat-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-desc {
  font-size: 0.95rem;
  color: #a0aab5;
  line-height: 1.6;
}

/* Section: Integrations (Marquee) */
.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-top: 40px;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: scroll 30s linear infinite;
}

.marquee-item {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.marquee-item:hover {
  opacity: 1;
}

.marquee-item img {
  height: 40px;
  width: auto;
  /* filter: brightness(0) invert(1);  Removed to show original logo colors/styles */
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.marquee-item img:hover {
  opacity: 1;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Footer: Join Conversation */
.footer-signup {
  max-width: 600px;
  margin: 0 auto 60px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 12px;
}

.signup-form {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.signup-input {
  flex-grow: 1;
  padding: 16px 20px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.signup-input:focus {
  outline: none;
  border-color: var(--electric);
}

.btn-signup {
  background: var(--electric);
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 0 32px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-signup:hover {
  background: #1a45e6;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .signup-form {
    flex-direction: column;
  }

  .btn-signup {
    width: 100%;
    padding: 16px;
  }
}