/* Sandlines: www.redcar-rocks.com/sandlines/
   Quiet and clean (after rippleplayer.com, quieter still): a soft sand-white page, one idea per section, light type,
   lots of room, and the beach itself as the pictures. Night navy in dark mode, where the films and stills turn to night.
   The 3D Duo in the hero is css/duo.css (index.html only). */

@font-face { font-family: "Source Sans 3"; src: url("../fonts/SourceSans3.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #F5F2EC;           /* dry sand in soft light */
  --bg-2: #EDE8DE;
  --ink: #1F2B31;
  --ink-2: #56636B;
  --ink-3: #616C73;            /* 4.8:1 on --bg (was #7E888E, 3.2:1) */
  --sea: #0C7174;          /* links and small accents: 5.2:1 on --bg (was #0F8589, 4.0:1) */
  --rule: rgb(31 43 49 / .12);
  --pill: rgb(255 255 255 / .7);
  --shade: 31 43 49;
  --font: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1120px;
  --gap: clamp(112px, 15vw, 200px);
  --ease: cubic-bezier(.25, .8, .25, 1);
}
/* Night: the page follows the film (html.night while it shows night, html.day while day; js/site.js), so it dims
   with the sunset and brightens at dawn. Without the film, or with reduced motion, it follows the system setting. */
@media (prefers-color-scheme: dark) {
  :root:not(.day) {
    --bg: #0B121C;
    --bg-2: #0F1824;
    --ink: #E7ECEE;
    --ink-2: #A3B0B7;
    --ink-3: #84929A;
    --sea: #6FD3D0;
    --rule: rgb(231 236 238 / .12);
    --pill: rgb(255 255 255 / .06);
    --shade: 0 0 0;
  }
}
:root.night {
    --bg: #0B121C;
    --bg-2: #0F1824;
    --ink: #E7ECEE;
    --ink-2: #A3B0B7;
    --ink-3: #84929A;
    --sea: #6FD3D0;
    --rule: rgb(231 236 238 / .12);
    --pill: rgb(255 255 255 / .06);
    --shade: 0 0 0;
}
/* (registered, so the colours fade rather than jump) */
@property --bg { syntax: "<color>"; inherits: true; initial-value: #F5F2EC; }
@property --bg-2 { syntax: "<color>"; inherits: true; initial-value: #EDE8DE; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #1F2B31; }
@property --ink-2 { syntax: "<color>"; inherits: true; initial-value: #56636B; }
@property --ink-3 { syntax: "<color>"; inherits: true; initial-value: #616C73; }
@property --sea { syntax: "<color>"; inherits: true; initial-value: #0C7174; }
@property --rule { syntax: "<color>"; inherits: true; initial-value: rgb(31 43 49 / .12); }
@property --pill { syntax: "<color>"; inherits: true; initial-value: rgb(255 255 255 / .7); }
@media (prefers-reduced-motion: no-preference) {
  :root.follows { transition: --bg 3.2s ease, --bg-2 3.2s ease, --ink 3.2s ease, --ink-2 3.2s ease, --ink-3 3.2s ease, --sea 3.2s ease, --rule 3.2s ease, --pill 3.2s ease; }
}
/* the day and night pictures cross over gently too */
picture img { transition: opacity .9s ease; }
picture img.swapping { opacity: 0; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); font: 300 18px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video, canvas, picture { display: block; max-width: 100%; }
main img { height: auto; }
picture img { width: 100%; height: auto; }
a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* Links inside a sentence are underlined, not only coloured (WCAG 1.4.1): a fine line, full strength on hover. */
:is(p, li) a:not([class]) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); }
:is(p, li) a:not([class]):hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 4px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 500; }
.skip:focus { left: 8px; }
h1, h2, h3, p, figure { margin: 0; }
main ul { margin: 0; padding: 0; list-style: none; }

/* Header: the mark and two quiet links. */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: 22px max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 300; font-size: 14px; letter-spacing: .32em; text-transform: uppercase; }
.mark:hover { text-decoration: none; }
.mark img { border-radius: 7px; }
.top nav { display: flex; gap: 20px; font-size: 15px; font-weight: 400; }
.top nav a { color: var(--ink-2); padding-block: 10px; }

.wrap { overflow-x: clip; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }

/* Type: light and unhurried. */
h1 { font-weight: 300; font-size: clamp(40px, 7.2vw, 82px); line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-weight: 300; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.small { font-size: 15px; line-height: 1.6; color: var(--ink-3); }

/* Hero: centred, the icon, the line, the price, then the Duo. */
.hero { display: grid; justify-items: center; text-align: center; padding-top: clamp(56px, 9vw, 104px); }
.hero__icon { width: clamp(72px, 9vw, 96px); height: auto; border-radius: 22%; box-shadow: 0 18px 40px -22px rgb(var(--shade) / .45); }
.hero h1 { margin-top: clamp(28px, 4vw, 40px); max-width: 13em; }
.hero .lede { margin-top: 20px; max-width: 26em; }
.buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: 32px; }
.soon { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px; background: var(--pill);
  box-shadow: inset 0 0 0 1px var(--rule); font-size: 15px; font-weight: 400; color: var(--ink); }
.soon img { width: 24px; height: 24px; border-radius: 6px; }
/* The App Store button and the price: the studio's pattern (Tuppenny Tumble, Mallet Mayhem), in Sandlines' quiet voice. */
.store { display: inline-grid; align-content: center; justify-items: center; text-align: center; min-height: 58px; padding: 9px 28px 10px;
  border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms var(--ease); }
.store small { font-size: 12.5px; line-height: 1; font-weight: 500; letter-spacing: .04em; }
.store span { font-size: 21px; line-height: 1.15; font-weight: 600; letter-spacing: -.005em; }
.store:hover { color: var(--bg); transform: translateY(-1px); box-shadow: 0 12px 22px -12px rgb(var(--shade) / .55); }
.store:active { transform: translateY(1px); box-shadow: none; }
.ticket { display: grid; justify-items: start; gap: 4px; text-align: left; }
.ticket .price { font-size: clamp(32px, 3vw, 40px); line-height: 1; font-weight: 300; letter-spacing: -.01em; color: var(--ink); }
.ticket .treat { font-size: 14px; line-height: 1.25; font-weight: 400; color: var(--ink-2); }
.hero .duo-figure { margin-top: clamp(40px, 6vw, 72px); }

/* Pause / Sound under the Duo: small frosted pills. */
.film { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px 8px 12px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--pill); color: var(--ink); font: 400 14px/1 var(--font); letter-spacing: .02em; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: border-color 200ms var(--ease); }
.film:hover { border-color: var(--ink-3); }
.film__icon { flex: none; width: 13px; height: 13px; fill: currentColor; }
.sound .film__icon { width: 15px; height: 15px; }
.film__icon--play, .sound__icon--on { display: none; }
.film[aria-pressed="true"] .film__icon--pause { display: none; }
.film[aria-pressed="true"] .film__icon--play { display: block; }
.sound[aria-pressed="true"] .sound__icon--off { display: none; }
.sound[aria-pressed="true"] .sound__icon--on { display: block; }
.sound[aria-pressed="true"] .film__icon--play { display: none; }

/* Three lines drawn in the sand, after the hero and before the end. */
.lines { display: block; width: min(100%, 240px); height: 30px; margin: var(--gap) auto 0; fill: none; stroke: var(--ink-3); stroke-width: 1.1; stroke-linecap: round; opacity: .55; }

/* Sections: words beside a picture, alternating; or centred. */
.row { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; padding-top: var(--gap); }
.row__text { display: grid; gap: 18px; max-width: 30em; }
@media (min-width: 900px) {
  .row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .row--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .row--flip .row__text { order: 2; }
}
.still { border-radius: clamp(18px, 2.4vw, 28px); overflow: hidden; box-shadow: 0 40px 70px -48px rgb(var(--shade) / .55), 0 0 0 1px var(--rule); background: var(--bg-2); }
.still--wide { width: min(100%, 900px); margin-top: clamp(36px, 5vw, 56px); }

.notes { display: grid; margin-top: 12px; border-top: 1px solid var(--rule); }
.notes li { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.notes b { font-weight: 500; font-size: 16px; }
.notes span { font-size: 15px; color: var(--ink-2); }

.skies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px); }
.skies li { display: grid; gap: 10px; }
.skies img { border-radius: 16px; box-shadow: 0 0 0 1px var(--rule); }
.skies span { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); text-align: center; }

