/* ==========================================================================
   Mar Expósito — Clean Static Stylesheet
   Modern Web Guidance compliant (dark-mode, carousel, navigation-drawer,
   dialog, validate-input-after-interaction)
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg-base: #130d25;
  --bg-header: #140e2e;
  --bg-black: #000000;
  --bg-surface: #1b1334;
  --bg-card: rgba(125, 114, 145, 0.1);
  --border-card: #49435c;
  --border-input: rgba(255, 255, 255, 0.45);
  --border-subtle: rgba(255, 255, 255, 0.14);

  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.8);
  --text-subtle: rgba(255, 255, 255, 0.65);

  --accent-pink: #d52c70;
  --accent-purple: #6340de;
  --accent-lavender: #8f72f8;
  --accent-error: #ff6b81;
  --accent-error-bg: rgba(255, 107, 129, 0.12);
  --accent-valid: #4ade80;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container-max: 1100px;
  --header-height: 82px;

  --scrollbar-track: #130d25;
  --scrollbar-thumb: #49435c;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  accent-color: var(--accent-pink);
}

@supports not (scrollbar-color: auto) {
  :root {
    scrollbar-width: auto;
  }
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 5px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  background-color: var(--bg-base);
  color: var(--text-primary);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-weight: 400;
  overflow-x: clip;
}

main {
  flex: 1 0 auto;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-lavender);
  outline-offset: 3px;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  background: #ffffff;
  color: var(--bg-base);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.75em;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.65rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 2rem); }
h4 { font-size: 1.45rem; }

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

p:last-child {
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.95em 2.1em;
  border-radius: 100px;
  border: 1px solid #ffffff;
  background-color: #ffffff;
  color: var(--accent-pink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  touch-action: manipulation;
}

.btn:hover {
  color: var(--accent-purple);
  background-color: #ffffff;
}

.btn--ghost {
  background-color: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.btn--ghost:hover {
  background-color: #ffffff;
  color: var(--accent-purple);
}

.btn--ghost-dark:hover {
  background-color: #ffffff;
  color: #000000;
}

.btn--sm {
  min-height: 38px;
  padding: 0.6em 1.35em;
  font-size: 0.85rem;
}

/* ==========================================================================
   Header & Desktop Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-height);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  height: 54px;
  width: auto;
  object-fit: contain;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.desktop-nav__list {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
}

.desktop-nav__link:hover,
.desktop-nav__link[aria-current="page"] {
  color: #ffffff;
}

.desktop-nav__link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-color: #ffffff;
}

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.4rem 0.7rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.lang-switcher__btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 120px;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background-color: var(--bg-header);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 200;
}

.lang-switcher[data-open="true"] .lang-switcher__menu {
  display: block;
}

.lang-switcher__menu a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lang-switcher__menu a:hover,
.lang-switcher__menu a[aria-current="true"] {
  background-color: #000000;
  color: #ffffff;
}

/* Mobile Menu Trigger */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  touch-action: manipulation;
}

@media (min-width: 960px) {
  .desktop-nav {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
}

/* ==========================================================================
   MWG Navigation Drawer (<dialog> + scroll-snap + scroll-driven backdrop)
   ========================================================================== */
.Drawer {
  --drawer-width: min(21em, 82dvw, 100dvw - 24px);
  --drawer-backdrop: 0;

  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  overflow: visible;
  color: var(--text-primary);
}

.Drawer::backdrop {
  background: #000000;
  opacity: calc(var(--drawer-backdrop) * 0.65);
}

.Drawer-scroller {
  position: relative;
  display: grid;
  grid-template-columns: var(--drawer-width) 100%;
  overflow-x: scroll;
  overscroll-behavior: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.Drawer-scroller::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .Drawer-scroller {
    scroll-behavior: smooth;
  }
}

.Drawer-scroller::after {
  content: '';
  scroll-snap-align: end;
  scroll-initial-target: nearest;
}

.Drawer-sheet {
  display: flex;
  flex-direction: column;
  height: 100svh;
  background-color: var(--bg-header);
  border-right: 1px solid var(--border-card);
  overflow-y: auto;
  scroll-snap-align: start;
  scrollbar-width: none;
  padding: 1.25rem 1.5rem 2rem;
}

@supports (animation-timeline: scroll()) {
  .Drawer {
    timeline-scope: --drawer-fade;
    animation: fade-drawer-backdrop linear both;
    animation-timeline: --drawer-fade;
  }

  .Drawer-scroller {
    scroll-timeline: --drawer-fade x;
  }

  @property --drawer-backdrop {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
  }

  @keyframes fade-drawer-backdrop {
    0% { --drawer-backdrop: 1; }
    100% { --drawer-backdrop: 0; }
  }
}

.Drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
}

