﻿html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Gilroy Light', sans-serif;
  opacity: 0;
}

/* Hide default cursor */
body {
  cursor: none;
}

/* Custom cursor container */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(var(--cx, -999px), var(--cy, -999px), 0) translate(-50%, -50%) scale(var(--c-scale, 1));
  transition: transform 0.08s ease-out;
}

#custom-cursor img {
  width: 100%;
  height: 100%;
}

.cursor-hidden {
  opacity: 0;
}

.pointer-active {
  --c-scale: 1.15;
}

@media (hover: none) {
  body {
    cursor: auto;
  }
  #custom-cursor {
    display: none;
  }
}

.screen-fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease;
}

@font-face {
    font-family: 'Sk-Modernist Regular';
    src: url(/fonts/Sk-Modernist-Regular.woff2) format('woff2'),
         url(/fonts/Sk-Modernist-Regular.otf) format('opentype');
    font-display: swap;
}

@font-face {
    font-family: 'Sk-Modernist Bold';
    src: url(/fonts/Sk-Modernist-Bold.woff2) format('woff2'),
         url(/fonts/Sk-Modernist-Bold.otf) format('opentype');
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy Light';
    src: url(/fonts/Gilroy-Light.woff2) format('woff2'),
         url(/fonts/Gilroy-Light.otf) format('opentype');
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy ExtraBold';
    src: url(/fonts/Gilroy-ExtraBold.woff2) format('woff2'),
         url(/fonts/Gilroy-ExtraBold.otf) format('opentype');
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy SemiBold';
    src: url(/fonts/Gilroy-Bold.woff2) format('woff2'),
         url(/fonts/Gilroy-Bold.ttf) format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Awesome Serif Bold Regular';
    src: url(/fonts/AwesomeSerif-BoldRegular.woff2) format('woff2'),
         url(/fonts/AwesomeSerif-BoldRegular.otf) format('opentype');
    font-display: swap;
}

@font-face {
    font-family: 'Awesome Serif SemiBd Extra Tall Italic';
    src: url(/fonts/AwesomeSerifItalic-SmExraTall.woff2) format('woff2'),
         url(/fonts/AwesomeSerifItalic-SmExraTall.otf) format('opentype');
    font-display: swap;
}

::selection {
  background: #DFFCA1;
}

:root {
  --paper: #FBF9F3;
  --ink: #1a1a1a;
  --muted: #696969;
  --accent-dark: #094020;
  --accent-light: #DFFCA1;
}

/* Case-study pages skip the homepage's dot-grid background (and its
   hover glow) for better text readability over long-form case content  - 
   only the plain paper background color is kept. The .paper-grid class
   stays on <body> because the shared /script.js also uses it to target
   the bottom gradual-blur effect behind the mobile nav pill. */

body.paper-grid {
  position: relative;
  background-color: var(--paper);
}


.fade-scale {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.175s ease-in-out, transform 0.175s ease-in-out;
}

.fade-scale.hidden {
    opacity: 0;
    transform: scale(0.85);
}


/* NAVBAR */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: transparent;
  height: 80px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  box-sizing: border-box;
  /* backdrop-filter is deliberately NOT in this transition - animating
     its blur radius makes Chrome briefly flash the layer blank/white
     while it recompiles the filter (a known compositor bug, see the
     Home page's styles.css for the fuller writeup). Letting it snap
     instantly between states, backed by will-change below, is far less
     visible than that flash. */
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  will-change: backdrop-filter;
}

