/* ==========================================================================
   Divergent Website Styles
   ========================================================================== */

/* CSS Reset (Tailwind Preflight style) */
*,
::after,
::before,
::backdrop,
::file-selector-button {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

html {
  font-size: 18px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  line-height: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

b,
strong {
  font-weight: bolder;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
optgroup,
textarea,
::file-selector-button {
  font: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  letter-spacing: inherit;
  color: inherit;
  border-radius: 0;
  background-color: transparent;
  opacity: 1;
}

[hidden]:where(:not([hidden='until-found'])) {
  display: none !important;
}

ol,
ul,
menu {
  list-style: none;
}

/* ==========================================================================
   Font Faces
   ========================================================================== */

@font-face {
  font-family: 'Asap';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/assets/fonts/Asap-Regular.woff2) format('woff2');
}

@font-face {
  font-family: 'Asap';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url(/assets/fonts/Asap-Italic.woff2) format('woff2');
}

@font-face {
  font-family: 'Asap';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/assets/fonts/Asap-SemiBold.woff2) format('woff2');
}

@font-face {
  font-family: 'Asap';
  font-style: italic;
  font-weight: 600;
  font-display: block;
  src: url(/assets/fonts/Asap-SemiBoldItalic.woff2) format('woff2');
}

/* ==========================================================================
   Theme Variables
   ========================================================================== */

:root {
  /* Colors - Divergent brand colors */
  --dg-black: #2e3135;
  --dg-white: #efebe6;
  --light-bg: #f9f9f7;
  --dark-bg: #1c293d;
  --card-bg-light: #ffffff;
  --card-bg-dark: #243043;

  /* Computed colors */
  --primary: var(--dg-black);
  --primary-hover: #1a1c1e;
  --text-rgb: 46, 49, 53;
  --text: rgb(var(--text-rgb));
  --text-muted: rgba(var(--text-rgb), 0.8);
  --text-faded: rgba(var(--text-rgb), 0.7);
  --bg: var(--light-bg);
  --bg-card: var(--card-bg-light);
  --border: #e5e5e5;
  --accent: #e11d48;
  --accent-secondary: #f59e0b;

  /* Nav background for sticky nav */
  --nav-bg: rgba(249, 249, 247, 0.8);

  /* Typography */
  --font-family: 'Asap', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --nav-height: 5rem;

  /* Selection colors */
  --selection-bg: #fecdd3;
  --selection-text: #881337;

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 1s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  /* Hover opacity */
  --hover-opacity: 0.7;

  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

/* Dark Theme */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: var(--dg-white);
    --primary-hover: rgba(239, 235, 230, 0.9);
    --text-rgb: 239, 235, 230;
    --text: rgb(var(--text-rgb));
    --text-muted: rgba(var(--text-rgb), 0.8);
    --text-faded: rgba(var(--text-rgb), 0.7);
    --bg: var(--dark-bg);
    --bg-card: var(--card-bg-dark);
    --border: #2d3748;
    --accent: #f59e0b;
    --accent-secondary: #e11d48;
    --selection-bg: #881337;
    --selection-text: #fecdd3;
    --nav-bg: rgba(28, 41, 61, 0.8);
  }
}

/* ==========================================================================
   Base Elements
   ========================================================================== */

body {
  cursor: default;
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  color: var(--text);
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.23'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    var(--bg);
  background-size:
    200px 200px,
    auto;
  min-height: 100vh;
}

body.hidden {
  opacity: 0;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1 {
  font-size: 1.875rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: 2rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;
  margin-bottom: var(--space-xl);
}

h3 {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-sm);
  color: var(--text-muted);
}

.prose {
  max-width: 48rem;
}

.prose p {
  font-size: var(--font-size-md);
  line-height: 1.75;
}

.prose h2 {
  margin-top: var(--space-2xl);
}

.prose h3 {
  margin-top: var(--space-xl);
}

.prose ul,
.prose ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-left: var(--space-md);
  margin-bottom: var(--space-md);
  color: var(--text-muted);
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  line-height: 1.6;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

.prose a {
  font-weight: var(--font-weight-semibold);
  color: var(--primary);
  transition: opacity var(--transition-smooth);
}

.prose a:hover {
  opacity: var(--hover-opacity);
}

/* ==========================================================================
   Links & Buttons
   ========================================================================== */

.link {
  font-weight: var(--font-weight-semibold);
  color: var(--primary);
  transition: opacity var(--transition-smooth);
  will-change: opacity; /* Thank you Safari.. */
}

