/* Big Pen — shared site styles (index / about / services / company / contact).
   2026-11-10: moved here unchanged from the former index.html inline <style>.
   Only edits: h1 added next to the section h2 selectors (sub pages use h1),
   and the "Site pages" block at the end. Keep this file at the repo root so
   url(images/...) keeps resolving. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-dark: #FFFFFF;
    --off-white: #0a0a0a;
    --champagne-gold: #0F1F5C;
    --gold-glow: rgba(15, 31, 92, 0.3);
    --glass-bg: rgba(15, 31, 92, 0.04);
    --glass-border: rgba(15, 31, 92, 0.12);
    --error-red: #ff4d4d;
}



html {
    scroll-behavior: smooth;
    background: #0F1F5C;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 6rem;
}
@media (max-width: 768px) {
    html {
        scroll-padding-top: 5rem;
    }
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--deep-dark);
    color: var(--off-white);
    overflow-x: hidden;
    font-weight: 700;
    line-height: 1.8;
    font-feature-settings: "palt";
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* FIX 2: Mobile Menu Background Scroll Lock.
   touch-action lives on .mobile-menu (always set) instead of here:
   toggling it on body restyled the whole document on every open/close
   and made the menu feel laggy on phones. */
body.no-scroll {
    overflow: hidden !important;
    height: 100vh;
}

/* Noise Texture Overlay - disabled to keep pure blue */
body::after {
    display: none;
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--deep-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loader-logo {
    font-family: 'Noto Serif JP', serif;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: #C9A961;
    text-shadow: 0 0 30px rgba(201, 169, 97, 0.4);
    margin-bottom: 3rem;
}

.loader-progress {
    width: 300px;
    height: 2px;
    background: rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #C9A961;
    box-shadow: 0 0 20px rgba(201, 169, 97, 0.5);
    transition: width 0.3s ease;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0F1F5C;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #C9A961;
    text-shadow: 0 0 20px rgba(201, 169, 97, 0.3);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--champagne-gold);
    transition: width 0.4s ease;
}

.nav-links a:hover {
    color: #C9A961;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Skip link — visible only when focused via keyboard.
   Lets keyboard / screen-reader users jump past nav to main content. */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    background: #0F1F5C;
    color: #FFFFFF;
    padding: 12px 20px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 0 0 4px 0;
    transform: translateY(-100%);
    transition: transform 0.2s ease;
    z-index: 10001;
}
.skip-link:focus {
    transform: translateY(0);
    outline: 2px solid #C9A961;
    outline-offset: -2px;
}

/* Hamburger Menu Button (Mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    padding: 14px 12px;
    margin: -14px -12px;
    background: transparent;
    border: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.hamburger:focus-visible {
    outline: 2px solid #C9A961;
    outline-offset: 2px;
    border-radius: 4px;
}
/* Suppress focus ring while the X is showing — iOS Safari treats taps
   as focus-visible and the gold rectangle reads as a stray bar through
   the close icon. */
.hamburger.active:focus-visible {
    outline: none;
}

.hamburger span {
    width: 30px;
    height: 2px;
    background: #FFFFFF;
    transition: transform 0.1s ease;
    will-change: transform;
}

/* X formation: translate first (in screen coords), then rotate.
   Mobile media query uses display:none on span2, which collapses the
   flex gap (18px tall → 10px tall). Translate values are now 4px so
   the two remaining bars meet exactly at the new center. */
.hamburger.active span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

/* Mobile Menu Overlay - REVERTED to Simple Design */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(30px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, visibility 0.12s ease;
    touch-action: none;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    list-style: none;
    text-align: center;
}

.mobile-menu-links a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 2rem;
    letter-spacing: 0.2em;
    font-weight: 700;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    display: inline-block;
}

.mobile-menu-links a:hover,
.mobile-menu-links a:active {
    color: #C9A961;
}

/* Hero Section */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #FFFFFF;
}

#webgl-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 2rem;
}

.hero-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.hero-title span {
    display: inline-block;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(30px);
}

.hero-cta {
    display: inline-block;
    padding: 1.2rem 3rem;
    border: 1px solid var(--champagne-gold);
    color: var(--off-white);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--champagne-gold);
    transition: left 0.4s ease;
    z-index: -1;
}

.hero-cta:hover {
    color: var(--deep-dark);
    box-shadow: 0 0 40px var(--gold-glow);
}

.hero-cta:hover::before {
    left: 0;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--champagne-gold);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--champagne-gold), transparent);
    animation: scrollAnimation 2s ease-in-out infinite;
}

@keyframes scrollAnimation {
    0%, 100% { opacity: 0; transform: translateY(-20px); }
    50% { opacity: 1; transform: translateY(0); }
}

/* About Section */
#about {
    padding: 8rem 4rem;
    position: relative;
}

.about-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.about-header {
    margin-bottom: 4rem;
}

.about-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.section-label {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    font-weight: 700;
    color: var(--champagne-gold);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.section-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    line-height: 1.4;
    margin-bottom: 3rem;
}

.about-text {
    font-size: 1.1rem;
    line-height: 2;
    color: rgba(10, 10, 10, 0.8);
    margin-bottom: 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* Glass cards (Vision / Policy) are display-only as well.
   No hover effects — cursor stays default. */
.glass-card { cursor: default; }

/* Services Section */
#services {
    padding: 8rem 0;
    position: relative;
}

.services-header {
    padding: 0 4rem;
    margin-bottom: 6rem;
}

.services-scroll-container {
    display: flex;
    flex-direction: column;
    gap: 7rem;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.services-scroll-container::-webkit-scrollbar {
    display: none;
}

.service-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: center;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    position: relative;
    transition: none;
}
.service-card:nth-child(even) .card-image {
    order: 2;
}
.service-card-text {
    padding: 0 5rem;
}

/* Editorial hover: no card lift, no heavy shadow.
   See .card-image bracket frame and .service-title underline below. */

/* Featured Service Card (01) - styled identically to others */

.service-number {
    display: none;
}

.service-icon {
    width: 60px;
    height: 60px;
    border: 1px solid var(--champagne-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.service-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.service-description {
    font-size: 1rem;
    line-height: 2;
    color: rgba(10, 10, 10, 0.8);
}

/* Company Section */
#company {
    padding: 8rem 4rem;
    position: relative;
}

.company-container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}

.company-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 4rem;
}

.company-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    padding: 2rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    text-align: left;
    transition: background 0.3s ease, padding 0.3s ease;
}

.company-item:hover {
    background: rgba(255, 255, 255, 0.03);
    padding-left: 3rem;
}

.company-label {
    font-size: 1.05rem;
    letter-spacing: 0.15em;
    color: var(--champagne-gold);
    display: flex;
    align-items: center;
}

.company-value {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--off-white);
    display: flex;
    align-items: center;
}

/* Contact Section Styles */
#contact {
    padding: 8rem 4rem;
    position: relative;
}

.contact-container {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.contact-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
}

.contact-text {
    font-size: 1.1rem;
    line-height: 2;
    color: rgba(10, 10, 10, 0.8);
    margin-bottom: 4rem;
}

/* Form Styles */
/* FIX 3: Form Animation Logic Change */
.contact-form {
    width: 100%;
    margin: 0 auto;
    text-align: left;
    /* Animation initial state will be handled by GSAP */
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--champagne-gold);
    margin-bottom: 0.8rem;
    letter-spacing: 0.1em;
    font-family: 'Noto Sans JP', sans-serif;
}

.form-input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 0 16px !important;
    background: #FFFFFF;
    border: 1.5px solid #C5CBDB;
    color: var(--off-white);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    line-height: 50px;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    border-radius: 4px;
    appearance: none;
    display: block;
}

.form-textarea {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    background: #FFFFFF;
    border: 1.5px solid #C5CBDB;
    color: var(--off-white);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    border-radius: 4px;
    appearance: none;
    resize: vertical;
    display: block;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #0F1F5C;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(15, 31, 92, 0.12);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: rgba(10, 10, 10, 0.5);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-submit-container {
    text-align: center;
    margin-top: 3rem;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 4rem;
    background: transparent;
    border: 1px solid var(--champagne-gold);
    color: var(--off-white);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.2em;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    font-family: 'Noto Sans JP', sans-serif;
    width: 100%;
    max-width: 400px;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--champagne-gold);
    transition: left 0.4s ease;
    z-index: -1;
}

.contact-button:hover {
    color: var(--deep-dark);
    box-shadow: 0 0 40px var(--gold-glow);
}

.contact-button:hover::before {
    left: 0;
}

.contact-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Message */
.form-success-message {
    display: none;
    text-align: center;
    padding: 2rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--champagne-gold);
    border-radius: 4px;
}

.success-icon {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--champagne-gold);
}