.navbar.scrolled {
  background-color: rgba(251, 249, 243, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(28, 28, 28, 0.06);
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: center;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.navbar-left img {
  height: 40px;
  width: auto;
  cursor: pointer;
  transition: ease-in-out 0.175s;
}

.navbar-left img:hover {
    cursor: pointer;
    transform: scale(1.2);
    transition: ease-in-out 0.175s;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* On desktop this wrapper must not participate in the box model at all  - 
   its buttons need to sit directly in .navbar-right's flex row. display:
   contents does exactly that; the mobile media query below turns it back
   into a real flex column for the collapse/expand animation. */
.mobile-nav-links {
    display: contents;
}

/* Bottom-center floating menu trigger: "Menu" label and icon side by
   side, both in normal flow so the pill's auto width - and therefore how
   much it needs to grow when it opens - correctly accounts for the
   icon's space too. .hamburger-icon morphs into an X via .active, same
   as the old top-right icon did. No hover/active feedback here by
   design - that's reserved for the actual nav links below. */
.hamburger {
    display: none;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    z-index: 10;
}

.hamburger-label {
    color: #fff;
    font-family: "Sk-Modernist Bold";
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    /* Match the icon's tight 12px box instead of the font's natural
       (much taller) line-height, so it centers accurately instead of
       against an inflated, mostly-empty line box. */
    line-height: 1;
}

.hamburger-icon {
    position: relative;
    width: 18px;
    height: 12px;
    flex-shrink: 0;
}

.hamburger-icon span {
    background: #fff;
    height: 2px;
    width: 100%;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger-icon span:nth-child(1) {
    top: 0;
}
.hamburger-icon span:nth-child(2) {
    top: 10px;
}

.hamburger.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg);
    top: 5px;
}
.hamburger.active .hamburger-icon span:nth-child(2) {
    transform: rotate(-45deg);
    top: 5px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* .navbar is position:fixed with its own z-index, which makes it a
       stacking context - .navbar-right's z-index only ever competes
       within THAT context, so no value on it could out-rank the gradual
       blur overlay (z-index 600, in script.js) sitting in the page's root
       stacking context. Raising .navbar's own z-index lifts the whole
       context (.navbar-right included) above the blur. */
    .navbar {
        z-index: 1000;
        will-change: auto;
    }

    /* backdrop-filter establishes a new containing block for position:fixed
       descendants - since .navbar-right lives inside <nav>, .navbar
       gaining backdrop-filter on scroll was hijacking its fixed anchor
       from the viewport to the 80px-tall navbar, making the floating menu
       snap up near the top instead of staying pinned to the bottom the
       moment the page scrolled. Disabling it on mobile (where the real
       nav now lives in the bottom card, not the top bar) fixes that. */
    .navbar.scrolled {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .navbar-right {
        display: block;
        flex-direction: column;
        position: fixed;
        top: auto;
        bottom: 24px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: auto;
        /* No min-width here - closed, the pill shrinks to fit the "Menu"
           row's own content. .show below grows it to fit the nav links. */
        min-width: 0;
        max-width: calc(100% - 32px);
        background: #131313;
        border-radius: 28px;
        padding: 0;
        transition: min-width 0.3s ease;
        /* Clips the hamburger row's hover/active background (and the
           links list) to these rounded corners regardless of their own
           box shape. */
        overflow: hidden;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
        opacity: 1;
        pointer-events: auto;
        /* Above the bottom gradual-blur overlay (z-index 600, set in
           script.js) so the menu isn't rendered underneath it. */
        z-index: 1000;
    }

    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
    }

    .navbar-right.show {
        min-width: 240px;
    }

    .navbar-right.show .mobile-nav-links {
        max-height: 320px;
        opacity: 1;
        padding: 12px 8px 0;
    }

    .mobile-nav-links a {
        text-decoration: none;
    }

    .mobile-nav-links .navbar-button,
    .mobile-nav-links .navbar-button-contact,
    .mobile-nav-links .resume-button,
    .mobile-nav-links .philosophy-button,
    .mobile-nav-links .life-button {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
        color: #fff;
        text-align: center;
        justify-content: center;
        text-transform: uppercase;
        font-size: 15px;
        letter-spacing: 0.5px;
        padding: 14px 16px;
        border-radius: 16px;
    }

    /* :hover as well as :active - touch browsers commonly leave a tapped
       element "stuck" in :hover after release (there's no real mouse-leave
       event on touch). Same white-bg/black-text feedback on all four
       links (Contact included), not just a subtle overlay on some. */
    .mobile-nav-links .navbar-button:active,
    .mobile-nav-links .navbar-button:hover,
    .mobile-nav-links .navbar-button-contact:active,
    .mobile-nav-links .navbar-button-contact:hover,
    .mobile-nav-links .resume-button:active,
    .mobile-nav-links .resume-button:hover,
    .mobile-nav-links .philosophy-button:active,
    .mobile-nav-links .philosophy-button:hover,
    .mobile-nav-links .life-button:active,
    .mobile-nav-links .life-button:hover {
        background: #fff !important;
        color: #000 !important;
    }

    .hamburger {
        display: flex;
        width: auto;
        height: auto;
        padding: 16px 20px;
    }
}

.navbar-button {
  padding: 10.5px 24px;
  border: none;
  border-radius: 30px;
  color: rgba(28, 28, 28, 0.9);
  cursor: pointer;
  font-size: 16px;
  font-family: "Sk-Modernist Bold";
  line-height: 1.75;
}

.navbar-button-contact{
  padding: 10.5px 24px;
  border: none;
  border-radius: 30px;
  color: #DFFCA1;
  cursor: pointer;
  font-size: 16px;
  font-family: "Sk-Modernist Bold";
  line-height: 1.75;
}

.navbar-button-contact:hover{
  background: #DFFCA1 !important;
  color: #094020;
}

.navbar-right a{
  text-decoration: none !important;
}


/* CASE STUDY HEADER */

.case-study {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px 0;
}

.case-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-family: "Sk-Modernist Bold";
    font-size: 14px;
    cursor: pointer;
}

.case-breadcrumb span {
    color: var(--muted);
    font-family: "Sk-Modernist Regular";
}

.case-breadcrumb-arrow {
    width: 22px;
    height: auto;
    transform: rotate(180deg);
}

.case-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 48px;
}

