/* --- Design Tokens --- */
:root {
    --color-accent: #c5a059 !important;
    --color-accent-hover: #e1c27a !important;
    --color-base: #FFFFFF !important;
    --color-bg-light: #f7f7f7 !important;
    --color-text: #185037 !important;
    --color-sub-text: #185037 !important;
    --color-line: #dddddd !important;

    --font-serif: "Noto Serif JP", serif !important;
    --font-sans: "Manrope", "Helvetica Neue", Arial, sans-serif !important;
    --font-eng: "Aboreto", cursive !important;

    --spacing-xs: 10px;
    --spacing-sm: 20px;
    --spacing-md: 40px;
    --spacing-lg: 80px;
    --spacing-xl: 120px;

    --container-width: 1400px !important;
    --container-narrow: 800px !important;
}

/* --- Base & Reset --- */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--color-base);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.8;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.heading-serif {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 1.5rem;
}

p {
    margin: 0 0 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

/* SP-only line break helper */
br.sp-br {
    display: none;
}

@media (max-width: 600px) {
    br.sp-br {
        display: block;
    }
}

/* --- Layout Containers --- */
.l-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.l-section {
    padding: var(--spacing-xl) 0;
}

.l-bg-light {
    background-color: var(--color-bg-light);
}

/* --- Header --- */
.site-header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    padding: 15px 0;
}

.site-header .l-inner {
    max-width: 1400px;
    width: 90%;
}

.admin-bar .site-header {
    top: 32px;
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: block;
    height: 48px;
    /* Balanced height for visibility and elegance */
    width: auto;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.02);
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10000;
}

.hamburger-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transition: all 0.3s ease;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 60px;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
    text-align: center;
    padding-bottom: 20px;
}

.main-navigation a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.nav-eng {
    display: block;
    color: var(--color-accent);
    font-family: var(--font-eng);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.2;
}

.nav-jp {
    display: block;
    color: var(--color-sub-text);
    font-family: "Noto Sans JP", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-top: 4px;
    line-height: 1;
}

.main-navigation a:hover .nav-eng {
    color: var(--color-accent-hover);
}

.main-navigation a:hover .nav-jp {
    color: var(--color-text);
}

/* --- Subpage Hero --- */
.page-hero {
    background: #f7f7f2;
    padding: 240px 0 160px;
    text-align: center;
}

.page-hero-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-accent);
    letter-spacing: 0.4em;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.page-hero-title {
    font-family: var(--font-eng);
    color: #ae915c;
    font-size: clamp(48px, 12vw, 110px);
    line-height: 1;
    margin: 0 0 15px;
    font-weight: 400;
    display: flex;
    /* Support character spans */
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 0;
    /* Tight character kerning */
}

.page-hero-sub {
    font-family: var(--font-eng);
    font-size: 14px;
    color: var(--color-text);
    letter-spacing: 0.25em;
    font-weight: 400;
    text-transform: uppercase;
}

/* Staggered Character Reveal */
.js-stagger-title span {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(5px);
    animation: charReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes charReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* --- Premium Scroll Reveal Animations (Global) --- */
.js-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.165, 0.84, 0.44, 1),
        transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1),
        filter 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform, filter;
}

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

/* Atmospheric Blur Reveal */
.js-reveal--blur {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: opacity 1.2s cubic-bezier(0.165, 0.84, 0.44, 1),
        transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1),
        filter 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.js-reveal--blur.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Base delay for subpage hero subtitle to follow title stagger */
.page-hero-sub.js-reveal--blur {
    transition-delay: 0.6s;
}

/* --- The Velt Section Heading Pattern --- */
.cp-contact.has-bg {
    position: relative;
    padding: 120px 0;
    background-image: url('../images/contact_back.jpg');
    background-size: cover;
    background-position: right center;
    /* Matched to front page Recruit section */
    background-repeat: no-repeat;
}

/* Contact Label (Japanese) above the English title */
.cp-contact-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 20px;
    color: #188136;
    /* Unified Green */
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.section-heading {
    margin-bottom: var(--spacing-lg);
}

