/* Layout system after apple.com: white page, full-width tiles that alternate light grey / white / black,
   centered headline → subhead → two pill buttons → media, and a calm vertical rhythm. The red stays the brand colour. */
:root{--ink:#1d1d1f;--muted:#6e6e73;--tile:#f5f5f7;--tile-gap:12px}
:root:not([data-theme="dark"]){--paper:#fff;background:#fff}
:root:not([data-theme="dark"]) body{background:#fff}
[data-theme="dark"]{--tile:#161618}

/* Buttons: Apple pills. Primary is filled red, secondary is a red outline. */
.button{min-height:44px;padding:11px 22px;gap:10px;font-size:17px;font-weight:500;letter-spacing:-.01em;line-height:1.2}
.button.primary,.home-project-feature .primary,.home-tesla .button.primary{background:var(--red);color:#fff;box-shadow:none}
.button.primary:hover{background:#bd2924;transform:none}
.button.secondary{background:transparent;color:var(--red);box-shadow:inset 0 0 0 1px var(--red)}
.button.secondary:hover{background:var(--red);color:#fff}
.tile-dark .button.secondary{color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}
.tile-dark .button.secondary:hover{background:#fff;color:#1d1d1f}

/* Tiles: full width, separated by a thin gap. */
main .tile{box-sizing:border-box;width:100%;margin:var(--tile-gap) 0 0;padding:88px max(24px,calc((100% - 1200px)/2)) 96px;overflow:hidden}
main .tile-light{background:var(--tile)}
main .tile-white{background:var(--paper)}
main .tile-dark{background:#000;color:#f5f5f7;--ink:#f5f5f7;--muted:#a1a1a6;--line:#2c2c2e}
.home-page main .tile::before{content:none}

/* Centered stack: eyebrow, headline, subhead, buttons. */
.tile-copy{max-width:820px;margin:0 auto 52px;text-align:center}
.tile-copy .eyebrow{display:inline-flex;align-items:center;gap:10px;margin:0 0 14px;color:var(--red)}
.tile-copy h2{margin:0;font-size:clamp(40px,5.6vw,72px);line-height:1.04}
.tile-copy .tile-sub,.tile-copy .project-intro p:first-child{max-width:640px;margin:18px auto 0;color:var(--muted);font-size:clamp(19px,1.9vw,24px);line-height:1.4;font-weight:400}
.tile-copy .project-intro{max-width:none;margin:0;justify-self:auto}
.tile-copy .project-soon{justify-content:center;margin:12px 0 0;color:var(--muted);font-size:15px}
.tile-ctas{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;margin-top:30px}
.tile-media{max-width:1200px;margin:0 auto}
.tile-media .project-player{border-radius:24px}
.tile-dark .tile-media .project-player{box-shadow:0 40px 100px -40px rgba(229,9,20,.35)}
.tile-note{max-width:560px;margin:22px auto 0;color:var(--muted);font-size:14px;text-align:center}

/* Tesla facts: a quiet centered row under the film. */
.home-tesla .tesla-facts{display:grid;grid-template-columns:repeat(3,minmax(0,180px));justify-content:center;gap:48px;margin:44px 0 0;padding:0;list-style:none;text-align:center}
.home-tesla .tesla-facts strong{display:block;color:#fff;font-size:clamp(28px,3vw,40px);line-height:1;letter-spacing:-.04em}
.home-tesla .tesla-facts span{display:block;margin-top:8px;color:#a1a1a6;font-size:14px}

/* Tool stack, about, feedback inside tiles. */
.home-page main .tool-stack{border:0;margin-top:var(--tile-gap);padding-block:72px}
.home-page main .tool-stack .stack-heading h2{font-size:clamp(32px,3.6vw,48px)}
.home-page main .creator{display:grid;margin-block:var(--tile-gap) 0;padding-block:96px;gap:72px}
.home-page main .reactions{padding-block:96px 110px}
.home-page main .reactions .section-top{border:0;padding-bottom:0}

/* Section heads on every page: centered, headline then a short line under it. */
main .section-top{display:block;max-width:820px;margin:0 auto 48px;text-align:center}
main .section-top .eyebrow{color:var(--red)}
main .section-top h2{margin-inline:auto}
main .section-top .section-aside{max-width:560px;margin:16px auto 0;font-size:19px;line-height:1.45}

@media (max-width:760px){
  :root{--tile-gap:8px}
  main .tile{padding:60px 20px 64px}
  .tile-copy{margin-bottom:34px}
  .tile-copy h2{font-size:clamp(36px,10vw,52px)}
  .tile-copy .tile-sub,.tile-copy .project-intro p:first-child{font-size:18px}
  .tile-ctas{flex-direction:column;align-items:stretch;gap:12px;max-width:340px;margin-inline:auto}
  .tile-ctas .button{width:100%;margin:0}
  main .tile .tile-media{margin-inline:-20px}
  main .tile .tile-media .project-player{border-radius:0}
  .home-tesla .tesla-facts{gap:16px;margin-top:30px}
  .home-tesla .tesla-facts strong{font-size:24px}
  .home-tesla .tesla-facts span{font-size:12px}
  .home-page main .tool-stack{padding-block:48px}
  .home-page main .creator{padding-block:60px;gap:28px}
  .home-page main .reactions{padding-block:60px 72px}
  main .section-top{margin-bottom:30px}
  main .section-top .section-aside{font-size:17px}
}

/* First tile on a page sits under the floating nav. */
main>.tile:first-child{margin-top:0;padding-top:150px}

/* Hire: an Apple product-page opening. Copy centered, then the film large underneath. */
.hire-page .hire-intro{display:block;text-align:center}
.hire-page .hire-intro-copy{max-width:820px;margin:0 auto}
.hire-page .hire-intro-copy>p:not(.eyebrow){max-width:620px;margin-inline:auto;font-size:clamp(19px,1.8vw,22px);line-height:1.45;color:var(--muted)}
.hire-page .hire-price{justify-content:center;margin-inline:auto}
.hire-page .hire-actions{justify-content:center}
.hire-page .hire-intro-art{max-width:1200px;margin:56px auto 0}
.hire-page .hire-intro-film .featured-player{aspect-ratio:992/432;border-radius:24px}
.hire-page .hire-intro-art figcaption{justify-content:center;gap:4px 18px}
.hire-quality.tile-dark .hire-proof strong{color:#fff}
.hire-quality.tile-dark p:not(.eyebrow){color:#a1a1a6}

/* Interaction 1: media grows into place as it scrolls in (scroll-driven, no JavaScript). */
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion:no-preference){
    .tile-media,.hire-intro-film .featured-player,.cs-film,.cs-compare,.cs-reel,.featured-second img,.creator-image{
      animation:tile-grow linear both;animation-timeline:view();animation-range:entry 0% cover 35%}
    @keyframes tile-grow{from{scale:.9;opacity:.4}to{scale:1;opacity:1}}
  }
}

/* Interaction 2: cards and logos lift under the pointer. */
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .hire-steps li,.featured-facts li,.reaction,.stack-logos li,.cs-cast-grid figure,.purchase-card,.kitty-guide-card{transition:translate .35s cubic-bezier(.22,1,.36,1),box-shadow .35s ease}
  .hire-steps li:hover,.featured-facts li:hover,.stack-logos li:hover,.cs-cast-grid figure:hover{translate:0 -6px;box-shadow:0 18px 40px -18px rgba(0,0,0,.25)}
  .stack-logos .stack-icon{transition:scale .35s cubic-bezier(.22,1,.36,1)}
  .stack-logos li:hover .stack-icon{scale:1.12}
  .button{transition:background .2s ease,color .2s ease,scale .2s ease}
  .button:active{scale:.97}
}
@media (max-width:760px){main>.tile:first-child{padding-top:112px}.hire-page .hire-intro-art{margin-top:36px;margin-inline:-20px}.hire-page .hire-intro-film .featured-player{border-radius:0}}

/* Work cards: the whole card is the link; the image eases in on hover. */
.work-cards{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.work-card{position:relative;display:block;overflow:hidden;border-radius:24px;background:#000;color:#fff;aspect-ratio:16/10;isolation:isolate}
.work-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:scale .8s cubic-bezier(.22,1,.36,1)}
.work-card::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 40%,rgba(0,0,0,.75));z-index:0}
.work-card-copy{position:absolute;left:28px;right:28px;bottom:26px;z-index:1;display:grid;gap:6px}
.work-card-tag{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.7)}
.work-card strong{font-size:clamp(24px,2.4vw,34px);line-height:1.1;letter-spacing:-.03em}
.work-card-more{font-size:16px;color:rgba(255,255,255,.85)}
.work-card-more span{display:inline-block;transition:translate .3s ease}
.work-card:focus-visible{outline:3px solid var(--red);outline-offset:4px}
@media (hover:hover){.work-card:hover img{scale:1.05}.work-card:hover .work-card-more span{translate:4px 0}}
@media (max-width:760px){.work-cards{grid-template-columns:1fr;gap:14px}.work-card{border-radius:18px;aspect-ratio:4/3}.work-card-copy{left:20px;right:20px;bottom:20px}}

/* Nav: "Hire me" is the one action that matters, so it is a small red pill. */
#main-navigation a[href="/hire"]{background:var(--red);color:#fff!important;border-radius:100px;padding-inline:14px}
#main-navigation a[href="/hire"]:hover{background:#bd2924}

/* Phones: long stacks become swipe rows (process steps, reference board) so pages stay short. */
@media (max-width:760px){
  .hire-steps,.hire-frames{display:flex!important;gap:12px;margin-inline:-20px;padding:0 20px 6px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:20px;scrollbar-width:none}
  .hire-steps::-webkit-scrollbar,.hire-frames::-webkit-scrollbar{display:none}
  .hire-steps li{flex:0 0 78%;scroll-snap-align:start}
  .hire-frames figure,.hire-frames-world figure:first-child{flex:0 0 86%;scroll-snap-align:start;grid-column:auto}
  .hire-frames img{aspect-ratio:16/9;object-fit:cover}
}
@media (max-width:700px){#main-navigation a[href="/hire"]{justify-content:center;text-align:center;margin-top:8px;padding-inline:14px}}


/* Projects page: every project is the same tile — label + tag, headline, one line, two buttons, one widescreen film. */
.meta-tag{display:inline-block;padding:5px 11px;border-radius:999px;box-shadow:inset 0 0 0 1px currentColor;color:var(--muted);font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:none;vertical-align:middle}
.tile-copy h1{margin:0;font-size:clamp(40px,5.6vw,72px);line-height:1.04}
.tile-copy .tile-note{margin-top:16px}
.projects-page .tile-media .project-player,.projects-page .tile-media .film-card{position:relative;overflow:hidden;aspect-ratio:992/432;border-radius:24px;background:#0d1014}
.projects-page .tile-media .project-video{width:100%;height:100%;object-fit:cover}
.projects-page .tile-media .film-card:after{content:none}
.projects-page .tile-media .film-card>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:none}
.projects-page .tile-media .film-preview iframe{inset:auto;top:50%;left:0;width:100%;height:auto;aspect-ratio:16/9;translate:0 -50%}
.projects-page .tile-dark .tile-media .project-player,.projects-page .tile-dark .tile-media .film-card{box-shadow:0 40px 100px -40px rgba(229,9,20,.35)}
.projects-page .tile-light .tile-media .project-player{box-shadow:0 30px 80px -40px rgba(0,0,0,.35)}
.projects-page .tile .project-testimonial{max-width:820px;margin:52px auto 0;padding:32px 0 0;text-align:center}
.projects-page .tile .project-testimonial blockquote{margin:0 auto 22px;font-size:clamp(20px,2.2vw,28px)}
.projects-page .tile .project-testimonial figcaption{justify-content:center}
.projects-page .tile .project-testimonial figcaption>span{margin-right:0;text-align:left}
.projects-page .tile-dark .project-testimonial strong{color:#fff}
@media (max-width:760px){
  .projects-page .tile-media .project-player,.projects-page .tile-media .film-card{border-radius:0}
  .projects-page .tile .project-testimonial{margin-top:36px}
}
/* The Clinic section carries older one-off rules; bring it back to the shared tile. */
.projects-page #clinic.tile{border-top:0;margin-top:var(--tile-gap);padding:88px max(24px,calc((100% - 1200px)/2)) 96px}
.projects-page #clinic .tile-media .film-card{aspect-ratio:992/432;border-radius:24px;min-height:0}
.projects-page #clinic h2{font-size:clamp(40px,5.6vw,72px);line-height:1.04;letter-spacing:inherit}
.projects-page #clinic h2>span{color:#a1a1a6}
.projects-page #clinic .project-explore{width:auto}
@media (max-width:760px){.projects-page #clinic.tile{padding:60px 20px 64px}.projects-page #clinic .tile-media .film-card{border-radius:0}}
.projects-page .project-guide-preview.tile{display:block;max-width:none;padding-bottom:96px}
.projects-page .tile-dark :is(h1,h2)>span,.projects-page #clinic h2>span{color:#86868b}
@media (max-width:760px){.projects-page .project-guide-preview.tile{padding-bottom:64px}}
/* Homepage "More projects": two cards and one way through to the full list. */
.home-more .tile-copy{margin-bottom:44px}
.home-more .work-cards{max-width:1200px;margin:0 auto}
.home-more .tile-ctas{margin-top:40px}
.tile-dark .work-card{box-shadow:0 30px 80px -40px rgba(229,9,20,.3)}
/* "One Little Knight." stays in the main ink colour (owner's choice), under the red "300K+ Views." */
:is(#series-title,#kitty-title)>:is(span,em,i):last-child{color:var(--ink)!important}
/* Hire: one tidy caption line under the film — title, then the link in the same size. */
.hire-page .hire-intro-art figcaption{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:6px 14px;margin-top:16px;font-size:14px;letter-spacing:0}
.hire-page .hire-intro-art figcaption>span{color:var(--ink);font-weight:600}
.hire-page .hire-intro-art figcaption .text-link{min-height:0;gap:4px;padding:0;color:var(--red);font-size:14px;font-weight:600}
.hire-page .hire-intro-art figcaption .text-link:hover{text-decoration:underline;text-underline-offset:3px}

/* Hire: the opening film uses the same card format as the work cards — label, title and link on the image. */
.hire-intro-film .featured-player::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,rgba(0,0,0,.72));pointer-events:none;transition:opacity .3s ease}
.film-overlay{position:absolute;left:28px;bottom:26px;z-index:2;display:grid;gap:6px;color:#fff;text-align:left}
.film-overlay strong{font-size:clamp(24px,2.4vw,34px);line-height:1.1;letter-spacing:-.03em}
.film-overlay .work-card-more span{display:inline-block;transition:translate .3s ease}
.film-overlay:hover .work-card-more span{translate:4px 0}
.film-overlay:focus-visible{outline:3px solid #fff;outline-offset:6px;border-radius:6px}
.hire-intro-film .featured-play{left:auto;right:22px;z-index:2}
.hire-intro-film .featured-player.is-playing::after,.hire-intro-film .featured-player.is-playing .film-overlay{opacity:0;pointer-events:none}
@media (max-width:760px){.film-overlay{left:20px;bottom:18px;gap:4px}.film-overlay strong{font-size:22px}.film-overlay .work-card-tag{font-size:10px}.hire-intro-film .featured-play{right:12px;bottom:auto;top:12px}}
