/* Shared foundations and reusable components. Page sections belong in their own CSS. */
@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-VariableFont_opsz-wght.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Noto Sans JP";
    src: url("../fonts/NotoSansJP-VariableFont_wght.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

.site-footer,
.section-inner {
    max-width: var(--page-width);
    margin-inline: auto;
}

main {
    width: 100%;
}

.section-inner {
    display: flow-root;
}

.section-band {
    display: flow-root;
    position: relative;
    container-type: inline-size;
}

mgt-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
}

mgt-footer {
    background: var(--footer);
    container-type: inline-size;
}

h1,
h2,
h3 {
    font-weight: 700;
}

ul {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

a[href],
button {
    touch-action: manipulation;
}

a[href]:hover {
    opacity: .75;
}

a,
button {
    transition: opacity .18s ease;
}

/* Read by search engines and screen readers, not shown on screen. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

button {
    font: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 5px;
}

img {
    display: block;
}

mgt-header,
mgt-footer,
mgt-button {
    display: block;
}

section,
article,
div {
    min-width: 0;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    background: #fff;
    padding: 12px;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 77px;
    background: #fff;
    box-shadow: 0 10px 5px -10px rgba(0, 0, 0, .1);
    position: relative;
    z-index: 10;
    padding-left: 36px;
}

.brand {
    display: flex;
    align-items: center;
    width: 303px;
    min-height: 46px;
    flex-shrink: 0;
    padding-inline: 5px;
}

.brand__pc {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand__sp {
    display: none;
}

.site-navigation {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.5vw, 36px);
    font-size: 0.9375rem;
}

.site-navigation>a {
    white-space: nowrap;
}

.header-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: var(--cyan);
    color: #fff;
    min-height: 77px;
    width: 228px;
    margin-left: 36px;
    font-size: 1.125rem;
}

.arrow,
.button__arrow {
    flex: none;
}

.menu-toggle {
    display: none;
}

.photo {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.photo>img {
    position: absolute;
    max-width: none;
    object-fit: contain;
    pointer-events: none;
}

.eyebrow,
.business-eyebrow,
.company-eyebrow,
.recruit-eyebrow {
    font-family: var(--font-heading);
}

.eyebrow,
.business-eyebrow,
.company-eyebrow,
.recruit-eyebrow {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: .1em;
}

.eyebrow {
    line-height: 1.5;
}

.body-copy {
    font-size: clamp(0.9375rem, 1.389vw, 1.25rem);
    line-height: 2;
}

.button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 23px;
    background: var(--cyan);
    color: white;
    min-height: 72px;
    width: 100%;
    font-size: 0.75rem;
    line-height: 1.6;
}

.button--light {
    background: #fff;
    color: #000;
}

.button[aria-disabled] {
    cursor: default;
}

.fit-graphic {
    width: 100%;
    position: relative;
}

.graphic-canvas {
    position: relative;
    transform-origin: top left;
}

.site-footer {
    background: var(--footer);
    color: #fff;
}

.contact {
    display: grid;
    grid-template-columns: 1fr 42%;
    gap: 5%;
    align-items: center;
    padding: 46px 7.03% 47px 7.8125%;
    background: #000;
}

.contact h2 {
    font-size: clamp(1.75rem, 3.809vw, 3.42775rem);
    line-height: 1.2;
    letter-spacing: 0.17578125rem;
}

.contact p {
    font-size: 0.875rem;
    line-height: 1.7;
    margin-top: 16px;
}

.contact .button {
    min-height: 87px;
    font-size: clamp(1rem, 1.563vw, 1.40625rem);
    padding-inline: 39px;
}

.footer-rule {
    display: block;
    width: 100cqw;
    height: 1px;
    margin-inline: calc((100% - 100cqw)/2);
    background: #646464;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, .9fr) minmax(0, .79fr);
    column-gap: 4%;
    padding: 54px 7.1% 60px 7.62%;
}

.photo--marimo {
    width: 70px;
    height: 70px;
}

.photo--marimo>img {
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

.footer-address address {
    font-size: 0.875rem;
    line-height: 1.5rem;
    font-style: normal;
    margin-top: 14px;
    white-space: nowrap;
}

.footer-main nav:not(.footer-policies) {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-main nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.75rem;
    line-height: 1.375rem;
}

.footer-main .footer-label {
    font-size: 1.1425625rem;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: 0.10546875rem;
    margin-bottom: 15px;
}

.footer-services .footer-label {
    color: #fff;
}

.footer-policies {
    grid-column: 2/4;
    display: flex;
    justify-content: flex-end;
    gap: 22px;
    margin-top: 44px;
}

.footer-main .footer-policies a {
    font-size: 0.6875rem;
    line-height: 1.6;
    color: #969696;
    display: block;
    white-space: nowrap;
}

.copyright {
    text-align: center;
    font-size: 0.625rem;
    letter-spacing: 0.0439375rem;
    line-height: 1.8;
    color: #777;
    padding: 18px 26px 24px;
}

.footer-address {
    grid-row: 1/3;
}

@media (min-width:768px) and (max-width:1250px) {
    .site-header {
        padding-left: 24px;
    }

    .brand {
        transform: scale(.82);
        transform-origin: left center;
        width: 255px;
    }

    .site-navigation {
        gap: 17px;
    }

    .header-contact {
        width: 190px;
        margin-left: 0;
        font-size: 1rem;
    }

    .footer-main {
        column-gap: 3%;
        padding-inline: 5%;
    }

    .footer-address address {
        font-size: 0.8125rem;
        line-height: 1.5rem;
    }

    .footer-main .footer-label {
        font-size: 1rem;
    }

    .footer-policies {
        grid-column: 1/4;
        gap: 18px;
    }

}

@media(max-width:1023px) {
    .site-header {
        min-height: 72px;
        padding: 0 24px;
    }

    .brand {
        transform: none;
        padding: 0;
        width: 198px;
    }

    .brand__pc {
        display: none;
    }

    .brand__sp {
        display: flex;
        align-items: center;
        gap: 7.5px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background: none;
        border: 0;
        width: 44px;
        height: 44px;
        padding: 12px 10px;
        cursor: pointer;
        margin-right: -10px;
    }

    .menu-toggle span {
        display: block;
        height: 1px;
        width: 24px;
        background: #082e56;
        transition: transform .2s, opacity .2s;
    }

    .menu-toggle[aria-expanded=true] span:first-child {
        transform: translateY(9.5px) rotate(45deg);
    }

    .menu-toggle[aria-expanded=true] span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded=true] span:last-child {
        transform: translateY(-9.5px) rotate(-45deg);
    }

    /* Kept in the layout while closed so opening and closing can animate;
       visibility keeps the hidden links out of the tab order. */
    .site-navigation {
        position: absolute;
        top: 100%;
        inset-inline: 0;
        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 12px 20px #0001;
        padding: 12px 24px 24px;
        font-size: 0.9375rem;
        max-height: calc(100dvh - var(--header-height));
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-12px);
        transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
    }

    .site-navigation.is-open {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: opacity .3s ease, transform .3s ease;
    }

    .site-navigation>a {
        --i: 0;
        padding: 16px 0;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity .2s ease, transform .2s ease;
    }

    .site-navigation.is-open>a {
        opacity: 1;
        transform: none;
        transition: opacity .35s ease calc(.08s + var(--i) * .05s), transform .35s ease calc(.08s + var(--i) * .05s);
    }

    .site-navigation>a:nth-child(2) { --i: 1; }
    .site-navigation>a:nth-child(3) { --i: 2; }
    .site-navigation>a:nth-child(4) { --i: 3; }

    .site-navigation .header-contact {
        width: 100%;
        min-height: 56px;
        margin: 12px 0 0;
        padding: 12px;
    }

}