/* Unified Contact Section Button (Matched to Front Page) */
.cp-contact-btn {
    display: inline-block;
    background-color: #0B3B23;
    color: #fff;
    width: 450px;
    max-width: 100%;
    padding: 24px 0;
    text-align: center;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cp-contact-btn:hover {
    background-color: #188136;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    color: #fff;
}

.section-label {
    display: block;
    color: var(--color-accent);
    font-family: var(--font-eng);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.section-line {
    flex-grow: 1;
    height: 1px;
    background-color: var(--color-line);
}

/* Target Gutenberg Headings automatically */
.wp-block-heading {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-top: 2em !important;
}

/* --- Buttons --- */
.btn-gold {
    display: inline-block;
    color: var(--color-accent);
    font-family: var(--font-eng);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2em;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-accent);
    transition: all 0.3s ease;
}

.btn-gold:hover {
    color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    padding-left: 5px;
}

/* --- Footer --- */
.site-footer {
    background-color: #2b2b2b;
    color: #fff;
    padding: 100px 0 40px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 80px;
}

.footer-logo img {
    max-width: 120px;
    height: auto;
}

.footer-center {
    display: flex;
    gap: 80px;
    flex: 1;
    justify-content: center;
}

.footer-nav-col {
    min-width: 140px;
}

.footer-nav-list,
.footer-child-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-list>li {
    margin-bottom: 15px;
}

.footer-nav-label,
.footer-nav-list a {
    font-family: var(--font-serif);
    font-size: 16px;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-nav-list>li>a::before {
    content: "・";
    color: var(--color-accent);
    margin-right: 5px;
    font-weight: bold;
}

.footer-nav-list a:hover {
    color: var(--color-accent);
}

.footer-child-list {
    margin-top: 5px;
    margin-left: 20px;
}

.footer-child-list li {
    margin-bottom: 8px;
}

.footer-child-list a {
    font-size: 13px;
}

.footer-child-list a:hover {
    color: var(--color-accent);
}

.mt-20 {
    margin-top: 20px !important;
}

.footer-right {
    flex-shrink: 0;
}

.footer-cta-btn {
    display: inline-block;
    background-color: #0b331a;
    color: #fff;
    padding: 18px 35px;
    font-size: 15px;
    border: 1px solid #fff;
    font-family: var(--font-serif);
    transition: all 0.3s ease;
}

.footer-cta-btn:hover {
    background-color: #188136;
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 40px;
}

.site-copyright {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.05em;
}

@media (max-width: 991px) {
    .footer-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 60px;
    }

    .footer-center {
        flex-direction: column;
        gap: 40px;
    }

    .footer-nav-list>li>a::before {
        display: none;
    }

    .footer-child-list {
        margin-left: 0;
    }
}

/* SP-only service sub-navigation */
.sp-service-nav {
    display: none !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 991px) {
    .sp-service-nav {
        display: flex !important;
        flex-direction: column;
        gap: 14px;
        margin-top: 2px;
        margin-bottom: 18px;
        padding-left: 14px;
        border-left: 1px solid rgba(255, 255, 255, 0.25);
    }

    .sp-service-nav a {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-decoration: none;
        transition: opacity 0.3s ease;
    }

    .sp-service-nav a:hover {
        opacity: 0.75;
    }

    .sp-nav-eng {
        display: block;
        font-family: var(--font-eng);
        font-size: 16px;
        color: rgba(255, 255, 255, 0.9);
        letter-spacing: 0.1em;
        line-height: 1.2;
    }

    .sp-nav-jp {
        display: block;
        font-family: "Noto Sans JP", sans-serif;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.6);
        letter-spacing: 0.05em;
        margin-top: 3px;
    }
}

/* --- Mega Menu Styling --- */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 90vw;
    max-width: 700px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 99999;
    padding: 30px 0;
    pointer-events: none;
    margin-top: 15px;
    /* Visual gap */
}

/* Hover Bridge: Invisible link between parent and menu */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    height: 35px;
    background: transparent;
}

.menu-item-has-mega::after {
    content: '';
    position: absolute;
    bottom: -35px;
    left: 0;
    width: 100%;
    height: 40px;
    display: none;
    z-index: 999;
}

.menu-item-has-mega:hover::after {
    display: block;
}

.menu-item-has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.mega-menu-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 30px;
}

