/* CollinMotion — afternoon light.
   The site is a sunlit wall around 4pm: butter-yellow paper, brown ink, and a
   patch of window light that drifts slowly across everything. Shadows in
   afternoon light run blue, so the one cool colour is a soft shade blue.
   Anything in Collin's own words is set in pen. */

:root {
  --paper: #fbf3dc;       /* page, sunlit wall */
  --paper-deep: #f3e6c2;  /* behind media */
  --ink: #3b2c1e;         /* primary text, brown ink */
  --pencil: #73614c;      /* secondary text */
  --sun: #f5c443;         /* warm yellow light */
  --marigold: #d9971a;    /* accents, rules, focus */
  --marigold-ink: #8a5800;/* accent when it has to be read as text */
  --shade: #6e86a3;       /* afternoon shadow blue */

  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pen: "Nanum Pen Script", "Bradley Hand", "Segoe Print", cursive;

  /* type scale: 15 / 17 / 21 / 28 / 40 / hero */
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-md: 1.3125rem;
  --t-lg: 1.75rem;
  --t-xl: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  --t-hero: clamp(3.4rem, 0.8rem + 11.5vw, 12rem);
  --t-pen: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem);

  --gutter: clamp(1rem, 0.5rem + 3vw, 3.5rem);
  --measure: 34rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* paper tooth, very quiet */
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  opacity: .09; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .1 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- the window light ----------
   Four panes of sun thrown on the wall, slanted, soft at the edges.
   It drifts over a minute and a half, the way light moves in an afternoon. */
.sunlight {
  position: fixed; z-index: 0; pointer-events: none;
  top: -12vh; right: -14vw;
  width: min(78vw, 62rem); aspect-ratio: 1 / 1.05;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.9rem, 2.4vw, 2.2rem);
  transform: skew(-14deg, 6deg) rotate(-8deg);
  filter: blur(clamp(14px, 2.4vw, 30px));
  opacity: .62;
  mix-blend-mode: multiply;
  animation: afternoon 90s ease-in-out infinite alternate;
}
.sunlight i {
  display: block;
  background: radial-gradient(120% 120% at 30% 25%, #fbd760 0%, var(--sun) 45%, #f0a93055 100%);
}
@keyframes afternoon {
  from { translate: 0 0; opacity: .62; }
  to   { translate: -9vw 7vh; opacity: .5; }
}
@media (max-width: 640px) {
  .sunlight { width: 120vw; top: -6vh; right: -45vw; opacity: .5; }
}
@media (prefers-reduced-motion: reduce) { .sunlight { animation: none; } }

.site-header, main, .hero, .site-footer { position: relative; z-index: 1; }

img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--marigold-ink); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: var(--gutter); top: -3rem; z-index: 60;
  background: var(--ink); color: var(--paper); padding: .5rem .9rem;
  text-decoration: none; border-radius: 4px;
}
.skip:focus { top: 1rem; }

.hand {
  font-family: var(--pen); font-weight: 400; font-size: var(--t-pen);
  line-height: 1.05; color: var(--ink); letter-spacing: 0;
}

/* ---------- header ---------- */

.site-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.25rem var(--gutter);
}
.site-header .mark {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 800; font-size: var(--t-md); letter-spacing: -.03em; text-decoration: none;
}
.site-header .mark img { width: auto; height: 2.1rem; }
.site-header nav ul { display: flex; gap: clamp(.9rem, 2vw, 2rem); list-style: none; margin: 0; padding: 0; }
.site-header nav a {
  text-decoration: none; font-weight: 500; padding-block: .2rem;
  border-bottom: 2px solid transparent;
}
.site-header nav a:hover { border-bottom-color: var(--sun); }
.site-header nav a[aria-current="page"] { border-bottom-color: var(--marigold); }
.is-home .site-header .mark span { display: none; } /* the hero carries the name */
.site-header { align-items: center; }
@media (max-width: 560px) {
  .site-header .mark span { display: none; } /* the logo alone on phones, so the nav fits */
  .site-header nav ul { gap: 1rem; }
}

/* ---------- hero ---------- */