/* Footer */
footer {
    padding: 4rem;
    background: #0F1F5C;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #C9A961;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #C9A961;
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #FFFFFF;
    letter-spacing: 0.1em;
    margin-top: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    nav {
        padding: 1.25rem 1.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Hero */
    .hero-title {
        font-size: clamp(2rem, 9vw, 3.25rem);
        letter-spacing: 0.1em;
    }

    /* Section padding unified to 24px sides */
    #about {
        padding: 5rem 1.5rem;
    }

    .about-cards {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #services {
        padding: 5rem 0;
    }

    .services-header {
        padding: 0 1.5rem;
        margin-bottom: 3rem;
    }

    .services-scroll-container {
        flex-direction: column;
        padding: 0 1.5rem;
        gap: 4rem;
    }

    .service-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .service-card:nth-child(even) .card-image {
        order: 0;
    }
    .service-card .card-image {
        height: 240px;
        box-shadow: 0 15px 40px rgba(15, 31, 92, 0.15);
    }
    .service-card-text {
        padding: 0 1.25rem !important;
    }
    .service-card-text .service-description {
        line-height: 1.85;
        font-size: 0.95rem;
        word-break: auto-phrase;
        overflow-wrap: anywhere;
    }
    /* Fallback for browsers that don't support auto-phrase */
    @supports not (word-break: auto-phrase) {
        .service-card-text .service-description {
            word-break: normal;
        }
    }

    #company {
        padding: 5rem 1.5rem;
    }

    .company-item {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
        padding: 1.5rem 1rem;
    }

    .company-item:hover {
        padding-left: 1.5rem;
    }

    .company-label {
        font-size: 0.75rem;
    }

    .company-value {
        font-size: 1rem;
    }

    #contact {
        padding: 5rem 1.5rem;
    }

    .contact-button {
        width: 100%;
        padding: 1.2rem 1.5rem;
    }

    footer {
        padding: 3rem 1.5rem 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    /* === Japanese typography & readability fixes === */
    /* Section h2: shrink + tighten letter-spacing to prevent 1-char orphan */
    #about h2, #about h1,
    #services h2, .services-header h2, #services h1,
    #company h2, #company h1,
    #contact h2, #contact h1,
    .process-header h2 {
        font-size: clamp(1.75rem, 7.5vw, 2.25rem);
        letter-spacing: 0.04em;
        line-break: strict;
    }

    /* Body p: smaller + tighter line-height to avoid orphan chars */
    #about p,
    #services p,
    #company p,
    #contact p {
        font-size: 1rem;
        line-height: 1.85;
        letter-spacing: 0;
    }

    /* Hide background decorative letter on mobile (overlaps headings) */
    .bg-letter {
        display: none !important;
    }

    /* Form: bump label readability + tap-friendly */
    #contact label,
    .form-label,
    label {
        font-size: 0.8125rem !important;
        letter-spacing: 0.15em !important;
    }

    #contact input,
    #contact textarea,
    input[type=text],
    input[type=email],
    input[type=tel],
    textarea {
        font-size: 1rem;
        min-height: 44px;
        padding: 0.75rem 0;
    }

    /* Submit button: trim huge horizontal padding */
    button[type=submit],
    #contact button {
        padding: 1rem 1.5rem !important;
    }

    /* Marquee tone-down on mobile */
    .marquee-track {
        font-size: 1.1rem !important;
    }
}

/* Small phones < 400px – extra trim */
@media (max-width: 400px) {
    .hero-title {
        font-size: clamp(1.875rem, 8vw, 2.75rem);
        letter-spacing: 0.08em;
    }
    #about h2, #about h1,
    #services h2, .services-header h2, #services h1,
    #company h2, #company h1,
    #contact h2, #contact h1,
    .process-header h2 {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }
}

/* === Photo additions (blue variant) === */
.glass-card .card-image {
    width: 100%;
    height: 200px;
    margin-bottom: 2rem;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.glass-card .card-image::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15, 31, 92, 0.35) 100%);
    border-radius: 6px;
}
.service-card .card-image {
    width: 100%;
    height: 480px;
    margin: 0;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(15, 31, 92, 0.18);
}

/* Full background image section (statement) */
#statement {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('https://images.unsplash.com/photo-1542051841857-5f90071e7989?w=2000&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 8rem 2rem;
    overflow: hidden;
}
#statement::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(15, 31, 92, 0.85) 0%, rgba(8, 18, 58, 0.92) 100%);
}
.statement-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
}
.statement-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    letter-spacing: 0.4em;
    color: #C9A961;
    margin-bottom: 2rem;
    text-transform: uppercase;
}
.statement-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}
.statement-title .accent {
    color: #C9A961;
}
.statement-sub {
    font-size: 1.125rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.85);
    max-width: 720px;
    margin: 0 auto;
    font-weight: 700;
}

/* Process Section (post-contract workflow) - timeline style */
#process {
    padding: 10rem 2rem;
}
.process-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 6rem;
}
.process-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}
.process-grid::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: var(--champagne-gold);
    opacity: 0.3;
    z-index: 0;
}
.process-step {
    background: transparent;
    border: none;
    padding: 0 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}
.process-step-num {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid var(--champagne-gold);
    color: var(--champagne-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    line-height: 1;
    transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.process-step:hover .process-step-num {
    background: var(--champagne-gold);
    color: #FFFFFF;
    transform: scale(1.06);
    box-shadow: 0 12px 30px rgba(201, 169, 97, 0.3);
}
.process-step h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--off-white);
    text-align: center;
}
.process-step p {
    color: rgba(10, 10, 10, 0.75);
    line-height: 1.8;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    max-width: 220px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    #statement {
        background-attachment: scroll;
        min-height: 60vh;
        padding: 5rem 1.5rem;
    }
    #process {
        padding: 5rem 1.5rem;
    }
    .process-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .process-grid::before {
        display: none;
    }
    .process-step-num {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }
    .glass-card .card-image,
    .service-card .card-image {
        height: 170px;
        margin-bottom: 1.5rem;
    }
}

/* === Rich enhancements (A + B + Marquee) === */

/* Section base — make sections position:relative for ::before bg text */
#about, #services, #process, #company, #contact, #statement {
    position: relative;
    overflow: hidden;
}

/* Giant background English text behind each section title */
.bg-letter {
    position: absolute;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    color: rgba(15, 31, 92, 0.045);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    white-space: nowrap;
    letter-spacing: 0.02em;
    font-size: clamp(7rem, 18vw, 18rem);
    top: 4rem;
    left: -2vw;
}
.bg-letter.right {
    left: auto;
    right: -2vw;
}
/* Statement section bg-letter is white-tinted */
#statement .bg-letter {
    color: rgba(255, 255, 255, 0.07);
}
/* Make all section content sit above bg-letter */
.about-container, .services-header, .services-scroll-container,
.process-header, .process-grid, .company-container,
.contact-container, .statement-inner {
    position: relative;
    z-index: 1;
}

/* Hairline divider between sections (above each section title area) */
.hairline-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0 auto 2rem;
    color: var(--champagne-gold);
}
.hairline-divider::before,
.hairline-divider::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--champagne-gold);
    opacity: 0.6;
}
.hairline-divider .dot {
    width: 6px;
    height: 6px;
    background: var(--champagne-gold);
    border-radius: 50%;
}

/* Marquee (always-flowing band) */
.marquee {
    position: relative;
    overflow: hidden;
    background: #0F1F5C;
    color: #C9A961;
    padding: 1.75rem 0;
    border-top: 1px solid rgba(201, 169, 97, 0.25);
    border-bottom: 1px solid rgba(201, 169, 97, 0.25);
}
.marquee-track {
    display: flex;
    gap: 4rem;
    white-space: nowrap;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    letter-spacing: 0.35em;
    font-weight: 700;
    text-transform: uppercase;
}
.marquee-track span.dot {
    color: rgba(201, 169, 97, 0.5);
}
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Scroll-triggered fade-in (B案: motion).
   Default state is now visible to guarantee content shows even if
   IntersectionObserver fails or runs late. The reveal animation
   still plays via .pre-reveal -> .is-visible toggle in JS. */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease-out,
                transform 0.3s ease-out;
}
.fade-in.pre-reveal {
    opacity: 0;
    transform: translateY(12px);
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-in.delay-1 { transition-delay: 0s; }
.fade-in.delay-2 { transition-delay: 0.04s; }
.fade-in.delay-3 { transition-delay: 0.08s; }

/* Bigger, more dramatic section titles */
.section-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
    line-height: 1.2 !important;
}

/* mobile-only <br> default: hidden on desktop */
br.mobile-only { display: none; }
br.speed-mobile-br { display: none; }
br.m-br { display: none; }

