/* =============================================================
   XICA REBRAND — GLOBAL SHELL CSS
   Loaded on every page via add_action('wp_head', fn, 9999).
   Priority 9999 guarantees this captures structural envelope setups.
   ============================================================= */

/* =========================================================
   1. CORE TOKENS
   ========================================================= */
:root {
    /* Color System */
    --ink:       #0A0A0A;
    --ink-2:     #1F1F1F;
    --grey-1:    #5C5C5C;
    --grey-2:    #8A8A8A;
    --grey-3:    #B8B8B8;
    --rule:      #E5E5E2;
    --paper:     #FFFFFF;
    --paper-2:   #FAFAF8;
    --paper-3:   #F2F1ED;

/* Type stack */
    --serif:    "adobe-caslon-pro", "Zen Old Mincho", "游明朝体", YuMincho, "Yu Mincho", ui-serif, Georgia, serif;
    --serif-jp: "Zen Old Mincho", "adobe-caslon-pro", "游明朝体", YuMincho, "Yu Mincho", serif;
    --sans:     "Inter", "Zen Kaku Gothic New", "游ゴシック体", YuGothic, "Yu Gothic", ui-sans-serif, system-ui, sans-serif;
    --sans-jp:  "Zen Kaku Gothic New", "Inter", "游ゴシック体", YuGothic, "Yu Gothic", sans-serif;
    --mono:      "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Global Structural Layout */
    --container: 1200px;
    --gutter:    20px;
    --header-h:  56px;
}

@media (min-width: 768px)  { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --header-h: 96px; } }

/* Precise Font-Internal Leading Trim */
.xr-header .wordmark, .h-mega {
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
}

/* =========================================================
   2. GLOBAL RESET & BASE RENDERING
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--sans-jp);
    font-weight: 400;
    color: var(--ink);
    background-color: var(--paper);
    line-height: 1.85;
    text-wrap: pretty;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    hanging-punctuation: first last;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; border-radius: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button {
    font-family: inherit;
    cursor: pointer;
    border-radius: 0;
    background: none;
    border: none;
    color: inherit;
}
:focus-visible {
    outline: 1px solid var(--ink);
    outline-offset: 2px;
}

/* =========================================================
   3. BASE TYPOGRAPHIC UTILITIES
   ========================================================= */
.serif    { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; }
.serif-jp { font-family: var(--serif-jp); font-weight: 500; letter-spacing: 0.005em; }
.en       { font-family: var(--serif), century-gothic, sans-serif; }

