/* openfilm.dev — one framed column, monospace, few words. The only colour is the films. */
:root {
  --bg: #fafaf9;
  --panel: #f2f1ef;
  --line: #e4e2df;
  --text: #1a1918;
  --muted: #6f6b67;
  --faint: #a29e99;
  --inverse: #0b0b0c;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --green: #1f8a86;
  --col: 1080px;
  --pad: clamp(16px, 5vw, 80px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
code { font-family: var(--mono); font-size: .9em; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
::selection { background: var(--text); color: var(--bg); }

.frame { max-width: var(--col); margin: 0 auto; border-inline: 1px solid var(--line); min-height: 100vh; }
.band { padding: clamp(48px, 7vw, 80px) var(--pad); border-bottom: 1px solid var(--line); }

/* header */
.top { display: flex; align-items: center; gap: 28px; height: 80px; padding: 0 var(--pad); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 650; font-size: 22px; letter-spacing: -0.025em; text-decoration: none; }
.logo img { width: 28px; height: 28px; }
.top nav { display: flex; align-items: center; gap: clamp(16px, 2.8vw, 32px); margin-left: auto; }
.top nav a { text-decoration: none; color: rgb(38, 37, 36); font-size: 15px; }
.top nav a:hover { color: var(--text); }
.top nav .solid { background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 8px; }
.top nav .solid:hover { text-decoration: none; opacity: 0.88; }
@media (max-width: 640px) { .top nav .opt { display: none; } }

/* hero */
h1 { margin: 0; font-size: clamp(30px, 4vw, 40px); line-height: 1.25; font-weight: 650; letter-spacing: -0.03em; text-wrap: balance; }
.hero { padding-top: clamp(64px, 9vw, 104px); padding-bottom: clamp(56px, 7vw, 80px); }
.sub { margin: 16px 0 0; max-width: 40em; color: var(--muted); font-size: 17px; line-height: 1.85; text-wrap: balance; }

/* the actions: a command to copy (pick which), GitHub, the Mac app */
.actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: 36px; }
.cmd { position: relative; display: flex; align-items: center; height: 48px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; max-width: 470px; }
.pick { appearance: none; border: 0; background: none; height: 46px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 14px; border-right: 1px solid var(--line); font: 500 13px/1 var(--sans); color: var(--muted); cursor: pointer; border-radius: 10px 0 0 10px; }
.pick:hover { color: var(--text); background: var(--panel); }
.pick svg { width: 12px; height: 12px; transition: transform .15s; }
.cmd.open .pick svg { transform: rotate(180deg); }
.menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; min-width: 300px; width: max-content; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 16px 40px -10px rgba(0,0,0,.22); display: none; }
.cmd.open .menu { display: block; }
.menu button { appearance: none; border: 0; background: none; width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 9px 10px; border-radius: 8px; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.menu button:hover { background: var(--panel); }
.menu b { font: 600 13px/1.3 var(--sans); }
.menu small { grid-column: 1; font: 400 12.5px/1.4 var(--mono); color: var(--muted); white-space: nowrap; }
.menu .ck { grid-row: 1 / span 2; grid-column: 2; color: var(--green); visibility: hidden; }
.menu button[aria-checked="true"] .ck { visibility: visible; }
.cmd code { flex: 1; min-width: 0; padding: 0 8px 0 14px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; font-size: 14px; color: var(--text); }
.copy { appearance: none; border: 0; background: none; color: var(--faint); cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center; flex: none; border-radius: 8px; }
.copy:hover { color: var(--text); }
.copy svg { width: 16px; height: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font: 500 14.5px/1 var(--sans); color: var(--text); background: #fff; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn [hidden] { display: none; }
.btn svg { width: 17px; height: 17px; }
@media (max-width: 480px) { .btn { flex: 1 1 0; gap: 7px; padding: 0 10px; font-size: 13.5px; } }

.screen { background: var(--inverse); border-bottom: 1px solid var(--line); }
.screen video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* sections */
h2 { margin: 0 0 12px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.band > p { margin: 0; color: var(--muted); max-width: 62ch; }
.list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.list li { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 4px 24px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.list b { color: var(--text); font-weight: 600; }
@media (max-width: 560px) { .list li { grid-template-columns: minmax(0, 1fr); } }
.button { display: inline-flex; align-items: center; gap: 10px; margin-top: 32px; background: var(--text); color: var(--bg); text-decoration: none; padding: 10px 18px; border-radius: 8px; font-size: 14.5px; font-weight: 500; }
.button:hover { opacity: 0.88; }

.sheet figure { margin: 0; }
.sheet video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--inverse); border-radius: 8px; cursor: pointer; }
details + details { margin-top: 4px; }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
details + details { margin-top: 0; }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; font-weight: 500; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; width: 8px; height: 8px; flex: none; margin-top: 8px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(45deg); transition: transform .15s; }
details[open] summary::after { transform: rotate(-135deg); margin-top: 12px; }
details p { margin: -4px 0 16px; color: var(--muted); max-width: 62ch; }

/* footer */
.foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.foot a { padding: 24px 0; text-align: center; text-decoration: none; color: var(--text); font-size: 14.5px; border-right: 1px solid var(--line); }
.foot a:last-child { border-right: 0; }
.foot a:hover { background: var(--panel); }
@media (max-width: 560px) { .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot a:nth-child(2) { border-right: 0; } .foot a:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.legal { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 24px var(--pad) 40px; font-size: 13px; color: var(--faint); }
.legal a { color: var(--faint); text-decoration: none; }
.legal a:hover { color: var(--text); }
.legal span { margin-right: auto; }
/* docs and legal pages */
.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr) 190px; }
.doc .side { padding: 40px 16px 40px 24px; border-right: 1px solid var(--line); }
.doc .side p, .doc .toc p { margin: 0 0 8px; padding: 0 10px; font: 600 11.5px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.doc .side ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 2px; }
.doc .side a { display: block; padding: 6px 10px; border-radius: 7px; font-size: 14px; color: var(--muted); text-decoration: none; }
.doc .side a:hover { color: var(--text); background: var(--panel); }
.doc .side a[aria-current] { color: var(--text); font-weight: 500; background: var(--panel); }
.doc .side > *, .doc .toc > * { position: relative; }
.doc .side, .doc .toc { align-self: start; position: sticky; top: 80px; }
.doc .toc { padding: 44px 24px 40px 8px; font-size: 13px; }
.doc .toc ol { list-style: none; margin: 0; padding: 0 0 0 10px; display: grid; gap: 8px; border-left: 1px solid var(--line); }
.doc .toc a { color: var(--muted); text-decoration: none; }
.doc .toc a:hover { color: var(--text); }
.doc .turn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.doc .turn a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 500; }
.doc .turn a:hover { border-color: var(--faint); }
.doc .turn a small { font-size: 12px; font-weight: 400; color: var(--faint); }
.doc .turn a.next { text-align: right; grid-column: 2; }
.doc.legal-doc { grid-template-columns: 200px minmax(0, 1fr); }
.doc.legal-doc aside { padding: 40px 24px; border-right: 1px solid var(--line); font-size: 13px; }
.doc.legal-doc aside ol { position: sticky; top: 100px; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.doc.legal-doc aside a { color: var(--muted); text-decoration: none; }
.doc.legal-doc aside a:hover { color: var(--text); }
.doc article { padding: 44px clamp(20px, 4vw, 52px) 80px; min-width: 0; }
.doc .tabs { display: flex; gap: 22px; margin-bottom: 32px; font-size: 14px; }
.doc .tabs a { color: var(--faint); text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.doc .tabs a[aria-current] { color: var(--text); border-bottom-color: var(--text); }
.doc article h1 { margin-bottom: 8px; }
.doc .lead { color: var(--muted); margin: 0 0 24px; }
.doc article h2 { font-size: 18px; margin: 44px 0 10px; scroll-margin-top: 96px; }
.doc article h3 { font-size: 15.5px; margin: 28px 0 8px; scroll-margin-top: 96px; }
.doc article p, .doc article li { color: var(--muted); }
.doc article strong, .doc article b { color: var(--text); }
.doc article ul, .doc article ol { padding-left: 20px; }
.doc article li { margin: 4px 0; }
.doc article :not(pre) > code { color: var(--text); background: var(--panel); padding: 1px 5px; border-radius: 3px; }
.doc article pre { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.65; }
.doc article blockquote { margin: 16px 0; padding-left: 16px; border-left: 2px solid var(--line); }
.doc article .table { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 4px; }
.doc article table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.doc article th, .doc article td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc article th { color: var(--text); background: var(--panel); }
.doc article tr:last-child td { border-bottom: 0; }
.doc .lg-short { border: 1px solid var(--line); background: var(--panel); padding: 4px 20px 12px; border-radius: 4px; }
.doc .lg-short h2 { margin-top: 16px; }
.doc .fine { font-size: 13px; color: var(--faint); }
@media (max-width: 1080px) { .doc { grid-template-columns: 200px minmax(0, 1fr); } .doc .toc { display: none; } }
@media (max-width: 820px) { .doc, .doc.legal-doc { grid-template-columns: minmax(0, 1fr); } .doc.legal-doc aside { display: none; }
  .doc .side { position: static; display: flex; gap: 4px; overflow-x: auto; padding: 12px var(--pad); border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .doc .side p { display: none; } .doc .side ul { display: contents; } .doc .side a { white-space: nowrap; } }

/* what you can make: pages of six, turned with the pager beside the heading */
.head { display: flex; align-items: flex-end; gap: 20px; }
.head > div:first-child { flex: 1; min-width: 0; }
.head p { margin: 0; color: var(--muted); max-width: 62ch; }
.pager { display: flex; align-items: center; gap: 2px; flex: none; font: 500 13px/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.pager button { appearance: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; transition: background .15s; }
.pager button:hover:not(:disabled) { background: var(--panel); }
.pager button:disabled { color: var(--line); cursor: default; }
.pager svg { width: 16px; height: 16px; }
.pages { overflow: hidden; margin-top: 30px; }
.track { display: flex; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.sheet { flex: 0 0 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; }
.sheet figcaption { margin-top: 12px; display: grid; gap: 3px; }
.sheet figcaption b { font-size: 15px; font-weight: 600; color: var(--text); }
.sheet figcaption span { font-size: 14px; line-height: 1.5; color: var(--muted); }
.yours { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 8px; text-decoration: none; color: var(--text);
  background: radial-gradient(120% 90% at 0% 0%, #e3f4ea 0%, transparent 60%), radial-gradient(120% 90% at 100% 100%, #e4eefa 0%, transparent 60%), var(--panel);
  box-shadow: inset 0 0 0 1px var(--line); }
.yours i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 6px 16px -8px rgba(0,0,0,.25); font: 300 26px/1 var(--sans); font-style: normal; transition: transform .2s; }
.yours:hover i { transform: scale(1.08); }
@media (max-width: 760px) { .sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .sheet { grid-template-columns: minmax(0, 1fr); } .head { align-items: flex-start; flex-direction: column; } }
