body { font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Poppins', system-ui, sans-serif; }

/* ===== Anti-FOUC: Disable body color transition on initial load =====
   The body has transition-colors via Tailwind. On refresh, this causes
   a visible fade from light→dark. We disable it on the first paint
   by adding a .preload class that's removed after load. */
body.preload { transition: none !important; }
body.preload * { transition: none !important; }
/* Use overflow-x: clip instead of hidden — `hidden` creates a scroll
   container which breaks `position: sticky` on descendant elements
   (like #site-nav). `clip` prevents horizontal overflow without
   creating a scroll container, so sticky positioning still works. */
html, body { overflow-x: clip; }
@supports not (overflow-x: clip) {
    /* Fallback for very old browsers */
    html, body { overflow-x: hidden; }
}

/* ============================================================
   PAGE TRANSITIONS: smooth fade-up when switching pages.
   Uses a short opacity + translateY transition that feels snappy
   but polished. The keyframe animation replays each time the
   .active class is added (via the router).
   ============================================================ */
.page-content {
    display: none;
    opacity: 0;
}
.page-content.active {
    display: block;
    opacity: 1;
    animation: pageFadeUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes pageFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .page-content.active {
        animation: none;
    }
}

/* ===== Private post card overlay (in listing) ===== */
.blog-card-private {
    position: relative;
}
.blog-card-private-overlay {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: inherit;
    z-index: 2;
}
.blog-card-private-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: rgb(255 255 255 / 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(53 179 255);
}
.blog-card-private-label {
    font-size: 0.75rem;
    color: rgb(255 255 255);
    font-weight: 500;
    text-shadow: 0 1px 4px rgb(0 0 0 / 0.5);
}
.blog-card-body-blurred {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}
.blog-card-private-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: rgb(239 68 68 / 0.15);
    color: rgb(220 38 38);
}

/* ===== Private post detail — blurred content + email access overlay ===== */
.private-blur-wrapper {
    position: relative;
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
    max-height: 60vh;
    overflow: hidden;
}
.private-blur-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to bottom, transparent, rgb(255 255 255));
    pointer-events: none;
}
.dark .private-blur-wrapper::after {
    background: linear-gradient(to bottom, transparent, rgb(23 23 23));
}
.private-access-overlay {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 100%;
    max-width: 30rem;
    padding: 1rem;
}
.private-access-card {
    background: rgb(255 255 255);
    border: 1px solid rgb(56 189 248 / 0.7);
    border-radius: 1.5rem;
    padding: 2rem 1.75rem;
    text-align: center;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.25);
    animation: privateCardSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes privateCardSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dark .private-access-card {
    background: rgb(38 38 38);
    border-color: rgb(64 64 64);
}
.private-access-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 9999px;
    background: rgb(254 215 170 / 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(53 179 255);
}
.dark .private-access-icon {
    background: rgb(124 45 18 / 0.4);
    color: rgb(253 186 116);
}
.private-access-title {
    font-size: 1.25rem;
    font-weight: 400;
    color: rgb(38 38 38);
    margin: 0 0 0.5rem 0;
}
.dark .private-access-title {
    color: rgb(255 255 255);
}
.private-access-desc {
    font-size: 0.875rem;
    color: rgb(82 82 82);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}
.dark .private-access-desc {
    color: rgb(212 212 212);
}
.private-access-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
@media (min-width: 480px) {
    .private-access-form {
        flex-direction: row;
        align-items: stretch;
    }
}
.private-access-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgb(56 189 248 / 0.7);
    background: rgb(240 249 255);
    color: rgb(38 38 38);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.private-access-input:focus {
    border-color: rgb(53 179 255);
    box-shadow: 0 0 0 3px rgb(53 179 255 / 0.15);
}
.dark .private-access-input {
    background: rgb(23 23 23);
    color: rgb(229 229 229);
    border-color: rgb(64 64 64);
}
.private-access-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: 0;
    background: rgb(38 38 38);
    color: rgb(255 255 255);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}
.private-access-btn:hover {
    background: rgb(64 64 64);
}
.private-access-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.dark .private-access-btn {
    background: rgb(53 179 255);
    color: rgb(255 255 255);
}
.dark .private-access-btn:hover {
    background: rgb(31 147 224);
}
.private-access-note {
    margin: 1rem 0 0;
    font-size: 0.6875rem;
    color: rgb(115 115 115);
    line-height: 1.5;
}
.dark .private-access-note {
    color: rgb(163 163 163);
}

/* ===== Mobile: prevent iOS Safari auto-zoom on input focus =====
   iOS Safari auto-zooms when an input's font-size is < 16px.
   Force all inputs/textareas/selects to 16px on mobile to prevent
   the zoom. Desktop inherits the component-specific font-sizes. */
@media (max-width: 640px) {
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="number"],
    input[type="tel"],
    input[type="password"],
    input[type="datetime-local"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ===== Hamburger Menu Animation ===== */
.hamburger-icon {
    position: relative;
    width: 20px;
    height: 16px;
    cursor: pointer;
}
.hamburger-icon .line {
    position: absolute;
    left: 0;
    background: currentColor;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}
.hamburger-icon .line:nth-child(1) { top: 0; }
.hamburger-icon .line:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-icon .line:nth-child(3) { bottom: 0; }
.hamburger-icon.active .line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.hamburger-icon.active .line:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
}
.hamburger-icon.active .line:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ===== Multi-Step Form ===== */
.form-step { display: none; opacity: 0; transform: translateX(20px); transition: all 0.4s ease; }
.form-step.active { display: block; opacity: 1; transform: translateX(0); }
.progress-bar { transition: width 0.4s ease; }

/* ===== Prevent Mobile Auto-Zoom on Forms ===== */
@media (max-width: 767px) {
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
    font-size: 16px !important;
}
}

/* Smooth scroll for legal pages */
#legal-content, #privacy-content, #terms-content, #refund-content, #payment-content { scroll-margin-top: 100px; }
#legal-content section, #privacy-content section, #terms-content section, #refund-content section, #payment-content section { scroll-margin-top: 100px; }

/* Custom checkbox/radio styling */
.option-card {
    transition: all 0.2s ease;
}
.option-card:has(input:checked) {
    background-color: rgb(56 189 248);
    color: rgb(23 23 23);
    border-color: rgb(56 189 248);
}
.dark .option-card:has(input:checked) {
    background-color: rgb(56 189 248);
    color: rgb(23 23 23);
}

/* Breadcrumb styling */
.breadcrumb a:hover { color: rgb(53 179 255); }

/* ===== Success Animations ===== */
@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes drawCheck {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}
@keyframes fadeInUp {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
.animate-scaleIn { animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; animation-delay: 0.2s; opacity: 0; }
.check-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 0.6s ease forwards 0.2s;
}

