/* 05 options (?combo=) and the 04 > 05 hand-over options (?slide=), js/combo-options.js. Nothing applies without a switch. */

/* ================= the premium sea chart: three depth layers ================= */
/* far (0.35 of the slide's speed): the water itself, with deeper channels */
.cx-far, .cx-near { position: absolute; left: 0; top: 0; height: 100%; z-index: 0; visibility: hidden; pointer-events: none; will-change: transform; }
.cx-far.is-on, .cx-near.is-on { visibility: visible; }
.cx-far { background: linear-gradient(180deg, #EAF7F3 0%, #D8F1EE 50%, #C6EAE8 100%); }
.cx-deep { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(70, 172, 188, .2), rgba(70, 172, 188, 0)); }
/* the chart (0.6): transparent ink over the water */
html[data-combo] .chart.cx-chart { background: none; }
.cx-svg { display: block; }
.cx-svg .cg { stroke: rgba(15, 59, 64, .075); stroke-width: .7; }
.cx-svg .cl { font: 500 9px var(--mono); letter-spacing: .1em; fill: rgba(15, 59, 64, .36); }
.cx-svg .cc0 { fill: rgba(255, 253, 246, .3); stroke: rgba(15, 59, 64, .22); stroke-width: .8; }
.cx-svg .cc1 { fill: none; stroke: rgba(15, 59, 64, .16); stroke-width: .7; }
.cx-svg .cc2 { fill: none; stroke: rgba(15, 59, 64, .12); stroke-width: .7; stroke-dasharray: 4 3; }
.cx-svg .cc3 { fill: none; stroke: rgba(15, 59, 64, .09); stroke-width: .7; }
.cx-svg .cc4 { fill: none; stroke: rgba(15, 59, 64, .06); stroke-width: .7; stroke-dasharray: 2 4; }
.cx-svg .cay { fill: #F4E6C4; stroke: rgba(15, 59, 64, .3); stroke-width: .7; }
.cx-svg .cs { font: italic 500 9.5px var(--body); fill: rgba(15, 59, 64, .32); text-anchor: middle; }
.cx-svg .cr2 { stroke: rgba(15, 59, 64, .055); stroke-width: .7; }
.cx-rose .cr { fill: rgba(255, 253, 246, .45); stroke: rgba(15, 59, 64, .38); stroke-width: 1; }
.cx-rose .cr--in { fill: none; stroke-width: .6; }
.cx-rose .ct { stroke: rgba(15, 59, 64, .4); stroke-width: .6; }
.cx-rose .cd { font: 500 6.5px var(--mono); fill: rgba(15, 59, 64, .45); text-anchor: middle; }
.cx-rose .cn { fill: #D2A54E; }
.cx-rose .cm { fill: rgba(15, 59, 64, .62); }
.cx-rose .cq { fill: rgba(15, 59, 64, .25); }
.cx-rose .cc { fill: var(--ink); }
.cx-rose .cN { font: italic 800 14px var(--display); fill: #C08F35; text-anchor: middle; }
.cx-cart rect { fill: rgba(255, 252, 244, .86); stroke: rgba(15, 59, 64, .42); stroke-width: 1; }
.cx-cart rect.in { fill: none; stroke: rgba(15, 59, 64, .22); stroke-width: .6; }
.cx-cart .t1 { font: italic 800 19px var(--display); letter-spacing: -.01em; fill: var(--ink); text-anchor: middle; }
.cx-cart .t2 { font: 500 8px var(--mono); letter-spacing: .2em; fill: rgba(15, 59, 64, .55); text-anchor: middle; }
/* near (0.85): soft cloud shadows and a few birds, each drifting on its own */
.cx-cloud { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(16, 72, 84, .1), rgba(16, 72, 84, 0)); animation: cx-drift 30s ease-in-out infinite alternate; }
@keyframes cx-drift { from { translate: 0 0; } to { translate: 140px 26px; } }
.cx-bird { position: absolute; width: 18px; height: 7px; animation: cx-fly 9s ease-in-out infinite alternate;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 7'%3E%3Cpath d='M1 6 Q5 0 9 5 Q13 0 17 6' fill='none' stroke='%230F3B40' stroke-opacity='.45' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
@keyframes cx-fly { 0% { translate: 0 0; scale: 1 1; } 25% { scale: 1 .55; } 50% { translate: 60px -14px; scale: 1 1; } 75% { scale: 1 .6; } 100% { translate: 120px 4px; scale: 1 1; } }

/* ================= island hopping, drawn (relief, low angle) ================= */
.spread--hop .ir0 { fill: none; stroke: rgba(15, 59, 64, .17); stroke-width: .9; }
.spread--hop .ir1 { fill: none; stroke: rgba(15, 59, 64, .12); stroke-width: .8; }
.spread--hop .ir2 { fill: none; stroke: rgba(15, 59, 64, .09); stroke-width: .7; stroke-dasharray: 4 3; }
.spread--hop .ir3 { fill: none; stroke: rgba(15, 59, 64, .06); stroke-width: .7; }
.spread--hop .ishal { fill: rgba(150, 228, 222, .55); }
.spread--hop .isurf { fill: rgba(255, 255, 255, .9); }
.spread--hop .ishadow { fill: rgba(10, 60, 60, .2); }
.spread--hop .isand { stroke: rgba(190, 150, 90, .4); stroke-width: 1; }
.spread--hop .icanopy { opacity: .25; }
/* a spread that has left the screen: its stamp goes (it used to poke in at the left edge) */
html[data-combo] .spread.cx-past .pstamp { visibility: hidden !important; }
#cxCrown .mid { fill: none; stroke: rgba(22, 58, 34, .5); stroke-width: 1.1; }
/* the island map and the cards are their own layers, so a floating card never repaints the drawn islands */
html[data-combo] .spread--hop .hop__map { will-change: transform; }
html[data-combo] .spread .scard, html[data-combo] .spread .pstamp, html[data-combo] .spread__title, html[data-combo] .spread__note { will-change: translate, rotate; }
/* the footprints, a little finer on the new maps */
html[data-combo] .hs.on { opacity: .5; }

/* ================= low angle ================= */
html[data-combo="lowangle"] .spread--hop .hop__map { will-change: transform; }
.lo-palms { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.lo-palm { position: absolute; width: auto; translate: -50% 0; transform-origin: 50% 100%; filter: saturate(1.05) drop-shadow(0 2px 3px rgba(10, 40, 40, .18)); }
html[data-combo="lowangle"] .spread--hop .scard { box-shadow: 0 30px 50px rgba(10, 50, 60, .28), 0 4px 10px rgba(10, 50, 60, .18); }

/* ================= 04 > 05 hand-over ================= */
/* lift off: the desk becomes a postcard on the chart */
html[data-slide-ho="rise"] .desk { transform-origin: 50% 50%; }
html[data-slide-ho="rise"] .desk.is-card { outline: calc(14px * var(--lift)) solid #FFFDF8; box-shadow: 0 calc(50px * var(--lift)) calc(90px * var(--lift)) rgba(15, 59, 64, calc(.3 * var(--lift))); z-index: 3; }
/* page turn: the desk is a page, its back is the journal's next page */
html[data-slide-ho="page"] .slide { perspective: 2600px; }
html[data-slide-ho="page"] .desk { transform-origin: 0 50%; }
html[data-slide-ho="page"] .desk.is-turning { z-index: 5; }
html[data-slide-ho="page"] .desk::after { content: ""; position: absolute; inset: 0; z-index: 60; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(10, 40, 40, 0), rgba(10, 40, 40, .9)); }
html[data-slide-ho="page"] .desk.is-turning::after { opacity: var(--shade); }
.cx-back { position: absolute; inset: 0; z-index: 40; display: none; transform: scaleX(-1); background: #FFF8EA; }
html[data-slide-ho="page"] .desk.is-back > :not(.cx-back) { visibility: hidden; }
html[data-slide-ho="page"] .desk.is-back .cx-back { display: block; }
.cx-back__lines { position: absolute; left: 8%; right: 8%; top: 22%; bottom: 18%;
  background: repeating-linear-gradient(180deg, transparent 0 46px, rgba(15, 59, 64, .12) 46px 47px); }
.cx-back__hand { position: absolute; left: 10%; top: 30%; margin: 0; font-family: var(--hand); font-size: clamp(22px, 2.6vw, 38px); color: var(--accent); transform: rotate(-3deg); }
.cx-back__mono { position: absolute; left: 10%; bottom: 10%; margin: 0; font: 500 11px var(--mono); letter-spacing: .2em; color: rgba(15, 59, 64, .5); }

@media (max-width: 760px) {
  .cx-svg .cl { font-size: 7.5px; }
  html[data-slide-ho="rise"] .desk.is-card { outline-width: calc(8px * var(--lift)); }
}