.Drawer-header img {
  height: 44px;
  width: auto;
}

.Drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
}

.Drawer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.Drawer-nav a {
  display: block;
  padding: 0.8rem 0.75rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.Drawer-nav a[aria-current="page"],
.Drawer-nav a:hover {
  background-color: rgba(99, 64, 222, 0.25);
  color: #ffffff;
}

.Drawer-langs {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.6rem;
}

.Drawer-langs a {
  flex: 1;
  text-align: center;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.Drawer-langs a[aria-current="true"] {
  background-color: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #ffffff;
}

/* ==========================================================================
   Homepage Hero Carousel (MWG native scroll-snap + accessible controls)
   ========================================================================== */
.hero-carousel {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  background-color: var(--bg-base);
  overflow: hidden;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: manipulation;
  height: calc(100svh - var(--header-height));
  min-height: 540px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .carousel-track {
    scroll-behavior: smooth;
  }
}

.carousel-track > .carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  position: relative;
  height: 100%;
}

/* MWG Continuous Looping via CSS order + sibling-count() fallback */
.carousel-track > :first-child {
  order: clamp(0, var(--current) - (var(--children-count, sibling-count()) - 3), 1);
}

.carousel-track > :last-child {
  order: calc(-1 * clamp(0, 2 - var(--current), 1));
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(99, 64, 222, 0.35) 0%, rgba(19, 13, 37, 0.65) 100%);
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(4.5rem, 10vh, 7rem);
  pointer-events: none;
}

.hero-content__box {
  max-width: 660px;
  pointer-events: auto;
}

.hero-eyebrow {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-headline {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  color: #ffffff;
}

.carousel-controls {
  position: absolute;
  inset-inline: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.carousel-controls button {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(19, 13, 37, 0.55);
  color: #ffffff;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.carousel-controls button:hover {
  background: rgba(99, 64, 222, 0.85);
  border-color: #ffffff;
}

.carousel-markers {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* WCAG 2.5.8 >=24x24px target size + non-color active indicator (width pill + border) */
.carousel-markers button {
  position: relative;
  min-width: 28px;
  min-height: 28px;
  padding: 8px 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.carousel-markers button::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background-color: rgba(240, 240, 240, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.carousel-markers button[aria-current="true"]::before {
  width: 26px;
  background-color: var(--accent-pink);
  border-color: #ffffff;
}

/* ==========================================================================
   Page Banner (Subpages)
   ========================================================================== */
.page-banner {
  position: relative;
  min-height: clamp(180px, 26vw, 270px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(19, 13, 37, 0.32);
}

.page-banner::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 44px;
  background: linear-gradient(180deg, transparent, var(--banner-fade, #000000));
}

.page-banner__title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 2rem 1.5rem;
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Content Sections
   ========================================================================== */
.section {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

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

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

.section--bg {
  position: relative;
  background-size: cover;
  background-position: center;
}

.section--bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(19, 13, 37, 0.45);
}

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

.section-header {
  max-width: 780px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-header h2 {
  font-weight: 400;
  margin-bottom: 1rem;
}

/* Homepage Single Feature */
.single-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .single-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3.5rem;
  }
}

.single-cover {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-card);
}

.single-cover img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.single-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* Biography Layout */
.bio-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 820px) {
  .bio-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 3.5rem;
  }
}

.bio-portrait {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-card);
}

.bio-portrait img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Cards Grid (Formatos & MarBand Show) */
.cards-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.media-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  overflow: hidden;
  padding: 1.5rem;
  gap: 1.25rem;
}

.media-card h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0;
}

/* Third-Party Embed Container + Cookie Gate */
.embed-box {
  position: relative;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background-color: #111526;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.embed-box--video {
  aspect-ratio: 16 / 9;
}

.embed-box--video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.embed-box--spotify {
  min-height: 352px;
}

.embed-box--spotify iframe {
  width: 100%;
  height: 352px;
  border: 0;
  display: block;
}

.embed-box iframe {
  border: 0;
  display: block;
}

.embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.85rem;
  padding: 1.5rem;
  width: 100%;
  height: 100%;
  min-height: 220px;
  background: radial-gradient(circle at top right, rgba(99, 64, 222, 0.25), #111526 70%);
}

.embed-placeholder p {
  max-width: 340px;
  font-size: 0.9rem;
  margin: 0;
}

/* Mi Música Stack */
.music-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 880px;
  margin-inline: auto;
}