/* ===== Custom Notification System ===== */
@keyframes notifSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes notifSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}
.notif-enter { animation: notifSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards; }
.notif-exit { animation: notifSlideOut 0.3s ease forwards; }
@media (max-width: 640px) {
    @keyframes notifSlideIn {
        from { transform: translateY(-120%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    @keyframes notifSlideOut {
        from { transform: translateY(0); opacity: 1; }
        to { transform: translateY(-120%); opacity: 0; }
    }
}

/* ===== Custom Calendar ===== */
.calendar-day {
    transition: all 0.15s ease;
}
.calendar-day:not(.disabled):hover {
    transform: scale(1.08);
}

/* ===== Theme Dropdown ===== */
.theme-dropdown {
    transform-origin: top right;
}
@keyframes dropdownIn {
    from { transform: scale(0.9) translateY(-10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
.theme-dropdown:not(.hidden) {
    animation: dropdownIn 0.2s ease forwards;
}

/* ===== Mobile Form Fixes ===== */
@media (max-width: 640px) {
    .form-step .option-card {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .form-step .option-card span {
        line-height: 1.3;
    }
}

/* ===== Partner & People Cards ===== */
.partner-card {
    cursor: pointer;
}

/* Smooth modal entrance */
@keyframes modalIn {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
#partner-modal:not(.hidden) {
    animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* People cards hover image zoom */
#people-grid article img {
    transition: transform 0.6s ease;
}
#people-grid article:hover img {
    transform: scale(1.05);
}

/* Prevent body scroll when modal open */
body.modal-open {
    overflow: hidden;
}

/* ==========================================================
   ===== BLOG SYSTEM STYLES ================================
   ========================================================== */

/* Blog card hover shadow lift */
#blog-grid article {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#blog-grid article:hover {
    transform: translateY(-2px);
}

/* ==========================================================
   ===== BLOG PAGE — FULL RESPONSIVE UI ====================
   ========================================================== */

/* ----- Header ----- */
.blog-header {
    margin-bottom: 2rem;
}
.blog-header-eyebrow {
    display: block;
    font-size: 0.875rem;
    font-style: italic;
    color: rgb(53 179 255);            /* orange-500 */
    text-transform: capitalize;
    margin-bottom: 0.5rem;
}
.blog-header-title {
    font-size: 1.875rem;               /* 30px — mobile */
    font-weight: 400;
    letter-spacing: -0.025em;
    color: rgb(38 38 38);
    line-height: 1.15;
    margin: 0;
}
.dark .blog-header-title {
    color: rgb(255 255 255);
}
.blog-header-subtitle {
    margin-top: 1rem;
    font-size: 0.9375rem;              /* 15px — mobile */
    line-height: 1.7;
    color: rgb(82 82 82);
    max-width: 42rem;                  /* 672px */
}
.dark .blog-header-subtitle {
    color: rgb(212 212 212);
}
.blog-header-email {
    color: rgb(53 179 255);            /* orange-500 */
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgb(53 179 255 / 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s ease;
}
.blog-header-email:hover {
    text-decoration-color: rgb(53 179 255);
}
@media (min-width: 640px) {
    .blog-header-eyebrow { font-size: 1.125rem; }
    .blog-header-title { font-size: 2.5rem; }
    .blog-header-subtitle { font-size: 1.125rem; }
}
@media (min-width: 1024px) {
    .blog-header-title { font-size: 3.75rem; }   /* 60px — desktop */
    .blog-header-subtitle { font-size: 1.25rem; max-width: 48rem; }
}

/* ==========================================================
   ===== NEWSROOM HERO (PARALLAX + VIDEO BG) ===============
   ========================================================== */
.newsroom-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;             /* contain blend modes */
    background: rgb(23 23 23);      /* fallback while video loads */
}
/* Background video — full-bleed cover, no parallax (parallax disabled site-wide) */
.newsroom-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    will-change: auto;
    transform: none;
}
/* Mobile: shorter hero so the video doesn't dominate small screens */
@media (max-width: 640px) {
    .newsroom-hero {
        min-height: 55vh;
    }
    .newsroom-hero-video {
        height: 100%;
    }
}
.newsroom-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    /* Neutral dark scrim (no color tint) — keeps the video's original
       colors while ensuring white text stays readable. */
    background:
        linear-gradient(180deg, rgb(0 0 0 / 0.35) 0%, rgb(0 0 0 / 0.15) 50%, rgb(0 0 0 / 0.5) 100%);
}
.newsroom-hero-content {
    position: relative;
    z-index: 1;
    padding: 5rem 0 4rem;
}
@media (min-width: 768px) {
    .newsroom-hero { min-height: 70vh; }
    .newsroom-hero-content { padding: 6rem 0 5rem; }
}
.newsroom-hero-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgb(188 228 255);            /* brand-200 */
    background: rgb(53 179 255 / 0.18);
    border: 1px solid rgb(53 179 255 / 0.4);
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(8px);
    animation: heroTitleFade 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.newsroom-hero-title {
    font-size: 2.5rem;                 /* 40px — mobile */
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: rgb(255 255 255);
    margin: 0 0 1.25rem 0;
    text-shadow: 0 2px 24px rgb(0 0 0 / 0.35);
    animation: heroTitleFade 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes heroTitleFade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (min-width: 640px) {
    .newsroom-hero-title { font-size: 3.5rem; }
}
@media (min-width: 1024px) {
    .newsroom-hero-title { font-size: 5rem; }    /* 80px — desktop */
}
.newsroom-hero-subtitle {
    font-size: 1rem;
    line-height: 1.65;
    color: rgb(255 255 255 / 0.95);
    max-width: 42rem;
    margin: 0;
    animation: heroTitleFade 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}
@media (min-width: 640px) {
    .newsroom-hero-subtitle { font-size: 1.125rem; }
}
@media (min-width: 1024px) {
    .newsroom-hero-subtitle { font-size: 1.25rem; max-width: 48rem; }
}
.newsroom-hero-email {
    color: rgb(188 228 255);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgb(188 228 255 / 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
.newsroom-hero-email:hover {
    color: rgb(255 255 255);
    text-decoration-color: rgb(255 255 255);
}
.newsroom-hero-scroll-hint {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgb(255 255 255 / 0.6);
    animation: newsroomHeroBounce 2s ease-in-out infinite;
}
@keyframes newsroomHeroBounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 8px); }
}

/* ==========================================================
   ===== PARALLAX SCROLL EFFECTS ===========================
   ========================================================== */
/* Parallax is DISABLED site-wide per brand design decision.
   The selector below is kept for backward compatibility in case
   any old markup still carries [data-parallax-bg], but it no
   longer moves on scroll. */
[data-parallax-bg] .newsroom-hero-video,
[data-parallax-bg] .newsroom-hero-bg {
    transform: none !important;
    will-change: auto;
}

/* ===== Home hero background video — mobile compatibility =====
   Ensure the <video> covers the hero on all screen sizes and
   doesn't cause layout shift on iOS. */
#home header video {
    object-fit: cover;
    object-position: center;
}
/* On very small screens, the video's intrinsic aspect ratio can
   cause it to appear too zoomed-in. object-fit: cover handles this,
   but we also ensure the video fills the container height on iOS
   Safari which sometimes renders <video> with a default height. */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific */
    #home header video,
    .newsroom-hero-video {
        width: 100%;
        height: 100%;
    }
}
/* Card media — no parallax transform; keep image stable. */
.blog-card-media img {
    will-change: auto;
}

/* ----- Toolbar (search + filters) ----- */
.blog-toolbar {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.blog-search-wrapper {
    margin-bottom: 0;                   /* toolbar handles spacing now */
}
.blog-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.blog-search-icon {
    position: absolute;
    left: 1rem;
    width: 1.125rem;
    height: 1.125rem;
    color: rgb(163 163 163);
    pointer-events: none;
}
.dark .blog-search-icon {
    color: rgb(115 115 115);
}
.blog-search-input {
    width: 100%;
    padding: 0.6875rem 2.75rem 0.6875rem 2.75rem;
    border-radius: 9999px;
    border: 1px solid rgb(56 189 248 / 0.7);
    background: rgb(255 255 255);
    color: rgb(38 38 38);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.blog-search-input::placeholder {
    color: rgb(163 163 163);
}
.dark .blog-search-input {
    background: rgb(38 38 38);
    color: rgb(229 229 229);
    border-color: rgb(64 64 64);
}
.dark .blog-search-input::placeholder {
    color: rgb(115 115 115);
}
.blog-search-input:focus {
    border-color: rgb(53 179 255);
    box-shadow: 0 0 0 3px rgb(53 179 255 / 0.15);
}
.blog-search-clear {
    position: absolute;
    right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    border: 0;
    background: transparent;
    color: rgb(163 163 163);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.blog-search-clear:hover {
    background: rgb(245 245 245);
    color: rgb(38 38 38);
}
.dark .blog-search-clear:hover {
    background: rgb(64 64 64);
    color: rgb(229 229 229);
}
.blog-search-status {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: rgb(115 115 115);
}
.dark .blog-search-status {
    color: rgb(163 163 163);
}
@media (min-width: 768px) {
    .blog-search-input { font-size: 0.9375rem; }
    /* On desktop, search box doesn't span full width */
    .blog-search-box { max-width: 28rem; }
}

/* ----- Filter tabs ----- */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;                   /* toolbar handles spacing */
}
.blog-filter-btn {
    padding: 0.4375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgb(56 189 248 / 0.7);
    background: rgb(255 255 255);
    color: rgb(64 64 64);
    cursor: pointer;
    transition: background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.25s ease,
                border-color 0.25s ease,
                transform 0.15s ease;
    white-space: nowrap;
}
.blog-filter-btn:hover {
    transform: translateY(-1px);
}
.blog-filter-btn:active {
    transform: translateY(0);
}
.dark .blog-filter-btn {
    background: rgb(38 38 38);
    color: rgb(229 229 229);
    border-color: rgb(64 64 64);
}
.blog-filter-btn:hover {
    border-color: rgb(53 179 255);
    color: rgb(53 179 255);
}
.blog-filter-btn.is-active {
    background: rgb(53 179 255);
    color: rgb(255 255 255);
    border-color: rgb(53 179 255);
}
.dark .blog-filter-btn.is-active {
    background: rgb(53 179 255);
    color: rgb(255 255 255);
    border-color: rgb(53 179 255);
}
.blog-filter-count {
    margin-left: 0.35rem;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}
@media (min-width: 640px) {
    .blog-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

/* ----- Blog grid (BENTO layout — Apple Newsroom style) ----- */
/* Layout (desktop, 3-col grid):
     ┌────────────────────┬──────────┐
     │                    │  card 2  │
     │   card 1 (2×2)     ├──────────┤
     │                    │  card 3  │
     ├────────┬───────────┴──────────┤
     │ card 4 │ card 5  │   card 6   │
     └────────┴──────────┴───────────┘
   First card spans 2 cols × 2 rows. Cards 2+3 stack in the 3rd column.
   Cards 4-6 fill the bottom row.
*/
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;                 /* mobile: 1 column */
    gap: 1.25rem;
}
@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);  /* tablet: 2 columns */
        gap: 1.5rem;
    }
    /* Tablet: first card spans both columns */
    .blog-grid > .blog-card:first-child {
        grid-column: span 2;
    }
    .blog-grid > .blog-card:first-child .blog-card-title {
        font-size: 1.5rem;
    }
}
@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);  /* desktop: 3 columns */
        gap: 2rem;
    }
    /* Bento: the FIRST card spans 2 columns + 2 rows (featured/latest) */
    .blog-grid > .blog-card:first-child {
        grid-column: span 2;
        grid-row: span 2;
        flex-direction: column;                 /* image on top, body below */
    }
    .blog-grid > .blog-card:first-child .blog-card-media {
        width: 100%;
        aspect-ratio: 16 / 9;
        flex-shrink: 0;
    }
    .blog-grid > .blog-card:first-child .blog-card-body {
        width: 100%;
        padding: 2rem;
        flex: 1;
    }
    .blog-grid > .blog-card:first-child .blog-card-title {
        font-size: 1.75rem;       /* larger title for the featured card */
    }
    .blog-grid > .blog-card:first-child .blog-card-excerpt {
        font-size: 0.9375rem;
        -webkit-line-clamp: 4;    /* show more text on the featured card */
    }
}
@media (min-width: 1280px) {
    .blog-grid > .blog-card:first-child .blog-card-body {
        padding: 2.5rem;
    }
    .blog-grid > .blog-card:first-child .blog-card-title {
        font-size: 2rem;
    }
}