/* Privacy consent label desktop defaults (mobile override below) */
.privacy-consent-label {
    font-size: 0.8rem;
    gap: 0.5rem;
}

/* Mobile adjustments for rich elements */
@media (max-width: 768px) {
    .bg-letter {
        font-size: clamp(5rem, 22vw, 9rem);
        top: 2rem;
        left: -3vw;
    }
    .marquee-track {
        font-size: 0.95rem;
        gap: 2.5rem;
        animation-duration: 30s;
    }
    .marquee {
        padding: 1.25rem 0;
    }
}

/* ============================================ */
/* === Editorial × Architectural enhancements === */
/* ============================================ */

/* Scroll progress bar (top, hairline) */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(to right, var(--champagne-gold), rgba(201, 169, 97, 0.4));
    z-index: 99999;
    width: 0;
    transition: width 0.08s linear;
    pointer-events: none;
}

/* Chapter marker - small section index, magazine style */
.chapter-marker {
    position: absolute;
    top: 4.5rem;
    left: 4rem;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: #C9A961;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
}
.chapter-marker::before {
    content: '';
    width: 2rem;
    height: 1px;
    background: #C9A961;
    opacity: 0.7;
}
.chapter-marker .num {
    font-weight: 700;
    color: #C9A961;
}
.chapter-marker .name {
    font-weight: 600;
    color: rgba(15, 31, 92, 0.65);
    letter-spacing: 0.25em;
}
/* Statement section sits on dark photo, name needs to be light */
#statement .chapter-marker .name {
    color: rgba(255, 255, 255, 0.7);
}

/* Editorial section header structure */
.editorial-eyebrow {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--champagne-gold);
    margin-bottom: 1.5rem;
    display: block;
}

/* Section title — unified with hero (Noto Serif JP 700, 0.18em) */
.section-title {
    font-family: 'Noto Serif JP', serif !important;
    font-weight: 700 !important;
    font-size: clamp(2.5rem, 5.5vw, 4rem) !important;
    line-height: 1.4 !important;
    letter-spacing: 0.18em !important;
    margin-bottom: 2.5rem !important;
    color: #0a0a0a !important;
}
/* Statement section keeps white headline (over photo bg) */
#statement .statement-title {
    color: #FFFFFF !important;
}
/* Reset the old hairline-divider's visual but keep markup compatible */
.hairline-divider {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    margin: 0 0 1.25rem 0 !important;
}
.hairline-divider::before {
    width: 40px !important;
    height: 1px !important;
    opacity: 0.7 !important;
}
.hairline-divider::after {
    display: none !important;
}
.hairline-divider .dot {
    width: 4px !important;
    height: 4px !important;
}

/* Section content: align left for editorial feel (was centered) */
.about-header,
.services-header,
.process-header,
#company .company-container > .hairline-divider,
#company .company-container > .section-label,
#company .company-container > .section-title,
#contact .contact-container > .hairline-divider,
#contact .contact-container > .section-label,
#contact .contact-container > .contact-title {
    text-align: left;
}
.about-header,
.services-header,
.process-header {
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 0 4rem;
}
#company .company-container,
#contact .contact-container {
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
}

/* Editorial lead paragraph (overrides .about-text alignment in headers) */
.about-header .about-text,
.process-header .about-text,
.contact-container .contact-text {
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 2;
    color: rgba(10, 10, 10, 0.85);
    max-width: 640px;
    margin: 0;
    font-style: normal;
    letter-spacing: 0.02em;
}

/* Quote-mark decoration */
.quote-mark {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12rem;
    line-height: 0.7;
    color: var(--champagne-gold);
    opacity: 0.5;
    position: absolute;
    font-weight: 400;
    user-select: none;
    pointer-events: none;
    z-index: 1;
}
.quote-mark.tl { top: 6rem; left: 4rem; }
.quote-mark.br { bottom: 6rem; right: 4rem; transform: rotate(180deg); }

/* Service card editorial numbering */
.service-card-text .service-edition {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--champagne-gold);
    margin-bottom: 1rem;
    text-transform: uppercase;
    display: block;
}
.service-card-text .service-num-large {
    font-family: 'Cormorant Garamond', serif;
    font-size: 5.5rem;
    line-height: 0.85;
    color: var(--off-white);
    margin: 0 0 1.5rem 0;
    display: inline-block;
    border-bottom: 1px solid rgba(201, 169, 97, 0.4);
    padding-bottom: 0.5rem;
    font-weight: 400;
    font-style: italic;
    font-variant-numeric: lining-nums;
    font-feature-settings: 'lnum' 1;
}
.service-card-text .service-title {
    font-family: 'Noto Serif JP', serif !important;
    font-weight: 700 !important;
    font-size: clamp(1.75rem, 3vw, 2.5rem) !important;
    line-height: 1.4 !important;
    margin-bottom: 1.5rem !important;
    letter-spacing: 0.01em;
    color: var(--off-white);
}
.service-card-text .service-description {
    font-size: 1rem !important;
    line-height: 2 !important;
    color: rgba(10, 10, 10, 0.85) !important;
    font-weight: 700 !important;
}

/* Photo with elegant inset frame (architectural) */
.service-card .card-image {
    border-radius: 8px !important;
    box-shadow: 0 30px 80px rgba(15, 31, 92, 0.18) !important;
    position: relative;
    overflow: hidden;
}
.service-card .card-image::after {
    content: '';
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
}
/* Editorial hover (B案): vertical gold accent bar on the text side
   + a small horizontal slide of the text + a subtle saturation
   bump on the image. No card lift, no drop shadow. */
.service-card-text {
    position: relative;
    transition: transform 0.35s ease-out;
}
.service-card-text::before {
    content: '';
    position: absolute;
    left: 4rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--champagne-gold);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.35s ease-out;
}
.service-card:hover .service-card-text {
    transform: translateX(6px);
}
.service-card:hover .service-card-text::before {
    transform: scaleY(1);
}
.service-card .card-image {
    transition: filter 0.4s ease-out !important;
}
.service-card:hover .card-image {
    filter: saturate(1.08) !important;
}

/* Glass card refinement - thin, elegant border */
.glass-card {
    background: #FFFFFF !important;
    border: none !important;
    backdrop-filter: none !important;
    border-top: 1px solid var(--champagne-gold) !important;
    border-radius: 0 !important;
    padding: 3rem 2rem !important;
    position: relative;
}
.glass-card p {
    font-weight: 700 !important;
}
.glass-card .card-image {
    border-radius: 0 !important;
    margin-top: -3rem;
    margin-left: -2rem;
    margin-right: -2rem;
    width: calc(100% + 4rem) !important;
    height: 240px !important;
}

/* About header in editorial layout */
.about-cards {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
}

/* Process step refinement - more architectural */
.process-step-num {
    border-radius: 0 !important;
    width: 100px !important;
    height: 100px !important;
    background: transparent !important;
    border: 1px solid var(--champagne-gold) !important;
    color: var(--off-white) !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic;
    font-size: 2.75rem !important;
    position: relative;
    font-variant-numeric: lining-nums;
    font-feature-settings: 'lnum' 1;
}
.process-step-num::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(201, 169, 97, 0.35);
}
.process-step:hover .process-step-num {
    background: var(--champagne-gold) !important;
    color: #FFFFFF !important;
    transform: rotate(45deg) scale(1.05) !important;
}
.process-step:hover .process-step-num::before {
    inset: 4px;
    border-color: rgba(255, 255, 255, 0.6);
}
.process-step h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.35rem !important;
    margin-top: 0.5rem;
}
.process-grid::before {
    top: 50px !important;
    opacity: 0.5 !important;
}

/* Statement section: editorial quote layout */
#statement {
    min-height: 80vh !important;
}
#statement .statement-inner {
    max-width: 1100px;
    position: relative;
    padding: 2rem;
}
.statement-eyebrow {
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    color: #C9A961 !important;
    text-transform: none !important;
    margin-bottom: 3rem !important;
}
.statement-title {
    font-family: 'Noto Serif JP', serif !important;
    font-size: clamp(2.5rem, 6vw, 5rem) !important;
    font-weight: 900 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 3rem !important;
}

/* Company section editorial: replace grid with column rules */
.company-grid {
    display: grid !important;
    grid-template-columns: 240px 1fr !important;
    gap: 0 !important;
    margin-top: 4rem !important;
    border-top: 1px solid rgba(15, 31, 92, 0.15);
}
.company-item {
    display: contents !important;
}
.company-item .company-label,
.company-item .company-value {
    border-bottom: 1px solid rgba(15, 31, 92, 0.1);
    padding: 1.5rem 1rem !important;
}
.company-item .company-label {
    font-family: 'Noto Sans JP', sans-serif !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.2em !important;
    font-weight: 700 !important;
    color: rgba(15, 31, 92, 0.85) !important;
    text-transform: uppercase !important;
    padding-left: 0 !important;
}
.company-item .company-value {
    font-family: 'Noto Serif JP', serif !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: var(--off-white) !important;
}
.company-item:hover {
    background: transparent !important;
    padding-left: 0 !important;
}