/* Tabular Numerals for Dynamic/Static Data Positioning */
.mono {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Tracked Small Caps for Editorial Eyebrows */
.eyebrow-en {
    font-family: var(--sans);
    font-variant-caps: all-small-caps;
    letter-spacing: 0.16em;
    font-size: 13px;
    color: var(--grey-1);
}

.body-jp {
    text-wrap: pretty;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.9;
    hanging-punctuation: first last;
    font-family: var(--sans-jp);
}

/* Precision Typography Scales Shared Globally Across System */
.text-xs { font-size: 13px; }
.text-sm { font-size: 15px; line-height: 1.7; }
.text-md { font-size: 17px; }
.text-lg { font-size: clamp(18px, 2.4vw, 20px); line-height: 1.7; }

.color-grey-1  { color: var(--grey-1); }
.color-grey-2  { color: var(--grey-2); }
.color-paper-3 { color: var(--paper-3); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* =========================================================
   4. GLOBAL LAYOUT UTILITIES
   ========================================================= */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-stretch { align-items: stretch; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

.grid { display: grid; gap: 24px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-40 { gap: clamp(24px, 4vw, 40px); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.w-full { width: 100%; }
.w-content-md { max-width: 800px; margin-inline: auto; }
.w-content-sm { max-width: 600px; margin-inline: auto; }

.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: clamp(24px, 4vw, 40px); }
.mb-60 { margin-bottom: clamp(32px, 5vw, 60px); }
.mb-80 { margin-bottom: clamp(48px, 6vw, 80px); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: clamp(24px, 4vw, 40px); }
.mt-60 { margin-top: clamp(32px, 5vw, 60px); }
.mt-80 { margin-bottom: clamp(48px, 6vw, 80px); }
.m-0   { margin: 0; }

/* =========================================================
   5. INTERACTIVE BUTTON INTERACTION (FILL-RISE MECHANISM)
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid var(--ink);
    border-radius: 0;
    padding: 12px 24px;
    font-size: 16px;
    font-family: var(--sans-jp);
    font-weight: 400;
    gap: 8px;
    letter-spacing: 0;
    color: var(--ink);
    background-image: linear-gradient(to top, var(--ink) 50%, var(--paper) 50%);
    background-size: 100% 202%;
    background-position: 0 0;
    transition: background-position 0.22s cubic-bezier(0.25, 0, 0, 1),
                color 0.18s ease,
                border-color 0.18s ease;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}
.btn:hover, .btn:focus-visible {
    background-position: 0 100%;
    color: var(--paper);
}

.btn-solid {
    background-image: linear-gradient(to top, var(--paper) 50%, var(--ink) 50%);
    color: var(--paper);
}
.btn-solid:hover, .btn-solid:focus-visible {
    background-position: 0 100%;
    color: var(--ink);
}

.btn-consult { padding: 8px 16px; font-size: 14px; }
@media (min-width: 768px) { .btn-consult { padding: 8px 24px; font-size: 16px; } }

/* =========================================================
   6. EDITORIAL HOVER PHENOMENA
   ========================================================= */
.hover-line {
    position: relative; display: inline-block; padding-bottom: 2px;
}
.hover-line::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 100%; height: 0.5px; background-color: currentColor;
    transform: scaleX(0); transform-origin: left center;
    transition: transform 0.25s cubic-bezier(0.25, 0, 0, 1);
}
.hover-line:hover::after, .hover-line:focus-visible::after { transform: scaleX(1); }

.hover-line-out {
    position: relative; display: inline-block; padding-bottom: 2px;
}
.hover-line-out::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 100%; height: 0.5px; background-color: currentColor;
    transform: scaleX(1); transform-origin: right center;
    transition: transform 0.25s cubic-bezier(0.25, 0, 0, 1);
}
.hover-line-out:hover::after, .hover-line-out:focus-visible::after { transform: scaleX(0); }

/* =========================================================
   7. XR-HEADER (MOBILE-FIRST ARCHITECTURE)
   ========================================================= */
.xr-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 0.5px solid var(--rule);
    z-index: 1100;
    display: flex;
    flex-direction: column;
}
.xr-header .utility-nav { display: none; }

.xr-header .main-nav {
    height: var(--header-h);
    display: flex; align-items: center; width: 100%;
}
.xr-header .main-nav .container {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.xr-header .wordmark {
    font-family: var(--serif); font-weight: 500; font-size: 26px;
    letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.xr-header .wordmark:hover { color: var(--ink); opacity: 0.7; }

/* Navigation Burger Interface */
.xr-header .nav-toggle {
    width: 32px; height: 32px;
    position: relative; display: flex; flex-direction: column;
    justify-content: center; gap: 5px; padding: 0;
    background: none; border: none; cursor: pointer; border-radius: 0;
}
.xr-header .nav-toggle span {
    display: block; width: 100%; height: 0.5px; background: var(--ink);
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.2s ease;
}
.xr-header .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.xr-header .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.xr-header .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.xr-header .mobile-cta { display: inline-flex; }
.xr-header .desktop-nav { display: none; }

/* Mobile Menu Overlay Drawer */
.mobile-menu {
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--paper);
    border-top: 0.5px solid var(--rule);
    padding: 0 var(--gutter) 48px;
    overflow-y: auto;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    z-index: 1099; box-sizing: border-box;
}
.mobile-menu[data-open="true"] { transform: translateY(0); opacity: 1; visibility: visible; }

.mobile-menu .menu-section { padding: 24px 0; border-bottom: 0.5px solid var(--rule); }
.mobile-menu .menu-section:last-of-type { border-bottom: none; }
.mobile-menu .menu-section > .mono {
    color: var(--grey-1); margin-bottom: 16px; display: block;
}
.mobile-menu .menu-primary { display: flex; flex-direction: column; padding: 0; margin: 0; }
.mobile-menu .menu-primary > li { padding: 10px 0; }
.mobile-menu .menu-primary a {
    font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em;
    display: block; color: var(--ink); text-decoration: none;
}
.mobile-menu .menu-primary a:hover { color: var(--ink); opacity: 0.6; }
.mobile-menu .menu-utility { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.mobile-menu .menu-utility a {
    font-family: var(--sans); font-size: 13px; letter-spacing: 0.02em;
    color: var(--grey-1); text-decoration: none;
}
.mobile-menu .menu-cta { padding-top: 24px; }
.mobile-menu .menu-cta .btn { width: 100%; padding: 16px; justify-content: center; }

/* Mobile Accordion Logic */
.mobile-menu .submenu-trigger {
    display: flex; justify-content: space-between; align-items: center; cursor: pointer;
}
.mobile-menu .submenu-trigger > span:first-child {
    font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em;
    color: var(--ink); text-decoration: none;
}
.mobile-menu .submenu-icon {
    width: 8px; height: 8px;
    border-right: 0.5px solid var(--ink); border-bottom: 0.5px solid var(--ink);
    transform: rotate(45deg); transition: transform 0.3s ease;
    flex-shrink: 0; margin-left: 16px;
}
.mobile-menu .submenu-trigger[aria-expanded="true"] .submenu-icon { transform: rotate(225deg); }
.mobile-menu .mobile-submenu { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.mobile-menu .mobile-submenu[data-open="true"] { max-height: 600px; }
.mobile-menu .mobile-submenu ul {
    padding: 12px 0 4px; display: flex; flex-direction: column; gap: 12px; margin: 0;
}
.mobile-menu .mobile-submenu a {
    font-family: var(--sans-jp); font-size: 17px; font-weight: 400;
    color: var(--grey-1); text-decoration: none;
}

/* =========================================================
   7b. XR-HEADER (DESKTOP INTERFACE OVERRIDES — 1024px+)
   ========================================================= */
@media (min-width: 1024px) {
    .xr-header .nav-toggle { display: none !important; }
    .xr-header .mobile-cta { display: none !important; }
    .xr-header .mobile-nav-group { display: none !important; }
    .mobile-menu { display: none !important; }

    .xr-header .utility-nav {
        display: flex; height: 32px;
        border-bottom: 0.5px solid var(--rule); align-items: center; background: var(--paper-2);
    }
    .xr-header .utility-nav .container {
        display: flex; justify-content: flex-end; align-items: center; width: 100%;
    }
    .xr-header .nav-links {
        display: flex; gap: 24px; font-size: 13px;
        font-family: var(--sans); align-items: center; letter-spacing: 0.02em;
    }
    .xr-header .nav-links a { color: var(--grey-1); transition: color 0.2s; text-decoration: none; }
    .xr-header .nav-links a:hover { color: var(--ink); }
    .xr-header .wordmark { font-size: 29px; }
    .xr-header .desktop-nav { display: flex; align-items: center; gap: 32px; }
    .xr-header .primary-nav {
        display: flex; gap: 28px; font-size: 16px;
        font-family: var(--serif); align-items: center; margin: 0; padding: 0; margin-top: 12px;
    }
    .xr-header .primary-nav a { color: var(--ink); text-decoration: none; }
    
    .xr-header .primary-nav > a {
        position: relative; padding-bottom: 2px; display: inline-block;
    }
    .xr-header .primary-nav > a::after {
        content: ''; position: absolute; bottom: 0; left: 0;
        width: 100%; height: 0.5px; background: var(--ink);
        transform: scaleX(0); transform-origin: left center;
        transition: transform 0.22s cubic-bezier(0.25, 0, 0, 1);
    }
    .xr-header .primary-nav > a:hover::after { transform: scaleX(1); }
    .xr-header .primary-nav > a:hover { color: var(--ink); }

    /* Dropdown Architecture */
    .xr-header .nav-item-dropdown { position: relative; padding-block: 24px; }
    .xr-header .nav-item-dropdown > span {
        display: flex; align-items: center; cursor: pointer;
        font-family: var(--serif); font-size: 16px; color: var(--ink);
    }
    .xr-header .nav-item-dropdown:hover > span { opacity: 0.7; }
    .xr-header .dropdown-icon {
        display: inline-block; margin-left: 8px;
        width: 6px; height: 6px;
        border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
        transform: translateY(-2px) rotate(45deg); transition: transform 0.3s ease;
    }
    .xr-header .nav-item-dropdown:hover .dropdown-icon { transform: translateY(1px) rotate(225deg); }
    
    .xr-header .nav-dropdown-menu {
        position: absolute; top: 100%; left: -24px;
        background: var(--paper); border: 0.5px solid var(--rule);
        padding: 24px; display: flex; flex-direction: column; gap: 16px;
        min-width: 280px; z-index: 200;
        visibility: hidden; opacity: 0; transform: translateY(8px);
        transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    }
    .xr-header .nav-item-dropdown:hover .nav-dropdown-menu {
        visibility: visible; opacity: 1; transform: translateY(0);
    }
    .xr-header .nav-dropdown-menu a {
        font-family: var(--sans-jp); font-size: 14px; color: var(--ink);
        transition: opacity 0.2s; text-decoration: none;
    }
    .xr-header .nav-dropdown-menu a:hover { opacity: 0.5; color: var(--ink); }
}
@media (min-width: 1280px) {
    .xr-header .primary-nav { gap: 40px; }
    .xr-header .desktop-nav { gap: 40px; }
}

/* =========================================================
   8. PRE-FOOTER (UNIVERSAL CREDENTIAL SYSTEM)
   ========================================================= */
.pre-footer {
    background: #FFFFFF;
    padding-block: 64px;
    text-align: center;
    border-top: 0.5px solid var(--rule);
}
@media (min-width: 1024px) { .pre-footer { padding-block: 80px; } }

.pre-footer .serif-jp { font-family: var(--serif-jp); font-weight: 500; letter-spacing: 0.005em; }
.pre-footer .h-section-jp { font-size: 24px; line-height: 1.4; margin-bottom: 24px; }
.pre-footer .text-lg { font-size: clamp(18px, 2.4vw, 22px); line-height: 1.7; }

/* Client Enterprise Shortcode Response Logo Grid Layout */
.client-logos {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    align-items: center;
}
.client-logos > div {
    padding: 0px 24px;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
    min-width: 140px;
    flex: 1 1 140px;
    max-width: 140px;
}
@media (min-width: 768px) {
    .client-logos > div { padding: 0px 0px; flex: 0 1 auto; }
}

/* =========================================================
   9. SITE FOOTER ARCHITECTURE
   ========================================================= */
.site-footer {
    background: var(--ink); color: var(--paper);
    padding-block: 64px 32px;
    font-family: var(--sans-jp); font-size: 17px;
}
@media (min-width: 1024px) { .site-footer { padding-block: 80px 32px; } }

/* Strict Specificity Override vs Bare Content Underlines */
.site-footer a:not(.btn-footer-primary):not(.btn-footer-secondary) {
    color: var(--paper);
    text-decoration: none;
    transition: opacity 0.2s;
}
.site-footer a:not(.btn-footer-primary):not(.btn-footer-secondary):hover {
    color: var(--paper);
    opacity: 0.7;
}

/* ── HIGH-SPECIFICITY FOOTER CTA ENGINE ── */
.footer-cta {
    text-align: center;
    border-bottom: 0.5px solid rgba(255,255,255,0.18);
    padding-bottom: clamp(40px, 6vw, 60px);
    margin-bottom: clamp(40px, 6vw, 60px);
}
.footer-cta-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    margin: 0 auto 40px;
    max-width: 800px;
}
.footer-cta-steps .step-arrow {
    color: var(--grey-2);
    font-family: var(--mono);
    align-self: center;
    transform: rotate(90deg);
    font-size: 13px;
    letter-spacing: 0.14em;
}
.footer-cta-steps > .text-center { padding: 12px 0; }

@media (min-width: 768px) {
    .footer-cta-steps {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 60px;
        gap: 16px;
    }
    .footer-cta-steps .step-arrow { transform: none; }
    .footer-cta-steps > .text-center { flex: 1; padding: 0; }
}

.footer-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.footer-cta-buttons .btn,
.footer-cta-buttons a[class^="btn-footer"] { width: 100%; max-width: 320px; }

@media (min-width: 768px) {
    .footer-cta-buttons { flex-direction: row; gap: 24px; justify-content: center; }
    .footer-cta-buttons .btn,
    .footer-cta-buttons a[class^="btn-footer"] { width: auto; }
}

/* High-Specificity Contextual Footer Button Tokens */
.site-footer .btn-footer-primary {
    display: inline-flex; align-items: center; justify-content: center;
    border: 0.5px solid var(--grey-1); border-radius: 0;
    padding: 12px 24px; font-size: 16px;
    font-family: var(--sans-jp); font-weight: 400;
    color: var(--paper); opacity: 1;
    background-image: linear-gradient(to top, var(--paper) 50%, var(--grey-1) 50%);
    background-size: 100% 202%; background-position: 0 0;
    transition: background-position 0.22s cubic-bezier(0.25, 0, 0, 1), color 0.18s ease, border-color 0.18s ease, opacity 0s;
    text-decoration: none; cursor: pointer; box-sizing: border-box;
}
.site-footer .btn-footer-primary:hover {
    background-position: 0 100%; border-color: var(--paper); color: var(--ink); opacity: 1;
}

.site-footer .btn-footer-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    border: 0.5px solid rgba(255,255,255,0.4); border-radius: 0;
    padding: 12px 24px; font-size: 16px;
    font-family: var(--sans-jp); font-weight: 400;
    color: var(--paper); opacity: 1;
    background-image: linear-gradient(to top, var(--paper) 50%, transparent 50%);
    background-size: 100% 202%; background-position: 0 0;
    transition: background-position 0.22s cubic-bezier(0.25, 0, 0, 1), color 0.18s ease, border-color 0.18s ease, opacity 0s;
    text-decoration: none; cursor: pointer; box-sizing: border-box;
}
.site-footer .btn-footer-secondary:hover {
    background-position: 0 100%; border-color: var(--paper); color: var(--ink); opacity: 1;
}

.site-footer .mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; }
.site-footer .color-grey-2 { color: var(--grey-2); }
.site-footer .serif-jp { font-family: var(--serif-jp); font-weight: 500; letter-spacing: 0.005em; }
.site-footer .h-section-jp { font-size: 24px; line-height: 1.4; margin-bottom: 24px; }

/* Structural Footer Navigation Block */
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; font-size: 14px; }
@media (min-width: 480px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px)  { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(5, 1fr); gap: 40px; } }

