/* Website round 4 (3 November 2026), on top of r2.css and r3.css: the big globe turns with trips' covers pinned to it, a
   little more motion where the page was still (hover lifts, slow parallax, words that slide in), a frame around the plane
   of trips on phones so no drag starts at the screen's edge, and /trips. Motion is transform, translate, scale and opacity
   only, and none of it runs under Reduce Motion. */

:root { --plane-frame: rgb(23 106 110 / 0.30); --plane-fill: rgb(255 255 255 / 0.45); --pin-ring: #FBF6EC; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --plane-frame: rgb(140 207 200 / 0.30); --plane-fill: rgb(255 255 255 / 0.03); --pin-ring: #F4EEE3; }
}
:root[data-theme="dark"] { --plane-frame: rgb(140 207 200 / 0.30); --plane-fill: rgb(255 255 255 / 0.03); --pin-ring: #F4EEE3; }

/* MARK: The big globe's pins (js/home.js moves them with the map) */

.orb.live .earth { transition: none; }
.globe-pins { --size: 480px; position: absolute; left: 50%; top: 80px; z-index: 2; width: var(--size); height: var(--size); border-radius: 50%; overflow: hidden;
  pointer-events: none; transform: translateX(-50%); }
.gpin { position: absolute; left: 0; top: 0; width: 44px; height: 44px; pointer-events: auto; will-change: transform, opacity; visibility: hidden; }
.gpin span { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 50%; background: #24434D;
  box-shadow: 0 0 0 2.5px var(--pin-ring), 0 6px 16px rgb(2 14 30 / 0.45); transition: transform 0.25s var(--ease); }
.gpin img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s; }
.gpin img.ok { opacity: 1; }
.gpin:hover span, .gpin:focus-visible span { transform: scale(1.3); }
@media (max-width: 1020px) { .globe-pins { --size: 300px; top: 70px; } .gpin { width: 36px; height: 36px; } }
@media (max-width: 820px) { .globe-pins { --size: 270px; } }

/* MARK: The plane of trips: never a browser gesture */

/* A drag on the plane never becomes back, forward or pull-to-refresh: up and down starts the page's own scroll (pan-y),
   sideways starts the plane, which then follows the finger both ways (js/home.js). Contained sideways only: .plane clips
   (overflow: hidden makes it a scroll container), and containing it up and down too would swallow the page's own scroll
   on every swipe that starts on it (measured at 390 px with touch emulation, 3 November). */
.plane, .plane-view { overscroll-behavior: contain auto; }
.plane-view { touch-action: pan-y pinch-zoom; }
.plane.still .plane-view { touch-action: auto; }
.plane-more { margin: 18px 0 0; }
/* Phones: the plane sits in a rounded frame 24 px in from each side, so no drag starts at the screen's edge, where the
   browser's swipe back lives. */
@media (max-width: 820px) {
  .plane { margin-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right)); border-radius: 22px;
    background: var(--plane-fill); -webkit-mask-image: none; mask-image: none; }
  .plane::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 2px var(--plane-frame); }
  .plane .plane-view:focus-visible { box-shadow: none; }
  .plane:has(.plane-view:focus-visible)::after { box-shadow: inset 0 0 0 3px var(--teal-text); }
}

/* MARK: /trips */

.trips-page { padding-bottom: 72px; }
.trips-page .page-head { padding-bottom: 18px; }
.tfilters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; align-items: end; margin: 6px 0 14px; }
.tf-search { grid-column: 1 / -1; }
.tfilters label { display: block; margin-bottom: 6px; font-weight: 650; font-size: 14px; color: var(--muted); }
.tfilters input, .tfilters select { width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: var(--radius-sm); background: var(--card); color: var(--ink);
  font: 16px/1.3 var(--font); box-shadow: inset 0 0 0 1px var(--card-line); }
.tfilters input:focus-visible, .tfilters select:focus-visible { outline: 2px solid var(--teal-text); outline-offset: 2px; }
.tfilters input::placeholder { color: var(--faint); }
.tf-q-row { display: flex; gap: 10px; }
.tf-q-row input { flex: 1; min-width: 0; }
.tf-q-row .btn { flex: none; min-height: 48px; }
.tfilters .hint { color: var(--muted); }
.tf-clear { grid-column: 1 / -1; min-height: 0; }
.tf-clear .btn { padding-inline: 0; color: var(--teal-text); font-weight: 700; }
.tstatus { min-height: 1.5em; margin: 4px 0 16px; color: var(--muted); font-weight: 650; }
.tstatus b { color: var(--ink); }
.tgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px 18px; }
.tcard a { display: block; color: var(--ink); text-decoration: none; border-radius: 18px; }
.tcard a:focus-visible { outline: 3px solid var(--teal-text); outline-offset: 4px; }
.tc-img { display: block; aspect-ratio: 16 / 11; overflow: hidden; border-radius: 18px; background: #24434D; box-shadow: 0 10px 26px rgb(0 10 14 / 0.14); }
.tc-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; font: 700 17px/1.28 var(--serif); }
.tcard a:hover .tc-title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.tc-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: 14px; color: var(--muted); }
.tc-meta b { font-weight: inherit; }
.tmore { display: flex; justify-content: center; margin: 34px 0 6px; }
.tback { margin: 40px 0 0; text-align: center; }
.tall { columns: 2 280px; column-gap: 32px; margin: 26px 0 0; padding: 0; list-style: none; }
.tall li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--rule); }
:is(:lang(ja), :lang(ko), :lang(zh), :lang(th), :lang(ar)) .tc-title { font-family: var(--font); }
@media (max-width: 820px) {
  .tfilters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 620px) {
  .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .tc-img { border-radius: 14px; }
  .tc-title { font-size: 15px; }
  .tc-meta { font-size: 13px; }
}
@media (max-width: 380px) { .tf-q-row { flex-wrap: wrap; } .tf-q-row .btn { width: 100%; } }