.link:hover {
  opacity: var(--hover-opacity);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  text-decoration: none;
  transition: opacity var(--transition-smooth);
}

.link-arrow:hover {
  opacity: var(--hover-opacity);
}

.link-arrow svg {
  transition: transform var(--transition-slow);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem var(--space-md);
  background: var(--primary);
  color: var(--bg);
  border: 1px solid var(--primary);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--transition-smooth),
    border-color var(--transition-smooth);
  will-change: background, border-color; /* Thank you Safari.. */
}

.button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.button-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.button-secondary:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
}

.button-sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-base);
  border-radius: var(--radius-full);
}

.button-primary {
  border: none;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--transition),
    background-color var(--transition);
}

.nav-sticky.scrolled {
  border-bottom-color: var(--border);
}

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

.logo-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  transition: opacity var(--transition-smooth);
  will-change: opacity; /* Thank you Safari.. */
}

.logo-link:hover {
  opacity: var(--hover-opacity);
}

.logo {
  width: auto;
  height: 1.5rem;
  fill: currentColor;
  margin-left: -4px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: 500;
}

.nav-links a {
  color: var(--text);
  transition: opacity var(--transition-smooth);
  will-change: opacity; /* Thank you Safari.. */
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-base);
  margin-top: 0.1rem;
}

/* Hamburger Button */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: var(--space-xs);
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition:
    transform var(--transition-slow),
    opacity var(--transition-smooth);
}

/* Hamburger to X animation
   The 7px translateY moves outer lines to center: 5px gap + 2px line height = 7px */
.nav-sticky.menu-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-sticky.menu-open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-sticky.menu-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-xl) var(--space-md);
  font-size: 1.5rem;
  font-weight: 500;
  overflow-y: auto;
}

.nav-mobile a {
  color: var(--text);
  transition: opacity var(--transition-smooth);
}

.nav-mobile a:hover {
  opacity: var(--hover-opacity);
}

.nav-sticky.menu-open .nav-mobile {
  display: flex;
}

/* When menu is open, use solid backgrounds (no transparency/blur) */
.nav-sticky.menu-open {
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: border-color var(--transition);
}

/* Language Switcher */
.lang-dropdown {
  position: relative;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-weight: var(--font-weight-semibold);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.2;
  transition: opacity var(--transition-smooth);
  will-change: opacity; /* Thank you Safari.. */
}

.lang-current:hover {
  opacity: var(--hover-opacity);
}

.lang-current svg {
  transition: transform var(--transition);
}

.lang-current[aria-expanded='true'] svg {
  transform: rotate(180deg);
}

.lang-options {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04);
  z-index: 100;
  min-width: 160px;
  overflow: hidden;
  margin-top: 0.75rem;
  padding: var(--space-xs) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast),
    visibility var(--transition-fast);
}

.lang-options.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  font-size: var(--font-size-md);
  line-height: 1.2;
  color: var(--text);
}

.lang-option:hover {
  background: var(--bg-card);
}

.lang-option.active {
  color: var(--accent);
  pointer-events: none;
}

[dir='rtl'] .lang-dropdown {
  justify-content: flex-start;
}

[dir='rtl'] .lang-options {
  right: auto;
  left: 0;
  text-align: right;
}

/* Mailto Notice Toast */
mailto-notice {
  display: block;
}

.mailto-toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(var(--space-lg));
  background: var(--bg-card);
  border: 1px solid var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 12px 24px -8px rgba(0, 0, 0, 0.15);
  padding: var(--space-lg) var(--space-xl);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  max-width: min(28rem, calc(100% - var(--space-lg) * 2));
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition),
    transform var(--transition),
    visibility var(--transition);
}

/* Gradient border effect */
.mailto-toast::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary), var(--accent));
  background-size: 300% 300%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: none;
}

.mailto-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mailto-toast.show::before {
  animation: gradient-shift 3s ease infinite;
}

.mailto-toast-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: var(--space-lg);
  height: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faded);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}

.mailto-toast-close:hover {
  color: var(--text);
  background: var(--bg);
}

.mailto-toast-message {
  max-width: 85%;
  font-size: var(--font-size-base);
  color: var(--text-muted);
  line-height: 1.6;
}

.mailto-toast-email {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  transition: opacity var(--transition-smooth);
}

.mailto-toast-email:hover {
  opacity: var(--hover-opacity);
}

