/* =====================================
   VERTICAL HOMEPAGE, PHASE ONE
   Mobile-first layout for hero, selected work and footer
====================================== */

body[data-page="work"][data-layout="vertical"] {
  --vh-bg: #222831;
  --vh-surface: #393e46;
  --vh-text: #eeeeee;
  --vh-accent: #00adb5;
  --vh-line: rgb(238 238 238 / 16%);
  min-width: 0;
  overflow-x: clip;
  background: var(--vh-bg);
  color: var(--vh-text);
}

body[data-page="work"][data-layout="vertical"] .cursor-orbit,
body[data-page="work"][data-layout="vertical"] .horizontal-pagination,
body[data-page="work"][data-layout="vertical"] .scroll-progress {
  display: none !important;
}

body[data-page="work"][data-layout="vertical"] main {
  display: block;
  width: 100%;
  overflow: clip;
}

body[data-page="work"][data-layout="vertical"] .wrap {
  width: min(100% - 2rem, 90rem);
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

/* =====================================
   HEADER
====================================== */

body[data-page="work"][data-layout="vertical"] .site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  width: 100%;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid transparent;
  background: rgb(34 40 49 / 78%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 240ms ease, background-color 240ms ease;
}

body[data-page="work"][data-layout="vertical"].is-page-scrolled .site-header {
  border-color: var(--vh-line);
  background: rgb(34 40 49 / 92%);
}

/* =====================================
   HERO
====================================== */

body[data-page="work"][data-layout="vertical"] .hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-content: stretch !important;
  min-height: calc(100svh - 4.75rem);
  align-content: start;
  gap: 1.35rem;
  padding-block: clamp(2.5rem, 8vh, 6rem) 2rem;
}

body[data-page="work"][data-layout="vertical"] .hero::before {
  position: absolute;
  z-index: -1;
  top: 1rem;
  right: -7rem;
  width: 17rem;
  height: 17rem;
  border: 1px solid rgb(0 173 181 / 30%);
  border-radius: 50%;
  box-shadow: 0 0 0 2.5rem rgb(0 173 181 / 3%), 0 0 5rem rgb(0 173 181 / 10%);
  content: "";
  animation: vh-orbit 18s linear infinite;
}

body[data-page="work"][data-layout="vertical"] .hero > .eyebrow {
  margin: 0;
  color: var(--vh-accent);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  line-height: 1.45;
  text-transform: uppercase;
}

body[data-page="work"][data-layout="vertical"] .hero h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--vh-text);
  font-family: "MuseoModerno", sans-serif;
  font-size: clamp(2.25rem, 9vw, 5.1rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98 !important;
}

body[data-page="work"][data-layout="vertical"] .hero h1 em {
  color: var(--vh-accent);
  font-style: normal;
}

body[data-page="work"][data-layout="vertical"] .hero-support {
  display: grid;
  gap: 1.1rem;
  max-width: 39rem;
  margin: 0;
}

body[data-page="work"][data-layout="vertical"] .hero-support p {
  margin: 0;
  color: rgb(238 238 238 / 82%);
  font-size: clamp(1rem, 3.8vw, 1.2rem);
  line-height: 1.65;
}

body[data-page="work"][data-layout="vertical"] .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

body[data-page="work"][data-layout="vertical"] .hero-actions a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--vh-line);
  border-radius: 999px;
  color: var(--vh-text);
  text-decoration: none;
  transition: border-color 220ms ease, background-color 220ms ease, color 220ms ease, transform 220ms ease;
}

body[data-page="work"][data-layout="vertical"] .hero-actions__primary {
  border-color: var(--vh-accent) !important;
  background: var(--vh-accent);
  color: #172226 !important;
}

body[data-page="work"][data-layout="vertical"] .hero-bottom {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0.4rem 0 0 !important;
  padding: 0 !important;
  transform: none !important;
}

body[data-page="work"][data-layout="vertical"] .hero-feature {
  position: relative;
  width: 100% !important;
  max-width: none !important;
  height: clamp(18rem, 70vw, 29rem);
  overflow: hidden;
  border: 1px solid var(--vh-line);
  border-radius: 1.25rem;
  background: var(--vh-surface);
  box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 25%);
}

body[data-page="work"][data-layout="vertical"] .hero-feature-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  color: var(--vh-text);
  pointer-events: none;
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-page="work"][data-layout="vertical"] .hero-feature-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

body[data-page="work"][data-layout="vertical"] .hero-feature-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.015);
  transition: transform 6s cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-page="work"][data-layout="vertical"] .hero-feature-slide.is-active img {
  transform: scale(1.055);
}

