:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1120px;
  --radius: 8px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

html[data-theme="light"] {
  --bg: #f7f5f2;
  --bg-elevated: #ffffff;
  --bg-muted: #efeeeb;
  --text: #111111;
  --text-muted: #68686d;
  --line: rgba(17, 17, 17, .11);
  --line-strong: rgba(17, 17, 17, .2);
  --accent: #e53935;
  --accent-strong: #b71c1c;
  --accent-soft: rgba(229, 57, 53, .1);
}

html[data-theme="dark"] {
  --bg: #101010;
  --bg-elevated: #1b1b1d;
  --bg-muted: #242426;
  --text: #f5f5f7;
  --text-muted: #b8b8bf;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .24);
  --accent: #ff453a;
  --accent-strong: #ff6b61;
  --accent-soft: rgba(255, 69, 58, .13);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  line-height: 1.5;
  background:
    radial-gradient(circle at 8% 4%, color-mix(in srgb, var(--accent), transparent 80%), transparent 22rem),
    radial-gradient(circle at 92% 7%, color-mix(in srgb, var(--accent-strong), transparent 84%), transparent 24rem),
    var(--bg);
  color: var(--text);
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 200;
  transform: translateY(-150%);
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  padding: .75rem 1rem;
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated), transparent 16%);
  backdrop-filter: blur(22px) saturate(1.35);
}

.nav-shell {
  width: min(100% - 2rem, var(--max-width));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
}

main {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6.5rem) 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(260px, .32fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.eyebrow,
.project-number {
  margin: 0;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
p,
figure {
  margin-top: 0;
}

h1 {
  max-width: 9ch;
  margin-bottom: 0;
  font-size: clamp(4rem, 13vw, 8rem);
  line-height: .9;
  letter-spacing: 0;
  text-transform: lowercase;
}

h2 {
  max-width: 14ch;
  margin: .35rem 0 0;
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: .95;
  letter-spacing: -.045em;
}

.hero-copy {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: clamp(1.04rem, 2vw, 1.22rem);
}

.project-list {
  display: grid;
  gap: clamp(5rem, 11vw, 9rem);
}

.project {
  min-width: 0;
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
}

.project-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .5fr);
  gap: 2rem;
  align-items: end;
}

.project-summary {
  max-width: 42ch;
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.project-notes {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.project-text {
  max-width: 72ch;
  color: var(--text-muted);
  font-size: 1.04rem;
}

.project-text p {
  margin-bottom: 0;
}

.project-text p + p {
  margin-top: 1rem;
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elevated), transparent 12%);
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 760;
  padding: .46rem .7rem;
}

.media-frame,
.round-icon-stage,
.gallery-stage,
.gallery-thumbnail {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elevated), transparent 4%);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-pair {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(320px, .48fr);
  gap: 1rem;
}

.round-icon-stage {
  min-height: 34rem;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, #8b76bd, transparent 44%), transparent 37%),
    linear-gradient(145deg, #171719, #09090a 58%, #4e4565);
  padding: clamp(2rem, 8vw, 6rem);
}

.round-icon-image {
  width: min(100%, 30rem);
  height: auto;
  filter: drop-shadow(0 34px 55px rgba(0, 0, 0, .36));
}

.media-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(0, 0, 0, .4);
  color: rgba(255, 255, 255, .72);
  font-size: .72rem;
  font-weight: 760;
  padding: .42rem .68rem;
  backdrop-filter: blur(12px);
}

.phone-frame {
  min-height: 34rem;
  display: grid;
  place-items: center;
}

.phone-frame img {
  width: min(100%, 27rem);
  height: auto;
  max-width: 100%;
  max-height: 44rem;
  object-fit: contain;
  filter: drop-shadow(0 28px 45px rgba(0, 0, 0, .28));
}

.project-split {
  grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 6.5rem);
}

.project-copy {
  max-width: 40rem;
}

.project-copy .project-summary {
  margin: 1.4rem 0;
}

.project-copy > p:not(.project-number):not(.project-summary) {
  color: var(--text-muted);
}

.project-copy .tool-list {
  margin-top: 1.6rem;
}

.phone-art {
  min-height: 42rem;
  display: grid;
  place-items: center;
}

.phone-art img {
  width: auto;
  max-height: 45rem;
  object-fit: contain;
  filter: drop-shadow(0 28px 45px rgba(0, 0, 0, .28));
}

