/* =====================================================================
   UNIQLO × MANGA UT — VOL.01
   Aesthetic: "MANGA UT BROADSIDE"
   Editorial-manga register: halftone field, hard panel borders,
   condensed display type, vertical katakana rail, mono-numeral prices.
   ===================================================================== */

:root {
    --uq-red:   #ED1D24;
    --uq-white: #FFFFFF;
    --uq-ink:   #0A0A0A;
    --uq-ash:   #1A1A1A;
    --uq-paper: #FFFFFF;  /* primary canvas (v3 — white edition) */
    --uq-mist:  #F4F4F2;  /* product card backdrop */

    --display: 'Anton', 'Arial Narrow Bold', sans-serif;
    --jp:      'Noto Sans JP', sans-serif;
    --mono:    'JetBrains Mono', ui-monospace, monospace;

    --halftone-opacity: 0.05;
    --grain-opacity:    0.03;

    --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
    --ease-snap: cubic-bezier(0.85, 0, 0.15, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Preview canvas (laptop only) — clean white with a faint Napptix-green
       wash so the brand logo blends and the phone frame floats elegantly. */
    background:
        radial-gradient(1200px 800px at 12% 50%, rgba(31, 203, 79, 0.10), transparent 65%),
        radial-gradient(900px 600px at 100% 100%, rgba(31, 203, 79, 0.06), transparent 60%),
        #FFFFFF;
    color: #1B1D2A;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
}

/* =====================================================================
   Phone-frame preview stage (desktop only — collapses on real phones).
   Lets us show the creative inside an iPhone-style chrome when viewing
   on a laptop, while on a real device the creative fills the screen.
   ===================================================================== */
.phone-stage {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1;
}

/* =====================================================================
   Napptix brand column (laptop preview only — pinned to the left edge so
   the phone frame stays visually centred on screen).
   ===================================================================== */
.brand-column {
    position: fixed;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    max-width: 360px;
    color: #1B1D2A;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 2;
    pointer-events: none;
}

.brand-column * { pointer-events: auto; }

.brand-glow {
    position: absolute;
    inset: -40px -60px auto -60px;
    height: 220px;
    background: radial-gradient(closest-side, rgba(31, 203, 79, 0.22), transparent 70%);
    filter: blur(36px);
    z-index: -1;
    pointer-events: none;
}

/* Napptix logo — sized larger per request; logo's white bg blends with
   the white canvas so no halo treatment is needed. */
.brand-logo {
    display: block;
    height: 84px;
    width: auto;
    margin-bottom: 1.6rem;
}

.brand-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.32em;
    color: #1FCB4F;
    margin-bottom: 0.85rem;
    text-transform: uppercase;
}

.brand-headline {
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.02;
    margin: 0 0 1.1rem;
    letter-spacing: -0.02em;
    color: #1B1D2A;
}

