/* The client space. Every colour, font and corner comes from the theme (/theme.css, made from theme.json):
   --bg --bg-2 --field-bg --fg --fg-dim --muted --primary --primary-hot --on-primary --accent --error --ok
   --font-heading --font-body --radius. Nothing here names a studio. */

:root {
  --line: color-mix(in srgb, var(--fg) 12%, transparent);
  --field: color-mix(in srgb, var(--field-bg) 85%, transparent);
  --glow: color-mix(in srgb, var(--primary) 45%, transparent);
  --s-1: 0.82rem; --s0: 1.0625rem; --s1: 1.42rem; --s2: 1.89rem; --s3: 2.52rem; --s4: 3.36rem; --s5: 4.48rem;
  --gutter: 16px;
  --measure: 36rem;
  --ease-light: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; font: 400 var(--s0)/1.6 var(--font-body); overflow-wrap: break-word; hyphens: auto;
  color: var(--fg); min-height: 100vh; position: relative; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 500; line-height: 1.08; margin: 0 0 0.5em;
  font-optical-sizing: auto; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0 0 1em; max-width: var(--measure); }
::selection { background: var(--primary); color: var(--on-primary); }

/* ---- A sky of stars behind the page, when the theme asks for it (sky.js) ---- */
.sky-on body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 60% at 50% 120%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 60%),
    radial-gradient(ellipse 80% 50% at 80% -10%, color-mix(in srgb, var(--haze, transparent) 16%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%); }
canvas.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--gutter); top: var(--gutter); background: var(--primary); color: var(--on-primary); padding: 0.5em 0.8em; z-index: 10; }

/* ---- Header ---- */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 18px var(--gutter); position: relative; z-index: 3; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none;
  font-family: var(--font-heading); font-size: var(--s1); font-weight: 500; letter-spacing: 0.01em; }
.brand span { white-space: nowrap; }
.brand .logo { height: 30px; width: auto; flex: none; }
.sky-on .brand .logo { filter: drop-shadow(0 0 6px var(--glow)); }
.head-right { display: flex; align-items: center; gap: 1.1rem; }
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { text-decoration: none; padding: 0.4em 0; white-space: nowrap; color: var(--fg-dim); transition: color 0.3s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--primary); }
.site-nav .nav-start { color: var(--primary); }
.site-nav.wide { display: none; }
.nav-fold summary { list-style: none; cursor: pointer; padding: 0.5em 0.2em; }
.nav-fold summary::-webkit-details-marker { display: none; }
.nav-fold[open] .site-nav { position: absolute; right: var(--gutter); top: 64px; flex-direction: column;
  align-items: flex-start; gap: 0.2rem; background: color-mix(in srgb, var(--bg-2) 96%, transparent); border: 1px solid var(--line);
  padding: 1rem 1.4rem; min-width: 12rem; backdrop-filter: blur(6px); border-radius: var(--radius); }
.lang-switch { display: flex; gap: 0.15rem; font-size: var(--s-1); letter-spacing: 0.04em; }
.lang-switch a { text-decoration: none; padding: 0.35em 0.45em; border-radius: var(--radius); color: var(--fg-dim); }
.lang-switch a:hover { color: var(--fg); }
.lang-switch a[aria-current="true"] { color: var(--on-primary); background: var(--primary); }
.head-logout { display: flex; align-items: center; gap: 1rem; margin: 0; font-size: var(--s-1); }
.head-space { text-decoration: none; white-space: nowrap; color: var(--fg-dim); }
.linklike { background: none; border: 0; padding: 0.35em 0; font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.2em; }
/* The wide menu needs 1040 px when it holds the site's links and Project login (measured 2026-10-09). */
@media (min-width: 1040px) {
  .site-nav.wide { display: flex; }
  .nav-fold { display: none; }
}
@media (min-width: 760px) {
  .site-head { padding: 26px 40px; }
  .head-right { gap: 2rem; }
}
@media (max-width: 430px) {
  .brand { font-size: 1.12rem; gap: 0.45rem; }
  .brand .logo { height: 24px; }
  .head-right { gap: 0.6rem; }
  .lang-switch a { padding: 0.35em 0.35em; }
  .head-space { display: none; }
  .head-logout { gap: 0.4rem; }
}

main { display: block; position: relative; z-index: 1; }
main > * { padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 760px) { main > * { padding-left: 40px; padding-right: 40px; } }

.lead { font-size: var(--s1); line-height: 1.45; color: var(--fg); max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; margin-top: 2rem; }
.button { display: inline-block; background: var(--primary); color: var(--on-primary); text-decoration: none;
  padding: 0.85em 1.4em; border-radius: var(--radius); border: 0; font: inherit; font-weight: 600; cursor: pointer;
  transition: box-shadow 0.4s, background 0.3s, transform 0.3s; }
