/* Honest Global PLC, home page only.
   The theme, masthead, hero, footer and shared photo groups live in theme.css. */

/* ---------------------------------------------------------------- businesses */
.biz { padding: var(--sp-section) 0; }
.biz__head { align-items: end; margin-bottom: var(--sp-block); }
.biz__title { grid-column: 1 / 9; }
.biz__cards { row-gap: 56px; align-items: start; }
.card { grid-column: span 4; display: block; }
.card:nth-child(2) { margin-top: clamp(0px, 4vw, 64px); }
.card__media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__num { display: inline-block; margin: 22px 0.6em 0 0; font: 400 1rem var(--serif); color: var(--accent); }
.card__name { font: 400 clamp(1.5rem, 2.1vw, 2.125rem)/1.1 var(--serif); letter-spacing: -0.01em; color: var(--fg); }
.card__line { display: block; max-width: 32ch; margin-top: 10px; font-size: 0.9375rem; color: var(--fg-2); }
.card:hover .card__name { color: var(--accent); }

/* ---------------------------------------------------------------- trading */
.page-home .chapter { padding-top: 0; }
.trade__title { grid-column: 1 / 12; }

.imports-run { margin-top: var(--sp-block); }
.run__head { align-items: end; margin-bottom: clamp(28px, 3.5vw, 48px); }
.run__title { grid-column: 1 / 9; }
.run__count { grid-column: 10 / 13; justify-self: end; display: flex; align-items: baseline; gap: 12px; }
.run__count b { font: 400 clamp(4.5rem, 9vw, 9rem)/0.8 var(--serif); letter-spacing: -0.04em; color: var(--fg); }
.run__count span { font-size: 0.875rem; color: var(--fg-3); }

.run__viewport { overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.run__viewport::-webkit-scrollbar { display: none; }
.run__track { display: flex; gap: var(--gutter); width: max-content; padding-inline: var(--margin); }
.tile { flex: none; width: clamp(230px, 23vw, 360px); scroll-snap-align: start; scroll-margin-left: var(--margin); }
.tile a { display: block; }
.tile__media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile a:hover .tile__media img { transform: scale(1.05); }
.tile__letter {
    position: absolute;
    top: 14px; left: 14px;
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    font: 400 1.125rem/1 var(--serif);
    color: var(--deep);
    background: #F5F0E6;
}
.tile__name { display: block; margin-top: 14px; font: 400 1.25rem/1.25 var(--serif); color: var(--fg); }
.tile a:hover .tile__name { color: var(--accent); }
.tile--more .tile__media {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 26px;
    color: #F5F0E6;
    background: var(--bg-3);
}
.tile__plus { font: 400 clamp(4rem, 7vw, 6.5rem)/0.9 var(--serif); letter-spacing: -0.03em; }
.tile__all { display: inline-flex; gap: 0.6em; font: 400 1.375rem/1.2 var(--serif); }
.tile__all .arr { transition: transform 0.35s var(--ease); }
.tile--more a:hover .tile__all .arr { transform: translateX(4px); }
.tile--more .tile__name { color: var(--fg-2); }

/* Desktop with motion: the gallery is driven by the vertical scroll */
.imports-run.is-pinned .run__viewport { overflow: hidden; scroll-snap-type: none; }
.imports-run.is-pinned { padding-block: 24px; }

.exports-set { margin-top: var(--sp-section); }
.set__head { align-items: end; margin-bottom: var(--sp-block); }
.set__title { grid-column: 1 / 9; }
.set__cta { grid-column: 9 / 13; justify-self: end; }

/* ---------------------------------------------------------------- automobiles: the reel */
.reel__head { margin-bottom: var(--sp-block); }
.auto__title { grid-column: 1 / 11; }
/* On the 3D stage the headline sits at the top, the cars below it */
.reel.is-3d .reel__head { position: absolute; top: calc(var(--header-h) + 20px); left: 0; right: 0; z-index: 2; margin: 0; pointer-events: none; }

/* Default (mobile, no motion): a row of photos you swipe */
.reel__stage { position: relative; }
.reel__floor, .reel__hud { display: none; }
.reel__cards {
    display: flex;
    gap: var(--gutter);
    padding-inline: var(--margin);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.reel__cards::-webkit-scrollbar { display: none; }
.rc { flex: none; width: min(78vw, 460px); scroll-snap-align: center; }
.rc__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-2); }
.rc__media img { width: 100%; height: 100%; object-fit: cover; }
.rc figcaption { margin-top: 12px; font: 400 1.25rem/1.2 var(--serif); color: var(--fg); }