/* MARK: A little more motion (none under Reduce Motion) */

@media (prefers-reduced-motion: no-preference) {
  /* Hover lifts: things you can open rise a little toward you. */
  .tcard a { transition: transform 0.35s var(--ease); }
  .tcard a:hover { transform: translate3d(0, -4px, 0); }
  .tc-img img { transition: transform 0.6s var(--ease); }
  .tcard a:hover .tc-img img { transform: scale(1.05); }
  .ptile img { transition: opacity 0.4s, transform 0.6s var(--ease); }
  .ptile:hover img { transform: scale(1.06); }
  .look .ph, .vis .ph { transition: translate 0.4s var(--ease); }
  .look:hover .ph, .vis .ph:hover { translate: 0 -6px; }
  .store-cta, .btn-accent, .btn-band { transition: transform 0.25s var(--ease); }
  :is(.store-cta, .btn-accent, .btn-band):not([aria-disabled="true"]):hover { transform: translate3d(0, -2px, 0); }
  .link-arrow .i { transition: translate 0.25s var(--ease); }
  .link-arrow:hover .i { translate: 4px 0; }
  [dir="rtl"] .link-arrow:hover .i { translate: -4px 0; }
  :is(.priv-grid, .inputs, .avail, .keeps) li .i { transition: translate 0.3s var(--ease), scale 0.3s var(--ease); }
  :is(.priv-grid, .inputs, .avail, .keeps) li:hover .i { translate: 0 -2px; scale: 1.1; }

  /* Cards /trips adds come in one after another. */
  .tcard.new { animation: card-in 0.55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }

  @supports (animation-timeline: view()) {
    /* Slow parallax: the opening's notes drift up at their own speeds as the page leaves it, the second phone of each
       pair lags its first, and the stars move slower than the words. */
    .opening .chip { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    .opening .k1 { --drift: -40px; } .opening .k2 { --drift: -90px; } .opening .k3 { --drift: -60px; } .opening .k4 { --drift: -24px; }
    .opening .stars { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; --drift: 60px; }
    .vis > .ph:nth-child(2), .vis > .pic:nth-child(2) { animation: lag linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    /* Words that slide in: a kicker's second part follows its first; each scene's caption under its picture. */
    .act .kicker .k2 { display: inline-block; animation: slide-in linear both; animation-timeline: view(); animation-range: entry 20% entry 90%; }
    [dir="rtl"] .act .kicker .k2 { animation-name: slide-in-rtl; }
    .act .cap { animation: fade-up linear both; animation-timeline: view(); animation-range: entry 10% entry 80%; }
    .page-trips .page-head > * { animation: fade-up linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    .site-footer .footer-col { animation: fade-up linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  }
}
@keyframes drift { to { translate: 0 var(--drift, -40px); } }
@keyframes lag { from { translate: 0 34px; } to { translate: 0 -34px; } }
@keyframes slide-in { from { opacity: 0; translate: -14px 0; } }
@keyframes slide-in-rtl { from { opacity: 0; translate: 14px 0; } }
@keyframes fade-up { from { opacity: 0; translate: 0 18px; } }
@keyframes card-in { from { opacity: 0; transform: translate3d(0, 16px, 0); } }

@media (prefers-reduced-motion: reduce) {
  .gpin span, .gpin img { transition: none !important; }
  .tcard.new { animation: none !important; }
}

/* /outline-sources (scripts/site-parts.mjs, outlineSources): a long table that scrolls sideways on a phone. */
.page-outline-sources .os-table { min-width: 640px; }
.page-outline-sources .os-table td { vertical-align: top; overflow-wrap: anywhere; }
/* Country and Level break between words only, never inside one ("Provin/ces" on a phone). */
.page-outline-sources .os-table td:nth-child(-n+2) { overflow-wrap: normal; }
.page-outline-sources .os-table td:nth-child(2) { white-space: nowrap; }
.page-outline-sources .os-notes { padding: 36px 0 64px; }
.page-outline-sources .os-notes li { margin-bottom: 10px; max-width: 70ch; }
.page-outline-sources .os-notes li[dir="ltr"] { text-align: start; }
:lang(ar) .page-outline-sources .os-notes li[dir="ltr"] { text-align: left; }

/* MARK: The 404 page (website sweep, 11 November: it was one line on empty cream): the compass art, the trips' search and
   three Made by Perager trips. */
.nf-page { padding-bottom: 72px; }
.nf-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.nf-rose { display: block; width: 132px; aspect-ratio: 1; background: center / contain no-repeat url(/art/looks/web/arrow-rose-light-360.webp); }
:root[data-theme="dark"] .nf-rose { background-image: url(/art/looks/web/arrow-rose-dark-360.webp); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nf-rose { background-image: url(/art/looks/web/arrow-rose-dark-360.webp); } }
.nf-search { max-width: 720px; margin: 6px 0 44px; }
.nf-trips h2 { font-size: clamp(26px, 3vw, 36px); margin: 4px 0 22px; }
.nf-trips .tgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; }
.nf-trips .tback { margin-top: 26px; }
@media (max-width: 620px) {
  .nf-head { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .nf-rose { width: 96px; }
  /* On a phone the three trips are rows: the cover beside its words. */
  .nf-trips .tgrid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .nf-trips .tcard a { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; }
  .nf-trips .tc-title { margin-top: 0; }
}
