/* =========================================
   Design Variables & Reset
   ========================================= */
:root {
  /* Morandi Palette */
  --color-primary: #6B8E7B;       /* Sage Green */
  --color-primary-dark: #4F6D5D;  /* Darker Green */
  --color-secondary: #D1C7B9;     /* Warm Sand */
  --color-accent: #B5C4C4;        /* Muted Blue-Grey */
  
  /* Neutrals */
  --color-bg: #F9F7F5;            /* Soft Cream */
  --color-surface: #FFFFFF;
  --color-text-main: #2D3436;     /* Deep Charcoal */
  --color-text-muted: #636E72;    /* Muted Grey */
  --color-border: #EAEAEA;

  /* Typography */
  --font-display: "Georgia", "Noto Serif SC", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;

  /* Spacing & Layout */
  --container-max: 1140px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --border-radius: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

/* =========================================
   Typography & Utilities
   ========================================= */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: normal;
  line-height: 1.3;
  color: var(--color-text-main);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  text-wrap: balance;
  margin-bottom: var(--space-sm);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  color: var(--color-text-main);
}

.text-muted {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.section-padding {
  padding: var(--space-lg) 0;
}

.bg-white {
  background-color: var(--color-surface);
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover, .btn-outline:focus {
  background-color: var(--color-primary);
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================
   Header & Footer
   ========================================= */
.site-header {
  padding: var(--space-sm) 0;
  background-color: rgba(249, 247, 245, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand img {
  height: 36px;
  width: auto;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-text-main);
  font-weight: bold;
}

.nav-menu {
  display: flex;
  gap: var(--space-md);
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link[aria-current="page"]::after {
  width: 100%;
}

.site-footer {
  background-color: var(--color-text-main);
  color: #fff;
  padding: var(--space-lg) 0 var(--space-md);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.footer-col h4 {
  color: #fff;
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* =========================================
   Components: Cards & Tables
   ========================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.feature-card {
  background: var(--color-surface);
  padding: var(--space-md);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Table Styles */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
}

.data-table th, .data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background-color: #f4f2ef;
  font-weight: 600;
  color: var(--color-text-main);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* FAQ Details */
details.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

details.faq-item summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--color-primary);
  transition: transform var(--transition-fast);
}

details.faq-item[open] summary::after {
  content: '-';
}

details.faq-item p {
  padding: 0 1rem 1rem;
  margin: 0;
  color: var(--color-text-muted);
}

/* News Cards */
.news-card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-content {
  padding: var(--space-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

/* =========================================
   SVG Animations (Keyframes)
   ========================================= */
/* Hero Light Sweep */
@keyframes lightSweep {
  0% { transform: translateX(-150%) skewX(-15deg); }
  100% { transform: translateX(250%) skewX(-15deg); }
}

.hero-sweep-anim {
  animation: lightSweep 6s infinite linear;
  opacity: 0;
}

/* Line Draw / Grow */
@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

svg.animate-draw path, svg.animate-draw polyline, svg.animate-draw line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 3s ease-in-out infinite alternate;
}

/* Pulse/Float for Icons */
@keyframes softFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.icon-float {
  animation: softFloat 4s ease-in-out infinite;
}

/* Checkmark Animation */
@keyframes checkPop {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

.check-pop {
  animation: checkPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Reduced Motion Media Query */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-sweep-anim {
    display: none;
  }
  svg.animate-draw path {
    stroke-dashoffset: 0;
  }
}

/* =========================================
   Specific Sections
   ========================================= */
/* Hero Section */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: var(--space-xl) 0;
}

.hero-content {
  flex: 1;
  z-index: 2;
  max-width: 550px;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-svg-container {
  width: 100%;
  max-width: 500px;
  height: auto;
}

/* Interface Mockup */
.interface-mockup {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  margin-top: var(--space-md);
}

.mock-header {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
}

.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: #eee; }
.mock-line { height: 8px; background: #f0f0f0; border-radius: 4px; margin-bottom: 8px; }

/* Scenario Steps */
.scenario-step {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}
.scenario-step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* Read More Link */
.link-arrow {
  display: inline-flex;
  align-items: center;
  color: var(--color-primary);
  font-weight: 600;
  gap: 0.5rem;
}
.link-arrow:hover {
  text-decoration: underline;
}
.link-arrow svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