@media(min-width:768px) and (max-width:900px) {
    .footer-main {
        grid-template-columns: 1.6fr 1.1fr 1fr;
    }

    .footer-policies {
        grid-column: 1/4;
    }

}

@media(max-width:767px) {
    html {
        scroll-padding-top: calc(var(--header-height) + 16px);
    }

    .desktop-break {
        display: none;
    }

    .site-header {
        padding-inline: 21px 24px;
    }

    .footer-address {
        grid-row: auto;
    }

    .button {
        min-height: 54px;
        padding: 15px 12px 15px 20px;
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1.25rem;
    }

    .contact {
        display: block;
        padding: 52px var(--gutter);
    }

    .contact h2 {
        font-size: 1.75rem;
        line-height: 2.5rem;
        letter-spacing: 0;
    }

    .contact p {
        font-size: 0.875rem;
        line-height: 1.75rem;
        margin-top: 23px;
    }

    .contact mgt-button {
        margin-top: 35px;
    }

    .contact .button {
        min-height: 54px;
        font-size: 0.75rem;
        padding-inline: 20px 12px;
    }

    .footer-main {
        grid-template-columns: minmax(0, 173fr) minmax(0, 145fr);
        column-gap: 20px;
        row-gap: 0;
        padding: 45px var(--gutter) 38px;
    }

    .footer-address {
        grid-column: 1/3;
    }

    .photo--marimo {
        width: 86px;
        height: 82px;
    }

    .footer-address address {
        font-size: 0.75rem;
        line-height: 1.375rem;
        margin-top: 32px;
        white-space: normal;
    }

    .footer-main nav:not(.footer-policies) {
        gap: 16px;
        margin-top: 68px;
    }

    .footer-main .footer-label {
        font-size: 0.8125rem;
        line-height: 1.375rem;
        letter-spacing: 0;
        margin: 0 0 10px;
    }

    .footer-main nav a {
        font-size: 0.8125rem;
        line-height: 1.375rem;
        gap: 0;
    }

    .footer-main nav .arrow {
        display: none;
    }

    .footer-services .footer-label {
        color: #fff;
    }

    .footer-policies {
        grid-column: 1/3;
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-top: 50px;
    }

    .footer-main .footer-policies a {
        font-size: 0.6875rem;
        line-height: 1.375rem;
        white-space: normal;
        color: #fff;
    }

    .copyright {
        text-align: left;
        font-size: 0.5625rem;
        line-height: 1.125rem;
        letter-spacing: 0;
        color: #fff;
        padding: 44px var(--gutter) 42px;
    }

}

