/* Website (Code)/public/assets/css/home-v4.css
   v1  ·  2026-10-30 MYT

   /home-v4 only, on top of v2.css (nav, footer). The home page as a navigator: the structure and scroll of
   rolls-roycemotorcars.com's home page, read live 2026-10-30 (a full-screen picture per slide, the nav laid over it,
   one scroll = one screen), in Apple's type: name 600 in sentence case, then a line, then one pill, sizes stepping
   down at 1068px and 734px. One difference: the slide dots are the services' names. */

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

:root { --nv-h: 72px; }
html:has(.hv4) { scroll-snap-type: y proximity; scroll-padding-top: 0; }
/* Mouse or trackpad: home-v4.js moves a screen at a time and CSS snapping would fight it. Touch: the finger does it. */
@media (pointer: fine) and (prefers-reduced-motion: no-preference) { html.js:has(.hv4) { scroll-snap-type: none; } }
@media (pointer: coarse) and (prefers-reduced-motion: no-preference) { html:has(.hv4) { scroll-snap-type: y mandatory; } }
.hv4 { background: var(--black); }
.hv4 main { color: var(--white); }

/* ─── NAV ─────────────────────────────────────────────────────────────────── */

/* The nav is laid over the first picture. A dark bar means a dark dropdown, as on apple.com's dark pages (Jimmy's
   recording of /iphone-18-pro, 2026-10-30): the flyouts, the phone menu and the curtain below them all turn dark. */

.hv4 .gn { position: absolute; inset: 0 0 auto; }
.hv4 .gn { background: linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); -webkit-backdrop-filter: none; backdrop-filter: none; }
.hv4 .gn__logo img { filter: invert(1); opacity: 1; }
.hv4 .gn__link { color: rgba(255, 255, 255, .84); }
.hv4 a.gn__link:hover, .hv4 .gn__link[aria-current="page"] { color: var(--white); }
.hv4 .gn__link--soon { color: rgba(255, 255, 255, .5); }
.hv4 .gn__icon, .hv4 .gn__icon:hover { color: var(--white); }
.hv4 .gn__burger span { background: var(--white); }
.hv4 .gn__chev { color: rgba(255, 255, 255, .84); }

.hv4 .gn.is-flyout-open, .hv4 .gn.is-open { background: #161617; }
.hv4 .gn__sub { background: #161617; }
.hv4 .gn__sub-head { color: var(--ink-3); }
.hv4 .gn__sub-link { color: var(--on-dark-3); }
.hv4 .gn__sub-link:hover { color: var(--white); }
.hv4 .gn-curtain { background: rgba(0, 0, 0, .48); }

@media (max-width: 833px) {
    .hv4 .gn__list { background: #161617; }
    .hv4 .gn__link { color: var(--on-dark); }
    .hv4 .gn__link--soon { color: var(--ink-2); }
}

/* ─── THE NAVIGATOR ───────────────────────────────────────────────────────── */

.nv { position: relative; }

/* Stuck to the foot of the screen while the slides last, then it leaves with the last one. */
.nv__nav {
    position: sticky; top: calc(100svh - var(--nv-h)); z-index: 5;
    height: var(--nv-h); margin-bottom: calc(var(--nv-h) * -1);
    display: flex; align-items: center;
    padding-inline: max(4vw, 22px);
}
.nv__nav ul {
    flex: 1;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0 clamp(20px, 4vw, 64px);
    border-top: 1px solid rgba(255, 255, 255, .28);
}
.nv__nav a {
    position: relative; display: block; margin-top: -1px; padding: 18px 2px;
    color: rgba(255, 255, 255, .72);
    font-size: 14px; line-height: 1.3; letter-spacing: .01em; white-space: nowrap;
    transition: color .3s var(--ease-standard);
    text-shadow: 0 1px 10px rgba(0, 0, 0, .55);
}
.nv__nav a::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 1px;
    background: var(--white);
    transform: scaleX(0); transition: transform .5s var(--ease-reveal);
}
.nv__nav a:hover, .nv__nav a[aria-current] { color: var(--white); }
.nv__nav a[aria-current]::before { transform: none; }

/* ─── SLIDES ──────────────────────────────────────────────────────────────── */

.nv-slide {
    --tx: 22%; --ty: 68%; --beam-w: 30vw;
    position: relative;
    display: flex; align-items: flex-end; justify-content: center;      /* the words below the faces */
    height: 100svh; min-height: 540px;
    padding: 44px 22px calc(var(--nv-h) + clamp(20px, 6svh, 56px));
    overflow: hidden;
    background: var(--black);
    scroll-snap-align: start; scroll-snap-stop: always;
}

.nv-slide__media { position: absolute; inset: 0; }
.nv-slide__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 9s cubic-bezier(.2, .4, .4, 1); }
.nv-slide.is-active .nv-slide__media img { transform: none; }
.nv-slide__media::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .22) 0, rgba(0, 0, 0, .1) 34%, rgba(0, 0, 0, .78) 82%);
}

.nv-slide__copy {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    text-shadow: 0 1px 24px rgba(0, 0, 0, .35);
}
.js .nv-slide__copy { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-reveal) .15s, transform .9s var(--ease-reveal) .15s; }
.js .nv-slide.is-active .nv-slide__copy { opacity: 1; transform: none; }
.nv-slide__name { font-size: 80px; line-height: 1.05; font-weight: 600; letter-spacing: -0.015em; }
.nv-slide__line { margin-top: 8px; font-size: 28px; line-height: 1.14286; letter-spacing: .007em; }
.nv-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; margin-top: 22px; padding: 12px 22px;
    border-radius: 980px;
    background: var(--white); color: var(--ink);
    font-size: 17px; line-height: 1.17648; letter-spacing: -0.022em;
    text-shadow: none;
    transition: background-color .3s var(--ease-standard);
}
.nv-btn:hover { background: var(--platter); }

