/* Animagine — "Film negative"
   Three colours only: the orange film base, the developed dark, the light-table cream. */

:root {
  --orange: #C9733D;
  --dark: #1C120C;
  --cream: #F3E6D8;
  --brown: #2E1A0F;

  --font: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
  --display: "Fira Sans Extra Condensed", "Arial Narrow", sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 88rem;
  --section: clamp(4.5rem, 10vw, 9rem);
  --radius-frame: 6px;
  --radius-control: 4px;

  --perf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='14'%3E%3Crect x='14' y='0' width='16' height='14' rx='3' fill='%23C9733D'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--orange);
  color: var(--dark);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--dark); color: var(--cream); padding: .75rem 1rem;
  border-radius: var(--radius-control); text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Tones: alternate like frames and gaps on a strip ---------- */

.tone-orange { background: var(--orange); color: var(--dark); }
.tone-dark { background: var(--dark); color: var(--cream); }

.tone-orange :focus-visible { outline: 3px solid var(--dark); outline-offset: 3px; }
.tone-dark :focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.site-header :focus-visible { outline: 3px solid var(--dark); outline-offset: 3px; }

/* ---------- Type ---------- */

.h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: .95;
  letter-spacing: -.01em;
}
.h2-large { font-size: clamp(3rem, 8vw, 7rem); }
.h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1;
}
.section-lead { max-width: 38em; margin-top: 1.25rem; color: var(--brown); }

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .25em;
}
.text-link:hover { text-decoration-thickness: 4px; }
.tone-dark .text-link { color: var(--orange); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .75rem 1.5rem;
  border: 2px solid transparent; border-radius: var(--radius-control);
  font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn-small { min-height: 2.5rem; padding: .5rem 1rem; }
.btn-dark { background: var(--dark); color: var(--cream); }
.btn-dark:hover { background: var(--brown); }
.btn-orange { background: var(--orange); color: var(--dark); }
.btn-orange:hover { background: var(--cream); }
.btn-ghost { border-color: var(--dark); color: var(--dark); background: transparent; }
.btn-ghost:hover { background: var(--dark); color: var(--cream); }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Header ---------- */

.site-header { background: var(--orange); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1.25rem;
}
.wordmark {
  font-family: var(--display); font-weight: 800;
  font-size: 1.75rem; letter-spacing: .01em; line-height: 1;
  text-decoration: none; white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a { white-space: nowrap; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: 1rem; }
.site-nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: .3em; }
.nav-toggle {
  display: none; background: none; border: 2px solid var(--dark);
  border-radius: var(--radius-control); padding: .4rem .9rem; font-weight: 600; cursor: pointer;
}

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 4.5rem; z-index: 5;
    flex-direction: column; align-items: flex-start; gap: 1.25rem;
    padding: 1.5rem var(--gutter) 2rem; background: var(--orange);
    border-bottom: 2px solid var(--dark);
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { font-size: 1.25rem; }
  .site-header { position: relative; }
}

/* ---------- Hero: the headline is the graphic ---------- */

.hero { padding-top: clamp(2rem, 6vw, 5rem); padding-bottom: var(--section); }
.hero-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 12.4vw, 12.5rem);
  line-height: .86;
  letter-spacing: -.015em;
  max-width: 13ch;
}
.hero-meta {
  display: grid; grid-template-columns: minmax(0, 34rem) auto;
  justify-content: space-between; align-items: end; gap: 2rem;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.hero-lede { color: var(--brown); font-size: clamp(1.125rem, 1.6vw, 1.3rem); }
@media (max-width: 760px) { .hero-meta { grid-template-columns: 1fr; } }

/* ---------- Frames: work always sits on the dark ---------- */

.frame {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--dark);
  border-radius: var(--radius-frame);
}
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame.portrait { aspect-ratio: 4 / 5; }
.reel { border: clamp(8px, 1.2vw, 16px) solid var(--dark); border-radius: calc(var(--radius-frame) + 4px); }

.frame-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--orange); font-family: var(--display); font-weight: 700;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
}
.frame.has-video .frame-placeholder { display: none; }
.frame-on-dark { background: var(--brown); }