.mailto-toast-email.copied {
  background: none;
  -webkit-text-fill-color: var(--text);
  color: var(--text);
}

/* ==========================================================================
   Layout
   ========================================================================== */

main {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-top: var(--space-lg);
  padding-bottom: 3rem;
}

/* Section - the core building block */
.section {
  padding: 0 var(--space-md);
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
}

/* Section header - optional label + heading + description */
.section > header {
  max-width: 48rem;
  margin-bottom: var(--space-xl);
}

.section-description {
  font-size: var(--font-size-md);
}

/* Label - small caps category label above headings */
.label {
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

/* CTAs - button group for hero and contact sections */
.ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  margin-top: var(--space-sm);
}

.ctas .button {
  width: 100%;
  justify-content: center;
}

.ctas .link-arrow {
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
}

.ctas-spaced {
  margin-top: var(--space-xl);
}

/* Card grid */
.card-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(1, 1fr);
}

.card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   Cards
   ========================================================================== */

simple-card,
feature-card,
pricing-card,
faq-item {
  display: block;
}

.card {
  position: relative;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast);
}

/* Shared gradient border effect for cards */
.card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  padding: 2px;
  background: linear-gradient(
    var(--gradient-angle, 135deg),
    var(--accent),
    var(--accent-secondary),
    var(--accent)
  );
  background-size: 300% 300%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.card:hover {
  border-color: transparent;
}

.card:hover::before,
.card.active::before {
  opacity: 1;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.card-title {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: 0.75rem;
}

.card-title-sm {
  font-size: var(--font-size-md);
}

.card-description {
  color: var(--text-faded);
  line-height: 1.6;
  margin: 0;
}

/* Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.feature-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.feature-image {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: var(--space-md);
}

.feature-image img,
.feature-image canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-card:hover .link-arrow {
  opacity: var(--hover-opacity);
}

.feature-card:hover .link-arrow svg {
  transform: translateX(4px);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
}

.feature-description {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

/* Pricing Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.pricing-grid > * {
  display: flex;
}

.pricing-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  transition: border-color var(--transition-fast);
}

/* Featured pricing card - animated gradient border */
.pricing-card-featured {
  border-color: transparent;
}

.pricing-card-featured::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary), var(--accent));
  background-size: 300% 300%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.pricing-header {
  margin-bottom: var(--space-lg);
}

.pricing-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.025em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  color: var(--text-muted);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: var(--space-sm);
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  color: var(--text);
}

.pricing-period {
  font-size: var(--font-size-base);
  color: var(--text-muted);
}

.pricing-description {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg) 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
}

.pricing-features li::before {
  content: '✓';
  flex-shrink: 0;
  font-weight: var(--font-weight-semibold);
}

/* ==========================================================================
   Page Sections
   ========================================================================== */

/* Hero - first section with larger typography */
.hero h1 {
  font-size: 2.5rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 56rem;
  margin-bottom: var(--space-md);
}

.hero-description {
  font-size: var(--font-size-md);
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 42rem;
  margin-bottom: var(--space-lg);
}

/* Hero image */
.hero-image {
  margin-top: var(--space-2xl);
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(to bottom, var(--bg-card), var(--border));
  border: 1px solid var(--border);
  height: 300px;
}

.hero-image img,
.hero-image canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 30%);
  opacity: 0.2;
  pointer-events: none;
}

/* Full-bleed alternate background wrapper */
.section-alt {
  padding: var(--space-2xl) 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.section-alt > .section {
  position: relative;
  z-index: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 3rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 16rem;
}

/* FAQ Section */
.faq-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-2xl);
  align-items: start;
}

.faq-header h2 {
  position: sticky;
  top: 6rem;
  margin-bottom: 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--text-faded);
}

.faq-item.open {
  border-color: var(--text-muted);
}

.faq-question {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  font-weight: var(--font-weight-semibold);
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  background: none;
  border: none;
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--text);
}

.faq-icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.25rem;
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text-muted);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-slow);
}

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

.faq-item:is(:hover, .open) .faq-icon {
  background: var(--text);
  color: var(--bg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition-fast);
  overflow: hidden;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  min-height: 0;
  overflow: hidden;
}

.faq-answer-content {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: var(--space-2xl);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-expanded {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
}

.footer-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.footer-brand {
  grid-column: 1;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
  margin-bottom: var(--space-md);
  max-width: 20rem;
}

.footer-logo-link svg {
  height: 1.5rem;
  width: auto;
  margin-left: -4px;
}

.footer-column h4 {
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-column a {
  font-size: 0.875rem;
  color: var(--text);
  transition: opacity var(--transition-smooth);
}

.footer-column a:hover {
  opacity: var(--hover-opacity);
}

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-faded);
  margin: 0;
}

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