.button:hover { background: var(--primary-hot); box-shadow: 0 0 28px var(--glow); }
.button:active { transform: translateY(1px); }
.button.secondary { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg-dim); }
.button.secondary:hover { box-shadow: inset 0 0 0 1.5px var(--primary), 0 0 22px color-mix(in srgb, var(--primary) 25%, transparent); color: var(--primary-hot); }
.button[disabled] { opacity: 0.6; cursor: wait; }
.quiet { color: var(--fg-dim); }

/* ---- Lit as you reach it (sky.js adds .lit; without it nothing is ever hidden) ---- */
.sky-on.js .reveal { opacity: 0.08; transform: translateY(18px); filter: blur(3px);
  transition: opacity 1.4s var(--ease-light), transform 1.4s var(--ease-light), filter 1.4s var(--ease-light); }
.sky-on.js .reveal.lit { opacity: 1; transform: none; filter: none; }

/* ---- Pages ---- */
.page-head { padding-top: 10vh; padding-bottom: 4vh; }
.page-head h1 { font-size: clamp(var(--s3), 7vw, var(--s5)); font-weight: 400; }
.page-head.narrow, .auth { max-width: 30rem; }
.note, .muted-line, .muted { color: var(--muted); }
.note { font-size: var(--s-1); }
.crumbs { margin: 0 0 0.6rem; font-size: var(--s-1); }
.crumbs a { color: var(--fg-dim); }
.prose { padding-bottom: 6vh; max-width: calc(var(--measure) + 80px); }
.prose h2 { font-size: var(--s2); margin-top: 1.6em; }
.prose section:first-child h2 { margin-top: 0; }
.empty .lead { font-family: var(--font-heading); font-size: var(--s2); line-height: 1.2; }

/* ---- Forms: fields glow when you write in them ---- */
textarea, input[type=text], input[type=email], input[type=password], select {
  width: 100%; font: inherit; color: var(--fg); background: var(--field);
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); border-radius: var(--radius); padding: 0.65rem 0.75rem;
  transition: border-color 0.3s, box-shadow 0.4s, background 0.3s; }
textarea:hover, input:hover, select:hover { border-color: color-mix(in srgb, var(--fg) 32%, transparent); }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 0 22px color-mix(in srgb, var(--primary) 28%, transparent); }
select option { background: var(--bg-2); }
input[type=file] { font: inherit; max-width: 100%; color: var(--fg-dim); }
input[type=checkbox] { accent-color: var(--primary); }
.brief { max-width: 42rem; padding-bottom: 8vh; }
.brief fieldset { border: 0; margin: 0 0 2.6rem; padding: 0; }
.brief legend { font-family: var(--font-heading); font-size: var(--s2); padding: 0; margin-bottom: 1rem; }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.help, .hint { font-size: var(--s-1); color: var(--muted); margin: 0 0 0.4rem; }
.req { color: var(--primary); }
.field-error { color: var(--error); font-weight: 600; font-size: var(--s-1); margin: 0.35rem 0 0; }
[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.row3 { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .row3 { grid-template-columns: repeat(3, 1fr); } }
.field.check { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.7rem; align-items: start; }
.field.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; }
.field.check label { font-weight: 400; }
.field.check .field-error { grid-column: 2; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth { padding-bottom: 8vh; }
.auth .button { width: 100%; text-align: center; }
.quiet-link { margin-left: 1rem; color: var(--fg-dim); }

/* ---- Notes on a page ---- */
.banner { margin: 0 var(--gutter) 1.4rem; padding: 0.8rem 1rem; background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-left: 2px solid var(--primary); max-width: 42rem; }
.banner.answered { background: color-mix(in srgb, var(--ok) 10%, transparent); border-left-color: var(--ok); }
.banner.error { background: color-mix(in srgb, var(--error) 10%, transparent); border-left-color: var(--error);
  color: color-mix(in srgb, var(--error) 55%, var(--fg)); font-weight: 600; }
@media (min-width: 760px) { .banner, .steps { margin-left: 40px; margin-right: 40px; padding-left: 0; padding-right: 0; } }

/* ---- A project's steps ---- */
.steps { list-style: none; margin: 0 0 8vh; padding: 0 var(--gutter); max-width: 44rem; }
.steps .step a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.4rem 1rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: background 0.4s; }
.steps .step a:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 6%, transparent), transparent 70%); }
.step-name { font-family: var(--font-heading); font-size: var(--s2); }
.step-state { font-size: var(--s-1); padding: 0.2em 0.7em; border-radius: 99px; background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg-dim); }
.state-waiting .step-state { background: var(--primary); color: var(--on-primary); font-weight: 600; box-shadow: 0 0 16px var(--glow); }
.state-approved .step-state { background: transparent; color: var(--ok); }
.state-changes .step-state { background: transparent; color: var(--accent); }
.space-project { padding-bottom: 2rem; }
.space-project h2 { font-size: var(--s2); margin: 1.5rem 0 0.3rem; padding: 0 var(--gutter); }
.space-project h2 a { text-decoration: none; }
.space-project h2 a:hover { color: var(--primary-hot); }
.space-project .muted-line { padding: 0 var(--gutter); }
@media (min-width: 760px) { .space-project h2, .space-project .muted-line { padding: 0 40px; } }