.footer-grid h4 {
    font-family: var(--mono); margin-bottom: 20px; color: var(--grey-2);
    letter-spacing: 0.1em; font-size: 13px; text-transform: uppercase; font-weight: 400;
}
.footer-grid ul { display: flex; flex-direction: column; gap: 12px; padding: 0; margin: 0; }
.footer-grid li { opacity: 0.8; line-height: 1.5; transition: opacity 0.2s; }
.footer-grid li:hover { opacity: 1; }
.footer-grid li a { color: var(--paper); text-decoration: none; font-size: 14px; }

/* Legal and Copyright Metric Row */
.footer-bottom {
    border-top: 0.5px solid rgba(255,255,255,0.18);
    margin-top: clamp(40px, 6vw, 80px); padding-top: 32px;
    font-size: 13px; color: var(--grey-2);
    display: flex; flex-direction: column; gap: 24px; align-items: flex-start;
}
.footer-bottom-row { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-legal-link { color: var(--grey-2); text-decoration: none; transition: color 0.2s; }
.footer-legal-link:hover { color: var(--paper); }

/* =========================================================
   10. SCROLL-TRIGGERED HARDWARE REVEAL CORE ENGINE
   ========================================================= */
.js-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.25, 0, 0, 1);
}
.js-reveal.is-visible { opacity: 1; transform: translateY(0); }