body[data-page="work"][data-layout="vertical"] .hero-feature-caption {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  left: 0.85rem;
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgb(238 238 238 / 20%);
  border-radius: 0.85rem;
  background: rgb(34 40 49 / 46%);
  color: var(--vh-text);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

body[data-page="work"][data-layout="vertical"] .hero-feature-caption small {
  color: #89e5e9;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="work"][data-layout="vertical"] .hero-feature-caption strong {
  font-family: "MuseoModerno", sans-serif;
  font-size: clamp(1.05rem, 5vw, 1.6rem);
  line-height: 1.15;
}

body[data-page="work"][data-layout="vertical"] .hero-feature-caption em {
  font-size: 0.82rem;
  font-style: normal;
}

body[data-page="work"][data-layout="vertical"] .hero-feature-controls {
  position: absolute;
  z-index: 4;
  top: 0.5rem !important;
  right: 0.5rem !important;
  bottom: auto !important;
  left: auto !important;
  display: flex !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 48px !important;
  align-items: center;
  padding: 0.1rem;
  border-radius: 999px;
  background: rgb(34 40 49 / 55%);
  backdrop-filter: blur(8px);
}

/* =====================================
   SELECTED WORK
====================================== */

body[data-page="work"][data-layout="vertical"] .projects {
  display: grid;
  gap: clamp(1.25rem, 5vw, 3rem);
  padding-block: clamp(5rem, 12vw, 10rem);
}

body[data-page="work"][data-layout="vertical"] .section-heading {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--vh-line);
}

body[data-page="work"][data-layout="vertical"] .section-heading .eyebrow {
  margin: 0 0 0.4rem;
  color: var(--vh-accent);
}

body[data-page="work"][data-layout="vertical"] .section-heading h2 {
  margin: 0;
  font-family: "MuseoModerno", sans-serif;
  font-size: clamp(2.4rem, 13vw, 6rem);
  letter-spacing: -0.05em;
  color: var(--vh-text);
}

body[data-page="work"][data-layout="vertical"] .section-heading > p {
  max-width: 36rem;
  margin: 0;
  color: rgb(238 238 238 / 72%);
}

body[data-page="work"][data-layout="vertical"] .project-card {
  width: 100%;
  min-width: 0;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body[data-page="work"][data-layout="vertical"] .project-card > a {
  display: grid;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  gap: 1rem;
  color: var(--vh-text);
  background: transparent !important;
  text-decoration: none;
}

body[data-page="work"][data-layout="vertical"] .project-art {
  position: relative;
  inset: auto !important;
  width: 100%;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 4 / 3 !important;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--vh-surface);
  transform: translateZ(0);
}

body[data-page="work"][data-layout="vertical"] .project-art > img:not(.roadtrip-home-logo) {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center !important;
  margin: 0 !important;
  transform: none !important;
  transition: filter 350ms ease !important;
}

/* Older thumbnail-specific rules used absolute centring and fixed heights.
   These resets keep every managed thumbnail inside the shared frame. */
body[data-page="work"][data-layout="vertical"] #projects .project-card .project-art > img.kcff-home-image,
body[data-page="work"][data-layout="vertical"] #projects .project-card .project-art > img.horizon-home-image,
body[data-page="work"][data-layout="vertical"] #projects .project-card .project-art > img.kelsey-home-preview,
body[data-page="work"][data-layout="vertical"] #projects .project-card .project-art > img.aad-home-image {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
}

body[data-page="work"][data-layout="vertical"] #projects .project-card.project-kcff .project-art,
body[data-page="work"][data-layout="vertical"] #projects .project-card.project-horizon .project-art {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 4 / 3 !important;
}

body[data-page="work"][data-layout="vertical"] .project-horizon .project-art > img {
  object-position: 44% center !important;
}

body[data-page="work"][data-layout="vertical"] .project-kelsey .project-art > img {
  object-position: center !important;
}

body[data-page="work"][data-layout="vertical"] .project-kcff .project-art > img {
  object-position: center !important;
}

body[data-page="work"][data-layout="vertical"] .roadtrip-home-logo {
  position: absolute !important;
  z-index: 2;
  top: 50% !important;
  left: 50% !important;
  width: min(52%, 22rem) !important;
  height: auto !important;
  object-fit: contain !important;
  transform: translate(-50%, -50%) !important;
  transition: none !important;
}

body[data-page="work"][data-layout="vertical"] .poster-stack {
  position: absolute;
  inset: 0;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.3rem, 1vw, 0.8rem);
  align-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  overflow: hidden;
  transform: none !important;
}

body[data-page="work"][data-layout="vertical"] #projects .project-posters .poster-stack {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  contain: layout paint;
}

body[data-page="work"][data-layout="vertical"] .poster-stack img,
body[data-page="work"][data-layout="vertical"] .poster-stack .night-owl-poster {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: auto !important;
  max-height: 92%;
  object-fit: contain !important;
  margin: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
}

