/* Films: the app's film tile and film choice (FilmIcon.swift FilmTile, Kit.swift FilmChoice), for
   the home shelf and the film pages. A tile is the badge drawn out: the code on the band colour,
   0.64 as tall as it is wide. The loaded film sits on an orange plate, name in dark ink. */
:root { --plate: #ff9938; --on-plate: #17110a; --tile-label: #bdbab4; }

.tile { --w: 56px; display: inline-grid; place-items: center; flex: none; width: var(--w); height: calc(var(--w) * .64);
  border-radius: min(calc(var(--w) * .64 * .22), 14px); background: var(--band); color: var(--ink); }
.tile b { font: 800 calc(var(--w) * .3)/1 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: .05em; padding: 0 calc(var(--w) * .08); }
.tile.small { --w: 36px; }
.tile.big { --w: 112px; display: grid; margin-bottom: 18px; }

.choice { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 5px;
  border-radius: 15px; color: var(--tile-label); background: none; border: 0; cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: background-color .25s ease, color .25s ease; }
.choice:hover { text-decoration: none; color: var(--paper); }
.choice .name { font: 700 .66rem/1.2 "Sofia Sans Condensed", "Arial Narrow", sans-serif; text-transform: uppercase; letter-spacing: .07em;
  white-space: nowrap; max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
.choice .lock { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; padding: 3.5px; border-radius: 50%;
  background: rgb(0 0 0 / .55); fill: #fff; }
.choice[aria-pressed="true"], .choice.current { background: var(--plate); color: var(--on-plate); }
.choice:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .choice { transition: none; } }

/* The home shelf: every film, grouped the way the films list groups them. A strip that scrolls on phones. */
.shelf { display: block; }
.shelf-group + .shelf-group { margin-top: 14px; }
.shelf-group > .label { display: block; margin: 0 0 6px 5px; font-size: .66rem; }
.shelf-row { display: flex; flex-wrap: wrap; gap: 2px; }
.film-now .label a { color: var(--mask); }
@media (max-width: 860px) {
  .shelf { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 0 10px; gap: 14px; scrollbar-width: none; }
  .shelf::-webkit-scrollbar { display: none; }
  .shelf-group + .shelf-group { margin-top: 0; }
  .shelf-row { flex-wrap: nowrap; }
  .shelf .choice { scroll-snap-align: center; }
}

/* A film's page */
.film-head { padding: clamp(24px, 5vh, 56px) 0 clamp(32px, 6vh, 64px); }
.crumbs { margin-bottom: 20px; }
.crumbs a { color: var(--paper-dim); }
.film-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.film-photo { margin: 0; }
.film-photo .cap { margin-top: 10px; }
.film-text h1 { font-size: clamp(2.6rem, 6vw, 5rem); margin: 8px 0 12px; }
.film-text .lede { margin-bottom: 18px; }
.film-price { color: var(--paper-dim); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font: 600 .72rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.chip.free { background: rgb(242 236 225 / .12); color: var(--paper); }
.chip.pro { background: var(--mask); color: #160c03; }
.film-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 12px; }
.film-more { margin-top: 22px; display: grid; gap: 4px; }
.film-source { border-top: 1px solid var(--rule); padding-top: 22px; margin-bottom: 40px; max-width: 46em; }
.film-source p { color: var(--paper-dim); }
.film-source strong { color: var(--paper); }
.film-family { border-top: 1px solid var(--rule); padding-top: 22px; }
.film-family .prose { margin: 8px 0 16px; }
.choices { display: flex; flex-wrap: wrap; gap: 4px; }
.film-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--rule); font: .9rem var(--mono); }
.chapter.tight { padding-top: 0; border-top: 0; }
@media (max-width: 860px) {
  .film-hero { grid-template-columns: minmax(0, 1fr); }
  .film-photo { order: 2; }
}

/* The catalogue */
.films-hero h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); max-width: 14em; }
.films-hero h1 em { font-style: normal; color: var(--mask); }
.films-hero .lede { max-width: 38em; }
.tile-wall { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; justify-items: center; }
.tile-wall a { display: block; border-radius: 10px; transition: transform .2s ease; }
.tile-wall a:hover { transform: translateY(-3px) rotate(-2deg); }
.tile-wall a:nth-child(3n) { transform: rotate(1.5deg); }
.tile-wall a:nth-child(4n+1) { transform: rotate(-1.5deg); }
@media (max-width: 860px) { .tile-wall { grid-template-columns: repeat(8, 1fr); } .tile-wall .tile { --w: 38px; } }
@media (prefers-reduced-motion: reduce) { .tile-wall a { transition: none; } }
.film-group { margin-bottom: clamp(40px, 7vh, 72px); }
.film-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.film-card { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border: 1px solid var(--rule); border-radius: 4px; color: var(--paper); transition: border-color .2s ease, background-color .2s ease; }
.film-card:hover { text-decoration: none; border-color: var(--paper-dim); background: var(--tray); }
.film-card > span:last-child { display: grid; gap: 3px; min-width: 0; }
.film-card strong { font: 500 1.25rem/1.15 var(--display); letter-spacing: -.02em; }
.film-card .notes { color: var(--paper-dim); font-size: .9rem; line-height: 1.45; }
.trademarks { max-width: 60em; }