.mobile-hide {
  display: inline;
}

.divergent-highlight {
  background: linear-gradient(120deg, var(--accent-secondary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Elements with data-animate start hidden, Motion animates them in */
[data-animate] {
  opacity: 0;
}

.opacity-0 {
  opacity: 0;
}

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */

/* --------------------------------------------------------------------------
   Dark Mode
   -------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  /* Primary button text uses brand black on light background */
  .button:not(.button-secondary) {
    color: var(--dg-black);
  }

  /* Language switcher dropdown */
  .lang-options {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.24),
      0 1px 3px rgba(0, 0, 0, 0.12);
  }

  /* Mailto toast */
  .mailto-toast {
    box-shadow:
      0 25px 50px -12px rgba(0, 0, 0, 0.5),
      0 12px 24px -8px rgba(0, 0, 0, 0.3);
  }

  /* Background texture for dark mode */
  body {
    background:
      url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
      var(--bg);
    background-size:
      200px 200px,
      auto;
  }
}

/* --------------------------------------------------------------------------
   Max-width: 1024px (Tablet landscape and below)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* --------------------------------------------------------------------------
   Max-width: 768px (Tablet portrait and below)
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  :root {
    --space-2xl: 2.5rem;
  }

  .card-grid-2,
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .faq-container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .faq-header h2 {
    position: static;
  }

  .faq-question {
    padding: var(--space-sm) var(--space-md);
  }

  .faq-answer-content {
    padding: 0 var(--space-md) var(--space-md);
  }
}

/* --------------------------------------------------------------------------
   Max-width: 640px (Mobile)
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .logo {
    width: 8rem;
    height: auto;
    margin-left: -2px;
  }

  .footer-logo-link svg {
    height: 1rem;
    margin-left: -2px;
  }

  .button {
    width: 100%;
  }

  .mobile-hide {
    display: none;
  }

  .footer {
    flex-direction: column;
  }

  .card {
    padding: var(--space-md);
  }

  .card-grid,
  .card-grid-2,
  .card-grid-3,
  .card-grid-4 {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .mailto-toast {
    left: var(--space-md);
    right: var(--space-md);
    transform: translateY(var(--space-lg));
    max-width: none;
  }

  .mailto-toast.show {
    transform: translateY(0);
  }

  /* Mobile scroll-based highlight - mirrors hover states */
  .card.active,
  .pricing-card.active {
    border-color: transparent;
  }

  .card.active::before,
  .pricing-card.active::before {
    opacity: 1;
  }

  feature-card.active .link-arrow {
    opacity: var(--hover-opacity);
  }

  feature-card.active .link-arrow svg {
    transform: translateX(4px);
  }

  .faq-item.active {
    border-color: var(--text-faded);
  }

  .faq-item.active .faq-icon {
    background: var(--text);
    color: var(--bg);
  }
}

/* --------------------------------------------------------------------------
   Min-width: 640px (Tablet and above)
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  h1 {
    font-size: 3.75rem;
    line-height: 1.1;
  }

  h2 {
    font-size: 2.5rem;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .hero-description {
    font-size: 1.25rem;
  }

  .prose p {
    font-size: 1.25rem;
  }

  .ctas {
    flex-direction: row;
    width: auto;
  }

  .ctas .button {
    width: auto;
  }

  .hero-image {
    height: 400px;
  }

  main > .section:first-child {
    padding-top: var(--space-2xl);
  }

  .stat-value {
    font-size: 4rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* --------------------------------------------------------------------------
   Min-width: 768px (Tablet landscape and above)
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
  main {
    gap: 6rem;
    padding-bottom: 6rem;
  }

  h2 {
    font-size: 3rem;
  }

  .hero h1 {
    font-size: 4.5rem;
  }

  .hero-image {
    height: 500px;
  }

  .stat-value {
    font-size: 4.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: 1;
  }
}

/* --------------------------------------------------------------------------
   Min-width: 1024px (Desktop - Nav Links)
   -------------------------------------------------------------------------- */

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
    margin-top: 0.2rem;
  }

  .nav-actions {
    margin-top: 0.2rem;
  }

  .nav-hamburger {
    display: none;
  }
}
