@font-face {
  font-family: "Hanson";
  src: url("fonts/Hanson-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Highrise";
  src: url("fonts/HighriseFont-Bold-Demo.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --blue: #1f3bff;
  --bg: #f4f4f4;
  --white: #ffffff;
  --gutter: clamp(16px, 2vw, 32px);
  --radius: clamp(14px, 1.8vw, 26px);
  --display: "Hanson", "Arial Black", sans-serif;
  --condensed: "Highrise", "Arial Narrow", sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--blue);
  font-family: var(--mono);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

/* Type voices: Hanson display, condensed label, small mono. */
.nav a, .works-intro h2, .tagline {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: .82;
  letter-spacing: -.01em;
}
.services li, .hero-media figcaption {
  font-family: var(--condensed);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.01em;
}

/* Header */
.mark { display: inline-block; color: var(--blue); width: clamp(26px, 3vw, 40px); aspect-ratio: 61 / 132; }
.mark svg { width: 100%; height: 100%; }
.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding: var(--gutter) var(--gutter) 0;
}
.nav { display: flex; gap: clamp(20px, 4vw, 44px); padding-top: 2px; }
.nav a { font-size: clamp(9px, .8vw, 12px); transition: opacity .2s; }
.nav a:hover { opacity: .55; }
.est { justify-self: end; width: clamp(96px, 9vw, 150px); height: auto; }

/* Hero: the name runs edge to edge across a centered, inset photo. */
.hero {
  display: grid;
  margin-top: clamp(0px, 1vw, 16px);
}
.hero > * { grid-area: 1 / 1; }
.hero-media {
  margin: 0 auto;
  width: 74%;
  aspect-ratio: 765 / 408;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-media figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  text-align: center;
  color: var(--white);
  font-size: clamp(11px, 1.45vw, 20px);
}
.hero-title {
  margin: 0;
  align-self: center;
  padding: 0 var(--gutter);
  transform: translateY(-8%);
  pointer-events: none;
}
.hero-title img { width: 100%; height: auto; }

/* Services */
.services {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(48px, 7vw, 96px) var(--gutter) 0;
}
.services li { font-size: clamp(13px, 1.55vw, 22px); }

/* Works */
.works { padding: clamp(72px, 10vw, 140px) 0 var(--gutter); }
.works-intro { padding: 0 calc(var(--gutter) + 10px); max-width: 640px; }
.works-intro h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 38px);
  text-transform: none;
  line-height: 1;
}
.works-intro p { margin: 12px 0 0; font-size: clamp(9px, .8vw, 11px); line-height: 1.45; }
.works-intro .swipe-hint { display: none; }