/* ===== Card entrance animation (fade-up) ===== */
@keyframes blogCardFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.blog-card {
    animation: blogCardFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Stagger the animation so cards fade in one after another */
.blog-card:nth-child(1) { animation-delay: 0.00s; }
.blog-card:nth-child(2) { animation-delay: 0.06s; }
.blog-card:nth-child(3) { animation-delay: 0.12s; }
.blog-card:nth-child(4) { animation-delay: 0.18s; }
.blog-card:nth-child(5) { animation-delay: 0.24s; }
.blog-card:nth-child(6) { animation-delay: 0.30s; }
.blog-card:nth-child(n+7) { animation-delay: 0.36s; }
/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .blog-card {
        animation: none;
    }
}

/* ----- Blog card ----- */
.blog-card {
    display: flex;
    flex-direction: column;
    background: rgb(255 255 255);
    border: 1px solid rgb(56 189 248 / 0.7);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    /* Speed up initial render — the browser skips rendering cards
       that are off-screen until they're near the viewport. */
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}
.dark .blog-card {
    background: rgb(38 38 38);
    border-color: rgb(64 64 64);
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.18);
    border-color: rgb(53 179 255 / 0.5);
}
.dark .blog-card:hover {
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.6);
}
.blog-card-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgb(224 242 254 / 0.3);     /* sky-100-ish (was yellow-100 in v1.38) */
}
.dark .blog-card-media {
    background: rgb(64 64 64);
}
.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-media img {
    transform: scale(1.05);
}
.blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem;                       /* mobile */
}
@media (min-width: 640px) {
    .blog-card-body { padding: 1.5rem; }
}
@media (min-width: 1024px) {
    .blog-card-body { padding: 1.75rem; }
}
.blog-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.blog-card-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.blog-card-date {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: rgb(115 115 115);
}
.dark .blog-card-date {
    color: rgb(163 163 163);
}
.blog-card-edited {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgb(254 215 170 / 0.5);
    color: rgb(194 65 12);
}
.dark .blog-card-edited {
    background: rgb(124 45 18 / 0.4);
    color: rgb(253 186 116);
}
.blog-card-title {
    font-size: 1.0625rem;                   /* 17px — mobile */
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin: 0 0 0.5rem 0;
}
.blog-card-title a {
    color: rgb(38 38 38);
    transition: color 0.15s ease;
}
.dark .blog-card-title a {
    color: rgb(255 255 255);
}
.blog-card-title a:hover {
    color: rgb(53 179 255);
}
@media (min-width: 640px) {
    .blog-card-title { font-size: 1.1875rem; }   /* 19px — tablet/desktop */
}
@media (min-width: 1024px) {
    .blog-card-title { font-size: 1.25rem; }     /* 20px — large desktop */
}
.blog-card-excerpt {
    font-size: 0.8125rem;                   /* 13px — mobile */
    line-height: 1.6;
    color: rgb(82 82 82);
    flex: 1;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dark .blog-card-excerpt {
    color: rgb(212 212 212);
}
@media (min-width: 640px) {
    .blog-card-excerpt { font-size: 0.875rem; }  /* 14px — tablet/desktop */
}
.blog-card-readmore {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: rgb(53 179 255);
    transition: color 0.15s ease, gap 0.15s ease;
    align-self: flex-start;
}
.blog-card-readmore:hover {
    color: rgb(31 147 224);                  /* orange-600 */
    gap: 0.5rem;
}
@media (min-width: 640px) {
    .blog-card-readmore { font-size: 0.875rem; }
}

/* Line clamp helper (browser-supported via -webkit-line-clamp) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Blog detail content typography =====
   The Quill editor outputs plain HTML (h1-h6, p, ul, ol,
   blockquote, pre, img, a, etc.). We style these here so
   the published post matches the rest of the site. */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
    color: inherit;
    font-weight: 500;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 0.6em;
}
.blog-content h1 { font-size: 1.8em; }
.blog-content h2 { font-size: 1.5em; }
.blog-content h3 { font-size: 1.25em; }
.blog-content h4 { font-size: 1.1em; }
.blog-content p {
    margin: 1em 0;
    line-height: 1.75;
}
.blog-content ul,
.blog-content ol {
    margin: 1em 0;
    padding-left: 1.5em;
}
.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }
.blog-content li { margin: 0.4em 0; }
.blog-content a {
    color: rgb(53 179 255);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.blog-content a:hover { color: rgb(31 147 224); }
.blog-content blockquote {
    border-left: 3px solid rgb(56 189 248);
    padding: 0.5em 0 0.5em 1.25em;
    margin: 1.5em 0;
    color: inherit;
    opacity: 0.85;
    font-style: italic;
}
.blog-content pre {
    background: rgb(245 245 247);
    color: rgb(17 17 17);
    padding: 1em 1.25em;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.25em 0;
    font-size: 0.875em;
}
.dark .blog-content pre {
    background: rgb(23 23 23);
    color: rgb(245 245 247);
}
.blog-content code {
    background: rgb(245 245 247);
    color: rgb(17 17 17);
    padding: 0.15em 0.4em;
    border-radius: 0.35rem;
    font-size: 0.9em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
.dark .blog-content code {
    background: rgb(38 38 38);
    color: rgb(245 245 247);
}
.blog-content pre code {
    background: transparent;
    padding: 0;
}
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5em 0;
}
/* Images resized in the editor have an inline width style. The max-width
   above ensures they never overflow the container on small screens. */
.blog-content img[style*="width"] {
    height: auto;
}
.blog-content hr {
    border: none;
    border-top: 1px solid rgb(234 234 234);
    margin: 2em 0;
}
.dark .blog-content hr { border-top-color: rgb(64 64 64); }

/* Embedded YouTube / video wrapper — global (featured media + blog content) */
.as-video-embed,
.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;          /* 16:9 aspect ratio */
    margin: 1.5em 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #000;
    /* Prevent the iframe from capturing scroll on touch devices until
       the user explicitly taps play. */
    -webkit-overflow-scrolling: touch;
}
.as-video-embed iframe,
.video-embed iframe,
.as-video-embed video,
.video-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
/* Mobile-first responsive tweaks for YouTube/video embeds */
@media (max-width: 640px) {
    .as-video-embed,
    .video-embed {
        /* Smaller corner radius on mobile so YouTube controls aren't clipped */
        border-radius: 0.5rem;
        margin: 1em 0;
    }
    /* Override the Tailwind md:rounded-[2rem] on the featured-media wrapper
       so mobile gets a sensible radius. */
    .as-video-embed.rounded-\[1\.5rem\],
    .as-video-embed.rounded-\[2rem\] {
        border-radius: 0.5rem !important;
    }
}
/* On very small screens, allow full-bleed video for a better viewing experience */
@media (max-width: 420px) {
    .as-video-embed,
    .video-embed {
        border-radius: 0.375rem;
    }
}
/* Keep blog-content-scoped rules for backward compatibility */
.blog-content .as-video-embed,
.blog-content .video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 1.5em 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #000;
}
.blog-content .as-video-embed iframe,
.blog-content .video-embed iframe,
.blog-content .as-video-embed video,
.blog-content .video-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== Quill editor theming (match Aftersolves palette) ===== */
#admin-content-editor {
    font-size: 16px;                            /* 16px prevents iOS auto-zoom */
    color: rgb(38 38 38);
}

/* ===== Mobile: prevent iOS auto-zoom on input focus =====
   iOS Safari auto-zooms when an input's font-size is < 16px.
   All form inputs in the admin use 16px on mobile. */
@media (max-width: 640px) {
    #admin input[type="text"],
    #admin input[type="email"],
    #admin input[type="url"],
    #admin input[type="number"],
    #admin input[type="search"],
    #admin input[type="datetime-local"],
    #admin select,
    #admin textarea,
    #admin-content-editor .ql-editor {
        font-size: 16px !important;
    }
}
.dark #admin-content-editor {
    color: rgb(245 245 247);
}
.dark #admin-content-editor .ql-editor {
    background: rgb(23 23 23);
    color: rgb(245 245 247);
}
/* Fix: Quill placeholder text ("Write your post...") invisible in dark mode.
   Uses !important + higher specificity to override Quill's CDN CSS which
   loads AFTER our custom CSS. */
.dark #admin-content-editor.ql-container .ql-editor.ql-blank::before,
.dark #admin-content-editor .ql-editor.ql-blank::before {
    color: rgb(115 115 115) !important;
    font-style: italic !important;
    opacity: 1 !important;
}
#admin-content-editor.ql-container .ql-editor.ql-blank::before,
#admin-content-editor .ql-editor.ql-blank::before {
    color: rgb(163 163 163) !important;
    font-style: italic !important;
}
.dark #admin-content-editor .ql-toolbar {
    background: rgb(38 38 38);
    border-color: rgb(64 64 64) !important;
}
.dark #admin-content-editor .ql-snow .ql-stroke { stroke: rgb(200 200 200); }
.dark #admin-content-editor .ql-snow .ql-fill   { fill:   rgb(200 200 200); }
.dark #admin-content-editor .ql-snow .ql-picker-label { color: rgb(200 200 200); }
#admin-content-editor .ql-editor {
    min-height: 22rem;
    line-height: 1.7;
}
#admin-content-editor.ql-container {
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
    border-color: rgb(56 189 248 / 0.7);
}
.dark #admin-content-editor.ql-container {
    border-color: rgb(64 64 64);
}
#admin-content-editor .ql-toolbar {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    border-color: rgb(56 189 248 / 0.7);
}

/* ===== Image resize in Quill editor ===== */
/* Images inside the editor — width is set directly on the img element
   (no wrapper div) so Quill's Delta tracking stays consistent. */
