/* ==========================================================================
   Open Stack Forge — Enterprise Design System & Stylesheet
   Supports: Light/Dark Mode, Mobile Optimization, Interactive Components
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Light Theme Variables (Default) */
  --bg: #ffffff;
  --bg-gradient: radial-gradient(circle at 84% 7%, #d9f6f0 0%, transparent 28%), linear-gradient(135deg, #f5fbfb 0%, #ffffff 70%);
  --bg-soft: #f4fbfa;
  --bg-subtle: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f7f8;
  --surface-elevated: #ffffff;
  --line: #d9e2ec;
  --line-strong: #bcccdc;
  --border-subtle: #e2e8f0;

  --ink: #102a43;
  --ink-heading: #0b1f33;
  --muted: #536b83;
  --muted-light: #829ab1;

  --teal: #007c91;
  --teal-hover: #006475;
  --teal-active: #004d5a;
  --teal-light: #e6f7f5;
  --teal-glow: rgba(0, 124, 145, 0.15);

  --mint: #d7f2ee;
  --mint-text: #006070;

  --emerald: #0f8558;
  --emerald-bg: #e6f6ee;
  --amber: #b7791f;
  --amber-bg: #fefcbf;
  --rose: #c53030;
  --rose-bg: #fff5f5;

  --cta-bg: linear-gradient(125deg, #007c91 0%, #065466 100%);
  --hero-card-border: #cfe0e4;
  --shadow-sm: 0 2px 8px rgba(16, 42, 67, 0.05);
  --shadow-md: 0 10px 25px rgba(16, 42, 67, 0.08);
  --shadow-lg: 0 24px 50px rgba(16, 42, 67, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --nav-backdrop: rgba(255, 255, 255, 0.88);
}

[data-theme="dark"] {
  --bg: #0b1521;
  --bg-gradient: radial-gradient(circle at 84% 7%, #0d2d38 0%, transparent 35%), linear-gradient(135deg, #0b1521 0%, #0d1e2e 70%);
  --bg-soft: #0e1d2c;
  --bg-subtle: #122336;
  --surface: #132437;
  --surface-alt: #172c42;
  --surface-elevated: #1a324b;
  --line: #203a54;
  --line-strong: #2c4d70;
  --border-subtle: #1e364f;

  --ink: #e0e8f0;
  --ink-heading: #f4f8fc;
  --muted: #8ea5be;
  --muted-light: #627d98;

  --teal: #14b8a6;
  --teal-hover: #2dd4bf;
  --teal-active: #0d9488;
  --teal-light: rgba(20, 184, 166, 0.14);
  --teal-glow: rgba(20, 184, 166, 0.25);

  --mint: #0f3945;
  --mint-text: #4ee1cd;

  --emerald: #34d399;
  --emerald-bg: rgba(52, 211, 153, 0.15);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.15);
  --rose: #f87171;
  --rose-bg: rgba(248, 113, 113, 0.15);

  --cta-bg: linear-gradient(125deg, #0c2d3a 0%, #08404f 100%);
  --hero-card-border: #1f3b55;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 50px rgba(0, 0, 0, 0.55);

  --nav-backdrop: rgba(11, 21, 33, 0.88);
}

/* Base Resets & Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

img, svg {
  vertical-align: middle;
  max-width: 100%;
}

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

a:hover {
  color: var(--teal-hover);
}

p {
  margin: 0 0 1.25rem 0;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink-heading);
  font-weight: 800;
  margin: 0 0 1rem 0;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--teal);
  color: #ffffff !important;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px var(--teal-glow);
  white-space: nowrap;
}

.button:hover {
  background-color: var(--teal-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px var(--teal-glow);
}

.button:active {
  transform: translateY(0);
}

.button.alt {
  background-color: var(--surface);
  color: var(--ink) !important;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.button.alt:hover {
  background-color: var(--bg-soft);
  border-color: var(--teal);
  color: var(--teal) !important;
}

.button.secondary {
  background-color: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--line);
}

.button.secondary:hover {
  background-color: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal) !important;
}

.button.sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.button.lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.button.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Eyebrows, Badges, Labels */
.eyebrow {
  color: var(--teal);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-mint {
  background-color: var(--mint);
  color: var(--mint-text);
}

.badge-outline {
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge-pulse {
  position: relative;
}

.badge-pulse::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--nav-backdrop);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-wrap {
  height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
  color: var(--ink-heading);
  text-decoration: none;
}

.brand b {
  color: var(--teal);
}

.brand-logo-icon {
  display: grid;
  place-items: center;
}

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

.nav-links a {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Theme Toggle Button */
.theme-btn {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.theme-btn:hover {
  background-color: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal);
}

.theme-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

[data-theme="light"] .theme-btn .moon-icon {
  display: block;
}
[data-theme="light"] .theme-btn .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-btn .sun-icon {
  display: block;
}
[data-theme="dark"] .theme-btn .moon-icon {
  display: none;
}

/* Mobile Hamburger Button */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

.mobile-nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--nav-backdrop);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  z-index: 999;
  border-bottom: 1px solid var(--line);
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer a {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-heading);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: block;
}

.mobile-drawer a:hover {
  background: var(--teal-light);
  color: var(--teal);
}

.mobile-drawer-bottom {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Hero Section */
.hero {
  background: var(--bg-gradient);
  padding: clamp(60px, 9vw, 96px) 0 clamp(64px, 8vw, 92px);
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(36px, 5.2vw, 68px);
  letter-spacing: -0.06em;
  line-height: 1.04;
  margin: 16px 0 22px;
}

.hero h1 span {
  color: var(--teal);
  display: inline-block;
}

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 30px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-note span.bullet {
  color: var(--teal);
}

/* Dashboard Interactive Card (Hero) */
.dashboard {
  border: 1px solid var(--hero-card-border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 18px;
  text-transform: uppercase;
}

.pill {
  background: var(--mint);
  color: var(--mint-text);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 750;
  font-size: 0.75rem;
}

.dash-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--ink-heading);
}

.metric {
  border-top: 1px solid var(--line);
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.metric span {
  font-size: 0.88rem;
  color: var(--muted);
}

.metric strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-heading);
}

.ok {
  color: var(--teal) !important;
}

.dash-interactive-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border: 1px solid var(--line);
}

.dash-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 6px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.dash-tab-btn.active {
  background: var(--surface);
  color: var(--teal);
  box-shadow: var(--shadow-sm);
}

/* Trust / Key Stats Bar */
.trust-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trust-number {
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight: 850;
  color: var(--teal);
  letter-spacing: -0.05em;
  line-height: 1;
}

.trust-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

/* Sections */
.section {
  padding: clamp(60px, 8vw, 92px) 0;
  position: relative;
}

.section.soft {
  background-color: var(--bg-soft);
}

.section-head {
  margin-bottom: 44px;
}

.section-head.center {
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.05em;
  margin: 10px 0 16px;
}

.intro {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  margin: 0 0 24px;
  line-height: 1.6;
}

/* Interactive ROI Calculator Section */
.calc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow-md);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 4vw, 60px);
  align-items: start;
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.calc-field label {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--ink-heading);
  margin-bottom: 10px;
}

