/* Single-column launchpad: three-part top bar, a centred serif statement, a full-width grid of
   project tiles, and a quiet footer. Always light. */
/* The footer sits at the bottom of the screen even when a page is short. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; background: var(--cream); }
body > main { flex: 1; }

/* Top bar: links left, the glass centred, social icons right. */
.top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 112px; padding: 20px var(--gutter);
}
.top__nav, .foot__nav { display: flex; gap: 22px; font-size: 15px; }
.top__nav a, .foot__nav a { text-decoration: none; }
.top__nav a:hover, .foot__nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.top__mark { justify-self: center; }
.top__mark svg { display: block; height: 74px; width: auto; transition: transform .4s var(--ease-out); }
.top__mark:hover svg { transform: rotate(-8deg); }
.top__social { justify-self: end; display: flex; gap: 10px; list-style: none; margin: 0 -8px 0 0; padding: 0; }
.top__social a { display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); opacity: .85; }
.top__social a:hover { opacity: 1; }
.top__social svg { width: 23px; height: 23px; fill: currentColor; }

/* Statement */
.hero { padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(56px, 8vw, 112px); }
.hero__title {
  margin: 0 auto; max-width: 15.5em;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 4.6vw, 66px); line-height: 1.04; letter-spacing: -0.012em;
  text-align: center; text-wrap: balance;
}
.hero__title em { font-style: italic; }
.nowrap { white-space: nowrap; }

