/* Modern CSS - No legacy browser support needed */
/* Using CSS Grid, Flexbox, Custom Properties, and modern features */

/* ============================================
   Static Design Tokens
   ============================================
   These are static values that don't change per theme.
   Theme-dependent variables (colors, fonts, container width)
   are defined in base.html via HubL.

   Site-specific overrides go in theme-overrides.css
   ============================================ */
:root {
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow: 0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 15px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Spacing Scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-bounce: 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;

  /* Static Colors (non-theme) */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-transparent: transparent;

  /* Grays (for backgrounds, borders, text) */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;

  /* Semantic Static Colors */
  --color-bg: var(--color-white);
  --color-bg-secondary: var(--color-gray-50);
  --color-bg-tertiary: var(--color-gray-100);
  /* Translucent neutral hover tint — composites correctly in both light and dark
     mode (header M4; several modules reference it via fallbacks). */
  --color-bg-hover: rgba(127, 131, 139, 0.12);
  --color-text: var(--color-gray-900);
  --color-text-secondary: var(--color-gray-600);
  --color-text-muted: var(--color-gray-400);
  --color-border: var(--color-gray-200);
  --color-border-light: var(--color-gray-100);

  /* Static Utility Colors */
  --color-warning: #ffc107;
  --color-info: #17a2b8;
  --color-light: #f8f9fa;
  --color-dark: #343a40;

  /* Font Stacks (fallbacks for theme fonts) */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

/* ============================================
   Dark Mode
   ============================================
   Auto dark-mode (prefers-color-scheme) lives in css/dark.css, which
   layouts load only when the "Enable Dark Mode CSS" theme setting is on.
   Keeping it out of this always-on file lets the setting actually disable
   dark mode. See dark.css.
   ============================================ */

/* ============================================
   Layout - Using CSS Grid and Flexbox
   ============================================ */

/* (Theme-wide `html { overflow-x: clip }` guard lives in base.html's inline
   critical CSS — a root html selector here trips HubSpot's CSS-file validator
   because this file contains HubL includes.) */

/* Modern container with container queries support */
.container {
  container-type: inline-size;
  width: var(--container-width, min(90%, 1200px));
  margin-inline: auto;
  padding-inline: var(--spacing);
}

/* CSS Grid for layouts */
.grid {
  display: grid;
  gap: var(--spacing, 1rem);
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }

/* Flexbox utilities */
.flex { display: flex; gap: var(--spacing, 1rem); }
.flex-wrap { flex-wrap: wrap; }
.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; }
.flex-column { flex-direction: column; }

/* Modern sticky header - uses CSS vars so dark mode is automatic */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

/* Component styles (accordion.css, forms.css) are linked directly from
   the layout <head> — a mid-file @import here is invalid per spec and was
   silently dropped by browsers, so those styles never loaded. */

/* ============================================
   Typography - Using clamp() for responsive sizing
   ============================================ */

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1rem, 2vw, 1.25rem); }
h6 { font-size: clamp(0.875rem, 1.5vw, 1rem); }

p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
  margin-block-end: 1em;
}