/* ---- A step's document: gentle panels so long scripts stay easy to read ---- */
.doc-head h1 { font-size: clamp(var(--s3), 6vw, var(--s4)); }
.doc { max-width: 44rem; }
.doc-section { margin: 0 0 1rem; padding: 1.4rem 1.4rem 1rem; background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius); }
.doc-section h2 { font-size: var(--s2); }
.doc-section p { font-size: 1.12rem; line-height: 1.7; }
.doc-image { width: 100%; height: auto; margin: 1rem 0; border-radius: var(--radius); }
.video { position: relative; aspect-ratio: 16 / 9; margin: 1rem 0; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.comment summary { cursor: pointer; color: var(--primary); font-size: var(--s-1); font-weight: 600; padding: 0.4rem 0; width: max-content; }
.comment[open] summary { margin-bottom: 0.4rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* A storyboard: a sheet of cards, picture first; 3-4 across on a computer, 2 on a tablet, 1 on a phone. */
.doc.board { max-width: 84rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 1rem; align-items: start; }
.doc.board .decide { grid-column: 1 / -1; }
.doc.board .doc-section { display: flex; flex-direction: column; margin: 0; padding: 0 0 0.6rem; overflow: hidden; }
.doc.board .doc-section > :not(.doc-image-link):not(.video) { margin-left: 1rem; margin-right: 1rem; }
.doc.board .doc-image-link, .doc.board .doc-image-removed { order: -1; display: block; }
.doc.board .doc-image-removed { padding: 1rem; margin: 0 0 0.6rem; }
.doc.board .doc-image { margin: 0 0 0.8rem; border-radius: 0; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-2); }
.doc.board .doc-image-link:hover .doc-image, .doc.board .doc-image-link:focus-visible .doc-image { opacity: 0.88; }
.doc.board .doc-section h2 { font-size: var(--s1); margin-bottom: 0.4rem; }
.doc.board .doc-section p { font-size: 0.95rem; line-height: 1.5; max-width: none; }
.doc.board .comment textarea { width: 100%; }
.doc.board .decide { max-width: 44rem; }
.decide { margin-top: 1.4rem; padding: 1.6rem 0 3rem; border-top: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); }
.decide label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.decide-buttons { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.2rem; }
.versions { padding-bottom: 6vh; }
.versions h2 { font-size: var(--s1); font-family: var(--font-body); font-weight: 600; }
.versions ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.versions a[aria-current="page"] { font-weight: 700; text-decoration: none; color: var(--primary); }

/* ---- A sent proposal goes up as a shooting star (sky.js) ---- */
.shooting-star { position: fixed; width: 140px; height: 2px; pointer-events: none; z-index: 20;
  background: linear-gradient(90deg, transparent, var(--primary-hot)); border-radius: 2px; transform-origin: right center; }
.shooting-star::after { content: ""; position: absolute; right: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary-hot); box-shadow: 0 0 14px 4px var(--glow); }

/* ---- Footer ---- */
.site-foot { position: relative; z-index: 1; padding: 7vh var(--gutter) 4vh; display: grid; gap: 1rem;
  font-size: var(--s-1); color: var(--fg-dim); }
.site-foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 60%, transparent) 50%, transparent); }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; color: var(--fg); }
.foot-brand { font-family: var(--font-heading); font-size: var(--s1); color: var(--fg); margin: 0; }
.langs, .foot-legal { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin: 0; }
.langs a[aria-current="true"] { color: var(--primary); }
.foot-legal .foot-client { font-weight: 600; color: var(--fg); }
@media (min-width: 760px) { .site-foot { padding: 9vh 40px 5vh; grid-template-columns: 1fr auto auto; align-items: end; gap: 2rem; } }

/* ---- Less motion: everything simply lit ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .sky-on.js .reveal { opacity: 1; transform: none; filter: none; }
}