.js-reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.25, 0, 0, 1);
}
.js-reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.js-reveal-stagger > *:nth-child(2) { transition-delay: 80ms; }
.js-reveal-stagger > *:nth-child(3) { transition-delay: 160ms; }
.js-reveal-stagger > *:nth-child(4) { transition-delay: 240ms; }
.js-reveal-stagger > *:nth-child(5) { transition-delay: 320ms; }

.js-reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .js-reveal, .js-reveal-stagger > * { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   11. LEGACY CSS COMPATIBILITY OVERRIDES (SPECIFICITY TRAP)
   ========================================================= */
.js-trigger.fade-top, .js-trigger.fade-right { opacity: 1 !important; transform: none !important; animation: none !important; }
.js-effect, .js-effect.preEffect, .js-effect.inEffect { opacity: 1 !important; letter-spacing: inherit !important; will-change: auto !important; }
.js-effect span[class^="t"], .preEffect span[class^="t"], .inEffect span[class^="t"] { color: inherit !important; transition: none !important; mix-blend-mode: normal !important; }

body.home .wordmark { opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
body.home.xr-hero-passed .wordmark { opacity: 1; pointer-events: auto; }

/* ── GTranslate widget — utility nav (desktop) ── */
.xr-header .utility-nav .main-header_lang {
    display: flex;
    align-items: center;
}
.xr-header .utility-nav .main-header_lang select,
.xr-header .utility-nav .main-header_lang a {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--grey-1);
    text-transform: uppercase;
    border: none;
    background: transparent;
}

.xr-header .utility-nav .main-header_lang {
    /* Override legacy: position:absolute, width:5.2rem, right:7.29vw */
    position: static !important;
    width: auto !important;
    right: auto !important;
    display: flex;
    align-items: center;
}
 
/* Target whatever the GTranslate plugin renders (select, anchor, or flag span) */
.xr-header .utility-nav .main-header_lang select,
.xr-header .utility-nav .main-header_lang a,
.xr-header .utility-nav .main-header_lang span {
    font-family: var(--mono, "JetBrains Mono", monospace);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey-1, #5C5C5C);
    background: transparent;
    border: none;
    cursor: pointer;
}
 
 
/* ── 3. GTranslate widget — mobile menu drawer ───────────────────────────────
 *
 * Uses .xr-lang-switch (not .main-header_lang) so zero legacy CSS inherits.
 * The section follows the same visual rhythm as the other .menu-section rows.
 */
 
.mobile-menu .xr-lang-section {
    /* Same padding/border as sibling menu-section rows */
    border-top: 0.5px solid var(--rule, #E5E5E2);
    padding-top: 20px;
}
 
.mobile-menu .xr-lang-switch {
    display: block !important;   /* force visible regardless of plugin defaults */
    margin-top: 10px;
}
 
/* GTranslate renders variously: a <select>, a list of <a> flags, or a widget div.
   All variants get the same base treatment. */
.mobile-menu .xr-lang-switch select,
.mobile-menu .xr-lang-switch a,
.mobile-menu .xr-lang-switch span {
    display: inline-block;
    font-family: var(--mono, "JetBrains Mono", monospace);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2, #1F1F1F);
    background: transparent;
    border: 0.5px solid var(--rule, #E5E5E2);
    padding: 6px 10px;
    cursor: pointer;
    text-decoration: none;
}
 
.mobile-menu .xr-lang-switch select:focus,
.mobile-menu .xr-lang-switch a:hover {
    border-color: var(--ink, #0A0A0A);
    color: var(--ink, #0A0A0A);
}
 
/* If GTranslate wraps everything in a div with its own display:none or
   visibility:hidden as a JS-init default, this override catches it. */
.mobile-menu .xr-lang-switch > * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
/* =============================================================
   APPEND TO: assets/css/xica-rebrand-pages.css
   Paste this block at the END of the file. Adds one new section;
   does not modify or override anything above it.
   ============================================================= */

/* =========================================================
   20. 404 — WAYFINDING DIRECTORY  (print-calm, no motion)
   Concept: a dead end reframed as a publication index. The
   numeral is demoted to an errata stamp; the substance is a
   hairline-ruled directory of destinations, opened by a 1px
   ink rule (the established "structured data below" signal).
   No entrance / scroll animation. Only standard link-hover
   affordances, consistent with the rest of the system.
   ========================================================= */

.xr-404 {
    /* Clear the fixed header + generous editorial top margin */
    padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px));
    padding-bottom: var(--section-pad-l);
}
.xr-404-inner {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* --- Top matter: left-aligned measured column (no centered slab) --- */
.xr-404-head { max-width: 680px; }

/* Demoted numeral — errata stamp */
.xr-404-stamp {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--grey-1);
    margin-bottom: clamp(24px, 4vw, 36px);
}
.xr-404-stamp-num { color: var(--ink); }
.xr-404-stamp-rule {
    flex: 0 0 40px;
    height: 1px;
    background: var(--ink);
    transform: scaleY(0.5);   /* true hairline on retina */
}

.xr-404-title {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: -0.02em;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.04;
    color: var(--ink);
    margin-bottom: clamp(20px, 3vw, 28px);
}
.xr-404-lede {
    font-family: var(--sans-jp);
    font-size: clamp(15px, 1.9vw, 18px);
    line-height: 1.9;
    color: var(--ink-2);
}

/* --- Directory --------------------------------------------------- */
.xr-404-index { margin-top: clamp(48px, 7vw, 88px); }

.xr-404-index-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}
.xr-404-index-jp {
    font-family: var(--serif-jp);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--grey-1);
    margin-left: 12px;
}
.xr-404-index-count { color: var(--grey-2); }

.xr-404-list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--ink);   /* strong rule opens the structured grid */
}
.xr-404-list > li { border-bottom: 0.5px solid var(--rule); }