.mega-menu-item {
    flex: 1;
    max-width: 300px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.mega-menu-item:hover {
    transform: translateY(-5px);
}

.mega-menu-img {
    width: 100%;
    height: 150px;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 2px;
}

.mega-menu-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.mega-menu-item:hover .mega-menu-img img {
    transform: scale(1.05);
}

.mega-menu-text {
    text-align: left;
}

.mega-eng {
    display: block;
    font-family: var(--font-eng);
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text);
    letter-spacing: 0.1em;
    margin-bottom: 5px;
}

.mega-jp {
    display: block;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-sub-text);
    letter-spacing: 0.05em;
}

.mega-menu-item:hover .mega-eng {
    color: var(--color-accent);
}

/* --- Responsive fixes --- */
@media (max-width: 991px) {
    .site-title-gold {
        color: #fff !important;
    }

    .site-header .l-inner {
        padding-right: 68px;
    }

    .hamburger-btn {
        display: flex;
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 60px;
        height: 60px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background-color: #188136;
        border: none;
        padding: 0;
        cursor: pointer;
        z-index: 10001;
    }

    .hamburger-btn span {
        width: 22px;
        height: 2px;
        background-color: #fff;
        transition: all 0.3s ease;
    }

    .hamburger-btn.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-btn.is-active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(160deg, #0d5522 0%, #188136 65%, #1d9642 100%);
        z-index: 9998;
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 0 44px;
        opacity: 0;
        visibility: hidden;
        transform: translateX(40px);
        transition: opacity 0.45s ease, visibility 0.45s ease, transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
        overflow: hidden;
    }

    /* VELT watermark */
    .main-navigation::before {
        content: 'VELT';
        position: absolute;
        right: -10px;
        bottom: -20px;
        font-size: 200px;
        font-family: "Times New Roman", Times, serif;
        color: rgba(255, 255, 255, 0.04);
        letter-spacing: 0.05em;
        pointer-events: none;
        line-height: 1;
        font-weight: 400;
        z-index: 0;
    }

    .main-navigation.is-active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    /* Stagger animation on items */
    .main-navigation > ul > li {
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .main-navigation.is-active > ul > li:nth-child(1) { opacity: 1; transform: translateX(0); transition-delay: 0.12s; }
    .main-navigation.is-active > ul > li:nth-child(2) { opacity: 1; transform: translateX(0); transition-delay: 0.18s; }
    .main-navigation.is-active > ul > li:nth-child(3) { opacity: 1; transform: translateX(0); transition-delay: 0.24s; }
    .main-navigation.is-active > ul > li:nth-child(4) { opacity: 1; transform: translateX(0); transition-delay: 0.30s; }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        position: relative;
        z-index: 1;
        padding: 10px 10px;
    }

    .main-navigation > ul > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .main-navigation > ul > li:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .main-navigation > ul > li > a {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 0;
        text-decoration: none;
        transition: opacity 0.25s ease;
    }

    .main-navigation > ul > li.menu-item-has-mega > a {
        padding-bottom: 8px;
    }

    .main-navigation > ul > li > a:hover {
        opacity: 0.65;
    }

    .nav-eng {
        color: #fff;
        font-size: 20px;
        letter-spacing: 0.2em;
        font-family: var(--font-eng);
        font-weight: 400;
        line-height: 1;
    }

    .nav-jp {
        color: rgba(255, 255, 255, 0.5);
        font-size: 10px;
        letter-spacing: 0.12em;
        margin-top: 7px;
    }

    .mega-menu {
        display: none !important;
    }

    body.nav-open {
        overflow: hidden;
    }

    .page-hero {
        padding: 150px 0 80px;
    }

    .page-hero-title {
        font-size: 50px;
    }

    .section-title {
        font-size: 24px;
        white-space: normal;
    }

    .cp-contact.has-bg {
        padding: 80px 0;
    }

    .site-footer {
        padding: 60px 0 30px;
    }

    .footer-main {
        margin-bottom: 50px;
    }

    .cp-contact-btn {
        width: 320px;
        max-width: 100%;
        padding: 20px 0;
        font-size: 16px;
    }

    .footer-cta-btn {
        width: 320px;
        max-width: 100%;
        text-align: center;
        padding: 18px 0;
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 130px 0 60px;
    }

    .page-hero-label {
        font-size: 11px;
        letter-spacing: 0.25em;
    }
}