/* masilmotion.com — plain static site. */
:root {
  /* Israel's palette, site-palette-09 */
  --paper: #EFEEEC;
  --mist: #D4DEEA;
  --royal: #293388;
  --ink: #18184C;
  --lilac: #D5B4FB;
  --lime: #DAE83D;
  --soft: #5b5c7d;
  --line: #D4DEEA;
  --wrap: 1120px;
  /* All text: Bricolage Grotesque (SIL OFL, fonts/OFL.txt), self-hosted.
     Fraunces headings (2026-11-21) were dropped by Israel on 2026-11-26.
     P22 Mackinac Pro stays in the logo and animations only. */
  --sans: "Bricolage Grotesque", "Helvetica Neue", Arial, system-ui, sans-serif;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
/* The site is light only, by design: asks browsers not to force dark mode. */
html { -webkit-text-size-adjust: 100%; color-scheme: only light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
/* Links are bold royal blue with no underline (Israel, 2026-11-26, after
   goodog.tv/contact-5). Weight and colour mark them; hover darkens to ink. */
a { color: var(--royal); font-weight: 700; text-decoration: none; }
a:hover { color: var(--ink); }
/* Links that are whole blocks keep the text colour of their content. */
.tile, .next, .mark, .tool-tile, .video a { color: inherit; }
.tile:hover, .next:hover { color: var(--royal); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--royal); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Header */
/* Logo centred; nav sits in the right-hand column (stacked below on phones).
   A full-width royal-blue bar (Israel's decision, 2026-11-21): the logo's blue
   extrusion merges into it, so the logo reads as white letters and no longer
   competes with the extruded hero line below. The bar reaches the window
   edges through a clipped box-shadow, so it causes no horizontal scroll. */
.site-header {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 20px 0;
  background: var(--royal); color: #fff;
  box-shadow: 0 0 0 100vmax var(--royal); clip-path: inset(0 -100vmax);
}
.site-header .mark { grid-column: 2; }
.site-header nav { grid-column: 3; justify-self: end; }
.site-header .mark img { width: 210px; }
.site-header nav a { margin-left: 28px; font-weight: 700; text-decoration: none; }
.site-header a { color: inherit; }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--lilac); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.site-header a:hover { color: var(--mist); }
.site-header a:focus-visible { outline-color: #fff; }

/* Type */
h1 { font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1.02; letter-spacing: -0.035em; margin: 0; font-weight: 800; color: var(--royal); }
h2 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .3em; font-weight: 800; }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.4rem); max-width: 34em; margin: 1.2em 0 0; }
.meta { color: var(--soft); font-size: .95rem; margin: .6em 0 0; }
.gold { color: var(--ink); font-weight: 700; }
.gold::before { content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .4em; background: var(--lime); outline: 1.5px solid var(--ink); transform: rotate(45deg); }

/* Hero */
.hero { padding: 8vh 0 9vh; text-align: center; }
.hero h1 span { display: block; }
.hero .lede { margin-left: auto; margin-right: auto; text-wrap: balance; }
.hero .lede span { display: block; } /* each sentence starts its own line */
.rule { display: block; width: min(420px, 70%); height: 6px; margin: 22px auto 0; background: linear-gradient(90deg, var(--royal) 55%, var(--lime) 55%); transform: rotate(-2deg); border-radius: 3px; }

/* Work grid */
.work { display: grid; grid-template-columns: repeat(2, 1fr); gap: 44px 32px; padding-bottom: 80px; }
.tile { text-decoration: none; display: block; }
.tile img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border: 1px solid var(--line); transition: transform .25s ease; }
.tile:hover img { transform: translateY(-4px) rotate(-.6deg); }
.tile h2 { margin-top: 14px; }
.tile .meta { margin: 0; }
/* Home: the interactive covers keep the old grid rhythm and tile titles. */
.work-covers { padding-bottom: 80px; }
.work-covers .mm-project-grid { gap: 44px 32px; }
.work-covers .mm-cover-title { margin-top: 14px; font-weight: 800; }