/* CTA Banner Section */
.cta-box {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.cta-box h2 {
  font-weight: 400;
  margin-bottom: 1rem;
}

.cta-box p {
  margin-bottom: 2rem;
}

/* Social List */
.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.social-list--center {
  justify-content: center;
}

.social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: #ffffff;
  color: var(--bg-base);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.social-list a:hover {
  background-color: var(--accent-lavender);
  color: #ffffff;
  transform: translateY(-2px);
}

.social-list svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Contact Page & MWG Form Validation (:user-invalid / :user-valid)
   ========================================================================== */
.contact-grid {
  display: grid;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 820px) {
  .contact-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 4rem;
  }
}

.contact-info-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-info-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #ffffff;
}

.contact-info-list svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #ffffff;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.field .hint {
  display: block;
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-bottom: 0.35rem;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background-color: rgba(19, 13, 37, 0.35);
  border: 1px solid var(--border-input);
  border-radius: 4px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: #ffffff;
  background-color: rgba(19, 13, 37, 0.55);
}

.field--checkbox {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem;
}

.field--checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.field--checkbox label {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
}

.field--checkbox label a {
  text-decoration: underline;
  color: #ffffff;
}

.field--checkbox .error-msg {
  flex-basis: 100%;
}

.error-msg {
  display: none;
  color: var(--accent-error);
  font-size: 0.875rem;
  margin-top: 0.35rem;
}

:is(input, textarea):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--accent-error);
  background-color: var(--accent-error-bg);
}

:is(input, textarea):is(:user-invalid, .user-invalid-fallback) + .error-msg,
.field--checkbox:has(input:is(:user-invalid, .user-invalid-fallback)) .error-msg {
  display: block;
}

:is(input[type="text"], input[type="email"], textarea):is(:user-valid, .user-valid-fallback) {
  border-color: var(--accent-valid);
}

.form-status {
  padding: 1rem 1.25rem;
  border-radius: 6px;
  font-size: 0.95rem;
  display: none;
}

.form-status[data-state="success"] {
  display: block;
  background-color: rgba(74, 222, 128, 0.14);
  border: 1px solid var(--accent-valid);
  color: #ffffff;
}

.form-status[data-state="error"] {
  display: block;
  background-color: var(--accent-error-bg);
  border: 1px solid var(--accent-error);
  color: #ffffff;
}

/* Honeypot hidden field */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Legal & Utility Pages
   ========================================================================== */
.legal-content {
  max-width: 860px;
  margin-inline: auto;
}

.legal-content h1 {
  margin-bottom: 1.5rem;
}

.legal-content h2 {
  font-size: 1.45rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content ul,
.legal-content ol {
  color: var(--text-muted);
  padding-left: 1.5rem;
  margin: 0 0 1.25rem;
}

.legal-content li {
  margin-bottom: 0.45rem;
}

.legal-content a {
  color: var(--accent-lavender);
  text-decoration: underline;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}

.legal-content th,
.legal-content td {
  border: 1px solid var(--border-card);
  padding: 0.65rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

.legal-content th {
  background-color: rgba(99, 64, 222, 0.2);
  color: #ffffff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--bg-black);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(19, 13, 37, 0.92)), url('/assets/img/bg-footer.jpg');
  background-size: cover;
  background-position: center;
  border-top: 1px solid var(--border-subtle);
  padding-block: 3.5rem 2.25rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  gap: 2.25rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: start;
  }
}

.footer-brand img {
  height: 52px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a,
.footer-links button {
  background: none;
  border: 0;
  padding: 0.2rem 0;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.footer-links a:hover,
.footer-links button:hover {
  color: #ffffff;
  text-decoration: underline;
}

.kit-digital-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.kit-digital-bar img {
  height: 36px;
  width: auto;
  opacity: 0.9;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text-subtle);
  font-size: 0.85rem;
}

/* ==========================================================================
   Cookie Consent Banner & MWG Native <dialog> Preferences Modal
   ========================================================================== */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 300;
  max-width: 820px;
  margin-inline: auto;
  padding: 1.15rem 1.35rem;
  background-color: var(--bg-header);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
}

@media (min-width: 768px) {
  .cookie-banner {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
    max-width: 500px;
    margin-inline: 0;
  }
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__text {
  flex: 1 1 320px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cookie-banner__text a {
  text-decoration: underline;
  color: #ffffff;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* MWG Modal Dialog */
.cookie-dialog {
  width: min(540px, calc(100vw - 2rem));
  padding: 1.75rem;
  background-color: var(--bg-header);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.cookie-dialog:modal {
  overscroll-behavior: contain;
}

.cookie-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  overflow: hidden;
  overscroll-behavior: contain;
}

.cookie-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cookie-dialog h1 {
  font-size: 1.45rem;
  margin: 0;
}

.cookie-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.cookie-option p {
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}

.cookie-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