#admin-content-editor .ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1em 0;
    cursor: pointer;
    display: block;
}
/* When an image is selected, show a subtle orange outline */
#admin-content-editor .ql-editor img.as-img-selected {
    outline: 2px solid rgb(53 179 255);   /* orange-500 */
    outline-offset: 2px;
}
/* Resize handles — 4 corners, positioned absolutely within the editor root */
.as-img-resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: rgb(53 179 255);          /* orange-500 */
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    z-index: 10;
}
.as-img-resize-handle.nw { cursor: nwse-resize; }
.as-img-resize-handle.ne { cursor: nesw-resize; }
.as-img-resize-handle.sw { cursor: nesw-resize; }
.as-img-resize-handle.se { cursor: nwse-resize; }
/* Size badge shown while dragging */
.as-img-size-badge {
    position: absolute;
    transform: translateX(-50%);
    background: rgb(38 38 38);
    color: #fff;
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 11;
    display: none;       /* only shown while dragging / on reset */
}
/* Floating toolbar above the selected image — presets + full + delete */
.as-img-toolbar {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgb(38 38 38);
    border-radius: 8px;
    padding: 3px;
    z-index: 12;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.as-img-tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    color: #fff;
    border: 0;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
    min-width: 28px;
    line-height: 1;
}
.as-img-tb-btn:hover {
    background: rgb(53 179 255);          /* orange-500 */
}
.as-img-tb-btn.as-img-tb-full:hover {
    background: rgb(34 197 94);           /* green-500 */
}
.as-img-tb-btn.as-img-tb-delete:hover {
    background: rgb(239 68 68);           /* red-500 */
}
.as-img-tb-btn svg {
    width: 12px;
    height: 12px;
}

/* ===== Admin table responsive tweaks ===== */
#admin-posts-tbody td {
    vertical-align: middle;
}
@media (max-width: 640px) {
    #admin-posts-tbody td { font-size: 0.875rem; }
}

/* ==========================================================
   ===== UI POLISH (v20260702g — PERFORMANCE TUNED) ========
   ========================================================== */

/* ===== Nav: subtle shrink/elevate when page is scrolled ===== */
#site-nav {
    position: sticky;           /* ensure sticky even if Tailwind class is overridden */
    top: 0;
    z-index: 50;
    transition: padding 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
#site-nav.nav-scrolled {
    box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.12);
}
.dark #site-nav.nav-scrolled {
    box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.5);
}

/* ===== Active nav link underline indicator ===== */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 0;
    height: 2px;
    background: rgb(53 179 255);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.is-active::after {
    width: 60%;
}
.nav-link.is-active {
    color: rgb(53 179 255);
}

/* ===== Cards & buttons: smoother global hovers ===== */
a, button {
    transition: color 0.2s ease, background-color 0.2s ease,
                border-color 0.2s ease, transform 0.2s ease,
                box-shadow 0.2s ease, opacity 0.2s ease;
}
.partner-card,
#blog-grid article,
.case-study-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease;
}
.partner-card:hover,
#blog-grid article:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.18);
}
.dark .partner-card:hover,
.dark #blog-grid article:hover {
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.6);
}

/* ===== Focus-visible accessibility polish ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgb(53 179 255);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ==========================================================
   ===== BLUR TEXT REVEAL — LIGHTWEIGHT EDITION =============
   ==========================================================

   PERFORMANCE NOTE (v20260702g):
   The original blur effect used:
     filter: blur(14px);  transform: translateY(14px);
     transition: 0.7s cubic-bezier(...);
   Combined with re-running on EVERY page navigation, this
   caused noticeable jank — especially on slower devices and
   when many elements revealed at once.

   The new values are MUCH lighter:
     filter: blur(4px);   transform: translateY(4px);
     transition: 0.28s ease-out;
   The perceptual "blur-in" is still there, but it is fast and
   GPU-friendly. Stagger delays are also shortened.

   Usage in markup stays the same:
     <h1 data-blur-reveal>Heading</h1>
     <p data-blur-reveal>Paragraph</p>
     <section data-blur-reveal>...</section>
     <div data-blur-stagger>...</div> */
[data-blur-reveal],
[data-blur-stagger] > * {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(4px);
    will-change: opacity, filter, transform;
    transition:
        opacity 0.28s ease-out,
        filter 0.28s ease-out,
        transform 0.28s ease-out;
}
[data-blur-reveal].is-revealed,
[data-blur-stagger].is-revealed > * {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Staggered children: shortened delays */
[data-blur-stagger].is-revealed > *:nth-child(1) { transition-delay: 0.02s; }
[data-blur-stagger].is-revealed > *:nth-child(2) { transition-delay: 0.06s; }
[data-blur-stagger].is-revealed > *:nth-child(3) { transition-delay: 0.10s; }
[data-blur-stagger].is-revealed > *:nth-child(4) { transition-delay: 0.14s; }
[data-blur-stagger].is-revealed > *:nth-child(5) { transition-delay: 0.18s; }
[data-blur-stagger].is-revealed > *:nth-child(6) { transition-delay: 0.22s; }
[data-blur-stagger].is-revealed > *:nth-child(7) { transition-delay: 0.26s; }
[data-blur-stagger].is-revealed > *:nth-child(8) { transition-delay: 0.30s; }

/* ===== Page-switch reset helper ===== */
[data-blur-reveal].blur-resetting,
[data-blur-stagger].blur-resetting > * {
    transition: none !important;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    [data-blur-reveal],
    [data-blur-stagger] > * {
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
        transition: none !important;
    }
    .page-content {
        transform: none !important;
        transition: opacity 0.15s ease !important;
    }
}

/* ===== Mobile menu: smoother slide/fade entrance ===== */
#mobile-menu:not(.hidden) {
    animation: mobileMenuIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes mobileMenuIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Logo subtle entrance on first paint ===== */
#site-nav img[alt="Aftersolves logo"] {
    animation: logoFadeIn 0.6s ease forwards;
}
@keyframes logoFadeIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

/* ==========================================================
   ===== DRAG & DROP UPLOAD ZONE ============================
   ========================================================== */
.as-dropzone {
    position: relative;
    border: 2px dashed rgb(56 189 248 / 0.7);
    border-radius: 1rem;
    background: rgb(240 249 255 / 0.5);
    padding: 1.5rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.dark .as-dropzone {
    background: rgb(23 23 23 / 0.5);
    border-color: rgb(64 64 64);
}
.as-dropzone:hover {
    border-color: rgb(53 179 255);
    background: rgb(255 247 237 / 0.6);
}
.dark .as-dropzone:hover {
    border-color: rgb(53 179 255);
    background: rgb(38 38 38 / 0.7);
}
.as-dropzone.is-dragover {
    border-color: rgb(34 197 94);
    background: rgb(237 252 231 / 0.7);
    transform: scale(1.005);
}
.dark .as-dropzone.is-dragover {
    border-color: rgb(34 197 94);
    background: rgb(20 40 30 / 0.7);
}
.as-dropzone-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 0.5rem;
    color: rgb(53 179 255);
    opacity: 0.85;
}
.as-dropzone-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(38 38 38);
    margin-bottom: 0.25rem;
}
.dark .as-dropzone-title { color: rgb(245 245 245); }
.as-dropzone-hint {
    font-size: 0.75rem;
    color: rgb(115 115 115);
}
.dark .as-dropzone-hint { color: rgb(163 163 163); }

.as-attachment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.as-attachment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid rgb(56 189 248 / 0.6);
    border-radius: 0.75rem;
    background: rgb(255 255 255);
}
.dark .as-attachment-item {
    background: rgb(38 38 38);
    border-color: rgb(64 64 64);
}
.as-attachment-thumb {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    object-fit: cover;
    background: rgb(245 245 247);
    flex-shrink: 0;
}
.dark .as-attachment-thumb { background: rgb(23 23 23); }
.as-attachment-info {
    flex: 1;
    min-width: 0;
}
.as-attachment-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgb(38 38 38);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dark .as-attachment-name { color: rgb(245 245 245); }
.as-attachment-meta {
    font-size: 0.6875rem;
    color: rgb(115 115 115);
    margin-top: 0.125rem;
}
.dark .as-attachment-meta { color: rgb(163 163 163); }
.as-attachment-remove {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(239 68 68);
    border: 1px solid rgb(239 68 68 / 0.3);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.as-attachment-remove:hover {
    background: rgb(239 68 68 / 0.1);
}

/* YouTube URL input row inside the upload area */
.as-youtube-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    align-items: center;
}
.as-youtube-row input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(56 189 248 / 0.7);
    background: rgb(255 255 255);
    color: rgb(38 38 38);
    font-size: 0.8125rem;
}
.dark .as-youtube-row input {
    background: rgb(23 23 23);
    color: rgb(245 245 245);
    border-color: rgb(64 64 64);
}
.as-youtube-row button {
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(53 179 255);
    color: rgb(53 179 255);
    background: transparent;
    font-size: 0.8125rem;
    cursor: pointer;
    white-space: nowrap;
}
.as-youtube-row button:hover {
    background: rgb(53 179 255);
    color: #fff;
}

/* ==========================================================
   ===== SCHEDULED PUBLISH UI ===============================
   ========================================================== */
