/* ==========================================================================
   Rahmat Careers — stylesheet
   Hand-written CSS, BEM naming, design tokens as custom properties.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */

:root {

    --color-rahmat-primary: #F7482F;
    --color-rahmat-light: #8E8E93;
    --color-rahmat-secondary: #F4F4F4;
    --color-rahmat-text-deactive: #C4C4C4;
    --color-rahmat-text-secondary: #898989;
    --color-rahmat-black: #000000;
    --color-rahmat-white: #fff;
    --border-rahmat-radius-small: 9px;
    --border-rahmat-radius-medium: 15px;
    --border-rahmat-radius-big: 25px;
    --gap-rahmat-small: 15px;
    --gap-rahmat-medium: 20px;
    --gap-rahmat-big: 45px;
    --gap-rahmat-bigger: 50px;
    --font-rahmat-size-small: 12px;
    --font-rahmat-size-middle: 1rem;
    --font-rahmat-size-big: 30px;
    --font-rahmat-size-huge: 45px;
    --transition-rahmat-fast: .3s;
    --transition-rahmat-normal: .6s;

    /* brand */
    --color-brand: var(--color-rahmat-primary);
    --color-brand-hover: #E23C24;

    /* neutrals — light surfaces */
    --color-bg: #FFFFFF;
    --color-surface: var(--color-rahmat-secondary);
    --color-surface-hover: #EBEBEB;
    --color-border: #EFEFEF;
    --color-border-strong: #E9E9E9;
    --color-border-dashed: #C9C9CE;

    /* text — on light surfaces */
    --color-text: var(--color-rahmat-black);
    --color-text-secondary: var(--color-rahmat-text-secondary);
    --color-text-muted: var(--color-rahmat-light);
    --color-text-faint: #9A9AA2;
    --color-text-deactive: var(--color-rahmat-text-deactive);

    /* neutrals — dark surfaces */
    --color-dark: #16171F;
    --color-darker: #0C0D12;
    --color-dark-border: #31313F;
    --color-dark-surface: rgba(255, 255, 255, 0.06);
    --color-dark-surface-hover: rgba(255, 255, 255, 0.16);

    /* text — on dark surfaces */
    --color-text-on-dark: var(--color-rahmat-white);
    --color-text-on-dark-secondary: #9A9AA2;
    --color-text-on-dark-muted: #8A8A92;
    --color-text-on-dark-faint: #898989;

    /* layout */
    --page-max-width: 1240px;
    --page-gutter: var(--gap-rahmat-medium);
    --radius-sm: var(--border-rahmat-radius-small);
    --radius-md: var(--border-rahmat-radius-medium);
    --radius-lg: var(--border-rahmat-radius-big);
    --radius-xl: 28px;
    --radius-pill: 99px;

    --shadow-card: 0 18px 40px rgba(22, 23, 31, 0.12);
    --shadow-deck: 0 24px 60px rgba(22, 23, 31, 0.2);
    --shadow-life: 0 30px 70px rgba(0, 0, 0, 0.55);

    --ease-out: cubic-bezier(0.2, 0.8, 0.25, 1);
    --ease-deck: cubic-bezier(0.22, 0.9, 0.3, 1);
}

/* ---- Buttons --------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-brand);
    color: #fff;
}

.btn--primary:hover {
    background: var(--color-brand-hover);
}
a.btn--primary:hover {
    color: #fff;
}
.btn--secondary {
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 600;
}

.btn--secondary:hover {
    background: var(--color-surface-hover);
}

.btn--outline {
    background: #fff;
    color: var(--color-text);
    border: 1.5px solid var(--color-border-strong);
    font-weight: 700;
}

.btn--outline:hover {
    background: var(--color-surface);
}

.btn--lg {
    height: 52px;
    padding: 0 26px;
    font-size: 15px;
}

.btn__arrow {
    font-size: 17px;
}
.eyebrow{
    color: var(--color-text-faint);
}
/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    flex-wrap: wrap;
    padding-top: 64px;
}

.hero__content {
    flex: 1;
    min-width: 420px;
    max-width: 640px;
}

.hero__title {
    min-height: 172px;
    margin: 0;
    font-weight: 800;
    font-size: 54px;
    line-height: 1.05;
    letter-spacing: -1.5px;
    color: var(--color-text);
}
.hero__title-phrase span{
    color: var(--color-brand);
}
.hero__title.is-animating {
    animation: heroIn 0.55s ease;
}

.hero__title-accent {
    color: var(--color-brand);
}

.hero__lead {
    margin: 10px 0 0;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.5;
    color: var(--color-text-secondary);
    max-width: 520px;
}

.hero__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* ---- Vacancy deck --------------------------------------------------------- */

