/* Common CSS Variables and Base Styles */
/* Fonts are loaded via <link rel="stylesheet"> in each HTML head to avoid render-blocking @import waterfalls. */

:root {
    /* Sophisticated light theme with deep emerald accent */
    --primary: #FAFAFA;
    --secondary: #F5F5F4;
    
    /* Deepened Emerald Accent */
    --accent: #047857; /* Darker base for professionalism */
    --accent-dark: #064E3B;
    --accent-light: #10B981;
    --accent-subtle: rgba(16, 185, 129, 0.08);
    
    /* Neutral Tones */
    --text: #111827; /* Sharper black */
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    
    /* Backgrounds */
    --background: #FFFFFF;
    --background-alt: #F9FAFB;
    --surface: #F3F4F6; /* Off-white for depth */
    
    /* Border */
    --border: rgba(0, 0, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    /* Avoid `transition: all` (animates unintended properties, can feel “cheap”). */
    --transition:
        transform 0.28s var(--ease-smooth),
        box-shadow 0.28s var(--ease-smooth),
        opacity 0.28s var(--ease-smooth),
        background-color 0.28s var(--ease-smooth),
        color 0.28s var(--ease-smooth),
        border-color 0.28s var(--ease-smooth);

    /* Premium Shadows (Diffused Glow) */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0,0,0,0.02);
    --shadow-accent: 0 8px 20px rgba(4, 120, 87, 0.25);
    
    /* Gradients */
    --gradient-accent: linear-gradient(135deg, #059669 0%, #065F46 100%);
    --gradient-surface: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: 12px;

    /* Animation durations */
    --anim-fast: 0.2s;
    --anim-normal: 0.4s;
    --anim-slow: 0.8s;

    /* Animation easings */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Anchor offsets (fixed header + extra context for option cards) */
    /* Header is now slimmer (product-UI). Keep a little extra breathing room. */
    --anchor-offset: 84px;
    /* Keep "How we work" visible, but show more of the card */
    --anchor-context-offset-model: clamp(80px, 10vh, 120px);
    /* Workshops need more context so "Workshop Options" stays visible */
    --anchor-context-offset-tier: clamp(110px, 14vh, 180px);

    /* First-viewport buffer (prevents bottom elements from clipping) */
    --marquee-viewport-buffer: clamp(14px, 2.5vh, 24px);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Apply default font to all elements except icons */
*:not(i):not([class*="fa-"]) {
    font-family: 'Plus Jakarta Sans', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Anchor offset for fixed header (also supports nested scroll containers) */
[id] {
    scroll-margin-top: var(--anchor-offset);
}

/* When deep-linking to in-section option cards, keep the section title/subtitle visible */
.model-block[id] {
    scroll-margin-top: calc(var(--anchor-offset) + var(--anchor-context-offset-model));
}

.tier-card[id] {
    scroll-margin-top: calc(var(--anchor-offset) + var(--anchor-context-offset-tier));
}

/* Subtle focus ring when jumping to key cards */
.model-block:target,
.tier-card:target {
    outline: 2px solid rgba(4, 120, 87, 0.35);
    outline-offset: 6px;
}

body {
    color: var(--text);
    /* Prevent iOS “rubber-band” overscroll from flashing pure white above hero. */
    background-color: var(--primary);
    background-image:
        radial-gradient(circle at 30% 0%, rgba(4, 120, 87, 0.06), transparent 55%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.04), transparent 45%);
    line-height: 1.7; /* Increased line-height */
    overflow-x: hidden;
}

/* Fix Font Awesome icons */
.fa, .fas, .far, .fal, .fad, .fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
}
.fa-solid, .fa-regular, .fa-light, .fa-thin, .fa-duotone, .fa-brands {
    font-family: var(--fa-style-family, "Font Awesome 6 Free") !important;
}
.far, .fa-regular { font-weight: 400 !important; }
.fab, .fa-brands { font-weight: 400 !important; }

i[class*="fa-"] {
    font-style: normal;
}

/* Hide Vue templates until compiled */
[v-cloak] {
    display: none !important;
}

/* Accessibility: Skip link (do not affect layout) */
.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5000;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.2);
}

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

/* Typography Refinement */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Satoshi', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.03em; /* Tighter tracking for editorial look */
    line-height: 1.2;
    color: var(--text);
}

p {
    margin-bottom: 1.5rem;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

/* Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 0.8s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Language Notification */
.language-notification {
    position: fixed;
    top: 100px;
    right: 30px;
    padding: 16px 24px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: var(--transition);
    z-index: 1001;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.language-notification i {
    font-size: 20px;
    color: var(--accent);
}

.language-notification span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* Page transition */
.page-transition {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.45s var(--ease-smooth), transform 0.45s var(--ease-out-back);
    perspective: 1200px;
    z-index: 1200;
}

.page-transition.active,
.page-transition.is-arriving {
    opacity: 1;
    transform: translateY(0);
}

.page-transition__panel {
    position: relative;
    width: 140%;
    height: 160%;
    border-radius: 28px;
    background: linear-gradient(130deg, rgba(4, 120, 87, 0.3) 0%, rgba(6, 95, 70, 0.45) 35%, rgba(4, 120, 87, 0.35) 60%, rgba(6, 95, 70, 0.55) 100%);
    box-shadow: 0 30px 120px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(4, 120, 87, 0.12);
    transform: rotateX(12deg) rotateY(-14deg) scale(0.9);
    opacity: 0;
    transition: transform 0.6s var(--ease-out-back), opacity 0.4s var(--ease-smooth);
    overflow: hidden;
}

.page-transition__panel::after {
    content: '';
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.4), transparent 40%),
        radial-gradient(circle at 75% 70%, rgba(16, 185, 129, 0.24), transparent 50%);
    filter: blur(26px);
    opacity: 0.9;
    transform: translateX(-8%) translateY(-6%) scale(1.05);
}