/* Contact form refinement (editorial) */
#contact .contact-title {
    font-family: 'Noto Serif JP', serif !important;
    font-weight: 700 !important;
    font-size: clamp(2.5rem, 5.5vw, 4rem) !important;
    line-height: 1.4 !important;
    letter-spacing: 0.18em !important;
    margin-bottom: 2.5rem !important;
    color: #0a0a0a !important;
}
.form-group label {
    font-family: 'Noto Sans JP', sans-serif !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.25em !important;
    text-transform: uppercase !important;
    color: rgba(15, 31, 92, 0.75) !important;
    font-weight: 700 !important;
}
.form-input, .form-textarea {
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1.5px solid rgba(15, 31, 92, 0.2) !important;
    background: transparent !important;
    padding: 0.75rem 0 !important;
    font-family: 'Noto Serif JP', serif !important;
    font-size: 1.1rem !important;
    font-weight: 400 !important;
}
.form-input:focus, .form-textarea:focus {
    border-bottom-color: var(--champagne-gold) !important;
    box-shadow: none !important;
}
.contact-button {
    border-radius: 4px !important;
    background: transparent !important;
    color: var(--off-white) !important;
    border: 1.5px solid #0F1F5C !important;
    padding: 1rem 2.75rem !important;
    font-family: 'Noto Sans JP', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: none !important;
    transition: background 0.3s ease, color 0.3s ease !important;
    cursor: pointer;
}
.contact-button:hover {
    background: #0F1F5C !important;
    color: #FFFFFF !important;
}

/* Hero — Noto Serif JP for stronger Japanese display weight */
.hero-title {
    font-family: 'Noto Serif JP', serif !important;
    font-weight: 800 !important;
    font-size: clamp(3rem, 8vw, 8rem) !important;
    line-height: 1.25 !important;
    letter-spacing: 0.18em !important;
}

