/* ==========================================================================
   Home hero: "Little moments. Lasting memories."
   ----------------------------------------------------------------------
   Copy on the left, a photostrip over a live map of the top countries on
   the right (pins come from /data/site-stats.json, see hero.js).
   Root font-size is 62.5% (1rem = 10px), matched here.
   ========================================================================== */

/* Tokens shared with the "Good company" section (world.css). */
.pb-hero,
.pb-world {
    --pbh-bg: #fdfafb;
    --pbh-ink: #2a2326;
    --pbh-muted: #6f6569;
    --pbh-pink: #c2508a;
    --pbh-pink-dark: #a93f75;
    --pbh-line: #ece4e7;
    --pbh-card: #f8f1f3;
    --pbh-serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --pbh-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --roboto: 'Roboto', serif;
    --syne: 'Syne', serif;
    --mukta-mahee: 'Mukta Mahee', sans-serif;
}

.pb-hero {
    position: relative;
    z-index: 1;
    width: 100%;
    background: var(--pbh-bg);
    border-bottom: 1px solid var(--pbh-line);
    color: var(--pbh-ink);
    font-family: var(--pbh-sans);
}

.pb-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(64px, 9vw, 104px) clamp(20px, 5.6vw, 80px);
}

/* ---------- Copy ---------- */

.pb-hero-copy {
    min-width: 0;
    text-align: left;
}

.pb-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    color: var(--pbh-pink);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pb-hero-eyebrow svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.pb-hero-title {
    margin: 0;
    color: var(--pbh-ink);
    font-family: var(--syne);
    font-size: clamp(4.4rem, 5vw, 7.2rem);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.01em;
}

.pb-hero-title em {
    display: inline-block;
    color: var(--pbh-pink);
    font-style: normal;
    transform-origin: left center;
    animation: pbBreathe 4.5s ease-in-out infinite;
}

/* A slow in-and-out, like breathing: a touch bigger with a soft pink glow. */
@keyframes pbBreathe {

    0%,
    100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(194, 80, 138, 0);
    }

    50% {
        transform: scale(1.035);
        text-shadow: 0 0 22px rgba(194, 80, 138, 0.35);
    }
}

.pb-hero-lede {
    max-width: 46ch;
    margin: 32px 0 0;
    color: var(--pbh-muted);
    font-size: 1.6rem;
    line-height: 1.75;
}

.pb-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 26px;
    margin-top: 34px;
}

.pb-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 0 24px;
    border-radius: 6px;
    background: var(--pbh-pink);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(194, 80, 138, 0.22);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pb-hero-cta svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.pb-hero-cta .pb-hero-arrow {
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.pb-hero-cta:hover {
    background: var(--pbh-pink-dark);
    box-shadow: 0 10px 24px rgba(194, 80, 138, 0.3);
}

.pb-hero-cta:hover .pb-hero-arrow {
    transform: translateX(3px);
}

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

.pb-hero-link {
    color: var(--pbh-ink);
    font-size: 1.4rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

.pb-hero-link:hover {
    color: var(--pbh-pink);
}

.pb-hero-cta:focus-visible,
.pb-hero-link:focus-visible {
    outline: 2px solid var(--pbh-pink);
    outline-offset: 3px;
}

.pb-hero-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0 0;
    color: var(--pbh-muted);
    font-size: 1.2rem;
}

.pb-hero-note svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ---------- Map card ---------- */

.pb-hero-visual {
    position: relative;
    min-width: 0;
    margin: 0;
    /* Height scales with the viewport (276px at 1440, like the design).
       Not aspect-ratio + min-height: that pair turns the min-height into a
       ~590px min-width and pushes the card past its column on 1025-1280px
       screens and zoomed-in browsers. */
    width: 100%;
    height: clamp(250px, 19vw, 300px);
    overflow: hidden;
    border-radius: 12px;
    background: var(--pbh-card);
}

/* hero.js frames the map around the pins; this is the no-JS position. */
.pb-hero-map {
    position: absolute;
    top: 50%;
    left: 12%;
    width: 98%;
    max-width: none;
    height: auto;
    transform: translateY(-50%);
    pointer-events: none;
    user-select: none;
}

/* Any map card (hero or "Good company") once world-map.js has placed it. */
[data-map].is-framed .pb-hero-map {
    transform: none;
}

.pb-hero-strip {
    position: absolute;
    /* Above the bubbles: smaller countries may sit behind the photo. */
    z-index: 4;
    top: 10px;
    left: 3%;
    /* Stops above the caption line at the bottom-left of the card. A fixed
       box, so the map doesn't shift when the slideshow changes photo. */
    height: calc(100% - 46px);
    aspect-ratio: 442 / 868;
    pointer-events: none;
    user-select: none;
}

/* Second, smaller strip pinned over the Indian Ocean. world-map.js places it
   with the map and hides it when it would cover a top country. It sits
   under the bubbles so a country is never hidden by it. */
.pb-hero-strip-alt {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    height: 59%;
    aspect-ratio: 300 / 864;
    transform: rotate(-6deg);
    pointer-events: none;
    user-select: none;
}

/* Slideshow photos, centred in their strip's box and cross-faded by
   strip-slideshow.js. Strips come in a few sizes, so each one shrinks to
   fit the box instead of being cropped. */
.pb-strip-slide {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    opacity: 0;
    box-shadow: 0 6px 16px rgba(42, 35, 38, 0.18);
    transition: opacity 0.9s ease;
}

.pb-strip-slide.is-on {
    opacity: 1;
}

/* Flat photos in the big strip get the same tilt as the first one. */
.pb-hero-strip .pb-strip-slide:not(.is-tilted) {
    max-height: 88%;
    transform: rotate(9deg);
    box-shadow: 4px 8px 14px rgba(42, 35, 38, 0.28);
}

/* The first photo already has its tilt and shadow drawn in. */
.pb-strip-slide.is-tilted {
    box-shadow: none;
}

[data-map]:not(.is-framed) .pb-hero-strip-alt,
.pb-hero-strip-alt.is-off {
    visibility: hidden;
}

.pb-hero-pins {
    position: absolute;
    inset: 0;
    z-index: 3;
}

/* Analytics-style bubbles: translucent so overlapping countries stay
   readable; size (set by world-map.js) grows with visitors. */
.pb-pin {
    position: absolute;
    width: var(--pin-size, 8px);
    height: var(--pin-size, 8px);
    margin: calc(var(--pin-size, 8px) / -2) 0 0 calc(var(--pin-size, 8px) / -2);
    border: 1px solid rgba(169, 63, 117, 0.75);
    border-radius: 50%;
    background: rgba(194, 80, 138, 0.42);
    box-sizing: border-box;
    animation: pbPinIn 0.5s ease-out both;
    transition: background-color 0.15s ease;
}

.pb-pin:hover,
.pb-pin.is-top {
    background: rgba(194, 80, 138, 0.6);
}

.pb-pin::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
}