/* Scroll reveal (classes added by main.js) */
.reveal-fade {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .9s ease, transform .9s cubic-bezier(.22, 1, .36, 1);
}

.reveal-fade--row {
    transform: translateY(16px);
}

.reveal-fade.is-revealed {
    opacity: 1;
    transform: none;
}

/* Titles and eyebrows are split into lines by main.js; each line rises from
   behind its own mask, one after another. Hidden until split to avoid a flash. */
.reveal-text:not(.is-split) {
    visibility: hidden;
}

.reveal-text--eyebrow {
    --reveal-delay: .1s;
}

.reveal-text--title {
    --reveal-delay: .25s;
}

.reveal-line {
    display: block;
    overflow: hidden;
    padding: .1em 0 .15em;
    margin: -.1em 0 -.15em;
}

.reveal-line__inner {
    display: block;
    transform: translateY(calc(100% + .25em));
    transition: transform .9s cubic-bezier(.22, 1, .36, 1);
    transition-delay: calc(var(--reveal-delay) + var(--line) * .12s);
}

.reveal-text.is-revealed .reveal-line__inner {
    transform: none;
}

/* Digital-signal text (main.js scrambleText): hidden until in view, then
   undecoded characters show faded. */
.reveal-scramble:not(.is-revealed) {
    visibility: hidden;
}

.text-noise {
    opacity: .55;
}

.text-noise.is-blank {
    visibility: hidden;
}

/* Photo curtain: a black panel sweeps in from the left, then pulls away to
   the right revealing the photo.
   - FV photos (.photo-curtain): html.curtain (inline script) hides them until
     main.js adds curtain-play on load.
   - Section photos (.photo-reveal, added by main.js): play when scrolled into view. */
.curtain .photo-curtain img,
.photo-reveal:not(.is-revealed) img {
    opacity: 0;
}

.curtain-play .photo-curtain::after,
.photo-reveal.is-revealed::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #000;
    animation: photo-curtain 1.4s cubic-bezier(.77, 0, .18, 1) both;
}

.curtain-play .photo-curtain img,
.photo-reveal.is-revealed img {
    animation: photo-curtain-image 1.8s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes photo-curtain {
    0% { transform: scaleX(0); transform-origin: left; }
    50% { transform: scaleX(1); transform-origin: left; }
    50.01% { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

@keyframes photo-curtain-image {
    0%, 38% { opacity: 0; transform: scale(1.08); }
    39% { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *:before,
    *:after {
        transition: none !important;
    }

}

.contact__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact__actions .button {
    min-height: 56px;
    padding: 15px 39px;
    font-size: 1rem;
    line-height: 1.6;
}

.contact__actions .button>.arrow {
    width: 24px;
    height: 24px;
}

@media(max-width:767px) {
    .contact__actions {
        margin-top: 28px;
        gap: 8px;
    }

    .contact__actions mgt-button {
        margin-top: 0;
    }

    .contact__actions .button {
        min-height: 48px;
        padding: 12px 12px 12px 20px;
        font-size: 0.75rem;
        line-height: 1.25rem;
    }

}

.footer-brands {
    display: grid;
    grid-template-columns: minmax(0, 165fr) minmax(0, 238fr) minmax(0, 222fr) minmax(0, 228fr) minmax(0, 77fr);
    align-items: center;
    gap: 12px;
    width: calc(100% - 2 * var(--gutter));
    max-width: 1080px;
    margin: 30px auto 0;
}

.footer-brands li {
    min-width: 0;
}

.footer-brands a {
    display: block;
}

.footer-brands img {
    width: 100%;
    height: auto;
}

@media(max-width:767px) {
    .footer-brands {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
        margin-top: 37px;
    }

    .footer-brands li:last-child img {
        max-width: 77px;
    }

}

.business-anchors-band,
.company-anchors-band,
.recruit-anchors-band {
    box-shadow: inset 0 10px 5px -10px rgba(0, 0, 0, .1), inset 0 -10px 5px -10px rgba(0, 0, 0, .1);
}

mgt-anchor {
    display: block;
    min-width: 0;
}

.section-anchor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    min-height: 64px;
    padding: 18px 18px 18px 24px;
    font-size: 0.9375rem;
    line-height: 1.625rem;
    font-weight: 700;
}

.section-anchor .arrow {
    transform: rotate(90deg);
}

.site-navigation a[aria-current=page] {
    text-decoration: underline;
    text-underline-offset: 12px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--recruit-line);
}

@media(max-width:767px) {
    .section-anchor {
        min-height: 56px;
        padding: 15px 12px 15px 20px;
        font-size: 0.875rem;
        line-height: 1.5rem;
    }

}