.logo-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.logo-card {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(18rem, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.logo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(1rem, 4vw, 3rem);
}

.logo-card-light {
  background: #ffffff;
}

.logo-card-dark {
  background: #030303;
}

.logo-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 740;
  padding: .85rem 1rem;
}

.logo-card figcaption span {
  color: var(--accent);
}

.wide-media {
  position: relative;
  aspect-ratio: 16 / 9;
}

.visualizer-gallery {
  min-width: 0;
}

.gallery-stage {
  aspect-ratio: 16 / 9;
  background: #07121c;
}

.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-stage img.is-changing {
  animation: gallery-change .32s var(--ease-out) both;
}

.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  padding: .9rem 0;
}

.gallery-dot {
  width: .58rem;
  height: .58rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted), transparent 45%);
  padding: 0;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.gallery-dot:hover,
.gallery-dot:focus-visible {
  outline: none;
  transform: scale(1.25);
}

.gallery-dot.is-active {
  background: var(--accent);
  transform: scale(1.18);
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}

.gallery-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  border-color: transparent;
  padding: 0;
  cursor: pointer;
  opacity: .58;
  transition: opacity .2s ease, border-color .2s ease, transform .2s ease;
}

.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbnail:hover,
.gallery-thumbnail:focus-visible,
.gallery-thumbnail.is-active {
  border-color: var(--accent);
  opacity: 1;
  outline: none;
  transform: translateY(-2px);
}

.trailer-project {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
}

.trailer-media {
  aspect-ratio: 4 / 3;
}

.youtube-media {
  display: block;
  transition: transform .22s var(--ease-out), border-color .2s ease, box-shadow .2s ease;
}

.youtube-media::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.1rem;
  height: 3.1rem;
  background: url("../Assets/LinkIcons/c.png") center / contain no-repeat;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .42));
  opacity: .98;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.youtube-media img {
  transition: transform .4s var(--ease-out);
}

.youtube-media:hover,
.youtube-media:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .2);
  outline: none;
  transform: translateY(-3px);
}

.youtube-media:hover img,
.youtube-media:focus-visible img {
  transform: scale(1.018);
}

.site-footer {
  width: min(100% - 2rem, var(--max-width));
  margin: clamp(5rem, 12vw, 9rem) auto 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--text-muted);
  font-size: .9rem;
}

@keyframes gallery-change {
  from {
    opacity: .25;
    transform: scale(.992);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    opacity: 0;
    transform: translateY(20px);
    animation: design-rise .72s var(--ease-out) both;
  }

  .hero > *:nth-child(2) {
    animation-delay: .12s;
  }

  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .72s var(--ease-out), transform .72s var(--ease-out);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes design-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero,
  .project-heading {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-pair {
    grid-template-columns: minmax(0, .82fr) minmax(280px, .48fr);
  }

  .round-icon-stage,
  .phone-frame {
    min-height: 28rem;
  }

  .project-split,
  .trailer-project {
    grid-template-columns: minmax(220px, .65fr) minmax(0, 1fr);
    gap: 2.5rem;
  }

  .phone-art {
    min-height: 34rem;
  }
}

@media (max-width: 700px) {
  .project-heading,
  .project-notes,
  .project-split,
  .trailer-project {
    grid-template-columns: 1fr;
  }

  .project-split > figure {
    order: 2;
  }

  .project-split .project-copy {
    order: 1;
  }

  .media-pair {
    grid-template-columns: 1fr;
  }

  .round-icon-stage {
    min-height: auto;
    aspect-ratio: 1;
  }

  .phone-frame {
    min-height: 30rem;
  }

  .logo-comparison {
    grid-template-columns: 1fr;
  }

  .logo-card {
    grid-template-rows: minmax(15rem, 1fr) auto;
  }
}

@media (max-width: 620px) {
  .nav-shell,
  main,
  .site-footer {
    width: min(100% - 1.25rem, var(--max-width));
  }

  .nav-shell {
    min-height: auto;
    flex-wrap: wrap;
    padding: .75rem 0;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(3.6rem, 20vw, 6rem);
  }

  .project-list {
    gap: 5rem;
  }

  .phone-art {
    min-height: 31rem;
  }

  .gallery-thumbnails {
    gap: .35rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }

  .gallery-stage img.is-changing {
    animation: none;
  }
}