.page-transition__glow {
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.22), transparent 60%);
    filter: blur(50px);
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth), transform 0.4s var(--ease-smooth);
}

.page-transition.active .page-transition__panel,
.page-transition.is-arriving .page-transition__panel {
    opacity: 1;
    transform: rotateX(6deg) rotateY(-6deg) scale(1.1);
}

.page-transition.is-leaving .page-transition__panel {
    transform: rotateX(0deg) rotateY(0deg) scale(1.35);
}

.page-transition.active .page-transition__glow,
.page-transition.is-arriving .page-transition__glow {
    opacity: 1;
    transform: scale(1.05);
}

body.transitioning {
    cursor: progress;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    z-index: 9999;
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Scroll Navigation Arrow */
.scroll-nav {
    position: fixed;
    right: 32px;
    bottom: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--background);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    cursor: pointer;
}

.scroll-nav.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-nav:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.scroll-nav .scroll-arrow {
    color: var(--text);
    font-size: 14px;
}

/* Value Props Band - Manual / swipeable (no auto-moving UI) */
.value-props-band {
    padding: 24px 0;
    height: 80px;
    box-sizing: border-box;
    background: var(--surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Lift marquee slightly to avoid bottom clipping on some viewports */
.value-props-band--lifted {
    margin-top: -4px;
}

/* Edge fade effect */
.value-props-band::before,
.value-props-band::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.value-props-band::before {
    left: 0;
    background: linear-gradient(to right, var(--surface) 0%, transparent 100%);
}

.value-props-band::after {
    right: 0;
    background: linear-gradient(to left, var(--surface) 0%, transparent 100%);
}

/* Manual band: allow horizontal scroll (no drift). */
.marquee-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 0; /* prevent flex child overflow on some browsers */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.marquee-container::-webkit-scrollbar {
    display: none;
}

/* Prevent iOS/Android selection highlight on tap/drag. */
.value-props-band,
.value-props-band .marquee-container,
.value-props-band .marquee-container * {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.value-props-band .marquee-container:focus,
.value-props-band .marquee-container:focus-visible {
    outline: none;
}

.marquee-track {
    display: flex;
    flex-direction: row;
    width: max-content;
    animation: none;
    transform: none;
    padding: 0 16px;
}

/* Performance: pause long-running animations when offscreen (saves CPU/battery) */
.hero.is-offscreen::before {
    animation-play-state: paused !important;
}

.marquee-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 48px;
    padding-right: 48px;
    flex-shrink: 0;
}

.value-prop {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    line-height: 1.1; /* prevent vertical clipping in fixed-height band */
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.value-prop:hover {
    color: var(--accent);
}

.value-prop i {
    color: var(--accent);
    font-size: 18px;
    line-height: 1;
    transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .value-prop:hover {
        transform: translateY(-1px);
    }

    .value-prop:hover i {
        transform: translateY(-1px);
    }
}

.value-prop-divider {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.4;
    flex-shrink: 0;
}

/* Mobile: tighter spacing for smaller screens */
@media (max-width: 768px) {
    .value-props-band::before,
    .value-props-band::after {
        width: 50px;
    }
    
    .marquee-content {
        gap: 32px;
        padding-right: 32px;
    }
    
    .value-prop {
        font-size: 12px;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        justify-content: center;
    }
    
    .marquee-content[aria-hidden="true"] {
        display: none;
    }
}

/* Primary Button - Premium Gradient (modern, minimal) */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    background: var(--gradient-accent);
    color: white;
    text-decoration: none;
    border-radius: 18px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.01em;
    transition:
        transform 0.18s var(--ease-smooth),
        box-shadow 0.18s var(--ease-smooth),
        filter 0.18s var(--ease-smooth),
        opacity 0.18s var(--ease-smooth),
        background-color 0.18s var(--ease-smooth),
        color 0.18s var(--ease-smooth),
        border-color 0.18s var(--ease-smooth);
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 16px 42px rgba(4, 120, 87, 0.22),
        0 1px 0 rgba(255, 255, 255, 0.18) inset,
        0 0 0 1px rgba(0, 0, 0, 0.06);
}

.cta-button::before {
    /* Exec-facing UI: remove “shine sweep” */
    content: none;
}

/* Soft highlight for depth (no moving shine) */
.cta-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 140% at 18% 0%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 58%);
    pointer-events: none;
    opacity: 0.95;
}

.cta-button i {
    transition: transform 0.22s var(--ease-smooth);
}

@media (hover: hover) and (pointer: fine) {
    .cta-button:hover {
        transform: translateY(-1px);
        filter: saturate(1.05) brightness(1.02);
        box-shadow:
            0 20px 54px rgba(4, 120, 87, 0.26),
            0 1px 0 rgba(255, 255, 255, 0.18) inset;
    }

    .cta-button:hover i {
        transform: translateX(3px);
    }
}

.cta-button:active {
    transform: translateY(0) scale(0.99);
    filter: none;
}