.pb-map-labels {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.pb-map-label {
    position: absolute;
    transform: translate(-50%, -50%);
    color: #9a9195;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
}

.pb-hero-callout {
    position: absolute;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border: 1px solid var(--pbh-line);
    border-radius: 6px;
    background: #fff;
    color: var(--pbh-ink);
    font-size: 1.1rem;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(42, 35, 38, 0.06);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.pb-hero-callout[hidden] {
    display: none;
}

.pb-hero-callout strong {
    color: var(--pbh-pink);
    font-weight: 600;
}

/* Leader line from the pin to the label */
.pb-hero-callout::before {
    content: '';
    position: absolute;
    background: var(--pbh-pink);
}

.pb-hero-callout.is-right::before,
.pb-hero-callout.is-left::before {
    top: var(--leader-y, 50%);
    width: var(--leader, 26px);
    height: 1px;
}

.pb-hero-callout.is-right::before {
    right: 100%;
}

.pb-hero-callout.is-left::before {
    left: 100%;
}

.pb-hero-callout.is-above::before,
.pb-hero-callout.is-below::before {
    left: var(--leader-x, 50%);
    width: 1px;
    height: var(--leader, 26px);
}

.pb-hero-callout.is-above::before {
    top: 100%;
}

.pb-hero-callout.is-below::before {
    bottom: 100%;
}

.pb-hero-caption {
    position: absolute;
    z-index: 3;
    left: 20px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--pbh-muted);
    font-size: 1rem;
}

.pb-hero-caption::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--pbh-pink);
}

/* Live numbers: the caption dot gently pulses. */
.pb-hero-caption.is-live::before,
.pb-world-live::before {
    animation: pbLive 2s ease-in-out infinite;
}

/* After the first draw, minute-by-minute updates don't re-animate bubbles. */
[data-map].is-settled .pb-pin {
    animation: none;
}

.pb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@keyframes pbLive {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(194, 80, 138, 0.45);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(194, 80, 138, 0);
    }
}

@keyframes pbPinIn {
    from {
        opacity: 0;
        transform: scale(0.4);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---------- Responsive ---------- */

@media only screen and (max-width: 1024px) {
    .pb-hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
        max-width: 720px;
    }

    .pb-hero-title {
        font-size: clamp(4.4rem, 7vw, 6.4rem);
    }

    .pb-hero-visual {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* Landscape phones: keep text and map side by side so the map isn't a
   full screen below the fold. */
@media only screen and (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
    .pb-hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        gap: 28px;
        max-width: none;
        padding: 32px clamp(20px, 4vw, 40px) 36px;
    }

    .pb-hero-title {
        font-size: clamp(3.2rem, 5vw, 4.4rem);
    }

    .pb-hero-eyebrow {
        margin-bottom: 14px;
    }

    .pb-hero-lede {
        margin-top: 14px;
        font-size: 1.4rem;
        line-height: 1.6;
    }

    .pb-hero-actions {
        margin-top: 20px;
    }

    .pb-hero-cta {
        min-height: 46px;
    }

    .pb-hero-note {
        margin-top: 16px;
    }

    .pb-hero-visual {
        aspect-ratio: 16 / 10;
    }
}

@media only screen and (max-width: 540px) {
    .pb-hero-inner {
        padding: 44px 16px 52px;
        gap: 36px;
    }

    .pb-hero-eyebrow {
        margin-bottom: 20px;
    }

    .pb-hero-title {
        font-size: clamp(3.6rem, 11.5vw, 4.4rem);
    }

    .pb-hero-lede {
        margin-top: 22px;
        font-size: 1.5rem;
    }

    .pb-hero-actions {
        margin-top: 28px;
    }

    .pb-hero-cta {
        flex: 1 1 100%;
        justify-content: center;
    }

    .pb-hero-note {
        margin-top: 24px;
    }

    .pb-hero-visual {
        aspect-ratio: 16 / 9;
    }

    .pb-hero-strip {
        top: 8px;
        height: calc(100% - 38px);
    }

    .pb-hero-strip-alt {
        height: 46%;
    }

    .pb-hero-caption {
        left: 14px;
        bottom: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .pb-pin,
    .pb-hero-title em,
    .pb-hero-caption.is-live::before,
    .pb-world-live::before {
        animation: none;
    }

    .pb-hero-cta,
    .pb-hero-cta .pb-hero-arrow,
    .pb-strip-slide {
        transition: none;
    }
}