/* Desktop with motion: the cars drive out of the distance */
.reel.is-3d .reel__stage {
    height: 100vh;
    overflow: hidden;
    perspective: 1000px;
    perspective-origin: 50% 50%;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.reel.is-3d .reel__floor {
    display: block;
    position: absolute;
    left: -60%; right: -60%;
    top: 52%;
    height: 160%;
    transform-origin: 50% 0;
    transform: rotateX(80deg);
    background-image:
        linear-gradient(rgba(157, 187, 224, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(157, 187, 224, 0.22) 1px, transparent 1px);
    background-size: 140px 140px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 100%);
}
.reel.is-3d .reel__cards {
    position: absolute;
    inset: 0;
    display: block;
    padding: 0;
    overflow: visible;
    transform-style: preserve-3d;
}
.reel.is-3d .rc {
    position: absolute;
    left: 50%; top: 60%;
    width: clamp(380px, 40vw, 640px);
    transform-style: preserve-3d;
    will-change: transform, opacity;
    backface-visibility: hidden;
}
.reel.is-3d .rc figure { transform: translate(-50%, -50%); }
.reel.is-3d .rc__media { box-shadow: 0 40px 60px -28px rgba(5, 14, 30, 0.7); }
.reel.is-3d .reel__hud {
    display: block;
    position: absolute;
    bottom: 32px;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fg-3);
}
.reel__hud--l { left: var(--margin); }
.reel__hud--r { right: var(--margin); }
.reel__hud b { font-weight: 500; color: var(--fg); }

.auto__foot { align-items: center; margin-top: var(--sp-block); }
.auto__cta { grid-column: 1 / 6; }
.auto__note { grid-column: 7 / 13; }

/* ---------------------------------------------------------------- ring of photographs */
.ring { padding: var(--sp-section) 0; overflow: hidden; }
.ring__stage { --size: min(92vw, 86vh, 860px); position: relative; width: var(--size); aspect-ratio: 1 / 1; margin: 0 auto; }
.ring__tiles { position: absolute; inset: 0; }
.rt {
    --a: calc(var(--i) * 30deg - 90deg);
    position: absolute;
    left: 50%; top: 50%;
    width: 16%;
    aspect-ratio: 4 / 5;
    margin: -10% 0 0 -8%;
    transform: rotate(var(--a)) translateX(calc(var(--size) * 0.385)) rotate(calc(var(--a) * -1));
}
.rt__in { width: 100%; height: 100%; overflow: hidden; background: var(--bg-2); box-shadow: 0 18px 40px -22px rgba(5, 14, 30, 0.7); }
.rt__in img { width: 100%; height: 100%; object-fit: cover; }
.ring__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring__logo { margin-bottom: 24px; }
.ring__logo .brand__img { height: clamp(76px, 8vw, 116px); }
.ring__title { max-width: 11ch; }

/* ---------------------------------------------------------------- the group, in facts */
.facts { padding: 0 0 var(--sp-section); }
.facts__head { align-items: end; margin-bottom: var(--sp-block); }
.facts__title { grid-column: 1 / 7; }
.facts__text { grid-column: 8 / 13; font-size: 1.0625rem; line-height: 1.7; color: var(--fg-2); }
.facts__text .signature { margin-top: 18px; font: 400 1.125rem/1.4 var(--serif); color: var(--fg); }
.facts__list { row-gap: var(--gutter); }
.facts__list li {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: clamp(180px, 18vw, 240px);
    padding: clamp(22px, 2.4vw, 34px);
    background: var(--bg-2);
}
.facts__list b { font: 400 clamp(3.5rem, 6vw, 5.75rem)/0.9 var(--serif); letter-spacing: -0.03em; color: var(--fg); font-variant-numeric: lining-nums; }
.facts__list b.facts__word { font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1; }
.facts__list span { font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); }