/* Scroll indicator — more prominent */
.scroll-indicator {
    opacity: 1 !important;
    bottom: 4rem !important;
    gap: 0.75rem !important;
    animation: scrollFloat 2.4s ease-in-out infinite;
}
.scroll-indicator span {
    font-size: 0.85rem !important;
    letter-spacing: 0.4em !important;
    color: #C9A961 !important;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(201, 169, 97, 0.4);
}
.scroll-line {
    width: 2px !important;
    height: 80px !important;
    background: linear-gradient(to bottom, #C9A961, rgba(201, 169, 97, 0)) !important;
    position: relative;
    overflow: hidden;
}
.scroll-line::after {
    content: '';
    position: absolute;
    top: -40%;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, transparent, #FFFFFF);
    animation: scrollDown 1.8s ease-in-out infinite;
}
@keyframes scrollFloat {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 8px); }
}
@keyframes scrollDown {
    0%   { top: -40%; opacity: 0; }
    30%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Mobile-only static particle backdrop — hidden on desktop where
   Three.js renders the live version. */
#hero-static-bg { display: none; }

/* Hero background containers */
#brush-svg, #grid-svg, .rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Brush strokes — shared base */
.brush-stroke { fill: none; opacity: 0; }

/* Bold strokes (太い・主役) — slow grand sweep */
.brush-stroke.bold {
    stroke-dasharray: 4500;
    stroke-dashoffset: 4500;
}
.brush-stroke.bold.b1 { animation: brushDrawBold 22s ease-in-out infinite; animation-delay: 0s;  }
.brush-stroke.bold.b2 { animation: brushDrawBold 24s ease-in-out infinite; animation-delay: 7s;  }
.brush-stroke.bold.b3 { animation: brushDrawBold 20s ease-in-out infinite; animation-delay: 12s; }

@keyframes brushDrawBold {
    0%   { stroke-dashoffset: 4500; opacity: 0; }
    6%   { opacity: 0.85; }
    48%  { stroke-dashoffset: 0;    opacity: 0.85; }
    70%  { stroke-dashoffset: 0;    opacity: 0.6; }
    100% { stroke-dashoffset: -4500; opacity: 0; }
}

/* Medium strokes — supporting */
.brush-stroke.med {
    stroke-dasharray: 3500;
    stroke-dashoffset: 3500;
}
.brush-stroke.med.m1 { animation: brushDrawMed 14s ease-in-out infinite; animation-delay: 1s;  }
.brush-stroke.med.m2 { animation: brushDrawMed 16s ease-in-out infinite; animation-delay: 4s;  }
.brush-stroke.med.m3 { animation: brushDrawMed 13s ease-in-out infinite; animation-delay: 7.5s;}
.brush-stroke.med.m4 { animation: brushDrawMed 15s ease-in-out infinite; animation-delay: 10s; }

@keyframes brushDrawMed {
    0%   { stroke-dashoffset: 3500; opacity: 0; }
    8%   { opacity: 0.7; }
    45%  { stroke-dashoffset: 0;    opacity: 0.7; }
    65%  { stroke-dashoffset: 0;    opacity: 0.5; }
    100% { stroke-dashoffset: -3500; opacity: 0; }
}

/* Fine strokes — fast, delicate */
.brush-stroke.fine {
    stroke-dasharray: 2500;
    stroke-dashoffset: 2500;
}
.brush-stroke.fine.f1 { animation: brushDrawFine 8s ease-in-out infinite;  animation-delay: 0.5s; }
.brush-stroke.fine.f2 { animation: brushDrawFine 10s ease-in-out infinite; animation-delay: 2.5s; }
.brush-stroke.fine.f3 { animation: brushDrawFine 9s ease-in-out infinite;  animation-delay: 5s;   }
.brush-stroke.fine.f4 { animation: brushDrawFine 11s ease-in-out infinite; animation-delay: 7.5s; }
.brush-stroke.fine.f5 { animation: brushDrawFine 7s ease-in-out infinite;  animation-delay: 3.5s; }

@keyframes brushDrawFine {
    0%   { stroke-dashoffset: 2500; opacity: 0; }
    12%  { opacity: 0.8; }
    45%  { stroke-dashoffset: 0;    opacity: 0.8; }
    60%  { stroke-dashoffset: 0;    opacity: 0.5; }
    100% { stroke-dashoffset: -2500; opacity: 0; }
}

/* Ink pools — slow breathing */
.ink-pool {
    transform-box: fill-box;
    transform-origin: center;
    animation: poolBreath 14s ease-in-out infinite;
}
.ink-pool.ip1 { animation-delay: 0s;  }
.ink-pool.ip2 { animation-delay: 4s;  }
.ink-pool.ip3 { animation-delay: 8s;  }
.ink-pool.ip4 { animation-delay: 11s; }

@keyframes poolBreath {
    0%, 100% { opacity: 0.7;  transform: scale(0.95); }
    50%      { opacity: 1;    transform: scale(1.08); }
}

/* Splatter dots — sharp flashes */
.splatter {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: splatterFlash 6s ease-in-out infinite;
}
.splatter.sp1  { animation-delay: 0s;    }
.splatter.sp2  { animation-delay: 0.4s;  }
.splatter.sp3  { animation-delay: 0.9s;  }
.splatter.sp4  { animation-delay: 1.4s;  }
.splatter.sp5  { animation-delay: 1.9s;  }
.splatter.sp6  { animation-delay: 2.4s;  }
.splatter.sp7  { animation-delay: 2.9s;  }
.splatter.sp8  { animation-delay: 3.4s;  }
.splatter.sp9  { animation-delay: 3.9s;  }
.splatter.sp10 { animation-delay: 4.4s;  }
.splatter.sp11 { animation-delay: 4.9s;  }
.splatter.sp12 { animation-delay: 5.4s;  }

@keyframes splatterFlash {
    0%, 100% { opacity: 0;    transform: scale(0.5); }
    15%      { opacity: 0.95; transform: scale(1.2); }
    45%      { opacity: 0.5;  transform: scale(1);   }
    80%      { opacity: 0.15; transform: scale(0.85); }
}

/* ====== Hero — calligrapher's atelier additions ====== */

/* Giant kanji rotation: 智 → 創 → 進 (15s cycle, 5s offset each) */
.kanji {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    stroke-dasharray: 5000;
    stroke-dashoffset: 5000;
}
.kanji.k1 { animation: kanjiInkWash 15s ease-in-out infinite; animation-delay: 0s;  }
.kanji.k2 { animation: kanjiInkWash 15s ease-in-out infinite; animation-delay: 5s;  }
.kanji.k3 { animation: kanjiInkWash 15s ease-in-out infinite; animation-delay: 10s; }

@keyframes kanjiInkWash {
    0%   { opacity: 0;    transform: scale(1.08) translateY(20px); stroke-dashoffset: 5000; }
    6%   { opacity: 0.95; }
    22%  { opacity: 1;    transform: scale(1) translateY(0); stroke-dashoffset: 0; }
    30%  { opacity: 0.9;  transform: scale(1) translateY(0); }
    33%  { opacity: 0;    transform: scale(0.96) translateY(-10px); }
    100% { opacity: 0;    transform: scale(0.96) translateY(-10px); }
}

/* Floating gold flecks (drifting like 金箔 in the air) */
.fleck {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
}
.fleck.fl1  { animation: fleckDrift 16s ease-in-out infinite; animation-delay: 0s;    }
.fleck.fl2  { animation: fleckDrift 18s ease-in-out infinite; animation-delay: 1.2s;  }
.fleck.fl3  { animation: fleckDrift 14s ease-in-out infinite; animation-delay: 2.4s;  }
.fleck.fl4  { animation: fleckDrift 17s ease-in-out infinite; animation-delay: 3.6s;  }
.fleck.fl5  { animation: fleckDrift 15s ease-in-out infinite; animation-delay: 4.8s;  }
.fleck.fl6  { animation: fleckDrift 19s ease-in-out infinite; animation-delay: 6.0s;  }
.fleck.fl7  { animation: fleckDrift 13s ease-in-out infinite; animation-delay: 0.6s;  }
.fleck.fl8  { animation: fleckDrift 16s ease-in-out infinite; animation-delay: 1.8s;  }
.fleck.fl9  { animation: fleckDrift 18s ease-in-out infinite; animation-delay: 3.0s;  }
.fleck.fl10 { animation: fleckDrift 14s ease-in-out infinite; animation-delay: 4.2s;  }
.fleck.fl11 { animation: fleckDrift 17s ease-in-out infinite; animation-delay: 5.4s;  }
.fleck.fl12 { animation: fleckDrift 15s ease-in-out infinite; animation-delay: 6.6s;  }
.fleck.fl13 { animation: fleckDrift 19s ease-in-out infinite; animation-delay: 7.8s;  }
.fleck.fl14 { animation: fleckDrift 16s ease-in-out infinite; animation-delay: 2.1s;  }
.fleck.fl15 { animation: fleckDrift 14s ease-in-out infinite; animation-delay: 3.3s;  }

@keyframes fleckDrift {
    0%   { opacity: 0;    transform: translate(0, 0)        scale(0.6); }
    15%  { opacity: 0.85; }
    50%  { opacity: 0.7;  transform: translate(30px, -50px) scale(1);   }
    85%  { opacity: 0.3; }
    100% { opacity: 0;    transform: translate(60px, -100px) scale(0.5); }
}

/* Seal (落款印) - simple opacity animation, position fixed in SVG */
.seal-box, .seal-text {
    opacity: 0;
    animation: sealAppear 18s ease-in-out infinite;
    animation-delay: 4s;
}

@keyframes sealAppear {
    0%   { opacity: 0; }
    8%   { opacity: 0; }
    12%  { opacity: 1; }
    65%  { opacity: 1; }
    75%  { opacity: 0.6; }
    100% { opacity: 0; }
}

/* Diagonal sweep (gold streak flashes across the diagonal) */
.sweep {
    opacity: 0;
    stroke-dasharray: 2200;
    stroke-dashoffset: 2200;
}
.sweep.s-sweep1 {
    animation: sweepShoot 11s ease-in-out infinite;
    animation-delay: 2s;
}
.sweep.s-sweep2 {
    animation: sweepShoot 13s ease-in-out infinite;
    animation-delay: 7s;
}
@keyframes sweepShoot {
    0%   { stroke-dashoffset: 2200; opacity: 0; }
    8%   { stroke-dashoffset: 2200; opacity: 0; }
    12%  { stroke-dashoffset: 0;    opacity: 0.9; }
    16%  { opacity: 0.9; }
    22%  { stroke-dashoffset: -2200; opacity: 0; }
    100% { stroke-dashoffset: -2200; opacity: 0; }
}

/* Architectural grid dots — flicker on/off */
.grid-dot {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: dotFlicker 6s ease-in-out infinite;
}
.grid-dot.d1  { animation-delay: 0s;    }
.grid-dot.d2  { animation-delay: 0.5s;  }
.grid-dot.d3  { animation-delay: 1.1s;  }
.grid-dot.d4  { animation-delay: 1.7s;  }
.grid-dot.d5  { animation-delay: 2.3s;  }
.grid-dot.d6  { animation-delay: 2.9s;  }
.grid-dot.d7  { animation-delay: 3.5s;  }
.grid-dot.d8  { animation-delay: 0.2s;  }
.grid-dot.d9  { animation-delay: 0.8s;  }
.grid-dot.d10 { animation-delay: 1.4s;  }
.grid-dot.d11 { animation-delay: 2.0s;  }
.grid-dot.d12 { animation-delay: 2.6s;  }
.grid-dot.d13 { animation-delay: 3.2s;  }
.grid-dot.d14 { animation-delay: 3.8s;  }
.grid-dot.d15 { animation-delay: 4.4s;  }

@keyframes dotFlicker {
    0%   { opacity: 0;    transform: scale(0.6); }
    25%  { opacity: 0.95; transform: scale(1); }
    55%  { opacity: 0.7;  transform: scale(1); }
    80%  { opacity: 0.3;  transform: scale(0.85); }
    100% { opacity: 0;    transform: scale(0.6); }
}

/* Architectural crosshair marks (slow blink) */
.cross-hair {
    animation: crossPulse 8s ease-in-out infinite;
}
.cross-hair.ch1 { animation-delay: 1s; }
.cross-hair.ch2 { animation-delay: 3.5s; }
.cross-hair.ch3 { animation-delay: 6s; }

@keyframes crossPulse {
    0%, 100% { opacity: 0; }
    30%, 70% { opacity: 0.6; }
}

/* legacy brush-stroke styles (kept for easy revert) */
.brush-stroke { fill: none; opacity: 0; }

/* Process step number — keep numeral upright while frame rotates */
.process-step-num {
    position: relative;
    transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease !important;
}
.process-step-num span.num-inner {
    display: inline-block;
    transition: transform 0.4s ease;
}
.process-step:hover .process-step-num {
    transform: rotate(45deg) scale(1.05) !important;
}
.process-step:hover .process-step-num span.num-inner {
    transform: rotate(-45deg);
}

/* Footer editorial */
footer {
    padding: 4rem !important;
    position: relative;
}

/* Marquee refinement: more elegant */
.marquee-track {
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic !important;
    font-size: 1.55rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.15em !important;
    text-transform: none !important;
}
.marquee {
    border-top: none !important;
    border-bottom: none !important;
    padding: 2rem 0 !important;
}

/* bg-letter editorial: refined, kept near section top */
.bg-letter {
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic !important;
    font-weight: 400 !important;
    color: rgba(15, 31, 92, 0.05) !important;
    font-size: clamp(5rem, 12vw, 12rem) !important;
    letter-spacing: -0.02em !important;
    top: 4rem !important;
    left: 4% !important;
    right: auto !important;
    transform: none !important;
    text-align: left;
}
.bg-letter.right {
    left: auto !important;
    right: 4% !important;
    text-align: right;
}

/* Mobile refinements */
@media (max-width: 768px) {
    .chapter-marker {
        top: 1.5rem;
        left: 1.5rem;
        font-size: 0.6rem;
        gap: 0.5rem;
    }
    .chapter-marker::before {
        width: 1.25rem;
    }
    .about-header,
    .services-header,
    .process-header,
    #company .company-container,
    #contact .contact-container {
        padding: 0 1.5rem;
    }
    .about-cards {
        padding: 0 1.5rem;
    }
    .quote-mark {
        font-size: 6rem;
    }
    .quote-mark.tl { top: 2rem; left: 1.5rem; }
    .quote-mark.br { bottom: 2rem; right: 1.5rem; }
    .company-grid {
        grid-template-columns: 1fr !important;
    }
    .company-item .company-label,
    .company-item .company-value {
        padding: 0.75rem 0 !important;
        border-bottom: none;
    }
    .company-item .company-label {
        padding-top: 1.5rem !important;
        border-top: 1px solid rgba(15, 31, 92, 0.1);
    }
    .company-item .company-value {
        padding-bottom: 1.5rem !important;
    }
    footer::before {
        top: -1.5rem;
    }
    .service-card .card-image::after {
        inset: 8px;
    }
    .service-card-text .service-num-large {
        font-size: 4rem;
    }
    .process-step-num {
        width: 80px !important;
        height: 80px !important;
        font-size: 2.25rem !important;
    }
    /* Process step text: widen on mobile so phrase breaks land at
       punctuation instead of mid-word (e.g. 組み合わ / せと、). */
    .process-step p {
        max-width: 320px !important;
    }

    /* Privacy consent label: keep on one line at mobile widths. */
    .privacy-consent-label {
        font-size: 11px;
        gap: 4px;
    }
    .privacy-consent-label input[type="checkbox"] {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0;
    }

    /* Footer copyright: keep on one line at mobile widths by
       shrinking the type and tightening letter-spacing. */
    .copyright {
        font-size: 0.62rem !important;
        letter-spacing: 0.04em !important;
        white-space: nowrap;
    }
}