.rail {
  --rail-gap: clamp(10px, 1.2vw, 14px);
  margin-top: clamp(20px, 2.4vw, 32px);
  display: grid;
  grid-auto-flow: column;
  /* About 2.3 cards per screen, so a good part of the next one shows and the row reads as scrollable.
     Cards stop growing at 680px; once three of those fit, they stretch to fill the row instead. */
  grid-auto-columns: max(280px, min(680px, (100% - 2 * var(--rail-gap)) / 2.3), (100% - 2 * var(--rail-gap)) / 3);
  gap: var(--rail-gap);
  padding: 0 calc(var(--gutter) + 10px);
  scroll-padding: 0 calc(var(--gutter) + 10px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail + .rail { margin-top: clamp(10px, 1.2vw, 14px); }
.rail.dragging { scroll-snap-type: none; cursor: grabbing; }
.rail.dragging .card { pointer-events: none; }
@media (hover: hover) { .rail { cursor: grab; } }

.card {
  position: relative;
  aspect-ratio: 467 / 365;
  border-radius: var(--radius);
  overflow: hidden;
  scroll-snap-align: start;
  background: #ddd;
}
a.card { display: block; }
/* A soft shade along the top and bottom keeps white logos and labels readable on any photo. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / .32), rgb(0 0 0 / 0) 34%, rgb(0 0 0 / 0) 72%, rgb(0 0 0 / .28));
  pointer-events: none;
}
.card-logo, .card-meta { z-index: 1; }
a.card:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.card > img:first-child {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.card:hover > img:first-child { transform: scale(1.04); }
.card-logo {
  position: absolute;
  top: 5%; left: 4%;
  height: clamp(14px, 1.7vw, 22px);
  width: auto;
}
/* Wide lockups (two logos side by side) need more height to stay legible. */
.card-logo-wide { height: clamp(26px, 3vw, 44px); }
/* Stacked, portrait logos get a taller box so they read at the same weight as the wide ones. */
.card-logo-tall { height: clamp(64px, 7vw, 110px); }
/* Projects without a logo file get their name set in the display face instead. */
.card-wordmark {
  height: auto;
  color: var(--white);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(13px, 1.5vw, 20px);
  line-height: 1;
  text-shadow: 0 1px 8px rgb(0 0 0 / .3);
}
.card-meta {
  position: absolute;
  left: 4%; right: 4%; bottom: 4%;
  margin: 0;
  display: flex;
  justify-content: space-between;
  color: var(--white);
  font-size: clamp(8px, .75vw, 11px);
  text-shadow: 0 1px 6px rgb(0 0 0 / .25);
}
/* Studio credits in a label (e.g. Inphantry) are their own links. A card that also links somewhere puts that
   link in an invisible layer over the whole card (links can't nest), and only the credit sits above it. */
.card-meta a { text-decoration: underline; text-underline-offset: 2px; }
.card-meta a:hover { opacity: .7; }
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.card-link ~ .card-logo, .card-link ~ .card-meta { pointer-events: none; }
.card-link ~ .card-meta a { pointer-events: auto; }

/* Footer */
.footer {
  background: var(--blue);
  color: var(--white);
  margin-top: var(--gutter);
  padding: var(--gutter) var(--gutter) 0;
  overflow: hidden;
}
.footer .mark { color: var(--white); }
.footer-top { display: flex; justify-content: space-between; align-items: start; }
.footer-links { display: flex; gap: clamp(20px, 2.2vw, 32px); font-size: clamp(9px, .8vw, 11px); }
.footer-links li + li { margin-top: 4px; }
.footer-links a:hover { text-decoration: underline; }
.tagline {
  margin: clamp(120px, 20vw, 300px) 0 0 10px;
  font-size: clamp(16px, 2.6vw, 38px);
  text-transform: none;
  line-height: 1;
}
/* Wordmark masked so it takes the footer's white. */
.footer-name {
  margin: clamp(8px, 1vw, 14px) 0 var(--gutter);
  aspect-ratio: 1844 / 160;
  background: currentColor;
  -webkit-mask: url("../Logos/Sunday%20Logo.svg") center / contain no-repeat;
  mask: url("../Logos/Sunday%20Logo.svg") center / contain no-repeat;
}

/* Contact: full-bleed photo on the left, form on the right, header over both. */
.page-contact .top { position: absolute; inset: 0 0 auto; z-index: 2; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: max(100svh, 760px);
}
.contact-media { margin: 0; overflow: hidden; }
.contact-media img { width: 100%; height: 100%; object-fit: cover; object-position: 8% 60%; }
.contact-panel {
  align-self: center;
  width: min(100%, 600px);
  margin: 0 auto;
  padding: clamp(110px, 12vw, 160px) calc(var(--gutter) + 12px) clamp(48px, 6vw, 80px);
}
.contact-panel h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 2.8vw, 42px);
  line-height: 1.02;
}
.contact-lede { margin: 14px 0 0; font-size: clamp(11px, .9vw, 13px); line-height: 1.5; max-width: 44ch; }

.contact-form { margin-top: clamp(28px, 3.4vw, 44px); display: grid; gap: clamp(20px, 2vw, 26px); }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend {
  display: block;
  padding: 0;
  font-family: var(--condensed);
  font-weight: 700;
  font-size: clamp(14px, 1.2vw, 17px);
  text-transform: uppercase;
}
.field label span { font-family: var(--mono); font-weight: 400; font-size: 10px; text-transform: none; opacity: .6; }
.field input, .field textarea {
  width: 100%;
  margin-top: 6px;
  padding: 8px 0 10px;
  border: 0;
  border-bottom: 1.5px solid color-mix(in srgb, var(--blue) 35%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font: 14px/1.4 var(--mono);
  outline: none;
  resize: vertical;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--blue); }