/* ---------------------------------------------------------------- intro: the cannon is revealed, then its orange bar */
.boot { display: none; }
.motion:not(.boot-seen):not(.boot-done) .boot { display: block; }
.boot-on, .boot-on body { overflow: hidden; }
.boot {
    --px: 50%;
    --py: 50%;
    --hole: 0px;
    position: fixed;
    inset: 0;
    z-index: 200;
    color: #C9D6E8;
    background: var(--deep);
    -webkit-mask-image: radial-gradient(circle at var(--px) var(--py), transparent var(--hole), #000 calc(var(--hole) + 1px));
    mask-image: radial-gradient(circle at var(--px) var(--py), transparent var(--hole), #000 calc(var(--hole) + 1px));
    cursor: pointer;
}
.boot__grid {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-image:
        linear-gradient(rgba(107, 140, 181, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 140, 181, 0.09) 1px, transparent 1px);
    background-size: 56px 56px;
    background-position: center;
}
.boot__frame { position: absolute; inset: clamp(12px, 2vw, 24px); border: 1px solid rgba(107, 140, 181, 0.28); }
.boot__hud { position: absolute; inset: clamp(12px, 2vw, 24px); font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(201, 214, 232, 0.72); }
.hud { position: absolute; padding: 14px 18px; white-space: nowrap; }
.hud span { color: var(--sky); margin: 0 0.3em; }
.hud--tl { top: 0; left: 0; }
.hud--tr { top: 0; right: 0; }
.hud--bl { bottom: 0; left: 0; }
.hud--bc { bottom: 0; left: 50%; transform: translateX(-50%); }
.hud--bc b { margin-left: 0.6em; font-weight: 500; color: #F5F0E6; font-variant-numeric: tabular-nums; }
.boot__skip {
    position: absolute;
    right: clamp(12px, 2vw, 24px);
    bottom: clamp(12px, 2vw, 24px);
    padding: 14px 18px;
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(201, 214, 232, 0.72);
}
.boot__skip:hover { color: #F5F0E6; }
.boot__stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
}
.boot__mark { width: min(1040px, 100%); max-height: 62vh; overflow: visible; }
.bm-ringtext { font: 500 10.5px var(--sans); letter-spacing: 3px; fill: rgba(201, 214, 232, 0.62); }
.bm-bar { fill: none; stroke: var(--teddy); stroke-width: 2.2; }
.bm-dots { color: var(--sky); }
.bm-labels text { font: 400 15px var(--serif); fill: #F5F0E6; }
.bm-num { color: var(--accent); fill: var(--sky); }
.bm-head { stroke: var(--sky); stroke-width: 1; opacity: 0; }
.boot__word {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    margin-top: clamp(10px, 2vh, 24px);
    font: 400 clamp(2.25rem, 5.4vw, 4.75rem)/1 var(--serif);
    letter-spacing: -0.02em;
    color: #F5F0E6;
}
.boot__word .w { display: inline-block; overflow: hidden; overflow: clip; padding: 0.06em 0 0.14em; }
.boot__word .ch { display: inline-block; }
.boot__word .p { margin-top: 0.5em; font: 500 0.75rem/1 var(--sans); letter-spacing: 0.2em; color: var(--sky); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
    .card__name { font-size: 1.5rem; }
    .facts__list li { grid-column: span 6; }
}

@media (max-width: 860px) {
    .biz__title, .run__title, .set__title, .trade__title, .auto__title { grid-column: 1 / -1; }
    .card { grid-column: 1 / -1; }
    .card:nth-child(2) { margin-top: 0; }
    .card__media { aspect-ratio: 4 / 3; }
    .run__count { grid-column: 1 / -1; justify-self: start; margin-top: 20px; }
    .tile { width: 68vw; }
    .set__cta { grid-column: 1 / -1; justify-self: start; margin-top: 24px; }
    .auto__cta, .auto__note { grid-column: 1 / -1; }
    .auto__note { margin-top: 24px; }
    .ring__stage { --size: 100vw; width: 100vw; }
    .rt { width: 19%; margin: -11.9% 0 0 -9.5%; }
    .ring__title { font-size: 1.5rem; max-width: 10ch; }
    .ring__logo { margin-bottom: 14px; }
    .ring__logo .brand__img { height: 58px; }
    .facts__title, .facts__text { grid-column: 1 / -1; }
    .facts__text { margin-top: 28px; }
    .hud--tr, .hud--bl { display: none; }
    .boot__mark { width: 150%; max-width: none; max-height: none; }
    .bm-labels { display: none; }
    .bm-callouts, .bm-dots { display: none; }
}

@media (max-width: 560px) {
    .tile { width: 78vw; }
    .facts__list li { min-height: 150px; }
    .boot__mark { width: 190%; }
}