/* === Mobile performance overrides === */
@media (max-width: 768px) {
    /* backdrop-filter is one of the heaviest things on mobile GPUs */
    nav { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
    .mobile-menu { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(10, 10, 10, 0.97) !important; }

    /* NOTE: content-visibility:auto was removed.
       iOS Safari skips IntersectionObserver firing on its descendants,
       leaving .fade-in elements stuck at opacity:0 (headings, contact form
       disappeared on real devices while Chrome DevTools showed them fine). */

    /* Pause brush calligraphy animations when hero is scrolled away.
       (JS toggles .brush-paused on body when hero leaves viewport.) */
    body.brush-paused .brush-stroke,
    body.brush-paused .ink-pool {
        animation-play-state: paused !important;
    }

    /* Reduce expensive shadows */
    .service-card .card-image { box-shadow: 0 8px 20px rgba(15, 31, 92, 0.08) !important; }

    /* Static particle / meteor backdrop replaces the WebGL canvas
       on mobile. Cover the hero, sit underneath the brush svg. */
    #hero-static-bg {
        display: block;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 1;
    }

    /* Hero brush calligraphy on mobile: SHOW the strokes but freeze
       them at the "fully drawn" state. CPU-bound stroke-dashoffset
       animation was the source of the stutter, not the rendering of
       the static path itself — so kill the animation and pin every
       path to its end-of-draw state at a tasteful opacity. */
    .brush-stroke.bold {
        animation: none !important;
        stroke-dashoffset: 0 !important;
        opacity: 0.55 !important;
    }
    .brush-stroke.med {
        animation: none !important;
        stroke-dashoffset: 0 !important;
        opacity: 0.4 !important;
    }
    .brush-stroke.fine {
        animation: none !important;
        stroke-dashoffset: 0 !important;
        opacity: 0.45 !important;
    }
    .ink-pool {
        animation: none !important;
        opacity: 0.7 !important;
        transform: scale(1) !important;
    }

    /* Keep hero & services on a dedicated GPU layer so iOS Safari
       doesn't discard their paint when they scroll out of view.
       translateZ(0) alone is only a hint — pair it with explicit
       will-change and contain:paint to force the compositor to
       retain the rasterised tiles. */
    #hero,
    #services {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        will-change: transform;
        contain: paint;
    }

    /* SVG Gaussian-blur filter forces a per-frame reflow on iOS
       Safari and is the most likely trigger of the white flash.
       Drop the filter on mobile — paths still look fine without it. */
    #brush-svg .brush-stroke {
        filter: none !important;
    }

    /* Stop iOS rubber-band overscroll from re-painting the hero. */
    html, body {
        overscroll-behavior-y: none;
    }

    /* The scroll-progress bar updates on every scroll event and can
       keep the compositor busy enough to delay hero re-paint after
       scroll-back. Hide it on mobile — it's a desktop nicety. */
    .scroll-progress {
        display: none !important;
    }

    /* Hamburger: nothing on the button itself should ever paint.
       Outline, box-shadow and border all suppressed across every state
       because iOS Safari was painting *something* (likely the focus
       outline-rectangle) that read as a horizontal bar through the X. */
    .hamburger,
    .hamburger:hover,
    .hamburger:focus,
    .hamburger:focus-visible,
    .hamburger:active,
    .hamburger.active,
    .hamburger.active:focus,
    .hamburger.active:focus-visible {
        outline: none !important;
        box-shadow: none !important;
        border: 0 !important;
    }
    /* Take the middle bar fully out of the layout when the X is showing
       — opacity:0 / width:0 alone wasn't enough on iOS Safari. */
    .hamburger.active span:nth-child(2) {
        display: none !important;
    }
}

/* === Mobile final overrides (source-order wins) === */
@media (max-width: 768px) {
    /* bg-letter: editorial backdrop on mobile — bigger, more visible */
    .bg-letter {
        display: block !important;
        font-size: clamp(3.5rem, 18vw, 5.5rem) !important;
        top: 0.5rem !important;
        left: 1rem !important;
        right: auto !important;
        color: rgba(15, 31, 92, 0.2) !important;
        pointer-events: none;
        white-space: nowrap;
        max-width: calc(100vw - 2rem);
        line-height: 1 !important;
    }
    .bg-letter.right {
        left: auto !important;
        right: 1rem !important;
        text-align: right;
    }

    /* Company section: 1-column layout (label on top, value full-width below) */
    .company-item {
        grid-template-columns: 1fr !important;
        gap: 0.25rem !important;
        padding: 1.25rem 0 !important;
    }
    .company-item .company-label {
        font-size: 0.7rem !important;
        color: rgba(15, 31, 92, 0.55) !important;
    }
    .company-item .company-value {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }
    /* Address: shrink so building name fits same line as street */
    .company-item .company-value.address-value {
        font-size: 0.82rem !important;
        white-space: nowrap;
        letter-spacing: -0.01em !important;
    }

    /* Footer padding (outer rule has !important; need to win) */
    footer { padding: 3rem 1.5rem 2rem !important; }

    /* Marquee size on mobile */
    .marquee-track { font-size: 1.18rem !important; letter-spacing: 0.1em !important; }
    .marquee { padding: 1.25rem 0 !important; }

    /* Statement eyebrow: keep "Beyond Implementation" on a single line */
    .statement-eyebrow {
        font-size: 1.1rem !important;
        letter-spacing: 0.03em !important;
        margin-bottom: 2rem !important;
        white-space: nowrap;
    }

    /* Statement title: 2-line layout on mobile (日本企業に、 / 明日から使えるAIを。).
       Size is set so 明日から使えるAIを。 (11 chars) fits on a 390px viewport
       after section padding. */
    .statement-title {
        font-size: clamp(1.4rem, 5.4vw, 2rem) !important;
        line-height: 1.55 !important;
        letter-spacing: 0.03em !important;
        margin-bottom: 2rem !important;
    }

    /* Body copy: shrink and let WebKit phrase-break Japanese naturally
       so a single character ("い。" etc.) doesn't dangle on its own line. */
    .about-header .about-text,
    .process-header .about-text,
    .contact-container .contact-text,
    .statement-sub,
    .about-text,
    .contact-text {
        font-size: 0.95rem !important;
        line-height: 1.85 !important;
        word-break: auto-phrase;
        text-wrap: pretty;
    }

    /* mobile-only line breaks: keep disabled so the statement title
       renders as 2 lines (日本企業に、 / 明日から使えるAIを。) instead
       of breaking 明日から使える ↵ AI into separate lines. */
    br.mobile-only { display: none; }

    /* Service cards on mobile: kill the hover-driven slide and
       saturation tap behaviour entirely (touch devices fire :hover
       on tap, leaving cards in a half-shifted state). Keep only the
       vertical accent bar, aligned to the photo's left edge so the
       line reads as a deliberate rule and not a screen-edge fragment. */
    .service-card-text::before {
        transform: scaleY(1) !important;
        left: 0 !important;
    }
    .service-card:hover .service-card-text,
    .service-card .service-card-text {
        transform: none !important;
    }
    .service-card:hover .card-image,
    .service-card .card-image {
        filter: none !important;
    }

    /* Speed sub-copy: phrase-aware breaks for narrow viewports so
       punctuation lands at the line end (avoids leaving に変え、
       dangling on a line of its own). */
    br.speed-mobile-br { display: inline; }
    br.m-br { display: inline; }

    /* Section heading (uses .section-title / .contact-title with !important) */
    .section-title,
    .contact-title,
    #contact .contact-title {
        font-size: clamp(1.75rem, 7.5vw, 2.25rem) !important;
        letter-spacing: 0.04em !important;
        line-height: 1.45 !important;
        margin-bottom: 2rem !important;
    }
}

@media (max-width: 400px) {
    .section-title,
    .contact-title,
    #contact .contact-title {
        font-size: clamp(1.5rem, 7vw, 2rem) !important;
    }
}