.brand-headline .accent {
    background: linear-gradient(90deg, #1FCB4F 0%, #45E37A 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.brand-tag {
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(27, 29, 42, 0.62);
    margin: 0 0 1.75rem;
    max-width: 330px;
}

.brand-meta {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(31, 203, 79, 0.25);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(31, 203, 79, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.brand-meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8rem;
}

.brand-meta-k {
    font-weight: 700;
    letter-spacing: 0.18em;
    color: rgba(27, 29, 42, 0.42);
    text-transform: uppercase;
}

.brand-meta-v {
    color: #1B1D2A;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

.phone-frame {
    position: relative;
    width: 375px;
    height: 812px;
    border: 12px solid #1a1a1a;
    border-radius: 44px;
    box-shadow: 0 0 0 2px #333,
                0 25px 50px rgba(0, 0, 0, 0.5),
                inset 0 0 0 2px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
    --notch-w: 110px;
    --notch-h: 26px;
    --notch-r: 16px;
    /* Bottom safe area — keeps the CTA off the home-indicator zone on
       real phones and gives the CTA breathing room on the desktop preview. */
    --notch-bottom: 22px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Notch / Dynamic Island — pinned to the top in portrait, rotates to the
   left bezel in landscape. Rendered as device-hardware black; the creative
   extends behind it (white canvas under) and the lockup is shifted clear
   via .ad-content's top offset. */
.phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--notch-w);
    height: var(--notch-h);
    background: #0a0a0a;
    border-radius: 0 0 var(--notch-r) var(--notch-r);
    z-index: 300;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-frame.landscape::before {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: var(--notch-h);
    height: var(--notch-w);
    border-radius: 0 var(--notch-r) var(--notch-r) 0;
}

/* The creative — fills the WHOLE phone frame, including the area behind
   the notch. The white canvas extends edge-to-edge so the notch (also
   white) appears as a soft pill that "belongs" to the device chrome. */
.interstitial-ad {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: var(--uq-paper);
}

/* Only the renderable content surface shifts to clear the notch and the
   home-indicator zone. The creative behind it (.interstitial-ad) is still
   full-bleed white. Layout percentages inside .ad-content remain unchanged
   because they're relative to .ad-content's box, which is what we shrink. */
.ad-content {
    position: absolute;
    top: var(--notch-h, 0px);
    left: 0;
    right: 0;
    bottom: var(--notch-bottom, 0px);
    width: auto;
    height: auto;
}

/* Landscape: notch is on the left → shift the content surface right
   instead of down. Bottom safe area still applies (home indicator). */
.phone-frame.landscape .ad-content {
    top: 0;
    left: var(--notch-h, 0px);
    bottom: var(--notch-bottom, 0px);
}

/* Scale the frame down on smaller laptop windows so it doesn't crop. */
@media (max-height: 950px) { .phone-frame { transform: scale(0.85); } }
@media (max-height: 800px) { .phone-frame { transform: scale(0.75); } }
@media (max-height: 650px) { .phone-frame { transform: scale(0.6);  } }

/* =====================================================================
   Preview toolbar (desktop only — device picker, landscape toggle, reload)
   ===================================================================== */
.preview-toolbar {
    position: fixed;
    right: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    z-index: 10000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 200px;
}

.tb-btn,
.tb-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(27, 29, 42, 0.12);
    border-radius: 10px;
    color: #1B1D2A;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(27, 29, 42, 0.06);
    font-family: inherit;
}

.tb-btn:hover,
.tb-dropdown-trigger:hover {
    background: #FFFFFF;
    color: #1B1D2A;
    border-color: rgba(31, 203, 79, 0.45);
    box-shadow: 0 6px 18px rgba(31, 203, 79, 0.12);
}

.tb-btn svg {
    width: 16px;
    height: 16px;
}

.tb-btn.is-active {
    background: rgba(31, 203, 79, 0.14);
    border-color: rgba(31, 203, 79, 0.6);
    color: #128a36;
}

.tb-btn.is-active svg { transform: rotate(90deg); }

/* Dropdown */
.tb-dropdown {
    position: relative;
    min-width: 180px;
}

.tb-dropdown-trigger {
    justify-content: space-between;
    width: 100%;
}

.tb-dropdown-trigger svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.tb-dropdown.open .tb-dropdown-trigger svg {
    transform: rotate(180deg);
}

.tb-dropdown-menu {
    /* Flyout to the LEFT of the right-side toolbar so the menu doesn't
       cover the Landscape/Reload buttons below. */
    position: absolute;
    top: 0;
    right: calc(100% + 10px);
    width: 240px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(27, 29, 42, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    max-height: 380px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateX(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 11000;
    box-shadow: 0 18px 40px rgba(27, 29, 42, 0.12);
}

.tb-dropdown.open .tb-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.tb-dropdown-group { padding: 0.3rem 0; }

.tb-dropdown-group:not(:last-child) {
    border-bottom: 1px solid rgba(27, 29, 42, 0.08);
}

.tb-dropdown-label {
    padding: 0.4rem 0.85rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(27, 29, 42, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tb-dropdown-item {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    color: #1B1D2A;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tb-dropdown-item:hover {
    background: rgba(31, 203, 79, 0.08);
    color: #128a36;
}

.tb-dropdown-item.selected {
    background: linear-gradient(90deg, rgba(31, 203, 79, 0.22), rgba(31, 203, 79, 0.06));
    color: #0e6a2a;
    border-left: 2px solid #1FCB4F;
    padding-left: calc(0.85rem - 2px);
}

.tb-dropdown-item .dim {
    font-size: 0.72rem;
    color: rgba(27, 29, 42, 0.4);
    font-variant-numeric: tabular-nums;
}

.tb-dropdown-menu::-webkit-scrollbar { width: 6px; }
.tb-dropdown-menu::-webkit-scrollbar-track { background: transparent; }
.tb-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(27, 29, 42, 0.18);
    border-radius: 3px;
}

/* Real phones: kill the decorative frame chrome, full-bleed the creative. */
@media (max-width: 767px) {
    html, body { background: var(--uq-paper); }
    .phone-stage {
        padding: 0;
        background: transparent;
    }
    .phone-frame {
        width: 100%;
        height: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        transform: none !important;
    }
    /* Hide decorative notch on real phones — real device's notch takes over */
    .phone-frame::before { display: none; }

    /* Zero out the synthetic notch + bottom safe-area variables — the
       real device's env() safe areas replace them below. */
    .phone-frame {
        --notch-h: 0px;
        --notch-bottom: 0px;
    }

    /* Push the renderable content surface below the device's real notch /
       status bar (top) and above the home indicator gesture zone (bottom).
       env() falls back to 0 on phones without those safe areas, so devices
       without a notch render edge-to-edge. The .interstitial-ad white
       background still extends behind any safe-area gap. */
    .ad-content {
        top: env(safe-area-inset-top, 0px);
        bottom: env(safe-area-inset-bottom, 0px);
    }

    /* Hide preview chrome on real phones */
    .preview-toolbar { display: none !important; }
    .brand-column   { display: none !important; }
    .phone-stage    { gap: 0; padding: 0; }
}

.ad-content {
    /* position / top / inset are set in the phone-frame block above so the
       notch is cleared. Background + overflow + stacking context here. */
    background: var(--uq-paper);
    overflow: hidden;
    isolation: isolate;
}

/* ----------------------------------------------------------------------
   Atmosphere: halftone + grain overlays
   ---------------------------------------------------------------------- */
.halftone-overlay,
.grain-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.halftone-overlay {
    opacity: 0;
    z-index: 1;
    animation: halftoneIn 600ms var(--ease-out) forwards;
}

.halftone-overlay rect { opacity: var(--halftone-opacity); }

.grain-overlay {
    opacity: var(--grain-opacity);
    z-index: 2;
    mix-blend-mode: multiply;
}

/* ----------------------------------------------------------------------
   Vertical katakana side rail
   ---------------------------------------------------------------------- */
.katakana-rail {
    position: absolute;
    top: 14%;
    left: 4px;
    z-index: 3;
    font-family: var(--jp);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.4em;
    color: var(--uq-ink);
    opacity: 0.18;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    user-select: none;
    pointer-events: none;
}

/* ----------------------------------------------------------------------
   Close button: hanko square
   ---------------------------------------------------------------------- */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    width: 24px;
    height: 24px;
    padding: 0;
    background: var(--uq-ink);
    color: var(--uq-white);
    border: none;
    border-radius: 0;
    font-family: var(--display);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 120ms var(--ease-out);
}

.close-btn:hover,
.close-btn:active { background: var(--uq-red); }

/* ----------------------------------------------------------------------
   Collab lockup
   ---------------------------------------------------------------------- */
.collab-lockup {
    position: absolute;
    top: 2.5%;
    left: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translate(-50%, -12px);
    opacity: 0;
    animation: lockupIn 520ms var(--ease-out) 120ms forwards;
}

.collab-logo {
    display: block;
    width: auto;
    /* Pin to a stable raster layer so the transparent PNGs don't soften
       on devices that re-rasterise during scroll/animation. */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.collab-logo.uniqlo { height: 60px; }

/* Manga UT PNG ships as light text on a black bedding. Invert the whole
   bitmap so the black bedding becomes white (vanishes on the white canvas)
   and the light text becomes ink-dark and legible. */
.collab-logo.manga {
    height: 38px;
    filter: invert(1);
}

.collab-x {
    font-family: var(--display);
    font-size: 26px;
    color: var(--uq-ink);
    line-height: 1;
    padding: 0 4px;
    transform: translateY(-1px);
}

/* ----------------------------------------------------------------------
   Issue line (editorial marker)
   ---------------------------------------------------------------------- */
.issue-line {
    position: absolute;
    top: 11%;
    left: 50%;
    z-index: 10;
    width: 86%;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 360ms var(--ease-out) 320ms forwards;
}

.issue-rule {
    flex: 1;
    height: 1px;
    background: var(--uq-ink);
    opacity: 0.35;
}

.issue-text {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 11px;
    color: var(--uq-ink);
    letter-spacing: 0.18em;
    white-space: nowrap;
    text-transform: uppercase;
}

/* ----------------------------------------------------------------------
   Hero video panel
   ---------------------------------------------------------------------- */
.video-panel {
    position: absolute;
    top: 15%;
    left: 4%;
    width: 92%;
    height: 30%;
    z-index: 5;
    border: 2px solid var(--uq-ink);
    background: var(--uq-ink);
    overflow: hidden;
    transform: scaleY(0.92);
    opacity: 0;
    transform-origin: top center;
    animation: panelIn 420ms var(--ease-out) 360ms forwards;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.responsive-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hanko "limited" stamp on video corner */
.hanko-stamp {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--uq-red);
    color: var(--uq-white);
    font-family: var(--jp);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 6;
    box-shadow: 0 0 0 1px var(--uq-white);
}

/* Audio button: hanko square chip with inline-SVG speaker icon — clean
   render at any size, no alpha tricks. */
#audioButton {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    padding: 0;
    background: var(--uq-ink);
    color: var(--uq-white);            /* drives SVG stroke via currentColor */
    border: 1.5px solid var(--uq-white);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

#audioButton .audio-icon {
    width: 20px;
    height: 20px;
    display: block;
}

/* Initial state: video is muted → show "muted" icon, hide "on" icon. */
#audioButton .icon-on { display: none; }

/* ----------------------------------------------------------------------
   Carousel
   ---------------------------------------------------------------------- */
#slider {
    position: absolute;
    top: 46%;
    left: 0;
    width: 100%;
    height: 34vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1100px;
    transform-style: preserve-3d;
    z-index: 5;
}

#slider input[type="radio"] { display: none; }

#slider label {
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    width: 58%;
    height: 100%;
    border-radius: 0;
    border: 1px solid var(--uq-ink);
    background-color: var(--uq-mist);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: grab;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    transition: transform 0.4s var(--ease-out),
                opacity   0.4s var(--ease-out),
                border-color 0.2s var(--ease-out);
    overflow: hidden;

    /* Crisp-rendering stabilisers — pre-allocate a stable GPU layer so
       3D transforms don't soften the product photography between frames. */
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Centered (active) slide — accented with a 2px red ring */
#s1:checked ~ #slide1,
#s2:checked ~ #slide2,
#s3:checked ~ #slide3 {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    z-index: 3;
    border: 2px solid var(--uq-red);
}

/* Right neighbour — tilted 3deg */
#s1:checked ~ #slide2,
#s2:checked ~ #slide3,
#s3:checked ~ #slide1 {
    transform: translate3d(62%, 0, -110px) rotateY(3deg);
    opacity: 0.55;
    z-index: 2;
}

/* Left neighbour — tilted -3deg */
#s1:checked ~ #slide3,
#s2:checked ~ #slide1,
#s3:checked ~ #slide2 {
    transform: translate3d(-62%, 0, -110px) rotateY(-3deg);
    opacity: 0.55;
    z-index: 2;
}

