@charset "UTF-8";

/* ==========================================================================
   Recruit Page - Redesign Styles
   ========================================================================== */

:root {
    /* Pastel Palette */
    --rec-color-bg: #ffffff;
    /* Warm white/cream base */
    --rec-color-primary: #81d4fa;
    /* Pastel Light Blue */
    --rec-color-primary-light: #e1f5fe;
    --rec-color-accent: #0277bd;
    /* Darker blue for text/buttons */
    --rec-color-secondary: #a5d6a7;
    /* Pastel Green */
    --rec-color-secondary-light: #e8f5e9;

    --rec-color-text: #455a64;
    --rec-color-white: #ffffff;

    --rec-slope-angle: 3deg;
    --rec-slope-angle: 3deg;
}

.recruit-body {
    background-color: var(--rec-color-bg);
    color: var(--rec-color-text);
    font-family: 'Zen Kaku Gothic New', sans-serif;
    overflow-x: hidden;
}

.recruit-main {
    overflow-x: clip;
}

/* ==========================================================================
   Openings & Departments (white, after the film)
   ========================================================================== */
.recruit-openings,
.recruit-depts {
    --ink: #10181b;
    --sub: #5f6b6e;
    --gutter: clamp(20px, 4vw, 76px);
    position: relative;
    background: #fff;
    color: var(--ink);
}

.recruit-openings {
    padding: clamp(80px, 13vh, 140px) var(--gutter) clamp(48px, 7vh, 80px);
}

.recruit-headline {
    margin: 0;
    color: var(--ink);
    font: 800 clamp(38px, 4.4vw, 76px)/1.1 'Outfit', 'Zen Kaku Gothic New', sans-serif;
    letter-spacing: -0.01em;
}

.recruit-headline small {
    color: var(--sub);
    font: 700 14px/1.6 'Zen Kaku Gothic New', sans-serif;
    letter-spacing: 0.06em;
}

.recruit-openings .recruit-headline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
    margin-bottom: clamp(22px, 2.6vw, 34px);
}

.recruit-openings__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.recruit-opening-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 4px 16px;
    height: 100%;
    padding: 24px;
    border-radius: 18px;
    background: #f4f6f6;
    color: var(--ink);
    text-decoration: none;
    transition: background-color 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
}

.recruit-opening-card small {
    grid-column: 1 / -1;
    color: #12808b;
    font: 600 12px/1.5 'Outfit', sans-serif;
    letter-spacing: 0.1em;
}

.recruit-opening-card b {
    font: 900 20px/1.5 'Zen Kaku Gothic New', sans-serif;
    overflow-wrap: anywhere;
}

.recruit-opening-card i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    font-style: normal;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.recruit-opening-card:focus-visible {
    outline: 3px solid #12808b;
    outline-offset: 4px;
}

.recruit-openings .recruit-data-message {
    padding: 24px;
    border-radius: 18px;
    background: #f4f6f6;
    color: #2f3b3e;
}

.recruit-depts {
    padding: clamp(48px, 8vh, 96px) 0 clamp(24px, 4vh, 56px);
    overflow: clip;
}

.recruit-depts__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 0 var(--gutter);
}

/* The heading is an outline; scrolling fills it in from the left (js/recruit.js sets --fill). */
.recruit-headline--fill span {
    --fill: 100%;
    position: relative;
    display: inline-block;
    color: #fff;
    font-size: clamp(44px, 6.4vw, 112px);
    letter-spacing: 0.015em;
    -webkit-text-stroke: clamp(1.2px, 0.13vw, 2.4px) var(--ink);
    /* The white fill covers the inner half of the outline, where parts of a letter overlap. */
    paint-order: stroke fill;
}

.recruit-headline--fill span::after {
    content: attr(data-text);
    position: absolute;
    inset: -0.1em 0 -0.2em;
    padding-top: 0.1em;
    color: var(--ink);
    clip-path: inset(0 calc(100% - var(--fill)) 0 0);
}

.recruit-headline--fill small {
    display: block;
    margin-top: 10px;
}

.recruit-depts__arrows {
    display: flex;
    flex: none;
    gap: 10px;
}

.recruit-depts__arrows button {
    width: 52px;
    height: 52px;
    border: 1px solid #cfd8d9;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.recruit-depts__arrows button:focus-visible {
    outline: 3px solid #12808b;
    outline-offset: 3px;
}