/* Note: prefers-reduced-motion handling intentionally omitted on this page.
   The hero WebGL particles, brush calligraphy, and marquee are core brand
   expressions; suppressing them harms the site identity. Revisit if a11y
   requirements escalate (e.g. add a manual "reduce visuals" toggle). */

/* ========= About: Statement Cards (Plan B / typography-led) ========= */
.statement-card {
    position: relative;
    padding: 0.5rem 0 0.5rem 2.5rem;
    border-left: 1px solid var(--champagne-gold);
}
.statement-eng {
    display: block;
    font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(3rem, 5.5vw, 4.75rem);
    line-height: 1;
    color: var(--champagne-gold);
    letter-spacing: -0.01em;
    margin-bottom: 2.25rem;
}
.statement-lead {
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 1.7vw, 1.55rem);
    line-height: 1.9;
    color: var(--off-white);
    letter-spacing: 0.06em;
    margin-bottom: 1.75rem;
}
.statement-body {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 2;
    color: rgba(10, 10, 10, 0.72);
    letter-spacing: 0.04em;
    max-width: 32rem;
}
@media (max-width: 768px) {
    .statement-card {
        padding: 0.25rem 0 0.25rem 1.5rem;
    }
    .statement-eng {
        font-size: clamp(2.5rem, 11vw, 3.5rem);
        margin-bottom: 1.5rem;
    }
    .statement-lead {
        font-size: 1.15rem;
        line-height: 1.85;
        margin-bottom: 1.25rem;
    }
    .statement-body {
        font-size: 0.9rem;
        line-height: 1.95;
    }
}

/* ========= Speed Section (between About and Services) ========= */
#speed {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('images/speed-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #FFFFFF;
    text-align: center;
    padding: 8rem 2rem;
    overflow: hidden;
}
#speed::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(15, 31, 92, 0.88) 0%, rgba(8, 18, 58, 0.94) 100%);
}
#speed .speed-inner {
    position: relative;
    z-index: 1;
    max-width: 1240px;
}
#speed .speed-eyebrow {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #C9A961;
    margin-bottom: 3rem;
}
#speed .speed-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.5;
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
    color: #FFFFFF;
}
#speed .speed-title .accent {
    color: #C9A961;
}
#speed .speed-sub {
    font-size: 1.125rem;
    line-height: 2.2;
    color: rgba(255, 255, 255, 0.92);
    max-width: 760px;
    margin: 0 auto;
    font-weight: 700;
}
#speed .bg-letter {
    color: rgba(255, 255, 255, 0.06) !important;
}
@media (max-width: 768px) {
    #speed {
        min-height: 60vh;
        padding: 5rem 1.5rem;
        background-attachment: scroll;
    }
    #speed .speed-eyebrow {
        font-size: 1.1rem;
        letter-spacing: 0.08em;
        margin-bottom: 2rem;
    }
    #speed .speed-title {
        font-size: clamp(1.4rem, 5.6vw, 2rem) !important;
        line-height: 1.5;
        letter-spacing: 0.03em;
        margin-bottom: 2rem;
        white-space: nowrap;
    }
    #speed .speed-sub {
        font-size: 0.95rem;
        line-height: 2;
    }
}

/* Cases teaser: navy band after Services on the top page (navy and white surfaces
   alternate down the page), links to cases.html */
#cases {
    position: relative;
    overflow: hidden;
    background-image: url('https://images.unsplash.com/photo-1609153754837-b95fe3f8e787?w=2000&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #FFFFFF;
    text-align: center;
    padding: 8rem 2rem;
}
#cases::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(15, 31, 92, 0.85) 0%, rgba(8, 18, 58, 0.92) 100%);
}
#cases .bg-letter {
    color: rgba(255, 255, 255, 0.06) !important;
}
#cases .cases-inner {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
}
#cases .cases-eyebrow {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #C9A961;
    margin-bottom: 1.5rem;
}
#cases .cases-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.4;
    letter-spacing: 0.12em;
    color: #FFFFFF;
    margin-bottom: 2.75rem;
}
#cases .cases-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 0.6rem;
    max-width: 820px;
    margin: 0 auto 3.5rem;
    padding: 0;
}
#cases .cases-list li {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    transition: border-color 0.3s ease;
}
/* Each pill links to its case page (2026-11-10) */
#cases .cases-list li a {
    display: block;
    padding: 0.55rem 1rem;
    color: inherit;
    text-decoration: none;
    border-radius: inherit;
    transition: color 0.3s ease;
}
#cases .cases-list li:hover {
    border-color: #C9A961;
}
#cases .cases-list li a:hover {
    color: #C9A961;
}
#cases .cases-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.2rem 3rem;
    border: 1px solid #C9A961;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease, box-shadow 0.4s ease;
}
#cases .cases-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #C9A961;
    transition: left 0.4s ease;
    z-index: -1;
}
#cases .cases-cta svg {
    width: 22px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease;
}
#cases .cases-cta:hover {
    color: #0F1F5C;
    box-shadow: 0 0 40px rgba(201, 169, 97, 0.35);
}
#cases .cases-cta:hover::before {
    left: 0;
}
#cases .cases-cta:hover svg {
    transform: translateX(4px);
}
#cases .cases-cta:focus-visible {
    outline: 2px solid #C9A961;
    outline-offset: 4px;
}
@media (max-width: 768px) {
    #cases {
        padding: 5rem 1.5rem;
        background-attachment: scroll;
    }
    #cases .cases-eyebrow {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    #cases .cases-title {
        font-size: clamp(1.7rem, 7vw, 2.2rem);
        letter-spacing: 0.06em;
        margin-bottom: 2rem;
    }
    #cases .cases-list {
        gap: 0.4rem 0.45rem;
        margin-bottom: 2.5rem;
    }
    #cases .cases-list li {
        font-size: 0.72rem;
        padding: 0.3rem 0.75rem;
    }
    #cases .cases-cta {
        width: 100%;
        justify-content: center;
        padding: 1.1rem 1.5rem;
    }
}

/* ========= Site pages (2026-11-10) ========= */

/* Current page in the header menu, mobile menu and footer */
.nav-links a[aria-current="page"],
.mobile-menu-links a[aria-current="page"],
.footer-links a[aria-current="page"] {
    color: #C9A961;
}

/* Footer logo links to the top page: same look, hover like the header logo, 44px tap area */
.footer-logo {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.footer-logo:hover {
    opacity: 0.8;
}

/* Sub pages: content starts below the fixed nav (index.html has no <main>) */
main {
    padding-top: 10rem;
}

/* Services page opens with the Speed photo band as its message (2026-11-10).
   The band starts under the fixed nav (no white strip); the extra top padding
   equals the nav height (108px desktop / 76px phone) so the copy stays centred
   in the visible part. */
main.lead-band {
    padding-top: 0;
}
.lead-band #speed {
    min-height: calc(70vh + 6.75rem);
    padding-top: calc(8rem + 6.75rem);
}

/* Top-page teasers: short About / Services with a link to the full page */
.teaser .about-header {
    margin-bottom: 0;
}
.teaser-more {
    position: relative;
    z-index: 1;
    margin-top: 3rem;
}
.teaser > .teaser-more {
    max-width: 1200px;
    margin: 5rem auto 0;
    padding: 0 4rem;
}

/* Contact CTA band before the footer (navy-soft surface, as on cases.html) */
.contact-cta {
    background: rgba(15, 31, 92, 0.06);
    padding: 5rem 4rem;
}
.contact-cta-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;            /* lines up with .about-header / .services-header text */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}
.contact-cta-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.08em;
    color: #0F1F5C;
}

@media (max-width: 768px) {
    main {
        padding-top: 6rem;
    }
    main.lead-band {
        padding-top: 0;
    }
    .lead-band #speed {
        min-height: calc(60vh + 4.75rem);
        padding-top: calc(5rem + 4.75rem);
    }
    .teaser-more {
        margin-top: 2rem;
    }
    .teaser > .teaser-more {
        margin-top: 3rem;
        padding: 0 1.5rem;
    }
    .contact-cta {
        padding: 3rem 1.5rem;
    }
    .contact-cta-inner {
        padding: 0;
        flex-direction: column;
        align-items: stretch;
    }
    .contact-cta-title {
        letter-spacing: 0.04em;
    }
    /* Link buttons: keep the label on one line down to 320px
       (the base .contact-button padding is !important) */
    .teaser-more .contact-button,
    .contact-cta .contact-button {
        padding: 1rem !important;
        gap: 0.5rem;
    }
}
@media (max-width: 400px) {
    .teaser-more .contact-button,
    .contact-cta .contact-button {
        letter-spacing: 0.04em !important;
    }
}