.calc-field label span.calc-val {
  color: var(--teal);
  font-size: 1.1rem;
}

.calc-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  outline: none;
  accent-color: var(--teal);
  cursor: pointer;
}

.calc-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-light);
  margin-top: 6px;
}

.calc-results {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calc-summary-stat {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.calc-summary-stat .eyebrow {
  margin-bottom: 6px;
}

.calc-big-saving {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 850;
  color: var(--teal);
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.calc-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.calc-stat-row span {
  color: var(--muted);
}

.calc-stat-row strong {
  color: var(--ink-heading);
  font-weight: 700;
}

.calc-recommendation {
  background: var(--surface);
  border-left: 3px solid var(--teal);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.calc-recommendation strong {
  color: var(--ink-heading);
  display: block;
  margin-bottom: 2px;
}

/* Service Solutions Grid */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--mint);
  color: var(--teal);
  font-weight: 850;
  font-size: 1.1rem;
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 750;
  background: var(--bg-soft);
  color: var(--muted);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
}

.card h3 {
  font-size: 1.25rem;
  letter-spacing: -0.035em;
  margin: 0 0 10px;
}

.card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  flex-grow: 1;
}

.card-stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.stack-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-light);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Comparison Matrix Section */
.table-container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-sm);
  margin-top: 24px;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 680px;
}

.matrix-table th,
.matrix-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.matrix-table th {
  background: var(--bg-soft);
  font-weight: 800;
  color: var(--ink-heading);
  letter-spacing: -0.02em;
}

.matrix-table th.col-osf,
.matrix-table td.col-osf {
  background: var(--teal-light);
  font-weight: 700;
  color: var(--teal);
  border-inline: 2px solid var(--teal);
}

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

.check-ok {
  color: var(--emerald);
  font-weight: 800;
  font-size: 1.1rem;
}

.check-bad {
  color: var(--rose);
  font-weight: 800;
  font-size: 1.1rem;
}

/* Split Layouts (Why, How, Support) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 68px);
  align-items: start;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 25px 0 0;
}

.checklist li {
  display: flex;
  gap: 14px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.checklist li b {
  color: var(--ink-heading);
}

.checklist i {
  font-style: normal;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--teal);
  font-weight: 850;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Steps (Methodology & How It Works) */
.steps {
  display: grid;
  gap: 14px;
}