.case-logo {
    font-family: "Gilroy ExtraBold";
    font-size: 32px;
    color: var(--ink);
}

.case-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-family: "Sk-Modernist Bold";
}

.case-meta-tag {
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--ink);
}

.case-meta-year {
    font-size: 13px;
    color: var(--muted);
}

.case-intro {
    max-width: 780px;
    margin: 40px 0 0;
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink);
    font-family: "Gilroy Light";
    letter-spacing: 0px;
}

.case-intro strong {
    font-family: "Gilroy SemiBold";
    letter-spacing: 0px;
}

.case-services {
    margin-top: 48px;
}

.case-services h4,
.case-cols h4 {
    margin: 0 0 12px;
    font-size: 16px;
    font-family: "Sk-Modernist Bold";
    color: var(--ink);
}

.case-pill-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.case-pill {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(28, 28, 28, 0.15);
    font-family: "Sk-Modernist Regular";
    font-size: 14px;
    color: var(--ink);
}

.case-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    margin-top: 48px;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(28, 28, 28, 0.1);
}

.case-cols p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
    font-family: "Gilroy Light";
    letter-spacing: 0px;
}


/* PLACEHOLDER BLOCKS */

.placeholder-block {
    position: relative;
    border: 1px dashed rgba(28, 28, 28, 0.25);
    background-color: #F2F4F6;
}

.placeholder-label {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    background-color: rgba(28, 28, 28, 0.85);
    color: #fff;
    font-family: "Sk-Modernist Bold";
    font-size: 12px;
    z-index: 2;
}


/* HERO */

.case-hero {
    margin-top: 64px;
    height: 60vh;
    min-height: 420px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Real embedded content sizes itself via its own aspect-ratio attribute  - 
   drop the placeholder's fixed height so the player isn't cropped/stretched
   to fit an unrelated 60vh box. */
.case-hero--player {
    height: auto;
    min-height: 0;
    display: block;
}

.case-hero--player mockup-player {
    display: block;
    width: 100%;
    border-radius: inherit;
}

.case-hero-logo {
    font-family: "Gilroy ExtraBold";
    font-size: clamp(28px, 4vw, 44px);
    color: var(--ink);
    opacity: 0.35;
}

.case-hero-badge {
    position: absolute;
    bottom: 24px;
    left: 24px;
    padding: 10px 20px;
    border-radius: 999px;
    background-color: rgba(28, 28, 28, 0.85);
    color: #fff;
    font-family: "Sk-Modernist Bold";
    font-size: 14px;
    z-index: 2;
}


/* STATIC HERO SHOT - VW has static product screenshots rather than an
   interactive build, so the hero is a single framed screen instead of
   Luna's live iframe. The backdrop echoes the screenshot's own VW-blue
   header/vehicle-plate color instead of the neutral grey used by
   .case-hero placeholders. */

.case-hero--shot {
    margin-top: 64px;
    height: auto;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.case-hero-shot-img {
    width: 100%;
    border-radius: 24px;
    display: block;
    box-shadow: 0 30px 70px rgba(19, 19, 19, 0.14);
}

.case-hero-shot-caption {
    font-family: "Sk-Modernist Regular";
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}


/* PROBLEM -> SOLUTION */

.case-problem {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 64px 0;
}

.case-problem-block {
    border-radius: 24px;
    padding: 40px;
    box-sizing: border-box;
}

.case-problem-label {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 16px;
    border-radius: 999px;
    font-family: "Sk-Modernist Bold";
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.case-problem-block p {
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
    font-family: "Gilroy Light";
    letter-spacing: 0px;
}

.case-problem-before {
    background-color: #F2F4F6;
}

.case-problem-before .case-problem-label {
    background-color: rgba(28, 28, 28, 0.08);
    color: var(--muted);
}

.case-problem-before p {
    color: var(--ink);
}

.case-problem-after {
    background-color: var(--accent-dark);
}

.case-problem-after .case-problem-label {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--accent-light);
}

.case-problem-after p {
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
    .case-problem {
        grid-template-columns: 1fr;
    }
}


/* STATS */

.case-stats {
    margin-top: 64px;
}

.case-stats-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.case-stats-header h4 {
    margin: 0;
    font-size: 16px;
    font-family: "Sk-Modernist Bold";
    color: var(--ink);
}

.placeholder-label-inline {
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px dashed rgba(28, 28, 28, 0.25);
    color: var(--muted);
    font-family: "Sk-Modernist Regular";
    font-size: 12px;
}

.case-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.case-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px 24px;
    border-radius: 20px;
    background-color: #F2F4F6;
}

.case-stat-value {
    font-family: "Gilroy ExtraBold";
    font-size: clamp(28px, 3vw, 40px);
    color: var(--accent-dark);
}

.case-stat-label {
    font-family: "Sk-Modernist Regular";
    font-size: 14px;
    line-height: 1.4;
    color: var(--muted);
}

@media (max-width: 900px) {
    .case-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .case-stats-row {
        grid-template-columns: 1fr;
    }
}



/* PROCESS / OUTCOME CARDS - 3-column variant of the stats grid, plus an
   accent modifier for outcome cards that carry a short label instead of
   a number. */

.case-cards-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .case-cards-row-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .case-cards-row-3 {
        grid-template-columns: 1fr;
    }
}