/* === Top page: cases shown with one figure and the result (2026-11-10 prototype) ===
   Generated by design-system/cases_builder.py (teaser_html). On the navy photo band:
   white text, gold accents, hairlines only. The other cases stay as .cases-list pills. */
#cases .cases-featured {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin: 0 0 3rem;
    padding: 0;
    text-align: left;
}
#cases .cases-featured a {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    color: #FFFFFF;
    text-decoration: none;
    transition: border-color 0.3s ease;
}
#cases .cases-featured a:hover {
    border-top-color: #C9A961;
}
#cases .cases-featured a:focus-visible {
    outline: 2px solid #C9A961;
    outline-offset: 6px;
}
#cases .cf-head {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.75);
}
#cases .cf-num {
    flex: none;                 /* the industry name wraps, the number never splits */
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1;
    font-variant-numeric: lining-nums;
    letter-spacing: 0;
    color: #C9A961;
}
#cases .cf-title {
    margin-top: 0.6rem;
    font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.04em;
}
#cases .cf-figure {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 0.6rem;
    margin-top: 1.75rem;
}
#cases .cf-value {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(2.75rem, 4.4vw, 3.75rem);
    line-height: 1;
    font-variant-numeric: lining-nums;
    white-space: nowrap;
}
#cases .cf-value .pre {
    margin-right: 0.15em;
    font-family: 'Noto Serif JP', serif;
    font-size: 0.4em;
    font-weight: 700;
}
#cases .cf-unit {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
#cases .cf-what {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.75);
}
#cases .cf-result {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(201, 169, 97, 0.7);
    font-family: 'Noto Serif JP', serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.9;
    letter-spacing: 0.02em;
    /* one sentence per line, wrapped by phrase where supported (as on the case pages) */
    word-break: normal;
    overflow-wrap: anywhere;
    line-break: strict;
    text-wrap: pretty;
}
@supports (word-break: auto-phrase) {
    #cases .cf-result {
        word-break: auto-phrase;
    }
}
#cases .cf-result .nb {
    white-space: nowrap;
}
#cases .cf-arrow {
    margin-top: auto;
    padding-top: 1.5rem;
    align-self: flex-end;
    line-height: 0;
}
#cases .cf-arrow svg {
    width: 24px;
    height: 12px;
    fill: none;
    stroke: #C9A961;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease;
}
#cases .cases-featured a:hover .cf-arrow svg {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    #cases .cases-featured {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-bottom: 2.5rem;
    }
    #cases .cf-figure {
        margin-top: 1.25rem;
    }
    #cases .cf-value {
        font-size: 3.25rem;
    }
    #cases .cf-result {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
    }
    #cases .cf-arrow {
        padding-top: 1rem;
    }
}

/* === About page: one-stop diagram (2026-11-10 prototype) ===
   Big Pen (navy disc) in the middle; the four things it takes on sit on a thin gold
   ring at 45deg (clockwise 01-04) and an X joins them to the middle. Ring and X are
   one SVG stretched over the ring box (strokes stay 1px). Icons and names are placed
   from --r: an icon's centre is --d from the middle on both axes, the top names sit
   above their icon and the bottom names below, so no name crosses the ring.
   Wide screens: title and text left, diagram right (president: the empty right half
   looked bare). .about-lead wraps, so where both do not fit the diagram drops under
   the text and centres itself; no extra breakpoint. */
.about-lead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}
.about-lead-text {
    flex: 999 1 520px;          /* takes the room first; the text stays within its 640px */
}
.onestop {
    --r: 120px;                 /* ring radius */
    --icon: 48px;
    --hub: 116px;
    --gap: 1.25rem;             /* icon to name */
    --w: 10rem;                 /* name box width */
    --cap: 5.5rem;              /* room above / below the ring for the names */
    --d: calc(var(--r) * 0.7071);
    flex: 1 0 360px;
    position: relative;
    height: calc(var(--r) * 2 + var(--cap) * 2);
    margin: 0;
}
.onestop-lines {
    position: absolute;
    top: var(--cap);
    left: calc(50% - var(--r));
    width: calc(var(--r) * 2);
    height: calc(var(--r) * 2);
    overflow: visible;
    fill: none;
    stroke: rgba(201, 169, 97, 0.7);
    stroke-width: 1px;
}
.onestop-lines * {
    vector-effect: non-scaling-stroke;
}
.onestop-hub {
    position: absolute;
    top: calc(var(--cap) + var(--r) - var(--hub) / 2);
    left: calc(50% - var(--hub) / 2);
    width: var(--hub);
    height: var(--hub);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 50%;
    background: #0F1F5C;
    color: #FFFFFF;
    text-align: center;
}
.onestop-hub .hub-name {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.7rem;
    line-height: 1;
    color: #C9A961;
}
.onestop-hub .hub-sub {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}
.onestop-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.onestop-list li {
    position: absolute;
    width: var(--w);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gap);
    text-align: center;
}
.onestop-list li:nth-child(-n+2) {      /* top: name above the icon */
    flex-direction: column-reverse;
    bottom: calc(var(--r) + var(--cap) + var(--d) - var(--icon) / 2);
}
.onestop-list li:nth-child(n+3) {       /* bottom: name below the icon */
    top: calc(var(--cap) + var(--r) + var(--d) - var(--icon) / 2);
}
.onestop-list li:nth-child(1),
.onestop-list li:nth-child(4) {
    left: calc(50% - var(--d) - var(--w) / 2);
}
.onestop-list li:nth-child(2),
.onestop-list li:nth-child(3) {
    left: calc(50% + var(--d) - var(--w) / 2);
}
.os-icon {
    display: grid;
    place-items: center;
    width: var(--icon);
    height: var(--icon);
    border: 1px solid rgba(15, 31, 92, 0.25);
    border-radius: 50%;
    background: #FFFFFF;        /* covers the ring and the X */
    color: #0F1F5C;
}
.os-icon svg {
    width: 45%;
    height: 45%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.os-label {
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: 0.04em;
    color: #0a0a0a;
}
.os-num {
    display: block;
    margin-bottom: 0.3rem;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.3rem;
    line-height: 1;
    letter-spacing: 0;
    font-variant-numeric: lining-nums;
    color: #C9A961;
}
@media (max-width: 768px) {
    .onestop {
        --r: 95px;
        --icon: 44px;
        --hub: 92px;
        --gap: 1rem;
        --w: 7.5rem;
        --cap: 5rem;
        flex: 0 0 calc(100% + 3rem);
        margin: 0 -1.5rem;          /* use the header's side padding too */
    }
    .onestop-hub .hub-name {
        font-size: 1.35rem;
    }
    .onestop-hub .hub-sub {
        font-size: 0.6rem;
        letter-spacing: 0.08em;
    }
    .os-label {
        font-size: 0.8125rem;
        letter-spacing: 0.02em;
    }
    .os-num {
        font-size: 1.1rem;
    }
}

/* === Services page: process step fixes (2026-11-10) ===
   The number boxes are white so the line across the steps no longer runs through
   the numbers, and the step texts wrap by phrase (as on the case pages). The
   受け取れるもの drawings tried here were dropped (president, 2026-11-10). */
.process-step-num {
    background: #FFFFFF !important;
}
.process-step p {
    word-break: normal;
    overflow-wrap: anywhere;
    line-break: strict;
    text-wrap: pretty;
}
@supports (word-break: auto-phrase) {
    .process-step p {
        word-break: auto-phrase;
    }
}

/* === Motion: phrases light up from grey to navy as they are read (2026-11-10 prototype) ===
   .lit-text = the About text on the top page and on about.html, one .lit per phrase
   (the phone line breaks). site.js adds .lit-ready to the paragraph, then .on to each
   phrase once it rises above 75% of the screen height: once, in order, never back to
   grey. Without site.js nothing changes. */
.lit-text.lit-ready .lit {
    color: rgba(15, 31, 92, 0.22);
    transition: color 0.6s ease;
}
.lit-text.lit-ready .lit.on {
    color: #0F1F5C;
}

/* === Motion: the navy band slides over the white section before it (2026-11-10 prototype) ===
   Top page: div.stack = a white section + the navy band after it. The white section is
   sticky: it scrolls as usual until its bottom is on screen, then stays while the band
   (drawn above it) rises over it like a sheet laid on paper. --h (its height) is set by
   site.js; without it `top` is invalid, so the section simply scrolls as before. The
   stack ends with the band, so nothing stays stuck under the sections that follow. */
.stack {
    position: relative;
}
.stack > #about,
.stack > #services {
    position: sticky;
    top: min(0px, calc(100vh - var(--h)));
    top: min(0px, calc(100svh - var(--h)));   /* phones: stable while the address bar moves */
    z-index: 0;
    background: #FFFFFF;
}
.stack > #statement,
.stack > #cases {
    z-index: 1;
}