.xr-404-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    padding: clamp(20px, 3vw, 30px) 8px;
    color: var(--ink);
    text-decoration: none;
    transition: background-color 0.18s ease;
}
.xr-404-row:hover,
.xr-404-row:focus-visible {
    background-color: var(--paper-2);
    outline: none;
}

.xr-404-row-num {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--grey-2);
    transition: color 0.18s ease;
}
.xr-404-row:hover .xr-404-row-num,
.xr-404-row:focus-visible .xr-404-row-num { color: var(--ink); }

.xr-404-row-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.xr-404-row-en {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: -0.01em;
    font-size: clamp(19px, 2.6vw, 26px);
    line-height: 1.15;
    color: var(--ink);
}
.xr-404-row-jp {
    font-family: var(--serif-jp);
    font-weight: 500;
    letter-spacing: 0.02em;
    font-size: clamp(12px, 1.6vw, 14px);
    color: var(--grey-1);
}

.xr-404-row-arrow {
    font-family: var(--mono);
    font-size: 16px;
    color: var(--grey-2);
    transition: transform 0.18s cubic-bezier(0.25, 0, 0, 1), color 0.18s ease;
}
.xr-404-row:hover .xr-404-row-arrow,
.xr-404-row:focus-visible .xr-404-row-arrow {
    transform: translateX(4px);
    color: var(--ink);
}

/* --- Closing CTA ------------------------------------------------- */
.xr-404-foot { margin-top: clamp(40px, 6vw, 72px); }

/* --- Mobile ------------------------------------------------------ */
@media (max-width: 600px) {
    .xr-404-row { gap: 14px; padding-block: 18px; }
}

/* --- Respect reduced-motion (belt-and-braces; motion is minimal) --- */
@media (prefers-reduced-motion: reduce) {
    .xr-404-row,
    .xr-404-row-arrow,
    .xr-404-row-num { transition: none; }
    .xr-404-row:hover .xr-404-row-arrow,
    .xr-404-row:focus-visible .xr-404-row-arrow { transform: none; }
}