:root {
  --wn-color-primary: var(--wp--preset--color--primary, #061B4A);
  --wn-color-primary-rgb: 6 27 74;
  --wn-color-accent: var(--wp--preset--color--accent, #C83218);
  --wn-color-accent-light: var(--wp--preset--color--accent-light, #F27A65);
  --wn-color-secondary: var(--wn-color-accent);
  --wn-color-accent-rgb: 200 50 24;
  --wn-color-text: var(--wp--preset--color--foreground, #1F2937);
  --wn-color-muted: var(--wp--preset--color--text-muted, #6B7280);
  --wn-color-text-muted: var(--wn-color-muted);
  --wn-color-soft: var(--wp--preset--color--surface-alt, #F3F4F6);
  --wn-color-light: var(--wn-color-soft);
  --wn-color-border: var(--wp--preset--color--border, #E5E7EB);
  --wn-color-surface: var(--wp--preset--color--background, #FFFFFF);
  --wn-color-white: var(--wn-color-surface);
  --wn-color-white-rgb: 255 255 255;
  --wn-radius-sm: 8px;
  --wn-radius-md: 16px;
  --wn-radius-lg: 24px;
  --wn-radius-pill: 999px;
  --wn-shadow-sm: 0 2px 8px -2px rgb(var(--wn-color-primary-rgb) / 0.08);
  --wn-shadow-soft: 0 10px 30px -10px rgb(var(--wn-color-primary-rgb) / 0.16);
  --wn-shadow-elevated: 0 20px 50px -20px rgb(var(--wn-color-primary-rgb) / 0.28);
  --wn-shadow-glow: 0 16px 38px -16px rgb(var(--wn-color-accent-rgb) / 0.55);
  --wn-transition-fast: 160ms ease;
  --wn-transition-smooth: 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --wn-container: 1200px;
  --wn-site-width: 100%;
  --wn-site-gutter: 0px;

  /* Safe aliases for content installed by versions older than 0.2.0. */
  --wp--preset--color--text: var(--wn-color-text);
  --wp--preset--spacing--2xl: var(--wp--preset--spacing--xxl, 4rem);
  --wp--preset--spacing--3xl: var(--wp--preset--spacing--xxxl, 6rem);
  --wp--preset--font-size--2xl: var(--wp--preset--font-size--xxl, 1.5rem);
  --wp--preset--font-size--3xl: var(--wp--preset--font-size--xxxl, 1.875rem);
}

/* WordPress sanitized numeric-leading slugs in already-installed content. */
.has-2-xl-font-size {
  font-size: var(--wp--preset--font-size--xxl, 1.5rem) !important;
}

.has-3-xl-font-size {
  font-size: var(--wp--preset--font-size--xxxl, 1.875rem) !important;
}

* {
  box-sizing: border-box;
}

body {
  color: var(--wn-color-text);
  background: var(--wn-color-surface);
  text-rendering: optimizeLegibility;
}

.wp-site-blocks,
.wn-site-main,
.wn-site-main > .wp-block-post-content {
  width: min(calc(100% - var(--wn-site-gutter, 0px)), var(--wn-site-width, 100%));
  max-width: var(--wn-site-width, 100%);
  margin-inline: auto;
}

.wn-site-main {
  margin: 0;
}

a {
  text-underline-offset: 0.18em;
  transition: color var(--wn-transition-fast), opacity var(--wn-transition-fast);
}

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

.wn-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--wn-color-border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.wn-header__inner {
  width: calc(100% - 32px);
  max-width: none;
  margin-inline: auto;
  min-height: 64px;
  gap: 24px;
}

.wn-site-title a {
  color: var(--wn-color-text);
  font-weight: 800;
  text-decoration: none;
}

.wn-site-main {
  min-height: 60vh;
}

.wn-front-page {
  margin-top: 0;
}

.wn-footer {
  margin-top: 64px;
  padding-block: 48px 24px;
  color: var(--wn-color-text);
  background: var(--wn-color-soft);
}

.wn-footer__grid {
  width: calc(100% - 32px);
  max-width: none;
  margin-inline: auto;
  gap: 32px;
}

.wn-container {
  width: min(100% - 32px, var(--wn-container));
  max-width: none;
  margin-inline: auto;
}

.wn-section {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px);
}

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

.wn-section--primary {
  color: #ffffff;
  background: var(--wn-color-primary);
}

.wn-kicker {
  margin: 0 0 10px;
  color: var(--wn-color-secondary);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.wn-section--primary .wn-kicker {
  color: var(--wn-color-accent-light);
}

.wn-lead {
  color: var(--wn-color-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.wn-section--primary .wn-lead {
  color: rgba(255, 255, 255, 0.82);
}

.wn-card {
  height: 100%;
  padding: 24px;
  border: 1px solid var(--wn-color-border);
  border-radius: var(--wn-radius-md);
  background: var(--wn-color-surface);
  box-shadow: var(--wn-shadow-soft);
  transition: border-color var(--wn-transition-smooth), box-shadow var(--wn-transition-smooth), transform var(--wn-transition-smooth);
}

.wn-card:hover,
.wn-card:focus-within {
  border-color: rgb(var(--wn-color-primary-rgb) / 0.2);
  box-shadow: var(--wn-shadow-elevated);
  transform: translateY(-5px);
}

.wn-placeholder {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--wn-color-border);
  border-radius: var(--wn-radius-md);
  color: var(--wn-color-muted);
  text-align: center;
  background: linear-gradient(135deg, #eef4ff, #f7fafc);
}

.wn-button,
.wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: var(--wn-radius-sm);
  font-weight: 700;
  line-height: 1.2;
  box-shadow: var(--wn-shadow-sm);
  transition: color var(--wn-transition-fast), background-color var(--wn-transition-fast), border-color var(--wn-transition-fast), box-shadow var(--wn-transition-smooth), transform var(--wn-transition-smooth);
}

.wn-button:hover,
.wn-button:focus-visible,
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus-visible {
  box-shadow: var(--wn-shadow-glow);
  transform: translateY(-2px);
}

.wp-block-button.is-style-outline .wp-block-button__link {
  border-color: currentColor;
  box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
  color: var(--wn-color-surface);
  background: var(--wn-color-primary);
  border-color: var(--wn-color-primary);
}

.wn-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.wn-stat {
  padding: 20px;
  border-left: 4px solid var(--wn-color-secondary);
  background: #ffffff;
}

.wn-stat strong {
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1;
}

.wn-faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--wn-color-border);
}

/* Shared premium surfaces for Gutenberg cards used throughout the theme. */
.wp-block-columns > .wp-block-column.has-background,
.wp-block-group.has-background.has-custom-border,
.wp-block-media-text.has-background {
  overflow: hidden;
  border-radius: var(--wn-radius-md);
  box-shadow: var(--wn-shadow-soft);
  transition: border-color var(--wn-transition-smooth), box-shadow var(--wn-transition-smooth), transform var(--wn-transition-smooth);
}

.wp-block-columns > .wp-block-column.has-background:hover,
.wp-block-columns > .wp-block-column.has-background:focus-within,
.wp-block-group.has-background.has-custom-border:hover,
.wp-block-group.has-background.has-custom-border:focus-within {
  border-color: rgb(var(--wn-color-primary-rgb) / 0.22) !important;
  box-shadow: var(--wn-shadow-elevated);
  transform: translateY(-4px);
}

.wp-block-image img,
.wp-block-cover__image-background {
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), filter var(--wn-transition-smooth);
}

.wp-block-image:hover img {
  transform: scale(1.015);
}

.wn-glass,
.glass-panel {
  border: 1px solid rgb(255 255 255 / 0.5);
  background: rgb(255 255 255 / 0.76);
  box-shadow: var(--wn-shadow-elevated), inset 0 1px 0 rgb(255 255 255 / 0.68);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .wn-glass,
  .glass-panel {
    background: rgb(255 255 255 / 0.96);
  }
}

@media (max-width: 960px) {
  .wn-grid--2,
  .wn-grid--3,
  .wn-grid--4 {
    grid-template-columns: 1fr;
  }

  .wn-header {
    position: static;
  }

  .wn-header__inner {
    align-items: flex-start;
    padding-block: 16px;
  }
}

@media (max-width: 640px) {
  .wn-container {
    width: min(100% - 24px, var(--wn-container));
  }

  .wn-card {
    padding: 20px;
  }

  .wp-block-button,
  .wp-block-button .wp-block-button__link {
    width: 100%;
  }
}

/* Accessibility: Global Focus States */
*:focus-visible {
  outline: 3px solid var(--wn-color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Accessibility: Screen Reader Text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-size: 0.875rem;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Accessibility: Prefers Reduced Motion */
@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;
  }
}