.reel-controls { position: absolute; right: 1rem; bottom: 1rem; z-index: 2; display: flex; gap: .5rem; }
.reel-controls[hidden] { display: none; }
.reel-controls button {
  background: var(--dark); color: var(--cream); border: 0;
  border-radius: var(--radius-control); padding: .5rem .9rem; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.reel-controls button:hover { background: var(--orange); color: var(--dark); }
.reel-controls button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- Who it's for ---------- */

.who { padding-bottom: var(--section); }
.who-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
@media (max-width: 860px) { .who-grid { grid-template-columns: 1fr; } }

.tabs { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; margin-bottom: 2rem; }
.tabs [role="tab"] {
  background: none; border: 0; padding: .25rem 0; cursor: pointer;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1.1;
  color: var(--brown);
  border-bottom: 4px solid transparent;
}
.tabs [role="tab"][aria-selected="true"] { color: var(--dark); border-bottom-color: var(--dark); }
.tabs [role="tab"]:hover { border-bottom-color: var(--brown); }

.panel { max-width: 36em; }
.panel p + p { margin-top: .75rem; color: var(--brown); }
.panel-lead { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.25; font-weight: 600; }
.panel .text-link { display: inline-block; margin-top: 1.5rem; }

/* ---------- Work: a strip of negative on the light table ---------- */

.strip { position: relative; padding-block: calc(var(--section) + 1.5rem); }
.strip::before, .strip::after {
  content: ""; position: absolute; left: 0; right: 0; height: 14px;
  background-image: var(--perf); background-repeat: repeat-x;
}
.strip::before { top: 18px; }
.strip::after { bottom: 18px; }

.work-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end;
  gap: 1.5rem; margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters button {
  background: transparent; color: var(--cream);
  border: 1.5px solid var(--cream); border-radius: 999px;
  padding: .45rem 1rem; font-size: .95rem; font-weight: 500; cursor: pointer;
}
.filters button:hover { border-color: var(--orange); color: var(--orange); }
.filters button[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--dark); }

.work-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2.5rem, 4vw, 3.5rem) clamp(1rem, 2.5vw, 2rem);
  align-items: start;
}
.work-item.wide { grid-column: span 2; }
.work-item[hidden] { display: none; }
.work-item h3 { margin-top: 1rem; font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.work-item p { margin-top: .35rem; max-width: 34em; font-size: 1rem; opacity: 1; color: var(--cream); }
.work-item .frame { cursor: pointer; }
.work-empty { font-size: 1.15rem; }

@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-item.wide { grid-column: auto; }

}

/* ---------- Process ---------- */

.process { padding-block: var(--section); }
.steps {
  counter-reset: step;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2rem clamp(1rem, 2vw, 2rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.steps li { counter-increment: step; border-top: 2px solid var(--dark); padding-top: 1rem; }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 1.25rem;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3.5rem, 6vw, 5.5rem); line-height: .8;
}
.steps h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.steps p { margin-top: .5rem; color: var(--brown); font-size: 1rem; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Craft ---------- */

.craft { padding-block: var(--section); }
.craft-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
}
.craft-lead { margin-top: 1.75rem; max-width: 32em; font-size: clamp(1.15rem, 1.6vw, 1.3rem); }
.craft-list { display: grid; gap: 2rem; }
.craft-list dt { font-weight: 700; font-size: 1.2rem; color: var(--orange); }
.craft-list dd { margin-top: .35rem; max-width: 34em; }
@media (max-width: 860px) { .craft-grid { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */

.pricing { padding-block: var(--section); }
.price-table {
  width: 100%; border-collapse: collapse;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.price-table tr { border-top: 2px solid var(--dark); }
.price-table tr:last-child { border-bottom: 2px solid var(--dark); }
.price-table th, .price-table td { padding: 1.1rem 0; text-align: left; vertical-align: baseline; }
.price-table th { width: 30%; font-weight: 700; font-size: 1.15rem; padding-right: 1rem; }
.price-table td:nth-child(2) { color: var(--brown); padding-right: 1rem; }
.price-table td:last-child {
  text-align: right; white-space: nowrap;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1;
}
.price-table .per { font-size: .55em; font-weight: 600; }
@media (max-width: 640px) {
  .price-table tr { display: grid; grid-template-columns: 1fr auto; padding: 1rem 0; }
  .price-table th, .price-table td { padding: 0; width: auto; }
  .price-table td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 1rem; }
  .price-table td:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

.founding {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 3rem; margin-top: clamp(3rem, 6vw, 5rem);
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--dark); color: var(--cream);
  border-radius: var(--radius-frame);
}
.founding p { margin-top: .75rem; max-width: 36em; }
.founding :focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* ---------- FAQ ---------- */

.faq { padding-block: var(--section); }
.faq-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-list details { border-top: 1.5px solid var(--cream); }
.faq-list details:last-child { border-bottom: 1.5px solid var(--cream); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.25rem 0; font-weight: 600; font-size: 1.2rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; font-size: 1.75rem; font-weight: 400; line-height: 1; color: var(--orange);
  transition: transform .2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding-bottom: 1.5rem; max-width: 36em; }
@media (prefers-reduced-motion: reduce) { .faq-list summary::after { transition: none; } }

/* ---------- Start a project ---------- */

.start { padding-block: var(--section); }
.start-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
}
.start-intro p { margin-top: 1.25rem; color: var(--brown); max-width: 28em; }
@media (max-width: 960px) { .start-grid { grid-template-columns: 1fr; } }

.brief-form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1rem;
}
.field { display: grid; gap: .4rem; align-content: start; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 1rem; }
.optional { font-weight: 400; color: var(--brown); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: .7rem .9rem;
  background: var(--cream); color: var(--dark);
  border: 2px solid var(--cream); border-radius: var(--radius-control);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input::placeholder, .field textarea::placeholder { color: #6B5446; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--dark); outline-offset: 2px;
}
.field [aria-invalid="true"] { border-color: var(--dark); }
.error { font-size: .95rem; font-weight: 600; color: var(--dark); }
.error::before { content: "! "; }

.check { display: flex; gap: .75rem; align-items: flex-start; font-size: 1rem; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--dark); flex: none; }