/* Modern text utilities */
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Typography enhancements */
.lead {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

mark {
  background-color: #fff3cd;
  color: var(--color-gray-900);
  padding: 0.1em 0.2em;
  border-radius: 0.15rem;
}

code {
  background-color: var(--color-bg-secondary);
  color: #e83e8c;
  padding: 0.2em 0.4em;
  font-size: 0.875em;
  border-radius: 0.25rem;
  font-family: 'Courier New', Courier, monospace;
}

pre {
  background-color: var(--color-bg-secondary);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.4rem;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

blockquote {
  border-left: 4px solid var(--color-primary, #0066cc);
  padding: 1rem 1.5rem;
  background-color: var(--color-bg-secondary);
  border-radius: 0.25rem;
  margin: 1.5rem 0;
  font-size: 1.125rem;
}

blockquote footer {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.5rem;
}

blockquote cite {
  font-style: italic;
}

figure {
  margin: 2rem 0;
}

figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.5rem;
}

small {
  font-size: 0.875em;
}

/* ============================================
   Navigation styles removed - handled by header module
   ============================================
   Generic nav, .menu-toggle, and .mobile-menu styles removed
   to prevent conflicts with header.module CSS.

   All navigation styling is now in:
   src/modules/header.module/module.css
   ============================================ */

/* ============================================
   Modern Forms - HTML5 validation styling
   ============================================ */

form {
  display: grid;
  gap: 1rem;
}

/* Form styles moved to components/forms.css for better organization */
/* All input, textarea, select, checkbox, radio styles are now in forms.css */

/* ============================================
   Modern Cards with aspect-ratio
   ============================================ */

.card {
  background: var(--color-bg, white);
  border: 2px solid var(--color-border, #e0e0e0);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  container-type: inline-size;
  display: flex;
  flex-direction: column;
}

.card.selected {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

/* Only apply the hover lift on devices that actually hover, so tapped
   cards on touch screens don't stay stuck in the lifted state. */
@media (hover: hover) {
  .card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--color-primary);
  }
}

/* Card without hover effects (for interactive cards like pricing) */
.card.no-hover {
  transform: none;
}

.card.no-hover:hover {
  transform: none;
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

/* Featured/highlighted card */
.card.featured {
  border: 2px solid var(--color-primary);
  background: var(--color-bg, white);
  box-shadow: var(--shadow-md);
}

.card.featured:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-secondary);
}

/* Card sections */
.card-header {
  padding: var(--spacing) var(--spacing) 0;
  text-align: center;
}

.card-body {
  padding: var(--spacing);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-footer {
  padding: 0 var(--spacing) var(--spacing);
  text-align: center;
  margin-top: auto;
}

.card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-content {
  padding: var(--spacing);
}

/* Card divider */
.card-divider {
  margin: var(--spacing) 0;
  border: 0;
  border-top: 1px solid var(--color-border, #e0e0e0);
}

/* Card image wrapper - ensures proper border radius */
.card-image {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background-color: var(--color-bg-secondary, #f5f5f5);
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* Container queries for responsive cards */
@container (min-width: 400px) {
  .card.card--horizontal {
    display: grid;
    grid-template-columns: 150px 1fr;
    flex-direction: row;
  }

  .card.card--horizontal .card-image,
  .card.card--horizontal img {
    border-radius: var(--radius) 0 0 var(--radius);
    aspect-ratio: 1;
  }
}

/* ============================================
   Modern Buttons
   ============================================ */

/* Scoped to .btn only — styling every bare <button> would override
   HubSpot form submits and third-party embeds. */
.btn {
  appearance: none;
  border: none;
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

/* Ripple effect on click */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
}

.btn:active::after {
  transform: scale(2);
  opacity: 1;
  transition: transform 0.5s, opacity 0.5s;
}

/* Button variants */
.btn-primary {
  background: var(--color-primary, #0066cc);
  border: 2px solid var(--color-primary, #0066cc);
  color: white;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--color-primary, #0066cc) 85%, black);
  border-color: color-mix(in srgb, var(--color-primary, #0066cc) 85%, black);
}

.btn-secondary {
  background: var(--color-secondary, #6c757d);
  border: 2px solid var(--color-secondary, #6c757d);
  color: white;
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-secondary, #6c757d) 85%, black);
  border-color: color-mix(in srgb, var(--color-secondary, #6c757d) 85%, black);
}

.btn-success {
  background: var(--color-success, #28a745);
  border: 2px solid var(--color-success, #28a745);
  color: white;
}

.btn-success:hover {
  background: color-mix(in srgb, var(--color-success, #28a745) 85%, black);
  border-color: color-mix(in srgb, var(--color-success, #28a745) 85%, black);
}

.btn-warning {
  background: var(--color-warning, #ffc107);
  border: 2px solid var(--color-warning, #ffc107);
  color: #212529;
}

.btn-warning:hover {
  background: color-mix(in srgb, var(--color-warning, #ffc107) 85%, black);
  border-color: color-mix(in srgb, var(--color-warning, #ffc107) 85%, black);
}

.btn-danger {
  background: var(--color-danger, #dc3545);
  border: 2px solid var(--color-danger, #dc3545);
  color: white;
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--color-danger, #dc3545) 85%, black);
  border-color: color-mix(in srgb, var(--color-danger, #dc3545) 85%, black);
}

.btn-outline {
  background: transparent;
  border: 2px solid currentColor;
  color: var(--color-primary);
}

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

/* Button sizes */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* ============================================
   Modern Tables
   ============================================ */

table {
  width: 100%;
  border-collapse: collapse;
}

/* Responsive tables with horizontal scroll */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

thead {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 10;
}

th {
  text-align: start;
  padding: 1rem;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

/* Zebra striping with CSS */
tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

/* ============================================
   Modern Utilities
   ============================================ */

/* Spacing with logical properties */
.mt-auto { margin-block-start: auto; }
.mb-auto { margin-block-end: auto; }
.ms-auto { margin-inline-start: auto; }
.me-auto { margin-inline-end: auto; }

/* Modern hiding techniques */
.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Aspect ratios */
.aspect-square { aspect-ratio: 1; }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-portrait { aspect-ratio: 3 / 4; }

/* Modern scroll snap */
.scroll-snap-x {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.scroll-snap-item {
  scroll-snap-align: start;
}

/* Backdrop blur */
.blur { backdrop-filter: blur(10px); }

/* Modern gradients */
.gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

/* CSS Shapes */
.shape-circle { clip-path: circle(50%); }
.shape-triangle { clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }

/* Print styles */
@media print {
  .no-print { display: none !important; }

  @page {
    margin: 1cm;
    size: A4;
  }
}

/* ============================================
   Component stylesheets — server-side inlined
   ============================================
   HubSpot processes HubL in CSS files, so these includes are concatenated
   into this single stylesheet at compile time (one request, one async swap
   instead of three separate <link>s). Appended last to preserve the original
   cascade order (modern.css → accordion.css → forms.css from the old layout
   link order). Do NOT add prefers-color-scheme blocks here — those belong in
   dark.css so the dark-mode theme setting can gate them. */
{% include "./components/accordion.css" %}
{% include "./components/forms.css" %}