.case-stat--accent {
    background-color: var(--accent-dark);
}

.case-stat--accent .case-stat-value {
    color: var(--accent-light);
    font-family: "Gilroy SemiBold";
    font-size: 19px;
}

.case-stat--accent .case-stat-label {
    color: rgba(255, 255, 255, 0.65);
}

.case-outcome {
    margin-top: 64px;
}

.case-outcome-copy {
    margin: 0 0 32px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--muted);
    font-family: "Gilroy Light";
    letter-spacing: 0px;
}


/* KEY TAKEAWAYS */

.case-takeaways {
    margin-top: 64px;
    margin-bottom: 64px;
    padding-top: 64px;
    border-top: 1px solid rgba(28, 28, 28, 0.1);
}

.case-takeaways-list {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 780px;
}

.case-takeaways-list li {
    position: relative;
    padding-left: 28px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    font-family: "Gilroy Light";
    letter-spacing: 0px;
}

.case-takeaways-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-dark);
}

/* STATEMENT */

.case-statement {
    margin: 64px 0;
    padding: 140px 10%;
    border-radius: 24px;
    background-color: #131313;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.case-statement h2 {
    margin: 0;
    text-align: center;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.2;
    font-family: "Gilroy SemiBold";
    letter-spacing: -1px;
    color: rgba(255, 255, 255, 0.35);
}

.case-statement h2 span {
    color: #fff;
    font-family: "Awesome Serif SemiBd Extra Tall Italic";
}


/* GRID */

.case-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 64px;
}

.case-grid-block {
    border-radius: 24px;
    min-height: 320px;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.case-grid-brand {
    background-color: var(--accent-dark);
    align-items: center;
}

.case-grid-brand-text {
    font-family: "Gilroy ExtraBold";
    font-size: clamp(28px, 3.5vw, 40px);
    line-height: 1.15;
    color: var(--accent-light);
    text-align: center;
}

.case-grid-status {
    background-color: #131313;
    color: #fff;
}

.case-grid-status h3 {
    margin: 0 0 12px;
    font-size: 22px;
    font-family: "Sk-Modernist Regular";
    color: rgba(255, 255, 255, 0.7);
}

.case-grid-status h3 strong {
    font-family: "Sk-Modernist Bold";
    color: var(--accent-light);
}

.case-grid-status p {
    margin: 0;
    font-family: "Gilroy Light";
    letter-spacing: 0px;
    color: rgba(255, 255, 255, 0.5);
}

.case-grid-features {
    background-color: #fff;
    border: 1px solid rgba(28, 28, 28, 0.08);
}

.case-grid-features ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.case-grid-features li {
    font-family: "Sk-Modernist Bold";
    font-size: 17px;
    color: var(--ink);
    padding-left: 28px;
    position: relative;
}

.case-grid-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-dark);
}

.case-grid-shot {
    /* height:100% on the img below is only meaningful with a definite
       height here - .case-grid-block's min-height alone leaves this
       auto-sized, so the img fell back to its native aspect ratio
       (~452px) instead of the 320px every other grid card uses,
       breaking row alignment via grid's default align-items:stretch. */
    height: 320px;
    padding: 0;
    overflow: hidden;
}