#slide1 { background-image: url('./assets/uniqlo-ut-naruto.webp'); }
#slide2 { background-image: url('./assets/uniqlo-ut-sakamoto-days.webp'); }
#slide3 { background-image: url('./assets/uniqlo-ut-jujutsu-kaisen.webp'); }

/* Clickable redirect overlay (only active slide accepts taps) */
.slide-link {
    position: absolute;
    inset: 0;
    display: block;
    text-decoration: none;
    pointer-events: none;
    cursor: default;
    z-index: 2;
}

#s1:checked ~ #slide1 .slide-link,
#s2:checked ~ #slide2 .slide-link,
#s3:checked ~ #slide3 .slide-link {
    pointer-events: auto;
    cursor: pointer;
}

/* Product info strip — bottom of slide, animates in for active slide only */
.product-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 8px 10px 9px;
    background: var(--uq-white);
    border-top: 1px solid var(--uq-ink);
    transform: translateY(101%);
    transition: transform 260ms var(--ease-out);
    pointer-events: none;
}

#s1:checked ~ #slide1 .product-info,
#s2:checked ~ #slide2 .product-info,
#s3:checked ~ #slide3 .product-info {
    transform: translateY(0);
}

.product-name {
    font-family: var(--display);
    font-size: 13px;
    line-height: 1.1;
    letter-spacing: 0.04em;
    color: var(--uq-ink);
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.3em;
}