/* Project page */
.project-head { padding: 5vh 0 28px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); }
.video a, .video iframe, .video img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video img { object-fit: cover; }
.video .play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; transition: transform .2s ease; }
.video .play::after { content: ""; margin-left: 6px; border-style: solid; border-width: 14px 0 14px 24px; border-color: transparent transparent transparent var(--ink); }
.video a:hover .play { transform: scale(1.08); }
.video-note { color: var(--soft); font-size: .8rem; margin: 8px 0 0; }
.clip video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #1d1d1d; border: 1px solid var(--line); }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; padding: 40px 0; }
.cols p { margin: 0 0 1em; max-width: 36em; }
.facts { margin: 0; font-size: .95rem; }
.facts dt { color: var(--soft); margin-top: 14px; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0; font-weight: 700; }
.stills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 48px; }
.stills img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border: 1px solid var(--line); }
.loop { padding-bottom: 48px; }
.loop video { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; background: #1d1d1d; border: 1px solid var(--line); }
/* Tools index: Israel's square click loops, one per tool. */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 16px 0 96px; }
.tool-tile { display: block; }
.tool-tile video { display: block; width: 100%; height: auto; aspect-ratio: 1; background: var(--paper); transition: transform .25s ease; }
.tool-tile:hover video { transform: translateY(-4px) rotate(-.6deg); }
.clip-note { margin-bottom: 48px; }
/* A single reference photo on a project page. */
.photo { margin: 0 0 48px; }
.photo img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.next { letter-spacing: -0.02em; border-top: 1px solid var(--line); padding: 32px 0 72px; font-weight: 800; font-size: 1.4rem; }
.next span { letter-spacing: 0; display: block; color: var(--soft); font-size: .9rem; font-weight: 400; }

/* About */
.about { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 88px); padding: 6vh 0 96px; align-items: center; }
.about .portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--line); }
.about .text { max-width: 34em; }
.about p { margin: 0 0 1em; }
.about .big { color: var(--ink); font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; margin-bottom: .7em; text-wrap: balance; }
.about .email { display: block; margin-top: .3em; color: var(--royal); font-size: 1.25rem; font-weight: 700; }
.about .big a { color: var(--royal); }
.about .big a:hover { color: var(--ink); }
/* Social links as icons (Israel, 2026-11-26). Inline SVG, nothing loaded from elsewhere. */
.icon { display: block; width: 1.2em; height: 1.2em; }
.about .social { display: flex; gap: 22px; margin-top: 1.2em; }
.about .social .icon { width: 30px; height: 30px; }
.text-page { max-width: 40em; padding: 5vh 0 80px; }
.text-page h2 { font-size: 1.25rem; margin: 2em 0 .4em; }
.text-page p { margin: 0 0 1em; }
.legal-note { color: var(--soft); font-size: .95rem; margin: .6em 0 0; }
/* Placeholder Israel still has to fill; the page must not go live while one is left. */
mark.todo { background: var(--lime); color: var(--ink); padding: 0 .2em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--soft); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }
.site-footer a { margin-right: 20px; white-space: nowrap; display: inline-block; }
.site-footer .social-link { vertical-align: -4px; }
.site-footer .icon { width: 20px; height: 20px; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .work, .cols, .about { grid-template-columns: 1fr; gap: 32px; }
  .about { padding-top: 3vh; }
  .about .portrait { aspect-ratio: 1 / 1; object-position: 50% 45%; } /* keeps the headline on the first screen */
  .stills { grid-template-columns: 1fr; }
  /* Door Loop: the action stays in the middle two-thirds, so phones crop it to 2:1. */
  .loop video { aspect-ratio: 2 / 1; object-fit: cover; }
  .tools-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; gap: 24px; }
  .site-header { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .site-header .mark, .site-header nav { grid-column: 1; justify-self: center; }
  .site-header .mark img { width: 170px; }
  .site-header nav a { margin: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Rive hero: the canvas replaces the heading once the animation has loaded. */
.hero canvas { display: none; width: 100%; aspect-ratio: 1980 / 500; cursor: pointer; touch-action: pan-y; }
.hero.has-rive canvas { display: block; }
.hero.has-rive h1, .hero.has-rive .rule { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero.has-rive { padding-top: 4vh; }

/* Project-page interaction: a still until the Rive file loads. */
.interaction { border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.interaction canvas { display: none; width: 100%; height: 100%; touch-action: pan-y; }
.interaction img { width: 100%; height: 100%; object-fit: cover; }
.interaction.has-rive canvas { display: block; }
.interaction.has-rive img { display: none; }
.interaction-note { margin-bottom: 48px; }

@media (max-width: 760px) {
  .interaction--week-vibes {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
  }
  .interaction--week-vibes canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: auto;
    aspect-ratio: 16 / 9;
    transform: translate(-50%, -50%);
  }
}