.step {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  background: var(--surface);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.step:hover {
  border-color: var(--teal);
  transform: translateX(4px);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
}

.step strong {
  display: block;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--ink-heading);
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Managed Maintenance & SLA Cards */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 36px;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card.featured {
  border: 2px solid var(--teal);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

.plan-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.plan-card .eyebrow {
  margin-bottom: 6px;
}

.plan-price {
  font-size: 2.2rem;
  font-weight: 850;
  color: var(--ink-heading);
  margin: 12px 0 6px;
  letter-spacing: -0.05em;
}

.plan-price span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.plan-card p.plan-desc {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 22px;
  min-height: 44px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  flex-grow: 1;
}

.plan-features li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-features li::before {
  content: '✓';
  color: var(--teal);
  font-weight: 800;
}

/* Security & Compliance Architecture */
.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 32px;
}

.security-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}

.security-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.security-card h4 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.security-card p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

/* Case Studies / Proof */
.case-study-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 32px;
}

.case-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.case-metric {
  font-size: 1.9rem;
  font-weight: 850;
  color: var(--teal);
  letter-spacing: -0.04em;
  margin: 8px 0 2px;
}

.case-tagline {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.case-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.case-client {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--ink-heading);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* Interactive FAQ Accordion */
.faq-grid {
  max-width: 820px;
  margin-inline: auto;
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
  border-color: var(--teal);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 20px 24px;
  font-weight: 750;
  font-size: 1.05rem;
  color: var(--ink-heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px 22px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* CTA & Contact Form Section */
.cta {
  padding: clamp(64px, 8vw, 96px) 0;
  background: var(--cta-bg);
  color: #ffffff;
  position: relative;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
}

.cta h2 {
  color: #ffffff;
  margin: 0 0 16px;
  font-size: clamp(30px, 4.2vw, 48px);
}

.cta p {
  color: var(--mint);
  margin: 0 0 28px;
  font-size: 1.08rem;
  line-height: 1.6;
}

.cta-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.cta-highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.cta-highlights li::before {
  content: '✓';
  color: #74d9ca;
  font-weight: 800;
}

/* Contact Form */
.form-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3.5vw, 36px);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.form-header {
  margin-bottom: 20px;
}

.form-header h3 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.form-header p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-heading);
}

.form input,
.form select,
.form textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

.form textarea {
  resize: vertical;
  min-height: 90px;
}

.form .button {
  width: 100%;
  padding: 14px;
  font-size: 1.02rem;
  margin-top: 6px;
}

.fine {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin: 6px 0 0;
}

/* Form Status Messages */
.form-status {
  display: none;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 10px;
}

.form-status.success {
  display: block;
  background-color: var(--emerald-bg);
  border: 1px solid var(--emerald);
  color: var(--emerald);
}

.form-status.error {
  display: block;
  background-color: var(--rose-bg);
  border: 1px solid var(--rose);
  color: var(--rose);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer */
.site-footer {
  padding: 50px 0 30px;
  background-color: var(--bg);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(20px, 3.5vw, 40px);
  margin-bottom: 40px;
}

.footer-col h5 {
  font-size: 0.92rem;
  font-weight: 750;
  color: var(--ink-heading);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-col a:hover {
  color: var(--teal);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

/* Thank You Page */
.thank-you-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-gradient);
}

.thank-you-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.confirmation-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 54px);
  box-shadow: var(--shadow-lg);
  max-width: 740px;
  text-align: center;
}

.success-badge-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--emerald-bg);
  color: var(--emerald);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}

.next-steps-panel {
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 28px 0;
}

.next-steps-panel h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.next-steps-list {
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.next-steps-list li {
  font-size: 0.9rem;
  color: var(--muted);
}

.next-steps-list strong {
  color: var(--ink-heading);
  display: block;
}

.direct-booking-banner {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.direct-booking-banner h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.direct-booking-banner p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.thank-you-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Legal Pages (Privacy Policy & Terms of Service)
   ========================================================================== */

.legal-hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: clamp(36px, 5vw, 60px) 0 32px;
}

.legal-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.legal-breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-breadcrumbs a:hover {
  color: var(--teal);
}

.legal-breadcrumbs .separator {
  color: var(--line-strong);
}

.legal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.legal-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--ink-heading);
}

.legal-lead {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--muted);
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.legal-meta-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.legal-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.legal-meta-badge strong {
  color: var(--ink);
}

.legal-quick-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Key Commitments Banner */
.legal-commitments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.legal-commitment-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.legal-commitment-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.legal-commitment-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--teal-light);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.legal-commitment-card h4 {
  font-size: 0.95rem;
  margin: 0 0 4px;
  color: var(--ink-heading);
}

.legal-commitment-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

/* Legal Two-Column Layout */
.legal-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 44px;
  padding: 48px 0 80px;
  align-items: start;
}

