/* ==========================================================================
   willstaiger.com
   One stylesheet for the whole site. The values you're most likely to
   tweak are the variables right below.
   ========================================================================== */

/* FONT
   The old site used Aktiv Grotesk through Squarespace's Adobe Fonts license,
   which doesn't come with you. To get it back:
     1. fonts.adobe.com > Aktiv Grotesk > "Add to Web Project"
        (Regular 400, Regular Italic, Medium 500, Bold 700)
     2. Replace the Inter line below with the project's @import line, e.g.
        @import url("https://use.typekit.net/abc1234.css");
   Until then Inter stands in, which is very close. */
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
  --font: "aktiv-grotesk", "Inter", "Helvetica Neue", Arial, sans-serif;
  --ink: #2b2b2b;          /* text, same as the old site */
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --bg: #ffffff;
  --bg-alt: #fafafa;       /* off-white sections */
  --accent: #0f5c66;       /* small labels and the results callout */
  --accent-soft: #f3f7f7;
  --gutter: clamp(16px, 3vw, 40px);
  --max: 1040px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }

p { margin: 0 0 1em; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Header: nav left, name centered, icons right (same as Squarespace)
   -------------------------------------------------------------------------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 24px var(--gutter);
}

.site-nav { display: flex; gap: 12px; }
.site-nav a {
  text-decoration: none;
  line-height: 1.6;
  background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0 1px;
  transition: background-size 0.2s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { background-size: 100% 1px; }

.site-title {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.site-icons { display: flex; gap: 14px; justify-self: end; }
.site-icons a { display: block; width: 20px; height: 20px; }
.site-icons svg { width: 100%; height: 100%; fill: currentColor; }

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
main { display: block; }

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

.section { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }

/* One heading style for the whole site: "Hi, I'm Will…" and the project
   titles (Uber Eats, Feals). Medium on desktop, semibold on phones. */
.headline,
.project h2 {
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 500;
  line-height: 1.33;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Home / showreel
   -------------------------------------------------------------------------- */
.home { text-align: center; padding: 24px 0 64px; }
.home .headline { margin-bottom: 40px; }
.home .video { max-width: 1000px; margin: 0 auto; }
.reel-notes { margin-top: 36px; font-size: 14px; line-height: 1.7; }
.reel-notes em { display: block; margin-top: 10px; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);   /* photo | text */
  gap: clamp(32px, 6vw, 72px);
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px var(--gutter) 80px;
  align-items: center;
}
.about img { width: 100%; border-radius: 10px; }
.about > div { max-width: 34em; }
.about .headline { margin-bottom: 20px; }

/* --------------------------------------------------------------------------
   Social reel (unlisted)
   -------------------------------------------------------------------------- */
.intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.intro .headline { margin-bottom: 20px; }
.intro .video { max-width: 320px; justify-self: center; width: 100%; }

.clients {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px var(--gutter);
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.clients b { color: var(--ink); font-weight: 500; white-space: nowrap; }

.project h2 { margin-bottom: 14px; }

.proj-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 36px; }
.proj-head p { line-height: 1.7; }

.facts { margin: 0; }
.facts dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 14px; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 4px 0 0; font-size: 15px; line-height: 1.6; }
.facts dd + dd { margin-top: 10px; }

.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 300px)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cap h3 { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 14px 0 4px; }
.cap p { font-size: 14px; line-height: 1.55; margin: 0; }

.closing { text-align: center; padding: 56px var(--gutter) 24px; }

/* --------------------------------------------------------------------------
   Videos
   Write a plain link to the video (YouTube, Shorts or Vimeo) with
   class="video" and js/video.js turns it into a poster with a play button
   that loads the player on click. Add "video--short" for vertical 9:16 videos,
   and "video--short video--portrait" for 4:5 ones.
   -------------------------------------------------------------------------- */
.video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}
.video--short { aspect-ratio: 9 / 16; border-radius: 10px; }
.video--portrait { aspect-ratio: 4 / 5; }   /* use with video--short for 4:5 videos */

.video img,
.video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  object-fit: cover;
}

.video .video-label {   /* only visible if the script doesn't run */
  position: absolute; left: 16px; bottom: 12px; right: 16px;
  font-size: 14px; line-height: 1.4;
}
.video.is-ready .video-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.video::after {  /* play button */
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") no-repeat 55% 50% / 30px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.video:hover::after, .video:focus-visible::after { transform: scale(1.08); background-color: rgba(0, 0, 0, 0.75); }
.video.is-playing::after { display: none; }

/* --------------------------------------------------------------------------
   Rive
   <div class="rive" data-rive="/rive/file.riv" style="--ratio: 16 / 9">
     <img src="/img/file-still.jpg" alt="…">
   </div>
   js/rive-embed.js loads the animation and fades out the still.
   -------------------------------------------------------------------------- */
.rive {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ratio, 16 / 9);
  background: var(--bg-alt);
  overflow: hidden;
  border-radius: 10px;
}
.rive img,
.rive canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.rive canvas { opacity: 0; transition: opacity 0.4s ease; }
.rive.is-live canvas { opacity: 1; }
.rive img { transition: opacity 0.4s ease; }
.rive.is-live img { opacity: 0; }

.rive-play {
  position: absolute; left: 50%; bottom: 16px;
  transform: translateX(-50%);
  font: inherit; font-size: 14px; line-height: 1;
  padding: 10px 16px;
  border: 0; border-radius: 999px;
  background: rgba(0, 0, 0, 0.7); color: #fff;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 32px var(--gutter) 40px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Phone width
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-areas: "title title" "nav icons";
    row-gap: 6px;
    padding-top: 18px;
    padding-bottom: 12px;
  }
  .site-title { grid-area: title; justify-self: center; font-size: 24px; }
  .site-nav { grid-area: nav; }
  .site-icons { grid-area: icons; }

  .section { padding: 40px 0; }
  .home { padding-top: 16px; }
  .home .headline { margin-bottom: 28px; }
  .headline, .project h2 { font-weight: 600; }   /* a touch bolder on phones */
  .about { grid-template-columns: 1fr; gap: 28px; padding-top: 16px; }
  .about img { max-width: 320px; }

  .intro, .proj-head, .grid--2, .grid--3 { grid-template-columns: 1fr; gap: 28px; }
  .intro .video, .grid .video { max-width: 340px; }
  .grid > div { max-width: 340px; width: 100%; margin: 0 auto; }
}