/* A drum of cards: drag, swipe or use the arrows; after the last card the first one comes again (js/recruit.js). */
.recruit-dept-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 34px var(--gutter) 56px;
    scroll-padding-inline: var(--gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.recruit-dept-list::-webkit-scrollbar {
    display: none;
}

/* Sliding cards would move the snap points, so snapping waits until they have settled; a row let go while moving rolls on. */
.recruit-dept-list.is-waiting,
.recruit-dept-list.is-arriving,
.recruit-dept-list.is-rolling {
    scroll-snap-type: none;
}

.recruit-dept-list.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.dept-card {
    position: relative;
    flex: none;
    width: clamp(240px, 18vw, 340px);
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    scroll-snap-align: start;
    -webkit-user-drag: none;
}

.dept-card__img {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #dfe6e6;
}

.dept-card__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    /* Slow and soft, both ways. */
    transition: transform 2.2s cubic-bezier(0.3, 0.1, 0.2, 1);
    -webkit-user-drag: none;
}

/* Shade under the words. */
.dept-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 20px;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0) 15%),
        linear-gradient(to top, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.28) 34%, rgba(0, 0, 0, 0) 60%);
}

/* As in the film's titles, two colours run through the words from right to left: ink, then the accent. Before and
   behind them the words are white. They are drawn this way at rest too, or their weight would change on hovering. */
.dept-card.is-swept {
    animation: dept-sweep 1.05s cubic-bezier(0.35, 0.1, 0.35, 1) both;
}

.dept-card__cat,
.dept-card__title {
    --front: calc(var(--wave, 0) * (100% + 4.2em));
    /* Only as wide as the words, so that the colours reach them at once. */
    width: fit-content;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(255deg,
        #fff calc(var(--front) - 4.2em),
        var(--film-accent) 0 calc(var(--front) - 1.4em),
        var(--film-ink) 0 var(--front),
        #fff 0);
    -webkit-background-clip: text;
    background-clip: text;
}

@media (forced-colors: active) {
    .dept-card__cat,
    .dept-card__title {
        -webkit-text-fill-color: currentColor;
        background: none;
    }
}

@keyframes dept-sweep {
    from { --wave: 0; }
    to { --wave: 1; }
}

.dept-card__no {
    position: absolute;
    top: 18px;
    left: 20px;
    z-index: 2;
    font: 400 15px/1 'Outfit', sans-serif;
    letter-spacing: 0.1em;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.dept-card__content {
    position: absolute;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 2;
}

.dept-card__cat {
    display: block;
    font: 600 12px/1.5 'Outfit', sans-serif;
    letter-spacing: 0.2em;
    opacity: 0.9;
}

.dept-card__title {
    margin: 4px 0 0;
    color: #fff;
    font: 900 clamp(20px, 1.5vw, 24px)/1.4 'Zen Kaku Gothic New', sans-serif;
    overflow-wrap: anywhere;
}

.dept-card:focus-visible {
    outline: 3px solid #12808b;
    outline-offset: 4px;
}

/* js/recruit.js hides the cards until the row arrives, then they come in one after another. */
.recruit-dept-list.is-waiting .dept-card {
    opacity: 0;
    translate: 90px 0;
}

.recruit-dept-list.is-arriving .dept-card {
    transition: translate 1s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--k, 0) * 0.07s),
        opacity 0.8s ease calc(var(--k, 0) * 0.07s);
}

@media (hover: hover) {
    .recruit-dept-list {
        cursor: grab;
    }

    .dept-card:hover .dept-card__img img,
    .dept-card.is-under .dept-card__img img {
        transform: scale(1.12);
    }

    .recruit-depts__arrows button:hover {
        background: var(--ink);
        color: #fff;
    }

    .recruit-opening-card:hover {
        background: #eaf0f0;
        transform: translateY(-4px);
        box-shadow: 0 18px 40px rgba(16, 24, 27, 0.1);
    }

    .recruit-opening-card:hover i {
        background: var(--ink);
        color: #fff;
    }
}

@media (max-width: 1023px) {
    .recruit-openings__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dept-card {
        width: clamp(220px, 34vw, 300px);
    }
}

@media (max-width: 600px) {
    .recruit-openings__list {
        grid-template-columns: minmax(0, 1fr);
    }

    .recruit-opening-card {
        padding: 20px 22px;
    }

    .recruit-depts__arrows {
        gap: 8px;
    }

    .recruit-depts__arrows button {
        width: 42px;
        height: 42px;
    }

    .recruit-headline--fill span {
        font-size: clamp(26px, 9vw, 60px);
    }

    .dept-card {
        width: min(66vw, 280px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dept-card__img img,
    .recruit-opening-card,
    .recruit-dept-list.is-arriving .dept-card {
        transition: none;
    }
}