/* Sidebar & Sticky TOC */
.legal-sidebar {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 6px;
}

.legal-sidebar::-webkit-scrollbar {
  width: 4px;
}
.legal-sidebar::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.legal-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-toc-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-light);
  margin: 0;
}

.legal-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-toc-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.legal-toc-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  min-width: 18px;
}

.legal-toc-link:hover {
  background: var(--bg-soft);
  color: var(--teal);
  transform: translateX(2px);
}

.legal-toc-link.active {
  background: var(--teal-light);
  color: var(--teal);
  font-weight: 700;
}

.legal-help-card {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.legal-help-card h4 {
  font-size: 0.95rem;
  margin: 0 0 6px;
  color: var(--ink-heading);
}

.legal-help-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 14px;
}

.legal-help-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.legal-help-item a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.legal-help-item a:hover {
  text-decoration: underline;
}

/* Legal Content Body */
.legal-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 52px);
  box-shadow: var(--shadow-sm);
}

.legal-intro-box {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 36px;
  font-size: 0.96rem;
  line-height: 1.7;
}

.legal-intro-box p:last-child {
  margin-bottom: 0;
}

.legal-section {
  scroll-margin-top: 100px;
  margin-bottom: 44px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-light);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.legal-section h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--ink-heading);
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section h3 {
  font-size: 1.12rem;
  margin: 24px 0 10px;
  color: var(--ink-heading);
  font-weight: 700;
}

.legal-section p {
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 16px;
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 20px;
  padding-left: 24px;
  color: var(--ink);
}

.legal-section li {
  margin-bottom: 10px;
  line-height: 1.65;
  font-size: 0.95rem;
}

.legal-section li strong {
  color: var(--ink-heading);
}

.legal-callout {
  background: var(--bg-soft);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin: 22px 0;
  font-size: 0.92rem;
  color: var(--ink);
}

.legal-callout p:last-child {
  margin-bottom: 0;
}

.legal-callout strong {
  color: var(--teal);
}

.legal-callout-warning {
  border-left-color: var(--amber);
  background: var(--amber-bg);
  color: #5c3800;
}

.legal-callout-warning strong {
  color: #7c4800;
}

[data-theme="dark"] .legal-callout-warning {
  color: #fed7aa;
}

[data-theme="dark"] .legal-callout-warning strong {
  color: var(--amber);
}

.legal-table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.legal-table th {
  background: var(--surface-alt);
  padding: 12px 18px;
  font-weight: 700;
  color: var(--ink-heading);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.legal-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--ink);
  vertical-align: top;
}

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

.legal-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.legal-contact-box {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.legal-contact-box h5 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 6px;
}

.legal-contact-box p {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink-heading);
}

.legal-contact-box a {
  color: var(--teal);
  text-decoration: none;
}

.legal-contact-box a:hover {
  text-decoration: underline;
}

.legal-disclaimer-card {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--surface-alt);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.legal-disclaimer-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* Print Styles for Legal Documents */
@media print {
  .site-header,
  .site-footer,
  .legal-sidebar,
  .legal-quick-actions,
  .theme-btn,
  .mobile-drawer,
  #mobile-nav-toggle,
  .badge-pulse {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #102a43 !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }

  .wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .legal-hero {
    background: transparent !important;
    border-bottom: 2px solid #007c91 !important;
    padding: 20px 0 !important;
  }

  .legal-hero h1 {
    font-size: 24pt !important;
    color: #0b1f33 !important;
  }

  .legal-layout {
    display: block !important;
    padding: 20px 0 !important;
  }

  .legal-content {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .legal-section {
    page-break-inside: avoid;
    border-bottom: 1px solid #bcccdc !important;
    margin-bottom: 24px !important;
    padding-bottom: 20px !important;
  }

  .legal-callout {
    background: #f4fbfa !important;
    border-left: 4px solid #007c91 !important;
  }

  .legal-meta-badge {
    border: 1px solid #bcccdc !important;
    background: transparent !important;
    color: #102a43 !important;
  }

  a {
    color: #007c91 !important;
    text-decoration: underline !important;
  }
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */

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

  .legal-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .cards,
  .plan-grid,
  .security-grid,
  .case-study-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .nav-links,
  .header-actions .button {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .hero-grid,
  .split,
  .cta-grid,
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .cards,
  .plan-grid,
  .security-grid,
  .case-study-grid {
    grid-template-columns: 1fr;
  }

  .dashboard {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .direct-booking-banner {
    flex-direction: column;
    text-align: center;
  }

  .direct-booking-banner .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: calc(100% - 28px);
  }

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

  .calc-card,
  .form-container,
  .dashboard {
    padding: 20px 16px;
  }

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

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

  .button {
    width: 100%;
  }

  .header-actions {
    gap: 8px;
  }
}