.hero { padding: clamp(1rem, 3vw, 2rem) var(--gutter) 0; }
.hero h1 {
  margin: 0 0 clamp(.75rem, 2vw, 1.5rem);
  font-weight: 800; font-size: var(--t-hero); line-height: .86; letter-spacing: -.045em;
  margin-left: -.04em; padding-bottom: .06em;
  /* the logo's look: a pale face lifted off the wall by a hard ink shadow */
  color: #fffaeb;
  text-shadow: .035em .04em 0 var(--ink);
  -webkit-text-stroke: .012em var(--ink);
}

.reel {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 21 / 9; border-radius: 4px;
  background: var(--paper-deep);
  box-shadow: 0 1px 0 #3b2c1e14, 0 30px 60px -30px #8a580055;
}
.reel video, .reel .reel-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1;
}
/* no reel yet: late light moving across a wall */
.reel-fallback {
  background:
    radial-gradient(40% 70% at 30% 40%, #f8d469 0%, transparent 70%),
    radial-gradient(35% 55% at 75% 65%, #f2b24a88 0%, transparent 70%),
    radial-gradient(60% 80% at 90% 10%, #6e86a333 0%, transparent 70%),
    linear-gradient(120deg, #f6e3b4, #edd29a);
  background-size: 160% 160%;
  animation: drift 30s ease-in-out infinite alternate;
}
.hero.has-reel .reel-fallback, .hero.has-still .reel-fallback { display: none; }
.reel-still { all: unset; position: absolute; inset: 0; cursor: pointer; }
.reel-still img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.reel-still:hover img { transform: scale(1.015); }
.reel-still:focus-visible { outline: 3px solid var(--marigold-ink); outline-offset: -3px; }
@keyframes drift {
  from { background-position: 0% 0%, 100% 0%, 50% 0%, 0 0; }
  to   { background-position: 100% 60%, 0% 80%, 20% 100%, 0 0; }
}

.hero .hand {
  max-width: 26rem; margin: -1.2em 0 0 clamp(.5rem, 4vw, 3rem);
  position: relative; z-index: 2;
  background: var(--paper); padding: .35em .6em .3em;
  rotate: -1.5deg; display: inline-block;
  box-shadow: 0 8px 20px -12px #3b2c1e55;
}

.reel-controls { position: absolute; right: 1rem; top: 1rem; }
.reel-controls button {
  font: inherit; font-size: var(--t-sm); font-weight: 500; color: var(--ink);
  background: #fbf3dccc; border: 0; border-radius: 999px;
  padding: .4rem .9rem; cursor: pointer; backdrop-filter: blur(6px);
}
.reel-controls button:hover { background: var(--paper); }
.hero:not(.has-reel) .reel-controls { display: none; }

@media (max-width: 640px) {
  .hero.has-reel .reel { aspect-ratio: 4 / 5; } /* a film still keeps its 16:9 so titles aren't cropped */
  .reel { aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) { .reel-fallback { animation: none; } }

/* ---------- sections ---------- */

main { display: block; }
.section { padding: clamp(4rem, 10vw, 7.5rem) var(--gutter) 0; }
.section:last-of-type { padding-bottom: clamp(4rem, 10vw, 7.5rem); }
.page-top { padding-top: clamp(2.5rem, 7vw, 5rem); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
h2, .page-title {
  margin: 0; font-weight: 800; font-size: var(--t-xl); line-height: 1; letter-spacing: -.035em;
}
.page-title { font-size: clamp(3rem, 1.4rem + 7vw, 7.5rem); line-height: .85; letter-spacing: -.05em; }
.section-head a { color: var(--pencil); text-decoration: none; font-weight: 500; border-bottom: 2px solid var(--sun); }
.section-head a:hover { color: var(--ink); border-bottom-color: var(--marigold); }
.lede { max-width: var(--measure); color: var(--pencil); font-size: var(--t-md); line-height: 1.45; margin: 1.25rem 0 0; }

.statement {
  max-width: 38rem; margin: 0;
  font-size: var(--t-lg); line-height: 1.3; font-weight: 500; letter-spacing: -.015em;
}

/* ---------- frames ---------- */

.frame { position: relative; overflow: hidden; background: var(--paper-deep); border-radius: 3px; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame.placeholder {
  background:
    radial-gradient(70% 70% at var(--x, 30%) var(--y, 40%), hsl(var(--h, 44) 88% 66% / .75), transparent 70%),
    linear-gradient(150deg, hsl(var(--h, 44) 60% 86%), hsl(calc(var(--h, 44) - 8) 45% 76%));
}
.frame.placeholder::after {
  content: attr(data-label); position: absolute; left: 1rem; bottom: .7rem; right: 1rem;
  font-family: var(--pen); color: #3b2c1ecc; font-size: var(--t-pen); line-height: 1;
}

/* ---------- films ---------- */

.films { display: grid; gap: clamp(3rem, 7vw, 5rem); }
.film {
  display: grid; gap: 1.1rem 2.5rem; align-items: end;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
}
.film .play { all: unset; cursor: pointer; display: block; position: relative; border-radius: 3px; }
.film .play:disabled { cursor: default; }
.film .play:focus-visible { outline: 2px solid var(--marigold-ink); outline-offset: 4px; }
.film .frame { aspect-ratio: 16 / 9; }
.film .frame img { transition: transform 1.2s var(--ease); transform: scale(var(--zoom, 1)); }
.film .play:hover .frame img { transform: scale(calc(var(--zoom, 1) * 1.02)); }
.film .play-badge, .reel-still .play-badge {
  position: absolute; left: 1rem; top: 1rem;
  font-size: var(--t-sm); font-weight: 500; padding: .3rem .8rem; border-radius: 999px;
  background: var(--sun); color: var(--ink);
}
.film h3 { margin: 0; font-weight: 700; font-size: var(--t-lg); line-height: 1.1; letter-spacing: -.025em; }
.film .feeling { margin: .5rem 0 0; max-width: 24rem; }
.film .meta { margin: .8rem 0 0; color: var(--pencil); font-size: var(--t-sm); }
.film .meta span + span::before { content: ", "; }
.film:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
.film:nth-child(even) .play { order: 2; }
.film .frame.placeholder::after, .series-card .frame.placeholder::after { content: none; }
.film:first-child { grid-template-columns: 1fr; }
.film:first-child .frame { aspect-ratio: 21 / 9; }
.film:first-child .info { max-width: 34rem; }

@media (max-width: 760px) {
  .film, .film:first-child, .film:nth-child(even) { grid-template-columns: 1fr; }
  .film:nth-child(even) .play { order: 0; }
  .film:first-child .frame { aspect-ratio: 16 / 9; }
}

/* ---------- photography ---------- */

.series-grid {
  display: grid; gap: clamp(1.25rem, 3vw, 2.25rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.series-card { text-decoration: none; display: block; }
.series-card .frame { aspect-ratio: 4 / 5; }
.series-card:nth-child(3n+2) .frame { aspect-ratio: 1 / 1; }
.series-card .frame img { transition: transform 1.2s var(--ease); }
.series-card:hover .frame img { transform: scale(1.03); }
.series-card h3 { margin: .9rem 0 0; font-weight: 700; font-size: var(--t-md); letter-spacing: -.02em; }
.series-card p { margin: .15rem 0 0; color: var(--pencil); font-size: var(--t-sm); }

/* home: a loose strip of single frames */
.photo-strip {
  display: grid; gap: clamp(.75rem, 2vw, 1.5rem);
  grid-template-columns: 1.25fr .8fr 1fr .85fr; align-items: end;
}
.photo-strip a { display: block; }
.photo-strip a:nth-child(1) .frame { aspect-ratio: 4 / 5; }
.photo-strip a:nth-child(2) .frame { aspect-ratio: 3 / 4; }
.photo-strip a:nth-child(3) .frame { aspect-ratio: 1 / 1; }
.photo-strip a:nth-child(4) .frame { aspect-ratio: 2 / 3; }
@media (max-width: 640px) {
  .photo-strip { grid-template-columns: 1fr 1fr; align-items: start; }
  .photo-strip a .frame { aspect-ratio: 4 / 5 !important; }
}

.series-view .back { color: var(--pencil); text-decoration: none; display: inline-block; margin-bottom: 1.5rem; border-bottom: 2px solid var(--sun); }
.series-view .back:hover { color: var(--ink); }
.series-photos { columns: 3 18rem; column-gap: clamp(.75rem, 2vw, 1.5rem); margin-top: clamp(2rem, 5vw, 3.5rem); }
.series-photos button {
  all: unset; cursor: zoom-in; display: block; width: 100%;
  margin-bottom: clamp(.75rem, 2vw, 1.5rem); break-inside: avoid; border-radius: 3px;
}
.series-photos button:focus-visible { outline: 2px solid var(--marigold-ink); outline-offset: 3px; }
.series-photos .frame.placeholder { aspect-ratio: var(--ar, 4 / 5); }

/* ---------- shorts ---------- */

.shorts {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(10.5rem, 14rem);
  gap: 1rem; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x mandatory;
  scrollbar-color: var(--marigold) transparent;
}
.short { scroll-snap-align: start; text-decoration: none; }
.short .frame { aspect-ratio: 9 / 16; }
.short .frame img { transition: transform 1.2s var(--ease); }
.short:hover .frame img { transform: scale(1.03); }
.short h3 { margin: .7rem 0 0; font-size: var(--t-base); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.short p { margin: .1rem 0 0; font-size: var(--t-sm); color: var(--pencil); }
.empty-note { color: var(--pencil); max-width: var(--measure); margin: 0; }
.empty-note a { color: var(--ink); text-decoration-color: var(--marigold); text-underline-offset: .2em; text-decoration-thickness: 2px; }

/* ---------- about ---------- */

.about {
  display: grid; gap: clamp(2rem, 6vw, 5rem); align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}
.about .frame { aspect-ratio: 4 / 5; }
.about-mark { display: grid; place-items: center; aspect-ratio: 4 / 5; }
.about-mark img { width: min(70%, 18rem); height: auto; }
@media (max-width: 760px) { .about-mark { aspect-ratio: auto; justify-items: start; } .about-mark img { width: 8rem; } }
.about-body p { max-width: var(--measure); margin: 0 0 1.1rem; }
.about-body p:first-child { font-size: var(--t-lg); line-height: 1.3; font-weight: 500; letter-spacing: -.015em; }
.about-body h2 { font-size: var(--t-md); margin: 2.5rem 0 .6rem; letter-spacing: -.02em; }
.about-body ul { list-style: none; padding: 0; margin: 0; color: var(--pencil); }
.about-body li + li { margin-top: .2rem; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

.links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.pill {
  display: inline-block; text-decoration: none; font-weight: 500; padding: .55rem 1.15rem; border-radius: 999px;
  background: var(--sun); color: var(--ink);
}
.pill:hover { background: var(--marigold); }

/* ---------- footer ---------- */

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding: 2rem var(--gutter) 2.5rem; color: var(--pencil); font-size: var(--t-sm);
  border-top: 2px solid #3b2c1e14; align-items: center;
}
.site-footer p { margin: 0; }
.site-footer .sig { font-family: var(--pen); font-size: 1.5rem; color: var(--ink); margin-left: .35rem; }
.site-footer ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- player + lightbox ---------- */

dialog {
  border: 0; padding: 0; background: transparent; color: var(--ink);
  width: min(92vw, 1200px); max-width: none; max-height: 92vh;
}
dialog::backdrop { background: #fbf3dcf2; backdrop-filter: blur(4px); }
dialog[open] { animation: open .45s var(--ease); }
@keyframes open { from { opacity: 0; transform: scale(.985); } }
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }

.player-frame { aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: 3px; overflow: hidden; box-shadow: 0 30px 60px -30px #3b2c1e88; }
.player-frame iframe { width: 100%; height: 100%; border: 0; }
.player-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1rem; }
.player-caption h3 { margin: 0; font-weight: 700; font-size: var(--t-md); letter-spacing: -.02em; }
.dialog-close {
  font: inherit; font-size: var(--t-sm); font-weight: 500; color: var(--ink); cursor: pointer;
  background: var(--sun); border: 0; border-radius: 999px; padding: .4rem .95rem;
}
.dialog-close:hover { background: var(--marigold); }

.lightbox { width: min(96vw, 1400px); }
.lightbox figure { margin: 0; display: grid; gap: .9rem; }
.lightbox .lb-img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 2px; }
.lightbox figcaption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--pencil); font-size: var(--t-sm); }
.lightbox .lb-nav { display: flex; gap: .5rem; }