.product-price {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 12px;
    color: var(--uq-ink);
    margin-top: 2px;
    letter-spacing: 0.02em;
}

/* ----------------------------------------------------------------------
   Slider arrows (compact, mono-character)
   ---------------------------------------------------------------------- */
.slider-button {
    position: absolute;
    top: 65%;
    width: 26px;
    height: 38px;
    padding: 0;
    background: var(--uq-white);
    color: var(--uq-ink);
    border: 1px solid var(--uq-ink);
    border-radius: 0;
    font-family: var(--display);
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 100ms var(--ease-out), color 100ms var(--ease-out);
}

.slider-button:hover,
.slider-button:active {
    background: var(--uq-ink);
    color: var(--uq-white);
}

.slider-button.left  { left: 6px; }
.slider-button.right { right: 6px; }

/* ----------------------------------------------------------------------
   Page ticks (hard squares, not dots)
   ---------------------------------------------------------------------- */
.page-ticks {
    position: absolute;
    bottom: 13%;
    left: 50%;
    z-index: 10;
    display: flex;
    gap: 5px;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 280ms var(--ease-out) 820ms forwards;
}

.tick {
    width: 14px;
    height: 3px;
    background: var(--uq-ink);
    opacity: 0.25;
    transition: background 180ms var(--ease-out),
                opacity    180ms var(--ease-out),
                transform  180ms var(--ease-out);
    cursor: pointer;
}