.centre { display: grid; justify-items: center; text-align: center; padding-top: var(--gap); }
.centre .lede { margin-top: 20px; max-width: 32em; }

/* Made for every iPhone: the Duo and a Pro Max side by side, at the same height (as they are in life), in Apple's frames. */
.phones { display: flex; justify-content: center; align-items: flex-end; gap: clamp(16px, 3vw, 40px); margin-top: clamp(36px, 5vw, 56px); width: 100%; }
.phones img { height: clamp(240px, 46vw, 560px); width: auto; filter: drop-shadow(0 30px 34px rgb(var(--shade) / .22)); }
@supports (animation-timeline: view()) { @media (prefers-reduced-motion: no-preference) {
  .phones img { animation: sl-from-left linear both; animation-timeline: view(); animation-range: entry 0% cover 34%; }
  .phones img + img { animation-name: sl-from-right; }
} }

.four { display: grid; gap: clamp(24px, 3vw, 40px); margin-top: clamp(40px, 5vw, 64px); text-align: left; width: 100%; }
@media (min-width: 720px) { .four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.four li { display: grid; align-content: start; gap: 8px; padding-top: 18px; border-top: 1px solid var(--rule); }
.four b { font-weight: 500; font-size: 17px; }
.four span { font-size: 16px; color: var(--ink-2); }

/* Apple Watch: Apple's Series 11 bezel (Apple Design Resources) around a real picture of the beach. */
.watch { display: grid; justify-items: center; }
.watch img { width: min(62vw, 300px); filter: drop-shadow(0 34px 40px rgb(var(--shade) / .28)); }

.facts { display: grid; width: min(100%, 560px); }
.facts li { padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: clamp(19px, 1.8vw, 22px); }
.facts li:first-child { border-top: 1px solid var(--rule); }

.end { padding-bottom: clamp(40px, 6vw, 80px); }
.end .lines { margin-top: 0; margin-bottom: 36px; }

.pagefoot { display: grid; gap: 6px; justify-items: center; text-align: center; padding: clamp(48px, 7vw, 88px) 0 calc(40px + env(safe-area-inset-bottom));
  margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-3); }