.as-schedule-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding: 0.875rem 1rem;
    border: 1px solid rgb(56 189 248 / 0.7);
    border-radius: 0.75rem;
    background: rgb(240 249 255 / 0.5);
}
.dark .as-schedule-row {
    background: rgb(23 23 23 / 0.5);
    border-color: rgb(64 64 64);
}
.as-schedule-row input[type="datetime-local"] {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(56 189 248 / 0.7);
    background: rgb(255 255 255);
    color: rgb(38 38 38);
    font-size: 0.8125rem;
}
.dark .as-schedule-row input[type="datetime-local"] {
    background: rgb(38 38 38);
    color: rgb(245 245 245);
    border-color: rgb(64 64 64);
}
.as-schedule-clear {
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(115 115 115 / 0.4);
    background: transparent;
    color: rgb(115 115 115);
    font-size: 0.8125rem;
    cursor: pointer;
}
.as-schedule-clear:hover {
    color: rgb(239 68 68);
    border-color: rgb(239 68 68);
}

/* Scheduled badge in admin table */
.as-status-scheduled {
    background: rgb(219 234 254) !important;
    color: rgb(30 64 175) !important;
}
.dark .as-status-scheduled {
    background: rgb(30 58 138 / 0.4) !important;
    color: rgb(147 197 253) !important;
}

/* ==========================================================
   ===== RESEND DASHBOARD (admin) ===========================
   ========================================================== */
.as-resend-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgb(56 189 248 / 0.5);
    padding-bottom: 0.75rem;
}
.dark .as-resend-tabs { border-color: rgb(64 64 64); }
.as-resend-tab {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgb(115 115 115);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.dark .as-resend-tab { color: rgb(163 163 163); }
.as-resend-tab:hover {
    color: rgb(53 179 255);
}
.as-resend-tab.is-active {
    color: rgb(53 179 255);
    background: rgb(254 243 232);
}
.dark .as-resend-tab.is-active {
    background: rgb(38 38 38);
}
.as-resend-panel {
    display: none;
}
.as-resend-panel.is-active {
    display: block;
}
.as-resend-card {
    border: 1px solid rgb(56 189 248 / 0.5);
    border-radius: 0.75rem;
    padding: 1rem;
    background: rgb(255 255 255);
    margin-bottom: 0.75rem;
}
.dark .as-resend-card {
    background: rgb(38 38 38);
    border-color: rgb(64 64 64);
}
.as-resend-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(38 38 38);
    margin-bottom: 0.25rem;
}
.dark .as-resend-card-title { color: rgb(245 245 245); }
.as-resend-card-meta {
    font-size: 0.75rem;
    color: rgb(115 115 115);
}
.dark .as-resend-card-meta { color: rgb(163 163 163); }
.as-resend-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgb(115 115 115);
    margin-top: 0.5rem;
}
.dark .as-resend-card-row { color: rgb(163 163 163); }
.as-resend-status {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.as-resend-status-sent      { background: rgb(219 234 204); color: rgb(54 95 30); }
.as-resend-status-draft     { background: rgb(245 245 245); color: rgb(82 82 82); }
.as-resend-status-scheduled { background: rgb(219 234 254); color: rgb(30 64 175); }
.as-resend-status-queued    { background: rgb(224 242 254); color: rgb(146 64 14); }
.as-resend-status-cancelled { background: rgb(254 226 226); color: rgb(153 27 27); }
.dark .as-resend-status-sent      { background: rgb(20 50 20 / 0.5); color: rgb(187 247 208); }
.dark .as-resend-status-draft     { background: rgb(64 64 64); color: rgb(229 229 229); }
.dark .as-resend-status-scheduled { background: rgb(30 58 138 / 0.5); color: rgb(147 197 253); }
.dark .as-resend-status-queued    { background: rgb(146 64 14 / 0.4); color: rgb(188 228 255); }
.dark .as-resend-status-cancelled { background: rgb(127 29 29 / 0.5); color: rgb(254 202 202); }

.as-resend-contact-list {
    max-height: 24rem;
    overflow-y: auto;
    border: 1px solid rgb(56 189 248 / 0.4);
    border-radius: 0.5rem;
}
.dark .as-resend-contact-list { border-color: rgb(64 64 64); }
.as-resend-contact-list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.as-resend-contact-list th,
.as-resend-contact-list td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgb(56 189 248 / 0.3);
}
.dark .as-resend-contact-list th,
.dark .as-resend-contact-list td { border-color: rgb(64 64 64); }
.as-resend-contact-list th {
    background: rgb(240 249 255);
    font-weight: 600;
    color: rgb(64 64 64);
    position: sticky;
    top: 0;
}
.dark .as-resend-contact-list th {
    background: rgb(23 23 23);
    color: rgb(229 229 229);
}
.as-resend-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(56 189 248 / 0.7);
    background: rgb(255 255 255);
    color: rgb(38 38 38);
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}
.dark .as-resend-search {
    background: rgb(38 38 38);
    color: rgb(245 245 245);
    border-color: rgb(64 64 64);
}

/* Broadcast "use this audience/segment" picker inside editor */
.as-resend-picker-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.25rem;
}
.as-resend-picker-row select {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(56 189 248 / 0.7);
    background: rgb(255 255 255);
    color: rgb(38 38 38);
    font-size: 0.8125rem;
}
.dark .as-resend-picker-row select {
    background: rgb(38 38 38);
    color: rgb(245 245 245);
    border-color: rgb(64 64 64);
}
.as-resend-refresh-btn {
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(56 189 248 / 0.7);
    background: rgb(255 255 255);
    color: rgb(64 64 64);
    font-size: 0.8125rem;
    cursor: pointer;
    white-space: nowrap;
}
.dark .as-resend-refresh-btn {
    background: rgb(38 38 38);
    color: rgb(229 229 229);
    border-color: rgb(64 64 64);
}
.as-resend-refresh-btn:hover {
    border-color: rgb(53 179 255);
    color: rgb(53 179 255);
}
.as-resend-contact-count {
    font-size: 0.6875rem;
    color: rgb(115 115 115);
    margin-top: 0.25rem;
}
.dark .as-resend-contact-count { color: rgb(163 163 163); }
.as-resend-contact-count button {
    color: rgb(53 179 255);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-decoration: underline;
}

/* ==========================================================
   ===== v2 UPDATES — TABS AS <A>, NEW-POST DROPDOWN =========
   ========================================================== */

/* The Resend Manager tabs are now <a data-link="..."> so they
   navigate to /admin/resend-manager/[tab]. Make sure they
   render identically to the old <button> tabs. */
a.as-resend-tab {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* "New Post" dropdown in the admin dashboard */
#admin-new-dropdown {
    animation: dropdownIn 0.18s ease forwards;
    transform-origin: top right;
}
#admin-new-dropdown a {
    transition: background-color 0.15s ease, color 0.15s ease;
    text-decoration: none;
}
#admin-new-dropdown a:hover {
    color: rgb(53 179 255);
}

/* Make the orange "create" / "add" CTA buttons consistent */
.as-resend-refresh-btn[style*="rgb(53 179 255)"] {
    font-weight: 500;
}
.as-resend-refresh-btn[style*="rgb(239 68 68)"]:hover {
    background: rgb(239 68 68 / 0.1);
}

/* "Back to Admin" / "Back to posts" buttons — keep them looking
   like text links rather than primary buttons */
#admin-resend-back,
#admin-preview-close,
#admin-cancel-btn {
    cursor: pointer;
}

/* Preview page: hide the audience picker row cleanly when not needed */
#admin-preview-audience-picker.hidden {
    display: none !important;
}

/* Preview page table tweaks — slightly more padding for readability */
#admin-preview-content .as-resend-contact-list table {
    font-size: 0.8125rem;
}
#admin-preview-content .as-resend-contact-list th {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* In the Resend Manager, when a card has a flex header (title + delete btn),
   make sure the title doesn't overflow on small screens. */
.as-resend-card .flex.items-start.justify-between {
    gap: 0.5rem;
}
.as-resend-card .flex.items-start .flex-1 {
    min-width: 0;
}
.as-resend-card .flex.items-start .as-resend-card-title {
    word-break: break-word;
}

/* ==========================================================
   ===== ADMIN LOADING SPINNER (anti-flicker) ================
   ==========================================================
   Shown inside #admin while Firebase Auth is restoring the
   session (before we know whether to show the login form or
   the dashboard). Prevents the login form from flashing on
   page load / refresh when the user is actually signed in. */
#admin-loading {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
#admin-loading.hidden {
    display: none !important;
}


/* ============================================================
   Aftersolves v1.40 — Liquid Glass Button Effect (refined)
   Brand color #35B3FF, Apple iOS 18 / macOS Sequoia aesthetic.
   ============================================================
   The .btn-glass class wraps ANY button/anchor to give it the
   liquid-glass look. To keep text readable on the translucent
   background, we EXPLICITLY set a high-contrast text color:
     - Light mode: dark text (neutral-900) on light glass
     - Dark mode:  white text on darker glass
   Inline Tailwind text color utilities are overridden with
   !important so the user never sees faint text on glass.
   ============================================================ */

.btn-glass {
    position: relative;
    isolation: isolate;
    /* Brand color #35B3FF @ 16% — light translucent fill */
    background: rgba(53, 179, 255, 0.16) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(53, 179, 255, 0.35) !important;
    /* Force dark text on light glass — keeps AA contrast */
    color: rgb(17, 24, 39) !important;             /* neutral-900 */
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.7) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.05) inset,
        0 8px 24px -8px rgba(53, 179, 255, 0.4) !important;
    transition: background-color 0.2s ease, backdrop-filter 0.2s ease,
                border-color 0.2s ease, transform 0.2s ease,
                box-shadow 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    overflow: hidden;
    font-weight: 500;
}

/* Specular sheen across the top of the button — the "glass" highlight */
.btn-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 1;
}

.btn-glass > * { position: relative; z-index: 2; }