.tick.active {
    background: var(--uq-red);
    opacity: 1;
    transform: scaleX(1.4);
    transform-origin: left center;
}

/* ----------------------------------------------------------------------
   CTA bar (full-width ink slab)
   ---------------------------------------------------------------------- */
.cta-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: var(--uq-red);
    color: var(--uq-white);
    text-decoration: none;
    border-top: 2px solid var(--uq-ink);
    opacity: 0;
    animation: fadeIn 280ms var(--ease-out) 880ms forwards;
    transition: background 120ms var(--ease-out);
}

.cta-bar:hover,
.cta-bar:active { background: var(--uq-ink); }

.cta-bar:active { transform: translateY(1px); }

.cta-label {
    font-family: var(--display);
    font-size: 16px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.cta-arrow {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 16px;
    transform: translateY(-1px);
}

/* ----------------------------------------------------------------------
   Motion keyframes
   ---------------------------------------------------------------------- */
@keyframes halftoneIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lockupIn {
    from { transform: translate(-50%, -12px); opacity: 0; }
    to   { transform: translate(-50%, 0);     opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes panelIn {
    from { transform: scaleY(0.92); opacity: 0; }
    to   { transform: scaleY(1);    opacity: 1; }
}


/* =====================================================================
   Landscape orientation overrides
   Applied when the JS toggles `.landscape` on `.phone-frame`.
   Repositions every element for a 16:9-ish wide canvas.
   ===================================================================== */
.phone-frame.landscape .collab-lockup {
    top: 6%;
    left: 4%;
    /* The portrait .lockupIn animation has fill-mode: forwards and ends at
       translate(-50%, 0). Disable it here so transform: none actually sticks,
       otherwise the Uniqlo hanko gets pushed off the left edge. */
    animation: none;
    transform: none;
    opacity: 1;
    gap: 10px;
}

.phone-frame.landscape .collab-logo.uniqlo { height: 52px; }
.phone-frame.landscape .collab-logo.manga  { height: 32px; }
.phone-frame.landscape .collab-x { font-size: 26px; }

.phone-frame.landscape .issue-line {
    top: 8%;
    left: auto;
    right: 4%;
    width: 50%;
    transform: none;
    gap: 8px;
}

.phone-frame.landscape .issue-text {
    font-size: 10px;
}

/* Hide katakana rail — no vertical room in landscape */
.phone-frame.landscape .katakana-rail {
    display: none;
}

/* Video occupies left column */
.phone-frame.landscape .video-panel {
    top: 18%;
    left: 4%;
    width: 38%;
    height: 64%;
}

.phone-frame.landscape .hanko-stamp {
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    font-size: 13px;
}

/* Carousel occupies right column */
.phone-frame.landscape #slider {
    top: 18%;
    left: 44%;
    width: 52%;
    height: 64%;
}

/* Slide labels — wider in landscape to fill the right column;
   neighbour offsets tighten so peek still works */
.phone-frame.landscape #slider label {
    width: 62%;
}

.phone-frame.landscape #s1:checked ~ #slide2,
.phone-frame.landscape #s2:checked ~ #slide3,
.phone-frame.landscape #s3:checked ~ #slide1 {
    transform: translate3d(62%, 0, -110px) rotateY(3deg);
}