.pagefoot nav { display: flex; gap: 22px; margin-top: 10px; }

/* Also from Redcar Rocks Studio: the four games, after the last word and before the footer. Soft cards in the
   page's own voice; the games' logos bring their own colour. */
.sibs { display: grid; gap: clamp(28px, 4vw, 40px); padding-top: clamp(72px, 10vw, 128px); }
.sibs__head { display: grid; justify-items: center; gap: 10px; text-align: center; }
.sibs__by { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.sibs__by img { width: 24px; height: 24px; }
.sibs h2 { font-size: clamp(28px, 3.4vw, 40px); }
.sibs__list { display: grid; gap: clamp(14px, 1.6vw, 20px); }
@media (min-width: 560px) { .sibs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .sibs__list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sib { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 20px 22px; border-radius: 22px; text-align: center;
  background: var(--pill); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink); text-decoration: none;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.sib:hover { text-decoration: none; transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--rule), 0 22px 36px -26px rgb(var(--shade) / .5); }
.sib__logo { width: auto; max-width: min(200px, 80%); height: 120px; object-fit: contain; margin-bottom: 10px; }
.sib b { font-weight: 500; font-size: 18px; line-height: 1.25; }
.sib span { font-size: 15px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.sib em { margin-top: auto; padding-top: 6px; font-style: normal; font-weight: 400; font-size: 15px; color: var(--sea);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); }
.sib:hover em { text-decoration-color: currentColor; }
@media (prefers-reduced-motion: reduce) { .sib:hover { transform: none; } }

/* Things arrive as you scroll to them: CSS scroll-driven animations, each tied to its own place in the view (no
   script). Words rise, pictures slide in from their side, list rows follow one another. Browsers without
   animation-timeline, and reduced motion, simply show everything. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .row__text > :not(ul), .centre > h2, .centre > .lede, .lines,
    .notes li, .four li, .facts li, .skies li, .sibs__head, .sibs__list {
      animation: sl-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 28%;
    }
    .row .still, .row .watch { animation: sl-from-right linear both; animation-timeline: view(); animation-range: entry 0% cover 34%; }
    .row--flip .still, .row--flip .watch { animation-name: sl-from-left; }
    .centre > .still { animation: sl-settle linear both; animation-timeline: view(); animation-range: entry 0% cover 34%; }
    .notes li:nth-child(2), .four li:nth-child(2), .facts li:nth-child(2), .skies li:nth-child(2) { animation-range: entry 6% cover 32%; }
    .notes li:nth-child(3), .four li:nth-child(3), .facts li:nth-child(3), .skies li:nth-child(3) { animation-range: entry 12% cover 36%; }
    .notes li:nth-child(4), .four li:nth-child(4), .facts li:nth-child(4), .skies li:nth-child(4) { animation-range: entry 18% cover 40%; }
  }
}
@keyframes sl-rise      { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes sl-from-right { from { opacity: 0; transform: translateX(64px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sl-from-left  { from { opacity: 0; transform: translateX(-64px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sl-settle    { from { opacity: 0; transform: translateY(56px) scale(.95); } to { opacity: 1; transform: none; } }

/* Read pages: privacy, support, 404 */
header.site { display: flex; align-items: center; height: 76px; }
.home { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 400; letter-spacing: .3em; text-transform: uppercase; padding-block: 12px; }
.doc { max-width: 720px; padding-block: clamp(32px, 6vw, 72px) 0; }
.doc h1 { font-weight: 300; font-size: clamp(40px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.015em; }
.doc .lede { margin-top: 18px; }
.doc .meta { margin-top: 12px; font-size: 15px; color: var(--ink-3); }
.doc h2 { margin-top: 56px; font-size: clamp(24px, 2.8vw, 30px); line-height: 1.15; }
.doc h3 { margin: 34px 0 0; font-size: 19px; font-weight: 500; line-height: 1.3; }
.doc p, .doc li { font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.doc h2 + p, .doc h3 + p, .doc p + p { margin-top: 12px; }
.doc ul { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 6px; list-style: disc; }
.doc li::marker { color: var(--sea); }
.doc .mail { margin-top: 40px; padding-block: 28px; border-block: 1px solid var(--rule); }
.doc .mail a { font-weight: 300; font-size: clamp(22px, 3vw, 30px); overflow-wrap: anywhere; }
.doc .mail p { margin-top: 12px; font-size: 16px; color: var(--ink-2); }
footer.site { margin-top: var(--gap); padding-bottom: max(48px, env(safe-area-inset-bottom)); }
.foot { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 40px; padding-top: 32px; border-top: 1px solid var(--rule); }
.foot .small { flex: 1 1 420px; min-width: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; margin-top: -12px; }
.foot nav a { color: var(--ink); padding-block: 12px; }
@media (max-width: 640px) {
  .foot { flex-direction: column; align-items: center; text-align: center; }
  .foot .small { flex: 0 0 auto; }
  .foot nav { margin-top: 0; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