.btn-glass:hover {
    background: rgba(53, 179, 255, 0.26) !important;
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-color: rgba(53, 179, 255, 0.55) !important;
    color: rgb(17, 24, 39) !important;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.9) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.05) inset,
        0 12px 32px -8px rgba(53, 179, 255, 0.55) !important;
    transform: translateY(-1px);
}

.btn-glass:active {
    transform: translateY(0);
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.5) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.05) inset,
        0 4px 12px -4px rgba(53, 179, 255, 0.4) !important;
}

.btn-glass:focus-visible {
    outline: 2px solid rgb(53, 179, 255);
    outline-offset: 2px;
}

/* Dark mode: stronger glass + bright text on dark backgrounds */
.dark .btn-glass {
    background: rgba(53, 179, 255, 0.22) !important;
    border-color: rgba(125, 211, 252, 0.45) !important;
    color: rgb(255, 255, 255) !important;            /* pure white for max contrast */
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.18) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.25) inset,
        0 8px 24px -8px rgba(53, 179, 255, 0.55) !important;
}

.dark .btn-glass:hover {
    background: rgba(53, 179, 255, 0.32) !important;
    border-color: rgba(125, 211, 252, 0.65) !important;
    color: rgb(255, 255, 255) !important;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.28) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.25) inset,
        0 12px 32px -8px rgba(53, 179, 255, 0.7) !important;
}

/* Variant: .btn-glass.is-solid-brand — solid brand color pill, white text.
   Use for PRIMARY CTAs on dark or busy backgrounds where the default
   translucent glass would be invisible. */
.btn-glass.is-solid-brand {
    background: rgb(53, 179, 255) !important;
    border-color: rgb(53, 179, 255) !important;
    color: rgb(255, 255, 255) !important;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.4) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.1) inset,
        0 8px 24px -8px rgba(53, 179, 255, 0.55) !important;
}
.btn-glass.is-solid-brand:hover {
    background: rgb(31, 147, 224) !important;          /* brand-600 */
    border-color: rgb(31, 147, 224) !important;
    color: rgb(255, 255, 255) !important;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.5) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.1) inset,
        0 12px 32px -8px rgba(53, 179, 255, 0.7) !important;
}
.dark .btn-glass.is-solid-brand {
    background: rgb(53, 179, 255) !important;
    border-color: rgb(53, 179, 255) !important;
    color: rgb(255, 255, 255) !important;
}
.dark .btn-glass.is-solid-brand:hover {
    background: rgb(90, 193, 255) !important;          /* brand-400 — brighter in dark mode */
    border-color: rgb(90, 193, 255) !important;
    color: rgb(255, 255, 255) !important;
}

/* Variant: .btn-glass.is-solid-light — solid white pill, dark text.
   Use on DARK cards/sections where a white pill needs to pop. */
.btn-glass.is-solid-light {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    color: rgb(17, 24, 39) !important;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.8) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.05) inset,
        0 8px 24px -8px rgba(0, 0, 0, 0.35) !important;
}
.btn-glass.is-solid-light:hover {
    background: rgb(255, 255, 255) !important;
    color: rgb(17, 24, 39) !important;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.9) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.05) inset,
        0 12px 32px -8px rgba(0, 0, 0, 0.45) !important;
}
.dark .btn-glass.is-solid-light {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    color: rgb(17, 24, 39) !important;
}
.dark .btn-glass.is-solid-light:hover {
    background: rgb(255, 255, 255) !important;
    color: rgb(17, 24, 39) !important;
}

/* Variant: .btn-glass.is-solid-dark — solid dark pill, white text.
   Use on LIGHT cards/sections where a dark pill needs to pop. */
.btn-glass.is-solid-dark {
    background: rgb(17, 24, 39) !important;
    border-color: rgb(17, 24, 39) !important;
    color: rgb(255, 255, 255) !important;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.1) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.2) inset,
        0 8px 24px -8px rgba(0, 0, 0, 0.4) !important;
}
.btn-glass.is-solid-dark:hover {
    background: rgb(31, 41, 55) !important;            /* neutral-800 */
    border-color: rgb(31, 41, 55) !important;
    color: rgb(255, 255, 255) !important;
}
.dark .btn-glass.is-solid-dark {
    background: rgb(255, 255, 255) !important;
    border-color: rgb(255, 255, 255) !important;
    color: rgb(17, 24, 39) !important;
    box-shadow:
        0 1px 0 0 rgba(0, 0, 0, 0.05) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.05) inset,
        0 8px 24px -8px rgba(255, 255, 255, 0.2) !important;
}
.dark .btn-glass.is-solid-dark:hover {
    background: rgb(229, 231, 235) !important;         /* neutral-200 */
    color: rgb(17, 24, 39) !important;
}

/* Reduced motion: disable hover transform */
@media (prefers-reduced-motion: reduce) {
    .btn-glass,
    .btn-glass:hover,
    .btn-glass:active {
        transform: none !important;
        transition: background-color 0.2s ease, border-color 0.2s ease;
    }
}

/* Brand radial-gradient hero — replaces the old yellow-400 hero on
   /leaderships and /partnership pages. Apply via class="as-soft-blue-hero"
   on the <header> element. */
.as-soft-blue-hero {
    background:
        radial-gradient(ellipse at top right,
            rgb(53 179 255 / 0.55) 0%,
            rgb(31 147 224 / 0.45) 40%,
            rgb(28 96 144 / 0.4) 100%);
}

.dark .as-soft-blue-hero {
    background:
        radial-gradient(ellipse at top right,
            rgb(31 147 224 / 0.45) 0%,
            rgb(28 96 144 / 0.55) 40%,
            rgb(19 50 82 / 0.65) 100%);
}

/* ============================================================
   AFTERSOLVES v2 — PREMIUM REDESIGN SYSTEM
   ============================================================
   Apple × Linear × Premium Software Engineering Studio
   ------------------------------------------------------------
   This block ADDS new tokens and components on top of the
   existing v1.41 design system. It does not delete or rewrite
   the legacy rules — it overrides them where the v2 spec
   requires a different value.

   Reference brand values:
   - Primary accent : #5AB4FA   (brand-400)
   - Background     : #FFFFFF
   - Primary text   : #111111   (neutral-900)
   - Secondary text : #6B7280   (neutral-500)
   - Borders        : #E5E7EB   (neutral-200)
   - Light bg       : #F8FAFC   (neutral-50)

   Spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 120
   Container    : max-width 1200–1280px, padding 32–48px desktop / 20–24px mobile
   Type scale    : Hero 56-64 / Heading 40-48 / Sub 20-24 / Body 16-17 / Nav 14-16 / Btn 14-15
   ============================================================ */

/* ---------- 1. Type & color tokens ---------- */
:root {
    --as-accent:        #5AB4FA;
    --as-accent-strong: #3a9ae0;
    --as-bg:            #FFFFFF;
    --as-bg-soft:       #F8FAFC;
    --as-text:          #111111;
    --as-text-muted:    #6B7280;
    --as-border:        #E5E7EB;
    --as-container:     1280px;
}
.dark {
    --as-accent:        #5AB4FA;
    --as-accent-strong: #7dcffc;
    --as-bg:            #0a0a0a;
    --as-bg-soft:       #111111;
    --as-text:          #ffffff;
    --as-text-muted:    #9ca3af;
    --as-border:        #1f2937;
}

/* ---------- 2. Container ---------- */
.as-container {
    max-width: var(--as-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;   /* mobile 24px */
    padding-right: 1.5rem;
}
@media (min-width: 1024px) {
    .as-container {
        padding-left: 2rem;   /* desktop 32px */
        padding-right: 2rem;
    }
}
@media (min-width: 1280px) {
    .as-container {
        padding-left: 3rem;   /* large desktop 48px */
        padding-right: 3rem;
    }
}

/* ---------- 3. Section rhythm ---------- */
.as-section {
    padding-top: 3.5rem;   /* mobile 56px */
    padding-bottom: 3.5rem;
}
@media (min-width: 768px) {
    .as-section {
        padding-top: 5rem;   /* desktop 80px */
        padding-bottom: 5rem;
    }
}
@media (min-width: 1024px) {
    .as-section {
        padding-top: 7.5rem;   /* large 120px */
        padding-bottom: 7.5rem;
    }
}

/* ---------- 4. Editorial typography ---------- */
.as-eyebrow {
    font-size: 0.75rem;       /* 12px small label */
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--as-accent);
}
@media (min-width: 768px) {
    .as-eyebrow { font-size: 0.875rem; }   /* 14px */
}

.as-h1 {
    font-size: clamp(2.375rem, 4vw + 1rem, 4rem);   /* 38–64px */
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: var(--as-text);
}
.as-h2 {
    font-size: clamp(1.875rem, 2.2vw + 1rem, 3rem);   /* 30–48px */
    line-height: 1.1;
    letter-spacing: -0.018em;
    font-weight: 600;
    color: var(--as-text);
}
.as-h3 {
    font-size: clamp(1.125rem, 1vw + 1rem, 1.5rem);   /* 18–24px */
    line-height: 1.3;
    letter-spacing: -0.01em;
    font-weight: 600;
    color: var(--as-text);
}
.as-body {
    font-size: 1rem;   /* 16px */
    line-height: 1.6;
    color: var(--as-text-muted);
}
@media (min-width: 768px) {
    .as-body { font-size: 1.0625rem; }   /* 17px */
}
.as-small {
    font-size: 0.8125rem;   /* 13px small label */
    line-height: 1.5;
    color: var(--as-text-muted);
}

/* ---------- 5. Button system (v2) ---------- */
/* Spec: 44–50px height, 12–14px radius, comfortable padding,
   clear hover/focus, subtle animation, NOT pill-shaped everywhere. */