/* ─── RENTAL ──────────────────────────────────────────────────────────────── */

.nv-slide--car { align-items: flex-start; padding-block: clamp(84px, 13svh, 128px) var(--nv-h); }
.nv-car { position: absolute; inset: auto 0 calc(var(--nv-h) + 1svh); height: 60%; }
.nv-car img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.nv-car__lit { display: none; }
.is-dark .nv-car__dim { filter: brightness(.36) contrast(1.05); animation: nv-dawn 2.2s .2s var(--ease-reveal) backwards; }
.is-dark .nv-car__lit {
    display: block;
    filter: brightness(2.6) contrast(1.08) sepia(.28);
    -webkit-mask-image: radial-gradient(ellipse var(--beam-w) 44vh at var(--tx) calc(var(--ty) * 1.35 - 34%), var(--black) 0, rgba(0, 0, 0, .72) 34%, transparent 100%);
            mask-image: radial-gradient(ellipse var(--beam-w) 44vh at var(--tx) calc(var(--ty) * 1.35 - 34%), var(--black) 0, rgba(0, 0, 0, .72) 34%, transparent 100%);
    animation: nv-fade 1.8s .9s linear backwards;
}
.is-dark::before {
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(ellipse calc(var(--beam-w) + 4vw) 46vh at var(--tx) var(--ty), rgba(212, 178, 117, .15), transparent 100%);
    mix-blend-mode: screen;
}
@keyframes nv-dawn { from { filter: brightness(0) contrast(1.05); } }
@keyframes nv-fade { from { opacity: 0; } }

/* ─── EXPLORE FURTHER ─────────────────────────────────────────────────────── */

.nv-more { position: relative; z-index: 6; padding: 88px max(4vw, 22px) 96px; background: var(--black); scroll-snap-align: start; }   /* over the navigator as it leaves */
.nv-more__title { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -0.01em; text-align: center; }
.nv-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 1400px; margin: 40px auto 0; }
.nv-tile a { position: relative; display: block; aspect-ratio: 45 / 32; border-radius: 18px; overflow: hidden; background: var(--ink); }
.nv-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-reveal); }
.nv-tile a:hover img, .nv-tile a:focus-visible img { transform: scale(1.04); }
.nv-tile a::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .66) 100%); }
.nv-tile__name { position: absolute; inset: auto 20px 16px; z-index: 1; display: inline-flex; align-items: center; gap: .4em; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */

.hv4 .gf { --hair: #2c2c2e; background: var(--black); color: rgba(255, 255, 255, .62); scroll-snap-align: end; }
.hv4 .gf a { color: rgba(255, 255, 255, .8); }
.hv4 .gf a:hover { color: var(--white); }
.hv4 .gf__wrap { padding-top: 28px; border-top: 1px solid var(--hair); }
.hv4 .gf__col summary { color: var(--white); }

/* ─── SMALLER SCREENS ───────────────────────────────────────────────────── */

@media (max-width: 1068px) {
    .nv-slide__name { font-size: 64px; }
    .nv-slide__line { font-size: 24px; }
}

/* ─── PHONES ──────────────────────────────────────────────────────────────── */

@media (max-width: 734px) {
    .nv-slide__name { font-size: 44px; }
    .nv-slide__line { font-size: 19px; line-height: 1.21; }
}

@media (max-width: 833px) {
    :root { --nv-h: 92px; }
    .nv__nav { padding-inline: 12px; }
    .nv__nav ul { gap: 0 16px; padding-top: 2px; }
    .nv__nav a { padding: 11px 2px 10px; font-size: 13px; letter-spacing: 0; }
    .nv-slide { --beam-w: 62vw; padding-bottom: calc(var(--nv-h) + 24px); }
    .nv-slide--car { padding-top: 96px; }
    .nv-car { inset: auto -35vw calc(var(--nv-h) + 3svh); height: 44%; }
    .is-dark .nv-car__dim { filter: brightness(.6) contrast(1.05); }
    .nv-more { padding-block: 64px 72px; }
    .nv-more__title { font-size: 32px; }
    .nv-tiles { gap: 8px; margin-top: 28px; }                 /* still three across: stacked, a tablet's tiles would be a screen each */
    .nv-tile a { aspect-ratio: 1; }
    .nv-tile__name { inset: auto 14px 12px; font-size: 17px; }

    /* A wide photo on a tall screen: the frame goes to the car, not the middle of the picture. */
    #subscription .nv-slide__media img {
        height: 80%; object-position: 88% 62% !important;
        -webkit-mask-image: linear-gradient(180deg, var(--black) 86%, transparent); mask-image: linear-gradient(180deg, var(--black) 86%, transparent);
    }
    #driver .nv-slide__media img { object-position: 97% 18% !important; }
}

@media (max-width: 560px) {
    .nv-tiles { grid-template-columns: 1fr; gap: 12px; }
    .nv-tile a { aspect-ratio: 16 / 10; }
    .nv-tile__name { inset: auto 18px 14px; font-size: 21px; }
}

/* ─── PREFERENCES ─────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .nv-slide__media img { transform: none; transition: none; }
    .js .nv-slide__copy { opacity: 1; transform: none; transition: none; }
    .nv-tile img, .nv__nav a::before { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
    .hv4 .gn { background: var(--black); }
    .nv-btn { background: var(--white); }
}