.case-grid-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

@media (max-width: 768px) {
    .case-grid {
        grid-template-columns: 1fr;
    }
}


/* PRODUCT SCREENS */

.case-screens {
    margin-bottom: 64px;
}

.case-screens-heading {
    margin: 0 0 24px;
    font-size: 16px;
    font-family: "Sk-Modernist Bold";
    color: var(--ink);
}

.case-screens-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Luna's product shots are portrait phone screens rather than wide
   dashboard screenshots, so they read better tiled in a grid than
   stacked full-width like .case-screens-list's default. */
.case-screens-list--phones {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    gap: 24px;
}

@media (max-width: 700px) {
    .case-screens-list--phones {
        grid-template-columns: 1fr;
    }
}

.case-screens-item {
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(28, 28, 28, 0.08);
}

.case-screens-list--phones .case-screens-item {
    background-color: #eef2f7;
}

.case-screens-item img {
    width: 100%;
    display: block;
}

/* Match every phone screenshot to the map shots' aspect ratio so the
   grid reads as uniform cards; the taller hero shot crops from the
   bottom, keeping its header/car/status content intact. */
.case-screens-list--phones .case-screens-item img {
    aspect-ratio: 428 / 927;
    object-fit: cover;
    object-position: top;
}

.case-screens-item figcaption {
    padding: 16px 24px;
    font-family: "Sk-Modernist Regular";
    font-size: 14px;
    line-height: 1.5;
    min-height: 3em;
    color: var(--muted);
    background-color: #F2F4F6;
}


/* FOOTER NAV */

.case-footer-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 100px;
}

.case-nav-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 999px;
    border: 1px solid rgba(28, 28, 28, 0.15);
    background: none;
    color: var(--ink);
    text-decoration: none;
    font-family: "Sk-Modernist Bold";
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.175s ease;
}

.case-nav-button:hover {
    background-color: rgba(129, 140, 161, 0.1);
}

.case-nav-back-arrow {
    width: 22px;
    height: auto;
    transform: rotate(180deg);
}

.case-nav-top-arrow {
    width: 22px;
    height: auto;
    transform: rotate(-90deg);
}


/* SITE FOOTER */

footer{
    display: block;
    position: relative;
    background-color: #000;
    padding: 115px 80px;
}

footer h1{
    margin: 0 0 32px 0;
    font-size: 60px;
    color: #fff;
    font-family: "Awesome Serif SemiBd Extra Tall Italic";
}

footer h3{
    margin: 0 0 4px 0;
    font-size: 32px;
    color: #696969;
    font-family: "Sk-Modernist Bold";
}

footer a{
    margin: 0;
    font-size: 24px;
    color: #696969;
    font-family: "Sk-Modernist Regular";
    text-decoration: none;
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
    transition: color 0.2s ease;
}

footer a:hover{
    color: #DFFCA1;
}

footer img{
    filter: invert(1);
    margin-right: 40px;
    width: 60px;
    height: auto;
    margin-bottom: 40px;
    transition: ease-in-out 0.175s;
    cursor: pointer;
}

footer img:hover{
    transform: scale(1.2);
    transition: ease-in-out 0.175s;
}

.footer-back-to-top{
    position: absolute;
    top: 115px;
    right: 80px;
    width: 64px;
    height: 64px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.footer-back-to-top img{
    width: 100%;
    height: 100%;
    filter: none;
    margin: 0;
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

.footer-back-to-top:hover img{
    transform: rotate(180deg) translateY(-4px);
}

@media (max-width: 700px) {
    .footer-back-to-top{
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar { padding: 20px; }
    .navbar-left img { height: 30px; }

    .case-study { padding-top: 100px; }
    .case-title-row { align-items: flex-start; }
    .case-meta { align-items: flex-start; }
    .case-statement { padding: 90px 8%; }

    footer { padding: 60px 32px; }
    footer h1 { font-size: 36px; }
    footer p { font-size: 18px; }
}

/* Below 390px, every page-edge container gets a flat 16px side gutter.
   .case-study is the single wrapper every case-study section (header,
   hero, stats, grid, screens, footer-nav) inherits its side inset from,
   so overriding it here covers the whole page in one rule. */
@media (max-width: 390px) {
    .navbar { padding-left: 16px; padding-right: 16px; }
    .case-study { padding-left: 16px; padding-right: 16px; }
    footer { padding-left: 16px; padding-right: 16px; }
}