.cta-button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 4px rgba(4, 120, 87, 0.18),
        0 14px 34px rgba(4, 120, 87, 0.18);
}

@media (max-width: 768px) {
    .cta-button {
        width: min(360px, 100%);
    }
}

/* Secondary/Ghost Button */
.cta-button.secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
    .cta-button.secondary:hover {
        background: var(--surface);
        border-color: var(--text-secondary);
    }
}

/* Hero quick-jump links (Home 1: minimal text links) */
.hero-cta-group {
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: center;
    align-items: center;
}

.hero-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-nav-link {
    font-size: 13px;
    font-weight: 650;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0;
    border-radius: 0;
    transition: color 0.18s var(--ease-smooth), opacity 0.18s var(--ease-smooth);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none;
    background: transparent;
    opacity: 0.9;
    position: relative;
}

.hero-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: rgba(4, 120, 87, 0.18);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth);
    border-radius: 999px;
}

.hero-nav-link:hover {
    color: var(--accent);
    opacity: 1;
}

.hero-nav-link:hover::after {
    transform: scaleX(1);
    background: rgba(4, 120, 87, 0.32);
}

.hero-nav-link:focus-visible {
    outline: 2px solid rgba(4, 120, 87, 0.35);
    outline-offset: 3px;
}

.hero-nav-divider {
    width: 3px;
    height: 3px;
    background: rgba(17, 24, 39, 0.22);
    border-radius: 50%;
    opacity: 1;
}

@media screen and (max-width: 768px) {
    .hero-nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: auto;
    }

    .hero-nav-link {
        font-size: 12px;
        justify-self: auto;
    }

    .hero-nav-divider {
        display: none;
    }
}

/* Text Link Style */
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: gap 0.2s var(--ease-smooth);
}

.cta-link:hover {
    gap: 10px;
    color: var(--accent-dark);
}

/* Contact Alternative (email fallback) */
.contact-alternative {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.contact-alternative p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.email-link:hover {
    color: var(--accent-dark);
}

/* Shared: Modal (contact + detail) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 3000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    inset: 0;
    margin: auto;
    max-width: 760px;
    width: 90%;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 3001;
    padding: 32px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.modal h3 {
    font-size: 28px;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

/* Ensure form contents scroll within modal on small viewports */
.modal form {
    overflow: auto;
    max-height: calc(90vh - 80px);
    padding-right: 4px;
}

@media screen and (max-width: 600px) {
    .modal {
        padding: 20px;
    }
}

/* Shared: Contact form (used inside modal across pages) */
.contact-form {
    display: grid;
    gap: 24px;
    padding-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-group label span {
    color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--background);
    color: var(--text);
    font-size: 15px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234B5563' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(23, 124, 87, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-status {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.form-status.success { color: var(--accent); }
.form-status.error { color: #b91c1c; }
.form-status.info { color: var(--text-secondary); }

.form-submit-btn {
    margin-top: 16px;
}

@media screen and (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* CTA Section */
.cta-section {
    background: var(--background);
    text-align: center;
    /* Match site-wide section rhythm on mobile while keeping
       the CTA feeling premium on desktop. */
    padding: clamp(80px, 9vw, 120px) 0;
}

.cta-panel {
    max-width: 700px;
    margin: 0 auto;
    /* Reduce "too airy" feel at common desktop widths while staying spacious. */
    padding: clamp(44px, 5.8vw, 72px) clamp(20px, 4vw, 40px);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: clamp(20px, 3vw, 32px);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.cta-panel:hover {
    border-color: var(--accent);
}

.cta-panel h2 {
    font-size: clamp(24px, 4.2vw, 42px);
    font-weight: 900;
    margin-bottom: clamp(16px, 2vw, 24px);
    font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
}

.cta-panel p {
    font-size: clamp(15px, 2.2vw, 20px);
    color: var(--text-secondary);
    margin-bottom: clamp(24px, 3vw, 40px);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    /* Better centered line breaks (prevents lonely last words like "take.") */
    text-wrap: balance;
}

/* =========================================================
   Shared Hero Styles for Subpages (workshop, deployment, about)
   Use class="hero hero--subpage" on these pages
   ========================================================= */
.hero--subpage {
    margin-top: 0;
    padding: 140px 0 120px;
    background: var(--background);
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Leave room for value-props band */
    min-height: calc(100vh - 80px);
    min-height: calc(100svh - 80px);
    min-height: calc(100dvh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slight zoom on hero background image for subpages (matches homepage crop). */
.hero--subpage::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/hero_bg.jpg') center center / cover no-repeat;
    transform: scale(1.07);
    transform-origin: 55% 55%;
    pointer-events: none;
    z-index: 0;
}

/* Subtle animated gradient for depth */
.hero--subpage::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(4, 120, 87, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(16, 185, 129, 0.035) 0%, transparent 40%);
    animation: heroRotateGradient 90s linear infinite;
    will-change: transform;
    pointer-events: none;
    z-index: 1;
}

@keyframes heroRotateGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero--subpage .container {
    position: relative;
    z-index: 2;
}

.hero--subpage h1 {
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text);
}

.hero--subpage p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 32px;
    line-height: 1.65;
}

@media screen and (max-width: 768px) {
    .hero--subpage {
        padding: 120px 0 100px;
        min-height: calc(100vh - 80px);
        min-height: calc(100svh - 80px);
        min-height: calc(100dvh - 80px);
    }
    
    .hero--subpage h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    .hero--subpage p {
        font-size: 16px;
        margin-bottom: 28px;
    }
}

@media screen and (max-width: 480px) {
    .hero--subpage {
        padding: 90px 0 60px;
    }
    
    .hero--subpage h1 {
        font-size: 26px;
    }

    .hero--subpage p {
        font-size: 15px;
    }
}

/* Common Section Styles */
section {
    padding: 120px 0;
    position: relative;
}

.section-title {
    font-size: 42px;
    margin-bottom: 24px;
    text-align: center;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.section-subtitle {
    font-size: 18px;
    margin-bottom: 64px;
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =========================================================
   Section Differentiation (minimal + consistent)
   - Use .section-header + .section-eyebrow for hierarchy
   - Use section.section--alt / --divider / --glow for contrast
   ========================================================= */

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header.section-header--compact {
    margin-bottom: 40px;
}

.section-header .section-title {
    margin-bottom: 16px;
}

.section-header .section-subtitle {
    margin-bottom: 0;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.section-eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--border);
}

section.section--alt {
    background: var(--background-alt);
}

section.section--divider {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

/* Soft background glow that doesn't override section background-color */
section.section--glow::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 0%, rgba(16, 185, 129, 0.12), transparent 46%),
        radial-gradient(circle at 82% 0%, rgba(4, 120, 87, 0.10), transparent 42%);
    opacity: 1;
}

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

/* Animation Classes - Staggered Fade Up */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeUp 0.55s var(--ease-out-back) forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* =========================================================
   Enhanced Hero Animations
   Executive-friendly reveal (calm, crisp, purposeful)
   ========================================================= */

/* Primary hero text reveal - crisp editorial slide-in with blur */
@keyframes heroReveal {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Word-by-word reveal animation */
@keyframes wordReveal {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(-8deg);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
        filter: blur(0);
    }
}

/* Accent word sweep (subtle "premium" motion, one-time) */
@keyframes heroHighlightSweep {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

/* CTA entrance - calm rise-in (keeps keyframe name for compatibility) */
@keyframes ctaBounce {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accent line grow animation */
@keyframes lineGrow {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 64px;
        opacity: 1;
    }
}

/* Floating orb ambient animation */
@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-20px, 15px) scale(1.03);
    }
    66% {
        transform: translate(15px, -10px) scale(0.97);
    }
}

@keyframes floatOrbAlt {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(18px, -12px) scale(0.96);
    }
    66% {
        transform: translate(-12px, 18px) scale(1.04);
    }
}