body[data-page="work"][data-layout="vertical"] #projects .project-posters .poster-stack img {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
}

body[data-page="work"][data-layout="vertical"] .project-info {
  display: grid;
  width: auto !important;
  max-width: none !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  gap: 0.8rem;
  box-sizing: border-box;
  padding: 1rem 1rem 1.5rem !important;
  background: transparent;
  color: var(--vh-text);
}

body[data-page="work"][data-layout="vertical"] .project-info span:first-child {
  color: #7fdde2;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

body[data-page="work"][data-layout="vertical"] .project-info h3 {
  margin: 0.25rem 0 0;
  font-family: "MuseoModerno", sans-serif;
  font-size: clamp(1.65rem, 7vw, 2.7rem);
  letter-spacing: -0.04em;
  color: var(--vh-text) !important;
}

body[data-page="work"][data-layout="vertical"] .project-info p {
  max-width: 42rem;
  margin: 0;
  color: rgb(238 238 238 / 72%);
  font-size: 0.95rem;
}

body[data-page="work"][data-layout="vertical"] .view-project {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  color: var(--vh-text) !important;
  font-size: 0.85rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* =====================================
   ABOUT PROMPT
====================================== */

body[data-page="work"][data-layout="vertical"] .closing {
  display: grid;
  gap: 1rem;
  padding-block: clamp(5rem, 14vw, 10rem);
  border-top: 1px solid var(--vh-line);
}

body[data-page="work"][data-layout="vertical"] .closing > .eyebrow {
  margin: 0;
  color: var(--vh-accent);
}

body[data-page="work"][data-layout="vertical"] .closing h2 {
  max-width: 15ch;
  margin: 0;
  font-family: "MuseoModerno", sans-serif;
  font-size: clamp(2rem, 10vw, 4.5rem);
  letter-spacing: -0.05em;
  color: var(--vh-text);
}

body[data-page="work"][data-layout="vertical"] .closing > div {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
}

body[data-page="work"][data-layout="vertical"] .closing p {
  margin: 0;
  color: rgb(238 238 238 / 72%);
}

/* =====================================
   VERTICAL FOOTER
====================================== */

body[data-page="work"][data-layout="vertical"] .site-footer {
  width: 100% !important;
  min-height: auto !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto !important;
  gap: 2.4rem !important;
  padding: 4.5rem 1rem 1.5rem !important;
  border-top: 1px solid var(--vh-line);
}

body[data-page="work"][data-layout="vertical"] .site-footer .footer-title,
body[data-page="work"][data-layout="vertical"] .site-footer .footer-links,
body[data-page="work"][data-layout="vertical"] .site-footer .footer-designation,
body[data-page="work"][data-layout="vertical"] .site-footer .footer-meta {
  grid-column: 1 !important;
  grid-row: auto !important;
}

body[data-page="work"][data-layout="vertical"] .site-footer .footer-title {
  max-width: 12ch !important;
  font-size: clamp(2.35rem, 11vw, 5rem) !important;
}

body[data-page="work"][data-layout="vertical"] .site-footer .footer-links {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.45rem 1rem !important;
}

body[data-page="work"][data-layout="vertical"] .site-footer .footer-designation {
  align-self: auto !important;
}

body[data-page="work"][data-layout="vertical"] .site-footer .footer-meta {
  display: grid !important;
  justify-content: stretch !important;
  gap: 0.55rem !important;
}

body[data-page="work"][data-layout="vertical"] .site-footer .footer-animated-logo {
  position: static !important;
  grid-row: auto !important;
  width: 4.5rem !important;
  height: 4.5rem !important;
  margin-left: 1rem !important;
  order: -1;
}

/* =====================================
   MOTION AND INTERACTION
====================================== */

body[data-page="work"][data-layout="vertical"].vertical-motion-ready [data-vh-reveal] {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--vh-delay, 0ms);
}

body[data-page="work"][data-layout="vertical"].vertical-motion-ready [data-vh-reveal].is-in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes vh-orbit {
  to { transform: rotate(360deg); }
}

@media (hover: hover) and (pointer: fine) {
  body[data-page="work"][data-layout="vertical"] .hero-actions a:hover {
    border-color: var(--vh-accent);
    transform: translateY(-2px);
  }

  body[data-page="work"][data-layout="vertical"] .hero-actions__primary:hover {
    background: #33c2c9;
  }

  body[data-page="work"][data-layout="vertical"] .project-card > a:hover .project-art > img:not(.roadtrip-home-logo) {
    filter: brightness(0.82);
  }

  body[data-page="work"][data-layout="vertical"] .project-card > a:hover .view-project {
    color: #7fdde2 !important;
  }
}

/* =====================================
   TABLET AND DESKTOP
====================================== */

@media (min-width: 40rem) and (max-width: 74.999rem) {
  body[data-page="work"][data-layout="vertical"] .project-art,
  body[data-page="work"][data-layout="vertical"] #projects .project-card.project-kcff .project-art,
  body[data-page="work"][data-layout="vertical"] #projects .project-card.project-horizon .project-art {
    aspect-ratio: 16 / 10 !important;
  }
}