.phone-frame.landscape #s1:checked ~ #slide3,
.phone-frame.landscape #s2:checked ~ #slide1,
.phone-frame.landscape #s3:checked ~ #slide2 {
    transform: translate3d(-62%, 0, -110px) rotateY(-3deg);
}

/* Slider arrows reposition vertically-centered to the carousel column */
.phone-frame.landscape .slider-button {
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 34px;
    font-size: 14px;
}

.phone-frame.landscape .slider-button.left  { left: 46%; }
.phone-frame.landscape .slider-button.right { right: 2%; }

/* Page ticks tucked into the bottom strip just above the CTA */
.phone-frame.landscape .page-ticks {
    bottom: 18%;
}

/* CTA bar — shorter percentage of total height, full width */
.phone-frame.landscape .cta-bar {
    height: 14%;
}

.phone-frame.landscape .cta-label {
    font-size: 14px;
    letter-spacing: 0.2em;
}

/* Audio button: smaller in landscape to suit the compressed video panel,
   but still tall enough to be obviously tappable. */
.phone-frame.landscape #audioButton {
    width: 32px;
    height: 32px;
    bottom: 8px;
    right: 8px;
}

.phone-frame.landscape #audioButton img {
    width: 16px;
    height: 16px;
}

/* Product-info strip: lower font + tighter padding so two lines fit */
.phone-frame.landscape .product-name { font-size: 11px; }
.phone-frame.landscape .product-price { font-size: 10px; }
.phone-frame.landscape .product-info { padding: 6px 8px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-delay:    0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .halftone-overlay,
    .collab-lockup,
    .issue-line,
    .video-panel,
    #slide1, #slide2, #slide3,
    .page-ticks,
    .cta-bar { opacity: 1; transform: none; }
    .collab-lockup { transform: translateX(-50%); }
    .issue-line    { transform: translateX(-50%); }
    .page-ticks    { transform: translateX(-50%); }
}

/* ----------------------------------------------------------------------
   Small-screen tweaks (≤ 360 wide)
   ---------------------------------------------------------------------- */
@media (max-width: 360px) {
    .collab-logo.uniqlo { height: 42px; }
    .collab-logo.manga  { height: 26px; }
    .collab-x { font-size: 24px; }
    .issue-text { font-size: 10px; letter-spacing: 0.16em; }
    .product-name { font-size: 12px; }
    .product-price { font-size: 11px; }
    .cta-label { font-size: 14px; letter-spacing: 0.2em; }
}