.as-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 44px;
    padding: 0 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    border-radius: 0.75rem;   /* 12px */
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.18s ease,
                border-color 0.18s ease,
                color 0.18s ease,
                transform 0.18s ease,
                box-shadow 0.18s ease;
    white-space: nowrap;
    text-decoration: none;
}
.as-btn:focus-visible {
    outline: 2px solid var(--as-accent);
    outline-offset: 2px;
}
.as-btn:active { transform: translateY(0.5px); }
@media (min-width: 768px) {
    .as-btn { height: 48px; padding: 0 1.5rem; font-size: 0.9375rem; }
}

/* Primary — solid accent */
.as-btn-primary {
    background: var(--as-accent);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px -4px rgba(90, 180, 250, 0.4);
}
.as-btn-primary:hover {
    background: var(--as-accent-strong);
    transform: translateY(-1px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 8px 20px -6px rgba(90, 180, 250, 0.55);
}
.dark .as-btn-primary {
    background: var(--as-accent);
    color: #0a0a0a;
}

/* Secondary — border + soft fill */
.as-btn-secondary {
    background: transparent;
    color: var(--as-text);
    border-color: var(--as-border);
}
.as-btn-secondary:hover {
    background: var(--as-bg-soft);
    border-color: var(--as-text-muted);
    transform: translateY(-1px);
}
.dark .as-btn-secondary {
    border-color: var(--as-border);
    color: var(--as-text);
}
.dark .as-btn-secondary:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--as-text-muted);
}

/* On-dark secondary (used over hero/video) */
.as-btn-on-dark {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    border-color: rgba(255,255,255,0.32);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.as-btn-on-dark:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

/* Text button with arrow */
.as-btn-text {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: auto;
    padding: 0;
    background: transparent;
    color: var(--as-accent);
    border: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 0;
    box-shadow: none;
}
.as-btn-text:hover {
    color: var(--as-accent-strong);
}
.as-btn-text .as-btn-arrow {
    transition: transform 0.18s ease;
}
.as-btn-text:hover .as-btn-arrow {
    transform: translateX(3px);
}

/* ---------- 6. Card (used sparingly) ---------- */
.as-card {
    background: var(--as-bg);
    border: 1px solid var(--as-border);
    border-radius: 1rem;
    padding: 1.75rem;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.as-card:hover {
    border-color: rgba(90, 180, 250, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.12);
}

/* ---------- 7. Editorial divider rows (What-we-build layout) ---------- */
.as-row-link {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: start;
    gap: 1rem;
    padding: 2rem 0;
    border-top: 1px solid var(--as-border);
    text-decoration: none;
    color: inherit;
    transition: padding 0.18s ease, background-color 0.18s ease;
}
.as-row-link:last-child { border-bottom: 1px solid var(--as-border); }
.as-row-link:hover {
    background: linear-gradient(90deg, rgba(90,180,250,0.04), transparent 70%);
    padding-left: 0.5rem;
}
.as-row-link .as-row-num {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--as-text-muted);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    padding-top: 4px;
}
.as-row-link .as-row-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--as-text);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
@media (min-width: 768px) {
    .as-row-link .as-row-title { font-size: 1.875rem; }
}
.as-row-link .as-row-desc {
    color: var(--as-text-muted);
    font-size: 1rem;
    line-height: 1.55;
    max-width: 52ch;
}
.as-row-link .as-row-arrow {
    color: var(--as-text-muted);
    transition: color 0.18s ease, transform 0.18s ease;
    padding-top: 6px;
}
.as-row-link:hover .as-row-arrow {
    color: var(--as-accent);
    transform: translateX(4px);
}
.as-row-link:hover .as-row-title {
    color: var(--as-accent);
}

/* ---------- 8. Process timeline (How we work) ---------- */
.as-timeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    position: relative;
}
@media (min-width: 1024px) {
    .as-timeline {
        grid-template-columns: repeat(6, 1fr);
        gap: 0;
    }
}
.as-timeline-step {
    padding: 1.25rem 0;
    border-top: 1px solid var(--as-border);
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 0.75rem;
}
@media (min-width: 1024px) {
    .as-timeline-step {
        padding: 1.5rem 1rem 1.5rem 0;
        border-top: none;
        border-left: 1px solid var(--as-border);
        display: block;
    }
    .as-timeline-step:first-child { border-left: none; }
}
.as-timeline-num {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--as-accent);
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.5rem;
}
.as-timeline-title {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--as-text);
    margin-bottom: 0.375rem;
}
.as-timeline-desc {
    font-size: 0.875rem;
    color: var(--as-text-muted);
    line-height: 1.55;
}

/* ---------- 9. Case-study block (Selected work) ---------- */
.as-case {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 0;
    border-top: 1px solid var(--as-border);
    text-decoration: none;
    color: inherit;
}
@media (min-width: 768px) {
    .as-case {
        grid-template-columns: 1.05fr 1fr;
        gap: 3rem;
        align-items: center;
        padding: 3rem 0;
    }
}
.as-case:last-of-type { border-bottom: 1px solid var(--as-border); }
.as-case-image {
    aspect-ratio: 16 / 11;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--as-bg-soft);
    border: 1px solid var(--as-border);
}
.as-case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.as-case:hover .as-case-image img { transform: scale(1.03); }
.as-case-meta {
    font-size: 0.75rem;
    color: var(--as-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    font-weight: 500;
}
.as-case-title {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--as-text);
    margin-bottom: 0.75rem;
    line-height: 1.15;
}
@media (min-width: 768px) {
    .as-case-title { font-size: 2.25rem; }
}
.as-case-desc {
    color: var(--as-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    max-width: 52ch;
}
.as-case-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.as-case-tech span {
    font-size: 0.75rem;
    color: var(--as-text-muted);
    background: var(--as-bg-soft);
    border: 1px solid var(--as-border);
    padding: 0.25rem 0.625rem;
    border-radius: 0.5rem;
}

/* ---------- 10. Why-Aftersolves editorial list ---------- */
.as-why-list { display: grid; gap: 0; }
.as-why-item {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--as-border);
}
.as-why-item:last-child { border-bottom: 1px solid var(--as-border); }
.as-why-num {
    font-size: 0.75rem;
    color: var(--as-text-muted);
    font-variant-numeric: tabular-nums;
    padding-top: 6px;
    letter-spacing: 0.04em;
}
.as-why-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--as-text);
    margin-bottom: 0.375rem;
    letter-spacing: -0.01em;
}
@media (min-width: 768px) {
    .as-why-title { font-size: 1.25rem; }
}
.as-why-desc {
    font-size: 0.9375rem;
    color: var(--as-text-muted);
    line-height: 1.55;
}

/* ---------- 11. Technology grid ---------- */
.as-tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
@media (min-width: 640px) { .as-tech-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px) { .as-tech-grid { grid-template-columns: repeat(6, 1fr); gap: 1rem; } }
@media (min-width: 1024px) { .as-tech-grid { grid-template-columns: repeat(8, 1fr); } }
.as-tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1rem 0.5rem;
    border: 1px solid var(--as-border);
    border-radius: 0.75rem;
    background: var(--as-bg);
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.as-tech-item:hover {
    border-color: rgba(90,180,250,0.4);
    transform: translateY(-2px);
}
.as-tech-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    /* When the image fails to load, don't show the broken-image icon —
       just collapse to the label-only treatment. */
    background: transparent;
    color: transparent;
}
.as-tech-item img::before {
    content: "";
    display: none;
}
.as-tech-item img::after {
    content: "";
    display: none;
}
@media (min-width: 768px) {
    .as-tech-item img { width: 36px; height: 36px; }
}
.as-tech-item span {
    font-size: 0.75rem;
    color: var(--as-text-muted);
    font-weight: 500;
    /* Allow text to wrap onto multiple lines on very narrow grids
       instead of being clipped to one truncated line. */
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* ---------- 12. Team ---------- */
.as-team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) { .as-team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .as-team-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.as-team-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.as-team-avatar {
    aspect-ratio: 4 / 5;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--as-bg-soft);
    border: 1px solid var(--as-border);
}
.as-team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.as-team-card:hover .as-team-avatar img { transform: scale(1.04); }
.as-team-name {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--as-text);
}
.as-team-role {
    font-size: 0.875rem;
    color: var(--as-text-muted);
}

/* ---------- 13. Final CTA ---------- */
.as-cta-band {
    padding: 4rem 0 2rem;
    text-align: left;
}
@media (min-width: 768px) {
    .as-cta-band { padding: 6rem 0 3rem; }
}
.as-cta-eyebrow {
    font-size: 0.75rem;
    color: var(--as-accent);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 500;
}
.as-cta-title {
    font-size: clamp(1.875rem, 2.5vw + 1rem, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: var(--as-text);
    margin-bottom: 0.75rem;
}
.as-cta-sub {
    font-size: 1rem;
    color: var(--as-text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}
@media (min-width: 768px) {
    .as-cta-sub { font-size: 1.0625rem; }
}

/* ---------- 14. Region selector (Apple-style dropdown) ---------- */
.as-region {
    position: relative;
    display: inline-flex;
}
.as-region-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 36px;
    padding: 0 0.625rem 0 0.5rem;
    background: transparent;
    border: 1px solid var(--as-border);
    border-radius: 0.625rem;
    color: var(--as-text);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}
.as-region-btn:hover {
    background: var(--as-bg-soft);
    border-color: var(--as-text-muted);
}
.as-region-btn:focus-visible {
    outline: 2px solid var(--as-accent);
    outline-offset: 2px;
}
.as-region-flag {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.as-region-flag svg {
    width: 100%;
    height: 100%;
    display: block;
}
.as-region-caret {
    transition: transform 0.18s ease;
}
.as-region.is-open .as-region-caret {
    transform: rotate(180deg);
}
.as-region-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: var(--as-bg);
    border: 1px solid var(--as-border);
    border-radius: 0.75rem;
    box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 60;
    padding: 0.375rem;
}
.as-region.is-open .as-region-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dark .as-region-menu {
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
}
.as-region-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.625rem 0.625rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: var(--as-text);
    font-size: 0.875rem;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease;
}
.as-region-option:hover { background: var(--as-bg-soft); }
.as-region-option.is-active {
    background: rgba(90, 180, 250, 0.08);
    color: var(--as-accent);
}
.as-region-option .as-region-flag { width: 18px; height: 18px; }
.as-region-option-label { font-weight: 500; }
.as-region-option-sub {
    font-size: 0.75rem;
    color: var(--as-text-muted);
    margin-left: auto;
}