.form-actions { margin-top: .5rem; }
.form-status { font-weight: 600; min-height: 1.5em; }

@media (max-width: 560px) { .brief-form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-footer { padding-block: clamp(3.5rem, 7vw, 6rem) 2.5rem; }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1fr);
  gap: 2rem; align-items: start;
}
.footer-mark {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3rem, 7vw, 6rem); line-height: .85; color: var(--orange);
  grid-column: 1 / -1; margin-bottom: 1rem;
}
.footer-links { display: grid; gap: .5rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--orange); }
.footer-legal { grid-column: 1 / -1; margin-top: 2rem; font-size: .95rem; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer-mark { grid-column: 1 / -1; } }
.site-footer a, .site-footer button { overflow-wrap: anywhere; }

/* ---------- Header tools: language and menu ---------- */

.header-tools { display: flex; align-items: center; gap: .75rem; order: 2; }
.site-nav { order: 1; margin-left: auto; }
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.75rem; min-height: 2.5rem; padding: 0 .6rem;
  border: 2px solid var(--dark); border-radius: var(--radius-control);
  font-weight: 700; font-size: .95rem; text-decoration: none;
}
.lang-switch:hover { background: var(--dark); color: var(--cream); }
@media (max-width: 1080px) {
  .header-tools { margin-left: auto; }
}

/* ---------- Small pieces ---------- */

.link-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.link-button:hover { color: var(--orange); }

.btn-outline-light { background: transparent; border-color: var(--cream); color: var(--cream); }
.btn-outline-light:hover { background: var(--cream); color: var(--dark); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .95rem; color: var(--brown); }

/* ---------- Cookie notice ---------- */

.cookie {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); z-index: 20;
  max-width: 44rem; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 2px solid var(--orange); border-radius: var(--radius-frame);
  font-size: 1rem;
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1 1 22rem; }

/* ---------- Legal pages ---------- */

.legal-head { padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem); }
.legal-updated { margin-top: 1rem; color: var(--brown); }
.legal-body { padding-block: clamp(3rem, 7vw, 6rem); }
.prose { max-width: calc(42rem + 2 * var(--gutter)); margin-inline: 0; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 {
  margin-top: 2.75rem;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.05; color: var(--orange);
}
.prose ul { list-style: disc; padding-left: 1.25rem; }
.prose li + li { margin-top: .6rem; }
.prose strong { font-weight: 700; }

/* ---------- 404 ---------- */

.not-found { min-height: 70vh; padding-block: clamp(3rem, 10vw, 8rem); }
.not-found .hero-lede { margin-block: 1.75rem 2rem; max-width: 30em; }

/* Cyrillic diacritics (й, ї) need a little more room between tight display lines */
:lang(uk) .hero-title { line-height: .96; }
:lang(uk) .h2 { line-height: 1.02; }

/* ---------- WordPress additions ---------- */

.frame-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame.has-image .frame-placeholder { display: none; }
.faq-answer { padding-bottom: 1.5rem; max-width: 36em; }
.faq-answer > * + * { margin-top: .75rem; }
.faq-list details .faq-answer p { padding-bottom: 0; }
.admin-bar .cookie { bottom: var(--gutter); }

/* The full name, language and menu buttons share one line on phones */
@media (max-width: 480px) {
  .wordmark { font-size: 1.4rem; }
  .header-tools { gap: .5rem; }
  .nav-toggle { padding: .4rem .7rem; }
}

/* A play mark on work that has a film, until it plays */
.work-item .frame.has-video::after {
  content: ""; position: absolute; left: 1rem; bottom: 1rem; z-index: 2;
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--dark) no-repeat 56% 50% / 1rem
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M0 0l10 6-10 6z' fill='%23C9733D'/%3E%3C/svg%3E");
  transition: opacity .2s;
}
.work-item .frame.has-video.playing::after { opacity: 0; }
.work-item .frame video { z-index: 1; }
@media (prefers-reduced-motion: reduce) { .work-item .frame.has-video::after { transition: none; } }

/* Smaller reel buttons on phones, so they don't cover the film */
@media (max-width: 600px) {
  .reel-controls { right: .5rem; bottom: .5rem; gap: .35rem; }
  .reel-controls button { padding: .35rem .6rem; font-size: .8rem; }
}

/* The showreel plays above its still, not under it */
.reel .reel-video { z-index: 1; }