.field.invalid input, .field.invalid textarea { border-bottom-color: #e5322d; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips label { position: relative; font: inherit; text-transform: none; cursor: pointer; }
.chips input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block;
  padding: 8px 14px;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  font: 11px var(--mono);
  transition: background .2s, color .2s;
}
.chips input:checked + span { background: var(--blue); color: var(--white); }
.chips input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form-foot button {
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform .2s var(--ease), opacity .2s, background .3s, color .3s, box-shadow .3s;
}
.form-foot button:hover { transform: translateY(-2px); }
/* Sent: the button goes light (white, blue outline) until the form is touched again. */
.form-foot button.sent { background: var(--white); color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.form-status { margin: 0; font-size: 11px; }
/* Spam trap: hidden from people, filled in by bots. */
.field-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.page-contact .footer { margin-top: 0; }

.contact-media img { animation: media-settle 1.6s var(--ease) .1s both; }
.contact-media { animation: wipe 1.1s var(--ease) both; }
.contact-panel > * { animation: rise .9s var(--ease) both; }
.contact-panel > :nth-child(1) { animation-delay: .5s; }
.contact-panel > :nth-child(2) { animation-delay: .62s; }
.contact-panel > :nth-child(3) { animation-delay: .74s; }
.page-contact .top > :nth-child(1) { animation-delay: .4s; }
.page-contact .top > :nth-child(2) { animation-delay: .5s; }
.page-contact .top > :nth-child(3) { animation-delay: .6s; }
@keyframes wipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}

/* About: big statement, wide photo, then label/copy rows split by hairlines. */
.about { padding: 0 var(--gutter); }
.about-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  flex-wrap: wrap;
  padding: clamp(80px, 14vw, 220px) 10px clamp(28px, 3vw, 44px);
}
.about-hero h1 {
  margin: 0;
  max-width: 11ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6.4vw, 104px);
  line-height: .92;
  text-wrap: balance;
  animation: logo-in 1.1s var(--ease) .1s both;
}
.about-hero-side {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  max-width: 340px;
  animation: rise .9s var(--ease) .5s both;
}
.about-hero-side p { margin: 0; font-size: clamp(11px, .9vw, 13px); line-height: 1.5; }
.about-down {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  font-size: 16px;
  transition: background .2s, color .2s;
}
.about-down:hover { background: var(--blue); color: var(--white); }

.about-media {
  margin: 0;
  aspect-ratio: 16 / 7;
  border-radius: var(--radius);
  overflow: hidden;
  animation: media-open 1.3s var(--ease) .7s both;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; animation: media-settle 1.8s var(--ease) .7s both; }

.about-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px clamp(32px, 6vw, 120px);
  margin-top: clamp(64px, 9vw, 140px);
  padding: clamp(20px, 2vw, 28px) 10px 0;
  border-top: 1.5px solid var(--blue);
}
.eyebrow {
  margin: 0;
  font-family: var(--condensed);
  font-weight: 700;
  font-size: clamp(14px, 1.2vw, 17px);
  text-transform: uppercase;
}
.about-label h2 {
  margin: 10px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 2.8vw, 42px);
  line-height: 1;
  text-wrap: balance;
}
.founder { margin: clamp(24px, 3vw, 40px) 0 0; max-width: 280px; }
.founder img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}
.founder figcaption { margin-top: 12px; font-size: clamp(11px, .9vw, 13px); line-height: 1.5; }
.founder b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(13px, 1.1vw, 16px);
}
.about-copy { display: grid; align-content: start; gap: 1.1em; max-width: 60ch; }
.about-copy p { margin: 0; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.65; }