/* Hero animation classes */
.hero-animate {
    opacity: 0;
    will-change: opacity, transform;
}

/* Gate hero entrance so it starts after Vue renders (prevents "animation ran while hidden"). */
.hero-animate.animate-title,
.hero-animate.animate-subtitle,
.hero-animate.animate-proof,
.hero-animate.animate-cta {
    animation: none;
}

html.is-ready .hero-animate.animate-title {
    animation: heroReveal 0.7s var(--ease-smooth) forwards;
}

html.is-ready .hero-animate.animate-subtitle {
    animation: heroReveal 0.7s var(--ease-smooth) 0.08s forwards;
}

html.is-ready .hero-animate.animate-proof {
    animation: heroReveal 0.65s var(--ease-smooth) 0.16s forwards;
}

html.is-ready .hero-animate.animate-cta {
    animation: ctaBounce 0.6s var(--ease-smooth) 0.24s forwards;
}

/* Hero word-by-word animation */
.hero-words {
    display: block;
}

.hero-word {
    display: inline-block;
    opacity: 0;
    will-change: opacity, transform, filter;
    margin-right: 0.25em; /* Natural word spacing */
}

.hero-linebreak {
    display: block;
    height: 0;
}

.hero-word:last-child {
    margin-right: 0;
}

/* Remove margin for Japanese text (no word spacing) */
html[lang="ja"] .hero-word {
    margin-right: 0;
}

html.is-ready .hero-word {
    animation: wordReveal 0.55s var(--ease-out-back) forwards;
}

/* Stagger delays for each word (up to 6 words) */
html.is-ready .hero-word:nth-child(1) { animation-delay: 0.05s; }
html.is-ready .hero-word:nth-child(2) { animation-delay: 0.12s; }
html.is-ready .hero-word:nth-child(3) { animation-delay: 0.19s; }
html.is-ready .hero-word:nth-child(4) { animation-delay: 0.26s; }
html.is-ready .hero-word:nth-child(5) { animation-delay: 0.33s; }
html.is-ready .hero-word:nth-child(6) { animation-delay: 0.40s; }

/* Hero-highlight inside hero-word still gets gradient animation */
.hero-word.hero-highlight {
    margin-right: 0.25em;
}

/* Hero highlight (accent word/phrase) */
.hero-highlight {
    color: var(--accent);
    font-weight: inherit;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .hero-highlight {
        display: inline-block;
        background: var(--gradient-accent);
        background-size: 200% 200%;
        background-position: 0% 50%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0 16px 40px rgba(4, 120, 87, 0.14);
        will-change: background-position;
    }

    /* When hero-highlight is also a hero-word, chain the gradient sweep after word reveal */
    html.is-ready .hero .hero-word.hero-highlight {
        animation: wordReveal 0.55s var(--ease-out-back) 0.05s forwards, 
                   heroHighlightSweep 1.05s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
    }
    
    /* Fallback for non-word hero-highlight */
    html.is-ready .hero .hero-highlight:not(.hero-word) {
        animation: heroHighlightSweep 1.05s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
    }
}