.hero__deck-wrap {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.deck {
    position: relative;
    width: 400px;
    height: 500px;
}

.deck-card {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    overflow: hidden;
    background: var(--color-dark);
    box-shadow: var(--shadow-deck);
    transition: transform 0.7s var(--ease-out), opacity 0.55s;
}
/* Starting fan of the stack, mirroring DECK_TRANSFORMS in scripts/hero.js.
   positionDeck() takes over on DOMContentLoaded and writes the same values
   inline as the deck rotates; these rules only hold the pre-script layout. */
.deck-card:nth-child(1) {
    z-index: 40;
    transform: none;
}

.deck-card:nth-child(2) {
    z-index: 30;
    transform: translate(20px, 14px) rotate(5deg) scale(0.96);
}

.deck-card:nth-child(3) {
    z-index: 20;
    transform: translate(-18px, 26px) rotate(-6deg) scale(0.93);
}

.deck-card:nth-child(4) {
    z-index: 10;
    transform: translate(6px, 36px) rotate(2deg) scale(0.9);
}

.deck-card__media {
    position: absolute;
    inset: 0;
}

.deck-card__media .media-placeholder {
    /* the placeholder icon/caption is otherwise centered in the full card,
       which collides with .deck-card__body once the card gets short on
       narrow screens (the body's height stays ~constant while the card
       shrinks) — anchor it to the top instead so it always clears the
       bottom-pinned title/CTA. */
    align-items: flex-start;
    padding-top: 15%;
}

.deck-card__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 7, 10, 0.05) 35%, rgba(6, 7, 10, 0.88) 100%);
    pointer-events: none;
}

.deck-card__dim {
    position: absolute;
    inset: 0;
    background: var(--color-darker);
    opacity: 0;
    transition: opacity 0.55s;
    pointer-events: none;
}

.deck-card.is-active .deck-card__dim {
    opacity: 0;
}

.deck-card:not(.is-active) .deck-card__dim {
    opacity: 0.55;
}

.deck-card__splash {
    position: absolute;
    top: 20px;
    right: 18px;
    pointer-events: none;
    transform: rotate(7deg);
    opacity: 0;
    transition: opacity 0.4s;
}

.deck-card.is-active .deck-card__splash {
    opacity: 1;
}

.deck-card__splash-text {
    display: inline-block;
    font-weight: 900;
    font-style: italic;
    font-size: 15px;
    color: #FFE14D;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
    animation: splashPulse 1s ease-in-out infinite;
}

@keyframes splashPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.09);
    }
}

.deck-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px;
    pointer-events: none;
}

.deck-card__tag {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.deck-card__title {
    margin: 12px 0 0;
    font-weight: 800;
    font-size: 25px;
    line-height: 1.12;
    letter-spacing: -0.4px;
    color: #fff;
}

.deck-card__meta {
    margin-top: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #D8D8DC;
}

.deck-card__cta {
    pointer-events: auto;
    margin-top: 16px;
    height: 44px;
    padding: 0 22px;
    font-size: 14px;
}

.deck-dots {
    display: flex;
    gap: 8px;
}

.deck-dots__dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    background: #E3E3E6;
    transition: all 0.3s;
    padding: 0;
}

.deck-dots__dot.is-active {
    width: 26px;
    background: var(--color-brand);
}

/* ---- Responsive ------------------------------------------------------------ */

@media (max-width: 720px) {
    .hero__content {
        min-width: 100%;
    }

    .hero__title {
        font-size: 40px;
    }

    /* `.deck` is width:100% below, but its parent has no in-flow content of
       its own to size against (every .deck-card is position:absolute, so
       it can't establish the wrap's width) — without this, `.hero__deck-wrap`
       collapses to a sliver and the slider renders tiny/broken. Giving the
       wrap the same width/cap makes the percentage resolve correctly. */
    .hero__deck-wrap {
        width: 100%;
        max-width: 400px;
    }

    .deck {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 4 / 5;
    }
}

@media (max-width: 480px) {
    /* The three background deck cards are fanned out with translate/rotate,
       so each one's painted box lands well outside `.deck` itself. On phones
       the deck is nearly full-width, so that fan escaped the right edge and
       gave the whole page a horizontal scroll. Padding the wrap pulls the
       deck in far enough for the fan to land inside the viewport — desktop
       keeps the full-size deck untouched. */
    .hero__deck-wrap {
        padding: 0 26px;
    }
}

/* ==========================================================================
   Placeholder media (stand-in for photo/video slots)
   Shared by the hero deck, life album, and event modal.
   ========================================================================== */

.media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    background:
            repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 14px),
            linear-gradient(160deg, #23242F, #14151C);
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 12.5px;
    line-height: 1.4;
}

.media-placeholder__icon {
    display: block;
    margin: 0 auto 8px;
    opacity: 0.6;
}