/* Project tiles: identical squares, edge to edge, each a flat colour field with one centred image. */
.grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 var(--gutter);
}
.tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--bg); color: var(--cream); text-decoration: none; }
.tile > img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.tile__label {
  position: absolute; z-index: 50; left: 14px; right: 14px; bottom: 14px;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px;
  background: #fff; color: var(--ink-2); box-shadow: 0 8px 24px rgb(0 0 0 / .16);
  font-size: 13.5px; line-height: 1.35;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
/* The project's own app icon or favicon beside its name and description. */
.tile__icon { flex: none; width: 44px; height: 44px; border-radius: 22%; object-fit: cover; }
.tile__icon--mark { border-radius: 0; object-fit: contain; }
.tile__label > span { display: grid; gap: 1px; }
.tile__label b { font-size: 15px; font-weight: 650; color: var(--ink); }
.tile:hover > img, .tile:focus-visible > img { transform: scale(1.035); }
.tile:hover .tile__label, .tile:focus-visible .tile__label { opacity: 1; transform: none; }
.tile:focus-visible { outline-offset: -4px; outline-color: var(--cream); }
/* Touch screens: no hover, so each tile's name sits on the cream below its square instead of over the art. */
@media (hover: none), (max-width: 720px) {
  .tile { aspect-ratio: auto; overflow: visible; background: none; color: var(--ink); }
  .tile > img, .tile > .art { aspect-ratio: 1; height: auto; background: var(--bg); }
  .tile__label { position: static; opacity: 1; transform: none; padding: 10px 2px 18px; background: none; box-shadow: none; }
}

/* Animated tiles: the artwork is split into layers so parts can move on hover. Every layer is a
   full-tile transparent image, so translate percentages are fractions of the tile itself. */
.art { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; background: var(--bg); container-type: inline-size; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.art__stack { position: absolute; inset: 0; }

/* Components: a cursor swaps the floating button brick for a toggle brick. js/tiles.js drives the
   cursor and the bricks frame by frame (the bricks swing from the cursor's inertia); CSS only holds the
   resting layout, the snap effects, and the eased return when the pointer leaves. */
.c-top, .c-swap { transform-origin: 60% 23%; }
.c-swap { transform: translate(-66%, -45%); }
.c-ticks { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.c-ticks path { fill: none; stroke: #141414; stroke-width: .9; stroke-linecap: round; }
.art--components.is-reset .c-top, .art--components.is-reset .c-swap { transition: transform .45s var(--ease-out); }
.art--components.is-snap .art__stack { animation: c-jolt .16s linear; }
.art--components.is-snap .c-ticks { animation: c-ticks .5s linear both; }
@keyframes c-jolt {
  0% { transform: none; }
  35% { transform: translateY(.7%); }
  100% { transform: none; }
}
@keyframes c-ticks {
  0% { opacity: 0; }
  8%, 60% { opacity: 1; }
  100% { opacity: 0; }
}
/* Shared cursor for tiles that use one (sized and styled once, placed by js/tiles.js). */
.art .c-cursor {
  position: absolute; left: 96%; top: 108%; width: 12%; height: auto;
  transform-origin: 8% 4%; overflow: visible; z-index: 5;
}
.art .c-cursor path { fill: #141414; stroke: #F1ECE1; stroke-width: 1.5; stroke-linejoin: round; }
.art.is-reset .c-cursor { transition: left .4s var(--ease-out), top .4s var(--ease-out), transform .2s; }
.art.is-reset img, .art.is-reset .lu-scale, .art.is-reset .nx-flow { transition: transform .5s var(--ease-out), opacity .4s, filter .5s; }

/* Takings: the swatch book flips through its cards on its own (no cursor: it is an iPhone app). Each card
   that lands in front recolours the widget. Resting angles live here so the tile is right without the script. */
.tk-w { opacity: 0; transition: opacity .3s var(--ease-out); }
.tk-bar { transform-origin: 50% 47.66%; }
.tk-card { transform-origin: 62.3% 60.55%; filter: drop-shadow(.3cqw .7cqw .5cqw rgb(12 30 22 / .3)); }
.tk-card[data-card="pink"], .tk-card[data-card="cobalt"], .tk-card[data-card="red"] { transform: rotate(-44deg); }
.tk-card[data-card="orange"] { transform: rotate(-16deg); }
.tk-card[data-card="yellow"] { transform: rotate(11deg); }
.tk-rest { opacity: 0; z-index: 30; }

/* Lumen Loops: the arch is a mask over a field that continues the art around the planet, so it can rise
   (scale about the planet centre) with no edges. A blurred, screened copy recreates the glow past the arch. */
.lu-arch {
  position: absolute; inset: 0;
  -webkit-mask: url("../assets/tiles/lumen/arch.svg") 0 0 / 100% 100% no-repeat;
  mask: url("../assets/tiles/lumen/arch.svg") 0 0 / 100% 100% no-repeat;
}
.lu-scale { position: absolute; inset: 0; transform-origin: 69.97% 91.21%; }
.lu-glow { position: absolute; inset: 0; filter: brightness(.9) contrast(2.2) blur(14px); mix-blend-mode: screen; opacity: .75; }
.lu-comet, .lu-stars { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lu-stars path { stroke: #F1ECE1; stroke-width: 2.6; stroke-linecap: round; }
.lu-stars g { transform-box: fill-box; transform-origin: center; }

/* The travelling light is a soft halo with a bright core, screened over the ribbon. */
.lu-comet { mix-blend-mode: screen; }
.lu-comet path { fill: none; stroke-linecap: round; stroke-dasharray: 0 2000; opacity: 0; }
.lu-halo { stroke: rgb(255 190 240 / .75); stroke-width: 46; filter: blur(14px); }
.lu-core { stroke: #FFF6FC; stroke-width: 7; filter: blur(2px); }
/* A sheen on the pink and plum bands (radius 400 to 530 of 1024 around the planet centre): soft stripes of a
   repeating conic gradient that turn slowly, so the ring looks like it is rotating. */
.lu-sheen {
  position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen;
  background: repeating-conic-gradient(from var(--a, 0deg) at 69.97% 91.21%,
    transparent 0deg 14deg, rgb(255 228 248 / .26) 24deg, transparent 34deg 52deg);
  filter: blur(5px);
  -webkit-mask: radial-gradient(circle at 69.97% 91.21%, transparent 38.8cqw, #000 39.4cqw, #000 51.4cqw, transparent 51.9cqw);
  mask: radial-gradient(circle at 69.97% 91.21%, transparent 38.8cqw, #000 39.4cqw, #000 51.4cqw, transparent 51.9cqw);
}

/* Yard AI: a roll of new lawn is pulled across the bare half. */
.yd-after { clip-path: inset(0 50% 0 50%); }
.art .yd-roll { width: 6.25%; height: 62.4%; top: 18.75%; left: 46.88%; opacity: 0; transform-origin: 50% 50%; filter: drop-shadow(-.9cqw 0 .8cqw rgb(0 0 0 / .35)); }
.yd-parasol { transform-origin: 71.48% 44.63%; }
.art.is-reset .yd-parasol { transition: none; }

/* Sign Off: the script wipes away, the cursor folds the flap open, a letter slides in, the cursor folds the
   flap shut, and "See ya!" writes itself across the sealed envelope. The flap hinges on the envelope's top edge. */
.so-env { position: absolute; inset: 0; }
.so-flap { transform-origin: 50% 30.76%; }
.so-back { opacity: 0; }
/* The letter slides down into the envelope; its slot hides anything below the envelope's bottom edge. */
.so-slot { position: absolute; inset: 0; clip-path: inset(0 0 30.47% 0); }
.so-letter { opacity: 0; }
.so-text {
  -webkit-mask-image: linear-gradient(100deg, #000 var(--w, 110%), transparent calc(var(--w, 110%) + 4%));
  mask-image: linear-gradient(100deg, #000 var(--w, 110%), transparent calc(var(--w, 110%) + 4%));
}
.so-rest { opacity: 0; z-index: 30; }

/* Next: the pitcher tips and pours, the lemonade rises and sloshes, and the lemon wheel gets nudged. */
/* The pitcher (padded 140px above and right of the tile) pivots on its spout lip, so the stream stays attached.
   Its lip, hidden by the stream in the art, is a copy that sits under the stream and turns with the pitcher. */
.nx-pitcher { position: absolute; left: 0; width: 113.67%; height: 113.67%; top: -13.67%; transform-origin: 46.05% 22.16%; }
.nx-liquid { clip-path: polygon(37.1% 56.35%, 64.45% 54.4%, 64.45% 100%, 37.1% 100%); }
.nx-lemon { transform-origin: 42.97% 40.82%; } /* the point where the wheel hangs on the rim */
.nx-rest { opacity: 0; }
.nx-flow {
  position: absolute; inset: 0; opacity: 0;
  -webkit-mask: url("../assets/tiles/next/stream.webp") 0 0 / 100% 100% no-repeat;
  mask: url("../assets/tiles/next/stream.webp") 0 0 / 100% 100% no-repeat;
  background: repeating-linear-gradient(180deg, transparent 0 7%, rgb(255 248 215 / .16) 7% 7.6%, transparent 7.6% 12%);
}

@media (prefers-reduced-motion: reduce) {
  .art img, .art svg, .art__stack { animation: none !important; transition: none !important; }
}

/* Footer */
.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom));
  font-size: 13px;
}
.foot__nav { font-size: 13px; gap: 14px; }
.foot__mark img { height: 37px; width: auto; }
.foot__legal { justify-self: end; color: var(--ink-2); }

/* Privacy: a plain list of policies, one per project, then one page per policy with a contents list
   beside serif section headings. */
.policies { max-width: 720px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 88px; }
.policies__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4vw, 52px); line-height: 1.05; }
.policies__intro { margin: 12px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.policies__list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.policies__list li { border-bottom: 1px solid var(--rule); }
.policies__list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px; color: var(--ink); text-decoration: none; }
.policies__list a::after { content: "\2192"; font-size: 18px; transition: transform .25s var(--ease-out); }
.policies__list a:hover::after, .policies__list a:focus-visible::after { transform: translateX(4px); }
.policies__list a[data-external]::after { content: "\2197"; }
.policies__list a[data-external]:hover::after, .policies__list a[data-external]:focus-visible::after { transform: translate(3px, -3px); }
.policies__list a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.policies__list span { display: grid; gap: 3px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.policies__list b { font-size: 17px; font-weight: 650; color: var(--ink); }

.policy { max-width: 1080px; margin: 0 auto; padding: clamp(28px, 4vw, 48px) var(--gutter) 88px; }
.policy__back { font-size: 14px; text-decoration: none; }
.policy__back::before { content: "\2190\00a0"; }
.policy__back:hover { text-decoration: underline; text-underline-offset: 3px; }
.policy__head { margin: clamp(28px, 5vw, 56px) auto clamp(40px, 6vw, 72px); text-align: center; }
.policy__title { max-width: 13em; }
.policy__lede { max-width: 34em; margin: 24px auto 0; font-size: 18px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.policy__meta { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }

/* Takings' summary, set like a nutrition label. */
.facts { max-width: 520px; margin: 0 auto clamp(48px, 7vw, 80px); padding: 18px 22px 16px; border: 2px solid var(--ink); }
.facts h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1; }
.facts__sub { margin: 4px 0 0; padding-bottom: 10px; border-bottom: 8px solid var(--ink); font-size: 13px; color: var(--ink-2); }
.facts dl { margin: 0; }
.facts dl div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--ink); font-size: 15px; }
.facts dd { margin: 0; font-weight: 650; text-align: right; }
.facts .facts__major { border-bottom-width: 4px; font-size: 17px; }
.facts__foot { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }

.policy__layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.policy__toc { position: sticky; top: 24px; font-size: 14px; }
.policy__toc p { margin: 0 0 10px; font-weight: 650; }
.policy__toc ol { display: grid; gap: 6px; margin: 0; padding-left: 1.5em; color: var(--ink-3); }
.policy__toc a { color: var(--ink-2); text-decoration: none; }
.policy__toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.policy__body { max-width: 640px; font-size: 17px; line-height: 1.6; }
.policy__body section { scroll-margin-top: 24px; }
.policy__body section + section { margin-top: 44px; }
.policy__body h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 36px); line-height: 1.1; }
.policy__body h2 span { display: inline-block; min-width: 1.15em; font-style: italic; color: var(--ink-3); }
.policy__body p { margin: 0 0 12px; }
.policy__body ul { margin: 0 0 12px; padding-left: 1.2em; }
.policy__body li + li { margin-top: 8px; }
.policy__body strong { font-weight: 650; }
.policy__body a { color: var(--ink); text-underline-offset: 3px; }
.policy__body a:hover { color: var(--tomato-ink); }

@media (max-width: 720px) {
  .top { min-height: 88px; padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: 14px; }
  .top__nav { gap: 14px; font-size: 14px; }
  .top__mark svg { height: 56px; }
  .top__social { gap: 0; margin-right: -6px; }
  .top__social a { width: 34px; height: 40px; }
  .top__social svg { width: 19px; height: 19px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; margin: 0 var(--gutter); }
  .tile__label { align-items: flex-start; gap: 10px; font-size: 12.5px; }
  .tile__icon { width: 36px; height: 36px; }
  .foot { grid-template-columns: 1fr auto; row-gap: 12px; }
  .foot__mark { display: none; }
  .policy__layout { grid-template-columns: 1fr; }
  .policy__toc { position: static; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
  .policy__body { font-size: 16px; }
  .policy__lede { font-size: 16px; }
}