/* How they're made */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.steps li { border-top: 2px solid var(--mask); padding: 14px 4px 0; }
.steps li p { color: var(--paper-dim); margin: 8px 0 0; font-size: .95rem; }
.roads { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(20px, 3vw, 40px); }
.roads h3 { margin-bottom: 10px; }
.sources { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; }
.sources li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.sources a { display: flex; align-items: center; gap: 10px; color: var(--paper); }
.sources span { color: var(--paper-dim); font: .82rem var(--mono); text-align: right; }

/* Updates */
.updates { display: grid; gap: 0; max-width: 60em; }
.update { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--rule); }
.update .when { display: grid; gap: 2px; align-content: start; }
.update time { font: 500 1.05rem var(--display); color: var(--paper); }
.update h2 { font-size: 1.35rem; margin: 0 0 10px; }
.update ul { margin: 0; padding-left: 1.1em; color: var(--paper-dim); display: grid; gap: 8px; }
.update strong { color: var(--paper); font-weight: 600; }
@media (max-width: 640px) { .update { grid-template-columns: 1fr; gap: 8px; } }

/* Big screens: real captures in plain device frames, a bezel and rounded glass, no gloss */
.screens { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.screen { margin: 0; }
.device { display: block; background: #050505; border: 1px solid #34312c; border-radius: 22px; padding: 10px; box-shadow: 0 30px 60px -30px #000; transition: transform .3s ease; }
.device img { width: 100%; height: auto; border-radius: 13px; }
.device:hover { transform: translateY(-4px); }
.duo-pair { position: relative; padding-right: 13%; }
.duo-pair .device.outer { position: absolute; right: 0; bottom: -10%; width: 30%; border-radius: 18px; padding: 6px; transform: rotate(4deg); }
.duo-pair .device.outer img { border-radius: 12px; }
.duo-pair .device.outer:hover { transform: rotate(4deg) translateY(-4px); }
.screen figcaption { margin-top: 22px; color: var(--paper-dim); max-width: 34em; }
.screen.duo figcaption { margin-top: calc(22px + 6%); }
.screen figcaption .label { display: block; margin-bottom: 6px; }
.screen figcaption strong { color: var(--paper); font-weight: 600; }
@media (max-width: 860px) { .screens { grid-template-columns: minmax(0, 1fr); } .screen.duo { margin-top: 12px; } }
@media (prefers-reduced-motion: reduce) { .device { transition: none; } }

/* The latest builds, in a band between the hero and the first chapter */
.latest { border-top: 1px solid var(--rule); padding: 22px 0 26px; }
.builds { display: grid; grid-template-columns: 220px repeat(3, minmax(0, 1fr)) auto; gap: 8px 24px; align-items: start; }
.builds > .label { padding-top: 4px; line-height: 1.5; }
.builds ol { display: contents; list-style: none; }
.builds li a { display: grid; gap: 4px; color: var(--paper); border-left: 1px solid var(--rule); padding-left: 16px; }
.builds li a:hover { text-decoration: none; color: var(--mask); }
.builds time { font: .82rem var(--mono); color: var(--edge); }
.builds li span { font: 500 1.05rem/1.3 var(--display); letter-spacing: -.01em; }
.builds > .cap { padding-top: 4px; white-space: nowrap; color: var(--mask); }
@media (max-width: 960px) {
  .builds { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .builds li a { grid-template-columns: 70px 1fr; border-left: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .builds > .label { margin-bottom: 4px; }
  .builds > .cap { margin-top: 10px; }
}