/* Accent line under hero title */
.hero-accent-line {
    display: block;
    width: 0;
    height: 3px;
    margin: 20px auto 0;
    background: var(--gradient-accent);
    border-radius: 2px;
    animation: none;
}

html.is-ready .hero-accent-line {
    animation: lineGrow 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

/* Floating ambient orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero-orb--primary {
    top: 8%;
    right: 5%;
    width: clamp(250px, 35vw, 450px);
    height: clamp(250px, 35vw, 450px);
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    animation: floatOrb 24s ease-in-out infinite;
}

.hero-orb--secondary {
    bottom: 15%;
    left: 3%;
    width: clamp(180px, 25vw, 350px);
    height: clamp(180px, 25vw, 350px);
    background: radial-gradient(circle, rgba(4, 120, 87, 0.06) 0%, transparent 70%);
    animation: floatOrbAlt 30s ease-in-out infinite;
}

/* Mouse parallax - orbs respond to cursor position */
.hero-orb.has-parallax {
    transition: transform 0.15s ease-out;
    will-change: transform;
}

/* Staggered hero nav links */
.hero-nav-link.animate-stagger {
    opacity: 0;
    animation: none;
}

/* Use nth-of-type so delays don't depend on divider spans */
.hero-nav-links > a.hero-nav-link.animate-stagger:nth-of-type(1) { animation-delay: 0.40s; }
.hero-nav-links > a.hero-nav-link.animate-stagger:nth-of-type(2) { animation-delay: 0.48s; }
.hero-nav-links > a.hero-nav-link.animate-stagger:nth-of-type(3) { animation-delay: 0.56s; }
.hero-nav-links > a.hero-nav-link.animate-stagger:nth-of-type(4) { animation-delay: 0.64s; }

.hero-nav-divider.animate-stagger {
    opacity: 0;
    animation: none;
}

html.is-ready .hero-nav-link.animate-stagger {
    animation: fadeUp 0.45s var(--ease-smooth) forwards;
}

html.is-ready .hero-nav-divider.animate-stagger {
    animation: fadeUp 0.35s var(--ease-smooth) 0.65s forwards;
}

/* Hero proof chips (homepage uses these; safe + reusable) */
.hero-proof {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 780px;
    margin: 0 auto 40px;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.hero-chip i {
    color: var(--accent);
    font-size: 12px;
    line-height: 1;
}

@media screen and (max-width: 768px) {
    .hero-proof {
        margin-bottom: 32px;
        gap: 8px;
    }
    .hero-chip {
        font-size: 12px;
        padding: 7px 10px;
    }
}

/* Ensure hero content is above orbs */
.hero .container {
    position: relative;
    z-index: 2;
}

/* Mobile adjustments for hero animations */
@media screen and (max-width: 768px) {
    .hero-accent-line {
        margin-top: 14px;
        height: 2px;
    }
    
    @keyframes lineGrow {
        100% {
            width: 48px;
        }
    }
    
    .hero-orb--primary {
        top: 5%;
        right: -10%;
        opacity: 0.7;
    }
    
    .hero-orb--secondary {
        bottom: 10%;
        left: -15%;
        opacity: 0.5;
    }
}

/* Scroll Reveal Base */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s ease-out, transform 0.45s var(--ease-out-back);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Optional: "pop" variant for scroll reveals */
.reveal-on-scroll.reveal-pop {
    transform: translateY(18px) scale(0.97);
}

.reveal-on-scroll.reveal-pop.revealed {
    transform: translateY(0) scale(1);
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .glass-panel {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(255, 255, 255, 0.9);
    }

    .hero::before,
    .hero-orb {
        animation: none !important;
        transform: none !important;
    }

    .hero-animate,
    .hero-nav-link.animate-stagger,
    .hero-nav-divider.animate-stagger,
    .hero-word {
        opacity: 1 !important;
        animation: none !important;
        filter: none !important;
        transform: none !important;
    }

    .hero-accent-line {
        width: 64px !important;
        opacity: 1 !important;
        animation: none !important;
    }

    .reveal-on-scroll,
    .reveal-on-scroll.reveal-pop,
    .reveal-on-scroll.reveal-pop.revealed {
        opacity: 1;
        transform: none;
    }

    .page-transition {
        display: none !important;
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .section-title {
        font-size: 32px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .section-header {
        margin-bottom: 48px;
    }

    .section-header.section-header--compact {
        margin-bottom: 32px;
    }

    .section-eyebrow {
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    section {
        padding: 80px 0;
    }

    .language-notification {
        right: 20px;
        top: 90px;
    }

    /* Horizontal mobile carousel utility */
    .mobile-carousel {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding-bottom: 16px;
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    .mobile-carousel > * {
        flex: 0 0 85%;
        scroll-snap-align: start;
        min-width: 280px;
    }

    /* Stacked sticky scroll utility (mobile) */
    .scroll-stack {
        --stack-top: 84px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 48px;
        padding-bottom: clamp(72px, 16vh, 160px); /* space for last sticky card to release */
    }

    .scroll-stack .scroll-stack-item {
        position: sticky;
        top: var(--stack-top);
        z-index: 1; /* predictable stacking */
        max-height: calc(100dvh - var(--stack-top) - 16px);
        scroll-margin-top: calc(var(--stack-top) + 8px);
    }

    /* If a card is taller than the available viewport, allow internal scroll (no visible scrollbar). */
    .scroll-stack .scroll-stack-item.is-scrollable {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        /* Allow scroll chaining to the page when the card hits its scroll boundary. */
        overscroll-behavior-x: contain;
        overscroll-behavior-y: auto;
        scrollbar-width: none;
    }

    .scroll-stack .scroll-stack-item.is-scrollable::-webkit-scrollbar {
        display: none;
    }

    /* Subtle emphasis: active card stays crisp while others soften slightly */
    .scroll-stack .scroll-stack-item.revealed {
        transition:
            box-shadow 0.35s var(--ease-smooth),
            border-color 0.35s var(--ease-smooth),
            opacity 0.35s var(--ease-smooth);
    }

    .scroll-stack .scroll-stack-item.revealed:not(.is-active) {
        opacity: 0.86;
        box-shadow: var(--shadow-sm);
    }

    .scroll-stack .scroll-stack-item.revealed.is-active {
        opacity: 1;
        border-color: rgba(4, 120, 87, 0.35);
        box-shadow: var(--shadow-lg);
        z-index: 2;
    }
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition:
        transform 0.18s var(--ease-smooth),
        background-color 0.18s var(--ease-smooth),
        box-shadow 0.18s var(--ease-smooth);
    padding: 0;
}

.carousel-dot:hover:not(.active) {
    background: var(--accent-light);
}

.carousel-dot.active {
    background: var(--accent);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(4, 120, 87, 0.4);
}

/* Carousel Navigation Wrapper */
.carousel-wrapper {
    position: relative;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.carousel-nav:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 6px 20px rgba(4, 120, 87, 0.25);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.carousel-nav.prev {
    left: -18px;
}

.carousel-nav.next {
    right: -18px;
}

.carousel-nav i {
    font-size: 12px;
}

/* Compact dots variant */
.carousel-dots.compact {
    margin-top: 24px;
    gap: 8px;
}

.carousel-dots.compact .carousel-dot {
    width: 8px;
    height: 8px;
}

@media screen and (max-width: 768px) {
    .carousel-nav {
        width: 32px;
        height: 32px;
    }

    .carousel-nav.prev {
        left: -8px;
    }

    .carousel-nav.next {
        right: -8px;
    }

    .carousel-nav i {
        font-size: 10px;
    }
}

/* Image Placeholders */
.image-placeholder {
    background: linear-gradient(135deg, var(--surface) 0%, var(--background-alt) 100%);
    border: 2px dashed var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px;
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, var(--accent-subtle) 0%, transparent 60%);
    opacity: 0.5;
}

.image-placeholder i {
    font-size: 32px;
    color: var(--accent);
    opacity: 0.6;
    position: relative;
    z-index: 1;
}

.image-placeholder span {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
}

.image-placeholder.small {
    min-height: 120px;
    padding: 20px;
}

.image-placeholder.small i {
    font-size: 24px;
}

.image-placeholder.small span {
    font-size: 11px;
}

.image-placeholder.wide {
    min-height: 160px;
    width: 100%;
}

.image-placeholder.hero-image {
    min-height: 300px;
    border-radius: 24px;
}

/* Shared: Story cards with top-right thumbnail */
.story-card {
    position: relative;
}

.story-card.has-thumb {
    padding-right: 112px;
}

.story-card-thumb {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    z-index: 2;
}

.story-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s var(--ease-smooth);
}

.story-card:hover .story-card-thumb img {
    transform: scale(1.08);
}

/* Shared: Use-case / success-story cards (homepage-style 2-row carousel) */
.case-cards-container {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-auto-columns: 340px;
    column-gap: 24px;
    row-gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-top: 8px;
    padding-bottom: 16px;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.case-cards-container::-webkit-scrollbar {
    display: none;
}

.case-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    transition:
        transform 0.18s var(--ease-smooth),
        box-shadow 0.18s var(--ease-smooth),
        border-color 0.18s var(--ease-smooth);
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 180px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.case-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.case-card .case-card-outcome,
.case-card .case-card-partner {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .case-card:hover {
        transform: translateY(-4px);
        border-color: var(--accent);
        box-shadow: var(--shadow-lg);
    }
}

.case-card,
.testimonial-card {
    cursor: pointer;
}

.case-card:focus-visible,
.testimonial-card:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.case-card::after {
    content: '';
    position: absolute;
    inset: -35%;
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.16), transparent 40%),
        linear-gradient(115deg, rgba(255, 255, 255, 0.12), transparent 60%);
    transform: translateX(-18%) translateY(-14%) scale(1.05);
    opacity: 0;
    transition: opacity 0.35s var(--ease-smooth), transform 0.35s var(--ease-smooth);
    pointer-events: none;
}

.case-card:hover::after {
    opacity: 1;
    transform: translateX(6%) translateY(-4%) scale(1.12);
}

.case-card h4 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
    font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.case-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Case Card Badges */
.case-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.case-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.case-badge i {
    font-size: 10px;
}

.case-badge.service-implementation {
    background: #e0f2fe;
    color: #0369a1;
}

.case-badge.service-workshops {
    background: #f3e8ff;
    color: #7c3aed;
}

/* Industry color palette */
.case-badge.industry-ai-startup { background: #dbeafe; color: #1d4ed8; }
.case-badge.industry-b2b-services { background: #ede9fe; color: #6d28d9; }
.case-badge.industry-hospitality { background: #fce7f3; color: #be185d; }
.case-badge.industry-aviation { background: #e0f2fe; color: #0284c7; }
.case-badge.industry-professional-services { background: #ccfbf1; color: #0d9488; }
.case-badge.industry-logistics { background: #ffedd5; color: #c2410c; }
.case-badge.industry-e-commerce { background: #dcfce7; color: #15803d; }
.case-badge.industry-manufacturing { background: #fef3c7; color: #b45309; }
.case-badge.industry-financial-services { background: #e0e7ff; color: #4338ca; }
.case-badge.industry-digital-marketing { background: #e0f2fe; color: #075985; }
.case-badge.industry-marketing { background: #fef9c3; color: #92400e; }
.case-badge.industry-technology { background: #e2e8f0; color: #1f2937; }
.case-badge.industry-business-development { background: #fef2f2; color: #b91c1c; }
.case-badge.industry-retail { background: #ecfeff; color: #0e7490; }
.case-badge.industry-government { background: #e0f2fe; color: #075985; }
.case-badge.industry-enterprise { background: #f1f5f9; color: #0f172a; }

@media screen and (max-width: 768px) {
    .case-cards-container {
        column-gap: 16px;
        row-gap: 16px;
        grid-auto-columns: 280px;
    }
    
    .case-card {
        padding: 22px;
        min-height: 170px;
    }
    
    .case-card h4 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .case-card p {
        font-size: 14px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* Shared: Outcome + partner rows (used across pages) */
.case-card-outcome {
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--surface);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text);
    line-height: 1.5;
}

.case-card-outcome .outcome-label {
    font-weight: 700;
    color: var(--accent);
    margin-right: 4px;
}

.case-card-partner {
    margin-top: 10px;
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.case-card-partner i {
    font-size: 11px;
}

@media screen and (max-width: 768px) {
    .story-card.has-thumb {
        padding-right: 32px;
    }

    .story-card-thumb {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        height: 160px;
        margin-top: 0;
        margin-bottom: 14px;
        border-radius: 12px;
    }
}

/* Shared: Testimonials carousel (homepage-style 2-row) */
.testimonials-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-auto-columns: 340px;
    column-gap: 24px;
    row-gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-top: 8px;
    padding-bottom: 16px;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.testimonials-grid::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    position: relative;
    transition:
        transform 0.18s var(--ease-smooth),
        box-shadow 0.18s var(--ease-smooth),
        border-color 0.18s var(--ease-smooth);
    scroll-snap-align: start;
    overflow: hidden;
    isolation: isolate;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .testimonial-card:hover {
        transform: translateY(-4px);
        border-color: var(--accent);
        box-shadow: var(--shadow-lg);
    }
}

.testimonial-card::before {
    content: '“';
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 60px;
    color: var(--accent);
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Subtle closing quote mark (kept outside the clamped text so it never gets truncated). */
.testimonial-quote-mark {
    position: absolute;
    right: 18px;
    bottom: 14px;
    font-size: 60px;
    color: var(--accent);
    opacity: 0.10;
    font-family: Georgia, serif;
    line-height: 1;
    pointer-events: none;
    z-index: 0;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    inset: -32%;
    background:
        radial-gradient(circle at 26% 24%, rgba(255, 255, 255, 0.12), transparent 42%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 60%);
    transform: translateX(-16%) translateY(-12%) scale(1.05);
    opacity: 0;
    transition: opacity 0.35s var(--ease-smooth), transform 0.35s var(--ease-smooth);
    pointer-events: none;
}

.testimonial-card:hover::after {
    opacity: 1;
    transform: translateX(8%) translateY(-2%) scale(1.1);
}

.testimonial-card .case-card-badges {
    margin-bottom: 12px;
}

.testimonial-card .case-card-badges,
.testimonial-card .testimonial-author,
.testimonial-card .testimonial-role {
    position: relative;
    z-index: 1;
}

.testimonial-quote {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.testimonial-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.testimonial-role {
    font-size: 12px;
    color: var(--text-muted);
}

@media screen and (max-width: 768px) {
    .testimonials-grid {
        column-gap: 16px;
        row-gap: 16px;
        grid-auto-columns: 280px;
    }
    
    .testimonial-card {
        padding: 24px;
        min-height: 180px;
    }
    
    .testimonial-card::before {
        font-size: 48px;
        top: 10px;
        left: 16px;
    }
    
    .testimonial-quote {
        font-size: 14px;
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
}

/* Shared: Case/Testimonial detail modal content */
.detail-modal-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

/* === Story detail modal polish (testimonials + case studies) === */
.modal-overlay.modal-overlay--story {
    background: rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal.modal--story {
    max-width: 920px;
    transform: translateY(16px) scale(0.985);
    transition:
        opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.28s ease;
}

.modal.modal--story.active {
    transform: translateY(0) scale(1);
}

.modal.modal--story .modal-close {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal.modal--story .modal-close:hover {
    border-color: var(--accent);
}

.detail-modal-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

/* (Story modal close button is rendered inside the nav cluster, so no extra right padding needed.) */

.detail-modal-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

@media screen and (max-width: 480px) {
    .detail-modal-topbar {
        flex-wrap: wrap;
    }

    .detail-modal-nav {
        display: flex;
        width: 100%;
        justify-content: flex-end;
        margin-top: 6px;
    }
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--surface);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        transform 0.15s var(--ease-smooth),
        border-color 0.15s var(--ease-smooth),
        color 0.15s var(--ease-smooth);
}

.icon-btn:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-1px);
}

.icon-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.detail-modal-counter {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    padding: 0 4px;
    user-select: none;
}

.detail-modal-subtitle {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
}

.detail-quote-large {
    font-size: 18px;
    line-height: 1.75;
    color: var(--text);
    font-style: italic;
    letter-spacing: -0.01em;
    margin: 0;
    white-space: pre-wrap;
}

.detail-attribution {
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.detail-modal-scroll {
    overscroll-behavior: contain;
}

@media (prefers-reduced-motion: reduce) {
    .modal.modal--story {
        transform: none;
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }
}

.detail-modal-hero {
    width: 100%;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.detail-modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-modal-scroll {
    overflow: auto;
    flex: 1;
    min-height: 0;
    padding-right: 4px;
    max-height: calc(90vh - 140px);
}

/* Testimonial modal (homepage story modal): visually center quote + attribution within the available space. */
.modal.modal--story .detail-modal-scroll.detail-modal-scroll--testimonial {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.modal.modal--story .detail-modal-scroll.detail-modal-scroll--testimonial .testimonial-modal-center {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    max-width: 760px;
    margin: 10px auto 0;
}

/* Keep CTAs anchored to the bottom when content is short (prevents awkward vertical centering). */
.modal.modal--story .detail-modal-scroll.detail-modal-scroll--testimonial .detail-modal-actions--testimonial {
    margin-top: auto;
}

.detail-body-text {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0;
    white-space: pre-wrap;
}

.detail-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.detail-list li {
    position: relative;
    padding-left: 16px;
    text-wrap: balance;
}

.detail-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85em;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(4, 120, 87, 0.35);
}

.detail-body-text.detail-quote {
    font-style: italic;
    color: var(--text);
}

.detail-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

/* Make Impact stand out (green accent + bolder text) */
.detail-section.impact-section {
    border-top-color: transparent;
    border-left: 4px solid var(--accent);
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
}

.detail-section.impact-section .detail-section-title {
    color: var(--accent);
}

.detail-section.impact-section .detail-body-text {
    color: var(--text);
    font-weight: 650;
}

.detail-section.impact-section .detail-list {
    color: var(--text);
    font-weight: 650;
}

.detail-section.impact-section .detail-list li::before {
    background: rgba(4, 120, 87, 0.65);
}

.detail-section-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.detail-kv {
    display: grid;
    gap: 8px;
}

.detail-kv-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    align-items: start;
}

.detail-kv-key {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.detail-kv-val {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.detail-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.detail-modal-actions {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

/* Story modals often show a single primary CTA; centering prevents the footer from feeling right-heavy. */
.modal.modal--story .detail-modal-actions {
    justify-content: center;
}

/* Testimonial modal: keep the primary "Ask" CTA pinned to the right, and the optional related-case button on the left
   without shifting the layout when the related button is absent. */
.modal.modal--story .detail-modal-actions.detail-modal-actions--testimonial {
    justify-content: flex-end;
}
.modal.modal--story .detail-modal-actions.detail-modal-actions--testimonial .related-case-btn {
    margin-right: auto;
}

/* Same alignment rules for non-story modals (deployment/workshop pages use plain .modal). */
.detail-modal-actions.detail-modal-actions--testimonial {
    justify-content: flex-end;
}
.detail-modal-actions.detail-modal-actions--testimonial .related-case-btn {
    margin-right: auto;
}

.modal.modal--story .detail-modal-actions {
    justify-content: center;
}

.detail-modal-actions .cta-button {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
}

@media screen and (max-width: 600px) {
    .detail-kv-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .detail-modal-hero {
        height: 180px;
        border-radius: 14px;
    }

    .detail-body-text {
        font-size: 15px;
        line-height: 1.7;
    }

    .detail-list {
        font-size: 14px;
        gap: 6px;
    }

    .detail-section.impact-section {
        padding: 10px 12px;
    }
}

/* =========================================================
   Unified Filter Bar + Dropdown (used across pages)
   Matches the Home page styling for consistency
   ========================================================= */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
    padding: 16px 24px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.filter-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    min-width: 140px;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    width: 100%;
}

.dropdown-trigger:hover {
    border-color: var(--accent);
}

.dropdown-trigger.open {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.dropdown-trigger i {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.dropdown-trigger.open i {
    transform: rotate(180deg);
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    overflow: hidden;
}

.dropdown-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-option {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

/* Partner logo chips (reusable across pages) */
.partner-logo-row{
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.partner-logo-label{
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.partner-logo{
    height: 18px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.9;
    filter: grayscale(100%) contrast(1.05);
}

.partner-logo-row:hover .partner-logo{
    filter: none;
    opacity: 1;
}

.dropdown-option:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}

.dropdown-option.selected {
    background: var(--accent-subtle);
    color: var(--accent);
    font-weight: 600;
}

.dropdown-option:not(:last-child) {
    border-bottom: 1px solid var(--border-subtle);
}

@media screen and (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .filter-group {
        width: 100%;
        justify-content: space-between;
    }

    .custom-dropdown {
        flex: 1;
        min-width: 0;
    }

    .filter-divider {
        width: 100%;
        height: 1px;
    }
}
