/* ==========================================================================
   CHARACTERS — Mobile (390px – 440px)
   Design not ready yet — verstka comes once the mockup is provided.
   ========================================================================== */

.characters-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    overflow: hidden;
}

.characters-main {
    position: relative;
    width: 100%;
    height: 153.6rem;
    background-color: #ffffff;
    overflow: hidden;
}

.characters-hero__bg,
.characters-hero__nav,
.characters-hero__bottom-logo,
.characters-main__card,
.characters-main__text,
.characters-main__music-icon {
    display: none;
}

/* Character carousel — exact same sizing/spacing/like mechanics as
   the portfolio page's case carousel (see portfolio.mobile.css), just
   no title/date text and not clickable yet (no detail pages exist).
   Likes reuse the same relay + D1 table, just their own char_N ids
   (whitelisted in telegram-relay/src/index.js). */
.characters-main-mobile__cases {
    position: absolute;
    left: 0;
    top: 2rem;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overflow-anchor: none;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 2rem;
    scroll-padding-right: 2rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    z-index: 1;
}

.characters-main-mobile__cases::-webkit-scrollbar {
    display: none;
}

.characters-main-mobile__cases-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    padding: 0 2rem;
}

/* No scroll-snap-align here on purpose — see .is-snap-ready below.
   A card only BECOMES a snap target once its own reveal transition
   has actually finished (added by js/characters.js on transitionend);
   while it doesn't have one yet, the browser has nothing to
   "correct" mid-animation, which is what caused the jolt/overshoot
   before. */
.characters-main-mobile__case-card {
    position: relative;
    display: block;
    flex-shrink: 0;
    width: 23.6rem;
    height: 36rem;
    overflow: hidden;
    opacity: 0;
    transform: translateX(6rem);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.characters-main-mobile__case-card.is-snap-ready {
    scroll-snap-align: start;
}

.characters-main-mobile__cases.is-revealed .characters-main-mobile__case-card {
    opacity: 1;
    transform: translateX(0);
}

.characters-main-mobile__case-card:nth-child(1) { transition-delay: 0s; }
.characters-main-mobile__case-card:nth-child(2) { transition-delay: 0.08s; }
.characters-main-mobile__case-card:nth-child(3) { transition-delay: 0.16s; }
.characters-main-mobile__case-card:nth-child(4) { transition-delay: 0.24s; }
.characters-main-mobile__case-card:nth-child(5) { transition-delay: 0.32s; }

.characters-main-mobile__case-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section label pair — same recipe as portfolio's/feedback's own
   "SCROLL" / count-or-label pairs. */
.characters-main-mobile__section-label {
    position: absolute;
    top: 39rem;
    margin: 0;
    font-family: 'Atyp Display', sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.5rem;
    letter-spacing: -0.08em;
    color: #000000;
    z-index: 2;
}

.characters-main-mobile__section-label--left { left: 2rem; }
.characters-main-mobile__section-label--right { right: 2rem; text-align: right; }

/* Same recipe as the feedback page's "Your feedback" heading — both
   lines full opacity this time (no dimmed first line). */
.characters-main-mobile__heading {
    position: absolute;
    left: 2rem;
    top: 48.4rem;
    margin: 0;
    z-index: 2;
}

.characters-main-mobile__heading span {
    display: block;
    font-family: 'Atyp Display', sans-serif;
    font-weight: 600;
    font-size: 5rem;
    line-height: 4rem;
    letter-spacing: -0.08em;
    color: #000000;
    opacity: 1;
}

.characters-main-mobile__subheading {
    position: absolute;
    left: 2rem;
    top: 58.4rem;
    margin: 0;
    font-family: 'Atyp Display', sans-serif;
    font-weight: 300;
    font-size: 1.5rem;
    line-height: 1.5rem;
    letter-spacing: -0.05em;
    color: #000000;
    opacity: 0.5;
    white-space: pre-line;
    z-index: 2;
}

.characters-main-mobile__like-zone {
    position: absolute;
    top: 0;
    right: 0;
    width: 8rem;
    height: 8rem;
    cursor: pointer;
    z-index: 2;
}

/* Placeholder characters (3-5) — not clickable, dimmed. */
.characters-main-mobile__like-zone--disabled {
    pointer-events: none;
    cursor: default;
    opacity: 0.5;
}

.characters-main-mobile__like-zone .characters-main-mobile__like-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.2rem;
    display: block;
    transition: transform 0.15s ease;
}

.characters-main-mobile__like-icon.is-pressed {
    transform: scale(0.7);
}

.characters-main-mobile__like-count {
    position: absolute;
    top: 3rem;
    right: 3.7rem;
    font-family: 'Atyp Display', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1rem;
    letter-spacing: 0.05em;
    text-align: right;
    color: #ffffff;
    opacity: 1;
}

/* Mobile hero bg — same natural-aspect + fade-in trick as the
   portfolio page's own hero photo (see portfolio.mobile.css). */
.characters-hero-mobile__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 39.3rem;
    height: auto;
    max-width: none;
    opacity: 0;
    animation: characters-hero-mobile-bg-in 2.5s ease forwards;
    z-index: 0;
}

@keyframes characters-hero-mobile-bg-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.characters-hero-mobile__wordmark {
    position: absolute;
    left: 2rem;
    top: 2rem;
    width: 15.1rem;
    height: 7rem;
    z-index: 1;
}

/* Menu button — same dark-circle/white-dots treatment as the
   portfolio page. No --light modifier fighting it here (this page's
   button never had one), so a plain class override is enough. */
.main-menu-trigger-btn {
    background-color: #000000;
    border-color: transparent;
}

.main-menu-trigger-btn:hover:not(.is-open) {
    background-color: #000000;
    border-color: transparent;
}

.main-menu-trigger-btn .menu-dots-invert {
    filter: none;
}

.main-menu-trigger-btn.is-open .menu-dots-invert {
    filter: invert(1);
}

/* Heading + intro — same classes/i18n keys/opacity split as desktop
   (see characters.desktop.css), just this breakpoint's own font size
   and position. */
.characters-hero__heading {
    position: absolute;
    left: 2rem;
    top: 62.8rem;
    margin: 0;
    font-family: 'Atyp Display', sans-serif;
    font-weight: 600;
    font-size: 5rem;
    line-height: 4rem;
    letter-spacing: -0.08em;
    color: #000000;
    white-space: pre;
    z-index: 1;
}

.characters-hero__heading-part--half {
    display: block;
    opacity: 0.5;
}

.characters-hero__heading-part--full {
    display: block;
    opacity: 1;
}

.characters-hero__intro {
    position: absolute;
    left: 2rem;
    top: 71.8rem;
    font-family: 'Atyp Display', sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.5rem;
    letter-spacing: -0.05em;
    color: #000000;
    opacity: 0.5;
    white-space: pre-line;
    z-index: 1;
}