.about-table li, .about-table a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 8px 24px;
  padding: 14px 0;
  font-size: clamp(11px, .9vw, 13px);
}
.about-table li { border-bottom: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); }
.about-table li:first-child { padding-top: 0; }
.about-table li:has(a) { display: block; padding: 0; }
.about-table li:has(a):first-child a { padding-top: 0; }
.about-table li > span:first-child, .about-table a > span:first-child {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(13px, 1.1vw, 16px);
}
.about-table li:has(> span:nth-child(3)), .about-table a { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.about-table span:nth-child(3) { text-align: right; opacity: .65; }
.about-table a { transition: opacity .2s; }
.about-table a:hover { opacity: .6; }

.about-cta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin: clamp(80px, 11vw, 170px) 0 clamp(48px, 6vw, 96px);
  padding: 0 10px;
}
.about-cta h2 {
  margin: 0;
  max-width: 12ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 80px);
  line-height: .95;
  text-wrap: balance;
}
.pill {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  transition: transform .2s var(--ease);
}
.pill:hover { transform: translateY(-2px); }

@media (max-width: 720px) {
  .about-row { grid-template-columns: 1fr; }
  .about-media { aspect-ratio: 4 / 3; }
  .about-table li:has(> span:nth-child(3)) > span:nth-child(2), .about-table a > span:nth-child(2) { display: none; }
  .about-table li:has(> span:nth-child(3)), .about-table a { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Lab: a masonry wall of tests, photos, GIFs and video. */
.lab { padding: clamp(40px, 6vw, 96px) var(--gutter) clamp(48px, 6vw, 96px); }
.lab-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  flex-wrap: wrap;
  padding: 0 10px;
}
.lab-intro h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(72px, 15vw, 240px);
  line-height: .8;
  text-transform: uppercase;
  animation: logo-in 1.1s var(--ease) .1s both;
}
.lab-intro-side { max-width: 380px; animation: rise .9s var(--ease) .55s both; }
.lab-intro-side p { margin: 0; font-size: clamp(11px, .9vw, 13px); line-height: 1.5; }
.lab-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.lab-filters button {
  padding: 8px 14px;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lab-filters sup { font-family: var(--mono); font-size: 9px; margin-left: 2px; }
.lab-filters button[aria-pressed="true"] { background: var(--blue); color: var(--white); }

/* The turntable player (assets/turntable.css) on its own page, /radio. */
.radio-deck { margin-bottom: clamp(48px, 6vw, 96px); padding: 0 10px; }
.about-hero-side .radio-note { margin-top: 10px; opacity: .6; }

.lab-grid {
  margin-top: clamp(32px, 4vw, 56px);
  columns: 6 180px;
  column-gap: clamp(10px, 1.2vw, 14px);
}
.lab-tile {
  display: block;
  width: 100%;
  margin: 0 0 clamp(18px, 2vw, 26px);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: zoom-in;
  break-inside: avoid;
}
.lab-tile[hidden] { display: none; }
/* A post that opens its own page (e.g. the turntable at /radio) instead of the viewer. */
a.lab-tile { cursor: pointer; }
.lab-frame {
  position: relative;
  display: block;
  aspect-ratio: var(--ar);
  border-radius: var(--radius);
  overflow: hidden;
  background: #e4e4e4;
}
.lab-media { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.lab-tile:hover .lab-media { transform: scale(1.04); }
.lab-tile:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: var(--radius); }
.lab-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 9px 3px;
  border-radius: 999px;
  background: rgb(255 255 255 / .9);
  color: var(--blue);
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}
.lab-caption { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding: 0 4px; font-size: 11px; }
.lab-note { opacity: .6; }

