/* Accessibility Fixes - WCAG 2.1 AA Compliance */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    font-weight: 500;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #38bdf8;
    outline-offset: 2px;
}

/* Color Contrast Fix - WCAG 2.1 AA Compliance */
.hero-copy {
    color: #1f2937 !important; /* gray-800 instead of gray-700 for 7.5:1 contrast ratio */
}

#testimonials .glass-card-dark {
    color: #e5e7eb;
}

#testimonials .glass-card-dark .text-gray-300,
#testimonials .glass-card-dark .text-gray-400,
#testimonials .glass-card-dark .text-sm {
    color: #e5e7eb;
}

.hero-fallback {
    opacity: 1;
    background-color: #f8fafc;
    background-image: image-set(
        url("../assets/images/hero-fallback.avif") type("image/avif"),
        url("../assets/images/hero-fallback.webp") type("image/webp")
    );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-fallback--hidden {
    opacity: 0;
}

#main-header {
    transition-property: background-color, box-shadow, opacity, transform;
}

.legal-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.legal-page {
    background: #f8fafc;
}

.legal-hero {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
}

.legal-body {
    padding-bottom: 4.5rem;
}

.legal-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
}

.legal-title {
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0 0 0.75rem;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: #475569;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0;
    margin: 1rem 0 1.5rem;
}

.legal-lead {
    font-size: 1.05rem;
    color: #334155;
    margin: 0 0 1rem;
}

.legal-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.legal-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: #0f172a;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: #0f172a;
}

.legal-content p {
    margin: 0.5rem 0 1rem;
    color: #334155;
}

.legal-list {
    margin: 0.5rem 0 1.25rem 1.25rem;
    list-style: disc;
    color: #334155;
}

.legal-list li {
    margin: 0.35rem 0;
}

.legal-list-plain {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 1.25rem;
}

.legal-list-plain li {
    margin: 0.35rem 0;
}

@media (min-width: 768px) {
    .legal-container {
        padding: 4.5rem 2rem;
    }

    .legal-content {
        padding: 3rem;
    }
}

.header-logo {
    font-size: 1.25rem;
    transition-property: transform, opacity;
}

h1 .gradient-text,
h1 .gradient-text-light,
h1 .gradient-emphasis {
    padding-bottom: 0.08em;
}

h2 .gradient-text,
h2 .gradient-text-light,
h2 .gradient-emphasis {
    padding-bottom: 0.08em;
}

/* CTA standardization: dark + light styles based on index hero */
.btn-gradient-solid,
.btn-header-primary,
.btn-primary-solid,
.btn-gradient-nav,
.pricing-cta,
.hero-primary-cta {
    position: relative;
    background-image: linear-gradient(125deg, var(--brand-gradient-start), var(--brand-gradient-mid));
    color: #fff;
    border: 0;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.18);
}

.btn-gradient-outline,
.btn-gradient-border-moving,
.hero-secondary-cta {
    position: relative;
    background: #ffffff;
    color: #1d4ed8;
    border: 0;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.btn-gradient-outline::before,
.btn-gradient-border-moving::before,
.hero-secondary-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--brand-gradient-start), var(--brand-gradient-mid), var(--brand-gradient-end));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.btn-gradient-solid::before,
.btn-gradient-outline::before {
    padding: 1px;
}

.btn-gradient-solid svg,
.btn-gradient-outline svg,
.btn-header-primary svg,
.btn-primary-solid svg,
.btn-gradient-nav svg,
.btn-gradient-border-moving svg,
.pricing-cta svg,
.hero-primary-cta svg,
.hero-secondary-cta svg {
    display: none;
}

.btn-gradient-solid,
.btn-gradient-outline,
.btn-header-primary,
.btn-primary-solid,
.btn-gradient-nav,
.btn-gradient-border-moving,
.pricing-cta,
.hero-primary-cta,
.hero-secondary-cta {
    gap: 0;
}

/* Custom navigation, dropdown, and pricing styles */
.delivery-schedule-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.delivery-option {
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.delivery-option:hover {
    border-color: rgba(59, 130, 246, 0.65);
    background: rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.delivery-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

.delivery-option-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.delivery-option-label {
    font-weight: 600;
    color: #f8fafc;
    font-size: 0.85rem;
}

.delivery-option-example {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.85;
    color: #cbd5f5;
}

.delivery-option-note {
    font-size: 0.8rem;
    color: #4ade80;
    font-weight: 600;
    white-space: nowrap;
}

.delivery-option.selected {
    border-color: rgba(59, 130, 246, 0.85);
    background: rgba(59, 130, 246, 0.16);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.delivery-option:focus-within {
    outline: 2px solid rgba(59, 130, 246, 0.85);
    outline-offset: 2px;
}

.header-dropdown {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.header-dropdown-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
    font-weight: 400;
    color: var(--header-dropdown-color, #0f172a);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    background: rgba(15, 23, 42, 0.03);
}

.header-theme-dark .header-dropdown-button {
    --header-dropdown-color: #f8fafc;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(226, 232, 240, 0.25);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.header-theme-dark .header-dropdown-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header-dropdown-button:focus-visible {
    outline: none;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.08);
}

.header-dropdown.is-open .header-dropdown-button {
    color: #0f172a;
    border-color: rgba(59, 130, 246, 0.25);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.header-dropdown:hover .header-dropdown-button,
.header-dropdown:focus-within .header-dropdown-button {
    color: #0f172a;
    border-color: rgba(59, 130, 246, 0.25);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 50%;
    transform: translate(-50%, 8px);
    min-width: 240px;
    padding: 0.9rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 60;
}

.header-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.header-dropdown-menu::after {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: inherit;
    border-left: 1px solid rgba(226, 232, 240, 0.9);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    z-index: -1;
}

.header-dropdown.is-open .header-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.header-dropdown:hover .header-dropdown-menu,
.header-dropdown:focus-within .header-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.header-dropdown-link {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.95rem;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-dropdown-link span {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 400;
}

.header-dropdown-link:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.header-theme-dark .header-dropdown-menu {
    background: rgba(7, 13, 28, 0.98);
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 25px 70px rgba(2, 6, 23, 0.65);
}

.header-theme-dark .header-dropdown-link {
    color: #f8fafc;
}

.header-theme-dark .header-dropdown-link span {
    color: rgba(226, 232, 240, 0.65);
}

.header-theme-dark .header-dropdown-link:hover {
    background: rgba(59, 130, 246, 0.2);
}

.nav-caret {
    width: 0.85rem;
    height: 0.85rem;
    transition: transform 0.2s ease;
}

.header-dropdown.is-open .nav-caret {
    transform: rotate(180deg);
}

.header-dropdown:hover .nav-caret,
.header-dropdown:focus-within .nav-caret {
    transform: rotate(180deg);
}

.mobile-dropdown-panel a,
.mobile-sub-link {
    display: block;
    padding: 0.45rem 0.75rem;
    border-radius: 0.65rem;
    color: #1f2937;
    font-size: 0.95rem;
}

.mobile-dropdown-panel a:hover,
.mobile-sub-link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
}

.mobile-dropdown-toggle svg {
    transition: transform 0.2s ease;
}

.mobile-dropdown-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.choice-button span {
    text-align: center;
}