/* ---------- 15. Mobile navigation (Apple-inspired) ---------- */
#as-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.32s ease,
                visibility 0.32s;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.dark #as-mobile-menu {
    background: rgba(10, 10, 10, 0.94);
}
#as-mobile-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.as-mobile-inner {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 5.5rem 1.5rem 2rem;
    max-width: 480px;
    margin: 0 auto;
}
.as-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 0;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--as-text);
    text-decoration: none;
    border-top: 1px solid var(--as-border);
    transition: color 0.18s ease;
}
.as-mobile-link:first-of-type { border-top: none; }
.as-mobile-link:hover,
.as-mobile-link:active { color: var(--as-accent); }
.as-mobile-section-label {
    font-size: 0.75rem;
    color: var(--as-text-muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.as-mobile-cta {
    margin-top: 1.75rem;
    width: 100%;
}
.as-mobile-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--as-text);
    cursor: pointer;
    border-radius: 0.5rem;
}
.as-mobile-close:hover { background: var(--as-bg-soft); }

/* Lock body scroll when mobile menu open */
body.as-mobile-open { overflow: hidden; }

/* ---------- 16. Trust strip (Trusted by) ---------- */
.as-trust {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--as-border);
    overflow: hidden;
}
.as-trust-label {
    font-size: 0.75rem;
    color: var(--as-text-muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.as-trust-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem 2.5rem;
}
/* Marquee version — infinite horizontal scroll, pause on hover. */
.as-trust-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.as-trust-track {
    display: flex;
    align-items: center;
    gap: 3.5rem;
    width: max-content;
    animation: as-trust-marquee 32s linear infinite;
}
.as-trust-marquee:hover .as-trust-track,
.as-trust-marquee:focus-within .as-trust-track {
    animation-play-state: paused;
}
@keyframes as-trust-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }   /* -50% because the track is duplicated */
}
@media (prefers-reduced-motion: reduce) {
    .as-trust-track { animation: none; transform: none; }
}
.as-trust-item {
    color: var(--as-text-muted);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    opacity: 0.65;
    transition: opacity 0.18s ease, color 0.18s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.as-trust-item:hover {
    opacity: 1;
    color: var(--as-text);
}
.as-trust-item img {
    height: 24px;
    width: auto;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.18s ease;
}
.as-trust-item:hover img { opacity: 1; }
@media (min-width: 768px) {
    .as-trust-item { font-size: 1.5rem; }
    .as-trust-item img { height: 28px; }
}

/* ---------- 17. Footer (Apple-inspired, compact) ---------- */
.as-footer {
    background: var(--as-bg-soft);
    border-top: 1px solid var(--as-border);
    padding: 3rem 0 2rem;
}
.dark .as-footer {
    background: var(--as-bg);
}
.as-footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--as-border);
}
@media (min-width: 768px) {
    .as-footer-top {
        grid-template-columns: 1.5fr repeat(4, 1fr);
        gap: 2rem;
    }
}
.as-footer-brand-name {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--as-text);
    margin-bottom: 0.375rem;
}
.as-footer-brand-tag {
    font-size: 0.8125rem;
    color: var(--as-text-muted);
    line-height: 1.55;
    max-width: 28ch;
}
.as-footer-col-label {
    font-size: 0.75rem;
    color: var(--as-text-muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 500;
}
.as-footer-list { display: flex; flex-direction: column; gap: 0.625rem; }
.as-footer-list a {
    font-size: 0.875rem;
    color: var(--as-text);
    text-decoration: none;
    transition: color 0.18s ease;
}
.as-footer-list a:hover { color: var(--as-accent); }
.as-footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    padding-top: 2rem;
    font-size: 0.8125rem;
    color: var(--as-text-muted);
}
@media (min-width: 768px) {
    .as-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}
.as-footer-bottom-links {
    display: flex;
    gap: 1.25rem;
}
.as-footer-bottom-links a {
    color: var(--as-text-muted);
    text-decoration: none;
    transition: color 0.18s ease;
}
.as-footer-bottom-links a:hover { color: var(--as-text); }

/* ---------- 18. Hero refinements ---------- */
.as-hero {
    position: relative;
    width: 100%;
    min-height: 88vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #0a0a0a;
}
@media (min-width: 768px) {
    .as-hero { min-height: 92vh; }
}
.as-hero-inner {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 0 1.5rem 4rem;
    max-width: var(--as-container);
    margin: 0 auto;
}
@media (min-width: 768px) {
    .as-hero-inner { padding: 0 2rem 6rem; }
}
.as-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 9999px;
    padding: 0.375rem 0.875rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .as-hero-eyebrow { font-size: 0.8125rem; margin-bottom: 1.75rem; }
}
.as-hero-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--as-accent);
}
.as-hero-title {
    font-size: clamp(2.375rem, 5vw + 0.5rem, 4rem);  /* 38–64px */
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-weight: 600;
    color: #ffffff;
    max-width: 18ch;
}
.as-hero-sub {
    margin-top: 1.25rem;
    font-size: 1.0625rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.55;
    max-width: 56ch;
}
@media (min-width: 768px) {
    .as-hero-sub { font-size: 1.1875rem; margin-top: 1.5rem; }
}
.as-hero-cta {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
@media (min-width: 768px) {
    .as-hero-cta { margin-top: 2.5rem; gap: 1rem; }
}

/* ---------- 19. Section heading layout ---------- */
.as-section-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 3rem;
}
@media (min-width: 768px) {
    .as-section-head {
        grid-template-columns: 200px 1fr;
        gap: 3rem;
        margin-bottom: 4rem;
    }
}
.as-section-head .as-eyebrow {
    align-self: start;
}
@media (min-width: 768px) {
    .as-section-head .as-eyebrow {
        padding-top: 12px;
    }
}

/* ---------- 20. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .as-btn,
    .as-btn-text,
    .as-card,
    .as-row-link,
    .as-case,
    .as-tech-item,
    .as-team-card,
    .as-region-btn,
    .as-region-menu,
    .as-mobile-link,
    #as-mobile-menu {
        transition: none !important;
        animation: none !important;
    }
    .as-btn:hover,
    .as-card:hover,
    .as-row-link:hover,
    .as-case:hover .as-case-image img,
    .as-team-card:hover .as-team-avatar img,
    .as-tech-item:hover {
        transform: none !important;
    }
}

/* ---------- 21. Utility: hide on dark video for legibility ---------- */
.as-hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(0,0,0,0.45) 0%,
            rgba(0,0,0,0.20) 35%,
            rgba(0,0,0,0.55) 100%);
}

/* ---------- 22. Editorial paragraph (about/long-form) ---------- */
.as-prose p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--as-text);
    margin-bottom: 1.25rem;
    max-width: 68ch;
}
.as-prose p:last-child { margin-bottom: 0; }

/* ---------- 23. Inline link (in body copy) ---------- */
.as-link {
    color: var(--as-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(90, 180, 250, 0.3);
    transition: border-color 0.18s ease, color 0.18s ease;
}
.as-link:hover {
    color: var(--as-accent-strong);
    border-bottom-color: var(--as-accent-strong);
}

/* ============================================================
   AFTERSOLVES v1.61 — Share Component
   ============================================================
   Minimal, on-brand share buttons for Newsroom articles.
   - Inline-flex row, small icons, no big dominant buttons
   - Native Web Share API used first on mobile (as-share-native)
   - UTM parameters appended to outbound share links
   - prefers-reduced-motion respected
   ============================================================ */

.as-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--as-border);
}
.as-share-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--as-text-muted);
    margin-right: 0.25rem;
}
.as-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    border: 1px solid var(--as-border);
    background: var(--as-bg);
    color: var(--as-text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
    flex-shrink: 0;
}
.as-share-btn:hover {
    border-color: rgba(90, 180, 250, 0.5);
    color: var(--as-text);
    background: var(--as-bg-soft);
    transform: translateY(-1px);
}
.as-share-btn:active { transform: translateY(0); }
.as-share-btn:focus-visible {
    outline: 2px solid var(--as-accent);
    outline-offset: 2px;
}
.as-share-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.as-share-btn-text {
    width: auto;
    padding: 0 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    gap: 0.375rem;
}
.as-share-btn-text svg { width: 14px; height: 14px; }
.as-share-btn-native {
    background: var(--as-accent);
    color: #ffffff;
    border-color: var(--as-accent);
}
.as-share-btn-native:hover {
    background: var(--as-accent-strong);
    border-color: var(--as-accent-strong);
    color: #ffffff;
}
.as-share-copy {
    position: relative;
}
.as-share-copy[data-copied="true"] {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.4);
    color: #16a34a;
}
.as-share-toast {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--as-text);
    color: var(--as-bg);
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.as-share-copy[data-copied="true"] .as-share-toast {
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    .as-share-btn, .as-share-btn:hover, .as-share-btn:active { transition: none; transform: none; }
}