.js .lab-tile { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .lab-tile.in { opacity: 1; transform: none; }
.lab-noscript { font-size: 12px; }

.lightbox {
  width: 100vw; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: var(--gutter);
  border: 0;
  background: rgb(10 14 40 / .94);
  color: var(--white);
  display: none;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
}
.lightbox[open] { display: grid; animation: fade .3s ease both; }
.lightbox::backdrop { background: transparent; }
.lightbox-stage { position: relative; min-height: 0; }
.lightbox-stage > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lightbox-bar { display: flex; align-items: center; gap: 16px; font-size: 12px; }
.lightbox-bar p { margin: 0; flex: 1; }
.lightbox-title { font-family: var(--display); font-weight: 700; font-size: 15px; margin-right: 8px; }
.lightbox-note, .lightbox-count { opacity: .65; }
.lightbox-controls { display: flex; gap: 8px; }
.lightbox-controls button {
  min-width: 44px; height: 44px;
  padding: 0 14px;
  border: 1.5px solid rgb(255 255 255 / .5);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font: 13px var(--mono);
  cursor: pointer;
}
.lightbox-controls button:hover { background: var(--white); color: var(--blue); }
@keyframes nudge {
  0%, 100% { transform: none; }
  50% { transform: translateX(6px); }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  .lab-grid { columns: 2; }
  .lab-filters button { font-size: 13px; }
  .lab-caption { font-size: 10px; }
  .lightbox-count { display: none; }
}

@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; min-height: 0; }
  .contact-media { height: 62svh; }
  .contact-panel { padding-top: clamp(40px, 8vw, 64px); }
}

@media (max-width: 640px) {
  .top { grid-template-columns: auto 1fr auto; gap: 16px; }
  .nav { justify-content: center; gap: 14px; }
  .hero-media { width: calc(100% - 2 * var(--gutter)); aspect-ratio: 4 / 3; }
  .services { flex-direction: column; align-items: center; gap: 10px; }
  .rail {
    grid-auto-columns: 72vw;
    padding: 0 var(--gutter);
    scroll-padding: 0 var(--gutter);
  }
  .works-intro { padding: 0 var(--gutter); }
  .works-intro .swipe-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-family: var(--condensed);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
  }
  .swipe-hint span { display: inline-block; animation: nudge 1.6s var(--ease) infinite; }
  .footer-links { gap: 16px; }
}

/* Load sequence: the wordmark rises in alone, the photo opens up behind it,
   then the chrome and services settle in. Works cards reveal on scroll. */
:root { --ease: cubic-bezier(.16, 1, .3, 1); }

.hero-title img { animation: logo-in 1.1s var(--ease) .15s both; }
.hero-media { animation: media-open 1.3s var(--ease) .95s both; }
.hero-media img { animation: media-settle 1.8s var(--ease) .95s both; }
.hero-media figcaption { animation: rise 0.8s var(--ease) 1.7s both; }
.top > * { animation: drop 0.8s var(--ease) both; }
.top > :nth-child(1) { animation-delay: 1.45s; }
.top > :nth-child(2) { animation-delay: 1.55s; }
.top > :nth-child(3) { animation-delay: 1.65s; }
.services li { animation: rise 0.8s var(--ease) both; }
.services li:nth-child(1) { animation-delay: 1.8s; }
.services li:nth-child(2) { animation-delay: 1.9s; }
.services li:nth-child(3) { animation-delay: 2s; }

@keyframes logo-in {
  /* Negative insets leave room for glyphs that rise above a tight line-height. */
  from { clip-path: inset(-30% -5% 100% -5%); transform: translateY(35%) scale(.96); }
  to { clip-path: inset(-30% -5% -30% -5%); transform: none; }
}
@keyframes media-open {
  from { clip-path: inset(48% 50% round var(--radius)); }
  to { clip-path: inset(0 round var(--radius)); }
}
@keyframes media-settle {
  from { transform: scale(1.25); }
  to { transform: none; }
}
@keyframes drop {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
/* Cards wipe in instead of sliding: clip-path never changes the row's scroll width, so the row
   doesn't nudge or re-snap while they arrive. A gentler curve than --ease keeps the start soft. */
.js .rail .card.reveal {
  transform: none;
  /* Start fully covered and swipe open from the left edge. Every card's edge moves at the same speed,
     so a card only partly on screen (the last in a scrolling row) swipes in too, not just fades. */
  clip-path: inset(0 100% 0 0 round var(--radius));
  transition: opacity 1s cubic-bezier(.33, 0, .2, 1), clip-path 1.2s cubic-bezier(.33, 0, .2, 1);
}
.js .rail .card.reveal.in { clip-path: inset(0 var(--wipe-to, 0%) 0 0 round var(--radius)); }
.js .rail .card.reveal.in.done { clip-path: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card > img:first-child { transition: none; }
  *, *::before, *::after { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .rail .card.reveal { clip-path: none; }
}