@media (min-width: 75rem) {
  body[data-page="work"][data-layout="vertical"] .wrap {
    width: min(100% - 4rem, 90rem);
  }

  body[data-page="work"][data-layout="vertical"] .site-header {
    padding-inline: 2rem;
  }

  body[data-page="work"][data-layout="vertical"] .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(24rem, 1.1fr) !important;
    grid-template-rows: auto auto 1fr;
    align-items: end;
    column-gap: clamp(2rem, 5vw, 6rem);
  }

  body[data-page="work"][data-layout="vertical"] .hero > .eyebrow,
  body[data-page="work"][data-layout="vertical"] .hero > h1,
  body[data-page="work"][data-layout="vertical"] .hero > .hero-support {
    grid-column: 1;
  }

  body[data-page="work"][data-layout="vertical"] .hero-bottom {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: stretch;
    margin: 0 !important;
  }

  body[data-page="work"][data-layout="vertical"] .hero-feature {
    height: 100%;
    min-height: 34rem;
  }

  body[data-page="work"][data-layout="vertical"] .section-heading {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.55fr);
    align-items: end;
  }

  body[data-page="work"][data-layout="vertical"] .project-card > a {
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
  }

  body[data-page="work"][data-layout="vertical"] .project-card .project-art {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body[data-page="work"][data-layout="vertical"] .project-card .project-info {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body[data-page="work"][data-layout="vertical"] .project-card:nth-of-type(even) .project-art {
    grid-column: 2 !important;
  }

  body[data-page="work"][data-layout="vertical"] .project-card:nth-of-type(even) > a {
    grid-template-columns: minmax(18rem, 0.55fr) minmax(0, 1.45fr) !important;
  }

  body[data-page="work"][data-layout="vertical"] .project-card:nth-of-type(even) .project-info {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body[data-page="work"][data-layout="vertical"] .project-art {
    aspect-ratio: 16 / 10 !important;
    border-radius: 1.25rem;
  }

  body[data-page="work"][data-layout="vertical"] #projects .project-card.project-kcff .project-art,
  body[data-page="work"][data-layout="vertical"] #projects .project-card.project-horizon .project-art {
    aspect-ratio: 16 / 10 !important;
  }

  body[data-page="work"][data-layout="vertical"] .project-info {
    align-content: center;
    padding: 1.25rem !important;
  }

  body[data-page="work"][data-layout="vertical"] .closing {
    grid-template-columns: 0.32fr 1fr 0.55fr;
    align-items: start;
    gap: clamp(2rem, 5vw, 6rem);
  }

  body[data-page="work"][data-layout="vertical"] .site-footer {
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr) !important;
    gap: 3rem 6rem !important;
    padding: clamp(5rem, 9vw, 8rem) max(2rem, calc((100vw - 90rem) / 2)) 2rem !important;
  }

  body[data-page="work"][data-layout="vertical"] .site-footer .footer-title {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body[data-page="work"][data-layout="vertical"] .site-footer .footer-links {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body[data-page="work"][data-layout="vertical"] .site-footer .footer-designation {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  body[data-page="work"][data-layout="vertical"] .site-footer .footer-meta {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    grid-template-columns: repeat(4, minmax(0, auto));
  }

  body[data-page="work"][data-layout="vertical"] .site-footer .footer-animated-logo {
    position: absolute !important;
    top: clamp(2rem, 4vw, 4rem) !important;
    right: max(2rem, calc((100vw - 90rem) / 2)) !important;
    margin-left: 0 !important;
  }
}

@media (min-width: 75rem) {
  body[data-page="work"][data-layout="vertical"] .project-card > a {
    grid-template-columns: minmax(0, 1.6fr) minmax(20rem, 0.5fr);
  }
}

/* =====================================
   ACCESSIBILITY
====================================== */

body[data-page="work"][data-layout="vertical"] :focus-visible {
  outline: 3px solid #70e0e5 !important;
  outline-offset: 4px !important;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="work"][data-layout="vertical"] *,
  body[data-page="work"][data-layout="vertical"] *::before,
  body[data-page="work"][data-layout="vertical"] *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body[data-page="work"][data-layout="vertical"].vertical-motion-ready [data-vh-reveal] {
    opacity: 1;
    transform: none;
  }
}
