/* ==========================================================================
   Picture Quotient — responsive layout
   Token scaling lives in global.css. This file adjusts page structure.
   ========================================================================== */

@media (max-width: 1399.98px) {
  .hero {
    min-height: 800px;
  }

  .what-we-do .card-feature {
    flex-basis: 480px;
    width: 480px;
  }
}

@media (max-width: 1199.98px) {
  .hero {
    min-height: 720px;
  }

  .hero__content {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: var(--space-48);
  }

  .hero__cta {
    max-width: none;
  }

  .insights__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-blog--down {
    margin-top: 0;
  }

  .footer-watermark {
    top: 80px;
    width: 100%;
    font-size: 120px;
    line-height: 1;
    white-space: normal;
  }

  .more-than__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 40px;
    min-height: 0;
  }

  .more-than__copy {
    max-width: none;
    flex: none;
    gap: 32px;
  }

  .more-than__tabs {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .more-than__tabs::-webkit-scrollbar {
    display: none;
  }

  .more-than__title {
    font-weight: var(--font-weight-medium);
  }

  .more-than__tab {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    font-size: var(--font-size-16);
    font-weight: var(--font-weight-regular);
    letter-spacing: 0;
    line-height: 1.2;
  }

  .more-than__tab[aria-selected="true"] {
    border-color: var(--color-pure);
  }

  .more-than__tab[aria-selected="true"]::before {
    content: none;
  }

  .more-than__frame {
    flex: none;
    width: 100%;
    max-width: 630px;
    height: auto;
    aspect-ratio: 630 / 600;
    align-self: center;
  }

  .lead-form {
    min-height: 0;
  }

  .lead-form__inner {
    flex-direction: column;
    gap: var(--space-40);
  }

  .lead-form__title {
    max-width: 100%;
  }

  .lead-form__panel {
    max-width: 522px;
    padding-top: 0;
  }
}

@media (max-width: 991.98px) {
  .story-cta {
    min-height: 560px;
    padding-block: var(--space-60);
  }

  .story-cta::before {
    background-position: 20% center;
  }

  .site-header {
    padding-block: var(--space-24);
  }

  .hero {
    min-height: 100svh;
  }

  .hero__video,
  .hero__poster {
    object-position: 72% 42%;
  }

  .hero__glow {
    width: 180px;
    height: 280px;
    left: 8%;
    top: 24%;
  }

  .about {
    min-height: 0;
  }

  .hero__title-line{
    display: unset;
  }

  .about .pq-container {
    padding-top: 120px;
    padding-bottom: var(--space-48);
  }

  .about__copy {
    margin-top: 24px;
  }

  .about__cta {
    margin-top: 32px;
  }

  .about__rule {
    margin-top: 48px;
  }

  .logo-strip {
    margin-top: var(--space-24);
  }

  .portfolio-row{
    padding: 0;
  }

  .portfolio-rows__head {
    margin-bottom: var(--space-48, 48px);
  }

  .portfolio-rows__sub {
    font-size: var(--font-size-16);
    line-height: 24px;
  }

  .portfolio-row__head,
  .portfolio-row__head--reverse {
    flex-direction: column;
    align-items: flex-start;
  }

  .portfolio-row__meta,
  .portfolio-row__meta--start {
    align-items: flex-start;
  }

  .case-studies__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .case-studies__intro {
    text-align: left;
  }

  .case-item,
  .case-item--reverse {
    grid-template-columns: 1fr;
  }

  .case-item--reverse .case-item__copy {
    order: 0;
  }

  .case-studies__cta {
    display: flex;
    width: fit-content;
    margin-inline: auto;
  }

  .stories {
    height: auto;
    overflow: visible;
    z-index: auto;
  }

  .stories__stage {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    padding: 60px 0;
  }

  .stories__title {
    position: relative;
    top: auto;
    z-index: auto;
    width: calc(100% - 40px);
    margin: 32px auto 16px;
    flex-shrink: 0;
    will-change: auto;
  }

  .stories__board {
    flex: none;
    width: 100%;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .stories__board::-webkit-scrollbar {
    display: none;
  }

  .stories__cards {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: max-content;
    max-width: none;
    aspect-ratio: auto;
    height: auto;
    padding-inline: 0;
    transform: none;
  }

  .stories-card,
  .stories-card--1,
  .stories-card--2,
  .stories-card--3,
  .stories-card--4,
  .stories-card--5 {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    flex: 0 0 100%;
    width: 100vw;
    max-width: 100vw;
    height: min(340px, 48svh);
    max-height: min(340px, 48svh);
    min-height: 0;
    aspect-ratio: auto;
    padding-inline: var(--container-gutter);
    overflow: hidden;
    background-color: var(--color-pure);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    align-self: stretch;
  }

  .stories-card--dark,
  .stories-card--on-image {
    background-color: var(--color-pure);
  }

  .stories-card--dark .stories-card__media,
  .stories-card--3 .stories-card__media,
  .stories-card--on-image .stories-card__media {
    position: relative;
    inset: auto;
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    aspect-ratio: auto;
    overflow: hidden;
    line-height: 0;
  }

  .stories-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }

  .stories-card--dark .stories-card__body,
  .stories-card--on-image .stories-card__body {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    padding: 12px;
  }

  .stories-card__quote {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 0;
  }

  .stories-card__quote.is-clamped:not(.is-expanded) .lead {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .stories-card__toggle {
    flex: 0 0 auto;
    margin: 0;
    margin-top: auto;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--font-body);
    font-size: 12px;
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-btn);
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 3px;
    color: inherit;
    cursor: pointer;
  }

  .stories-card__toggle:focus-visible {
    outline: 2px solid var(--color-lime);
    outline-offset: 3px;
  }

  .stories__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 0 32px;
  }

  .stories__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(28, 30, 33, 0.22);
    cursor: pointer;
    appearance: none;
  }

  .stories__dot.is-active {
    background-color: var(--color-lime);
  }

  .stories__dot:focus-visible {
    outline: 2px solid var(--color-lime);
    outline-offset: 3px;
  }

  .footer-main {
    flex-direction: column;
    gap: var(--space-48);
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: var(--space-40);
  }

  .card-feature__body .text-meta{
    font-size: 10px;
  }

  .lead-form {
    padding-block: var(--space-60);
  }

  .lead-form__panel {
    max-width: none;
  }

}

@media (max-width: 767.98px) {
  .hero__actions {
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
  }

  .hero__actions .btn {
    flex: 1 1 0;
    align-self: stretch;
    min-width: 0;
    height: auto;
    justify-content: space-between;
    padding-inline: 12px;
    gap: 8px;
  }

  .hero .text-tags {
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.08em;
  }

  .collage-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .collage-section__title {
    margin-bottom: 40px;
  }

  .collage {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
  }

  .collage__item {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
  }

  .collage__item--lg {
    aspect-ratio: 738 / 588;
  }

  .collage__item--md {
    aspect-ratio: 413 / 350;
  }

  .collage__item--sm {
    aspect-ratio: 305 / 411;
  }

  .collage__item--wide {
    aspect-ratio: 640 / 436;
  }

  .collage__item--mid {
    aspect-ratio: 630 / 350;
  }

  .collage__item--tall {
    aspect-ratio: 414 / 469;
  }

  .collage-section__cta {
    margin-top: 32px;
  }

  .story-cta {
    min-height: 480px;
    padding-block: var(--space-48);
    align-items: flex-end;
  }

  .story-cta::before {
    background-position: 12% center;
  }

  .story-cta__inner {
    justify-content: flex-start;
  }

  .story-cta__content,
  .story-cta__actions {
    align-items: flex-start;
  }

  .story-cta__content,
  .story-cta__title,
  .story-cta__copy {
    max-width: 100%;
    text-align: left;
  }

  .our-work__intro {
    padding: 40px 0 28px;
  }

  .our-work__grid {
    grid-template-columns: 1fr 1fr;
  }

  .work-tile__label{
    font-size: 12px;
  }

  .our-work__actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-16);
    margin-top: 48px;
  }

  .case-item__media img {
    height: 240px;
  }

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

  .footer-bar__inner {
    flex-direction: column;
    gap: var(--space-16);
    text-align: center;
  }

  .footer-visual {
    height: 220px;
  }

  .footer-watermark {
    top: 48px;
    font-size: 40px;
    line-height: 0.9;
    margin:auto!important;
    text-align: center!important;
  }

  .case-item__copy h3{
    font-size: 20px!important;
  }

  .case-studies__head{
    margin-bottom: 30px!important;
  }

  .card-blog .title{
    font-size: 16px!important;
  }

  .case-studies__head span{
    display:inline!important;
  }

  .more-than__title {
    max-width: none;
    font-size: 28px;
    font-weight: var(--font-weight-regular);
    line-height: 1.15;
  }

  .more-than__tab {
    padding: 8px 12px;
    font-size: var(--font-size-14);
    font-weight: var(--font-weight-regular);
  }

  .stories__title {
    width: calc(100% - 40px);
    margin-top: 12px;
  }

  .stories-card .lead {
    font-size: 22px;
    line-height: 1.3;
  }

  .what-we-do {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .what-we-do__title {
    margin-bottom: 28px;
  }

  .what-we-do .card-feature {
    flex-basis: min(522px, 85vw);
    width: min(522px, 85vw);
    height: min(638px, 78svh);
    min-height: 480px;
  }

  .what-we-do .card-feature .display-sm {
    line-height: 1.1;
    letter-spacing: 0em;
  }

  .lead-form {
    padding-block: var(--space-48);
  }

  .lead-form__card {
    padding: var(--space-24);
    gap: var(--space-16);
  }

  .lead-form__row {
    flex-direction: column;
    gap: var(--space-16);
  }

  .utility-page {
    padding-top: 120px;
    padding-bottom: var(--space-48);
  }

  .utility-page__actions {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .lead-form__inner .accent{
      
    display:block!important;
  }

  .stories__title .accent{
    display:inline!important;
  }
}

@media (max-width: 575.98px) {
  .brand img {
    width: 140px;
    height: 47px;
  }

  .hero {
    min-height: 100svh;
  }

  .media-row img {
    width: auto;
    max-width: none;
    height: 280px;
  }

  .logo-strip__track {
    animation-duration: 60s;
  }

  .logo-strip__group {
    gap: 32px;
    padding-right: 32px;
  }

  .logo-strip__group img {
    height: 44px;
  }
}

/* ==========================================================================
   iPad portrait + landscape (768px–1199px)
   Overrides phone/tablet stack. Does not apply to phones or desktop.
   ========================================================================== */
@media only screen and (min-width: 768px) and (max-width: 1199.98px) {
  .case-studies__head{
    flex-direction: row;
    align-items: flex-end;
  }

  .what-we-do {
    overflow: visible;
    padding-bottom: 40px;
  }

  .service-scroller {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .service-scroller::-webkit-scrollbar {
    display: none;
  }

  .story-cta__content {
    max-width: 420px;
  }

  .story-cta__copy {
    max-width: 300px;
  }

  .case-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-24);
  }

  .case-item,
  .case-item--reverse {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .case-item--reverse .case-item__copy {
    order: 0;
  }

  .case-item__media img {
    height: 200px;
  }

  .stories {
    height: auto;
    overflow: visible;
    z-index: auto;
  }

  .stories__stage {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    padding: 60px 0;
  }

  .stories__title {
    position: relative;
    top: auto;
    z-index: auto;
    width: calc(100% - 40px);
    margin: 32px auto 16px;
    flex-shrink: 0;
    will-change: auto;
  }

  .stories__board {
    flex: none;
    width: 100%;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .stories__board::-webkit-scrollbar {
    display: none;
  }

  .stories__cards {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: max-content;
    max-width: none;
    aspect-ratio: auto;
    height: auto;
    padding-inline: 0;
    transform: none;
  }

  .stories-card,
  .stories-card--1,
  .stories-card--2,
  .stories-card--3,
  .stories-card--4,
  .stories-card--5 {
    flex: 0 0 50%;
    width: 50vw;
    max-width: 50vw;
    height: min(300px, 42svh);
    max-height: min(300px, 42svh);
    min-height: 0;
    padding-inline: 16px;
  }

  .stories-card:nth-child(even) {
    scroll-snap-align: none;
  }

  .stories-card--dark,
  .stories-card--on-image {
    background-color: var(--color-pure);
  }

  .stories-card--dark .stories-card__media,
  .stories-card--3 .stories-card__media,
  .stories-card--on-image .stories-card__media {
    aspect-ratio: auto;
  }

  .stories-card--dark .stories-card__body,
  .stories-card--on-image .stories-card__body {
    min-height: 0;
    padding: 12px;
  }

  .stories__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 0 32px;
  }

  .stories__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(28, 30, 33, 0.22);
    cursor: pointer;
    appearance: none;
  }

  .stories__dot.is-active {
    background-color: var(--color-lime);
  }

  .stories__dot:focus-visible {
    outline: 2px solid var(--color-lime);
    outline-offset: 3px;
  }

  .footer-main {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-48);
  }

  .footer-nav {
    flex-wrap: nowrap;
    gap: var(--space-40);
  }
  .stories__title .accent{
    display:block!important;
  }

}

@media (prefers-reduced-motion: reduce) {
  .logo-strip__track,
  .media-row__track,
  .footer-watermark,
  .footer-watermark::before {
    animation: none;
  }

  .media-row__group[aria-hidden="true"] {
    display: none;
  }

  .hero__video {
    display: none;
  }

  .hero__poster {
    display: block;
  }

  html {
    scroll-behavior: auto;
  }

  .site-header {
    transition: background-color var(--duration) var(--ease), padding-block var(--duration) var(--ease);
  }

  .site-header.is-hidden {
    transform: none;
    pointer-events: auto;
  }

  .work-tile::after,
  .work-tile__label,
  .work-tile__chip,
  .case-item__media img,
  .collage__item img,
  .what-we-do .card-feature__media img,
  .what-we-do .card-feature__overlay,
  .what-we-do .card-feature__body::before,
  .what-we-do .card-feature .display-sm,
  .what-we-do .card-feature .mono,
  .what-we-do .card-feature .text-meta,
  .what-we-do .card-feature .btn-secondary,
  .more-than__tab,
  .more-than__frame img {
    transition: none;
  }

  .more-than__frame img {
    filter: none;
    transform: translate3d(100%, 0, 0);
  }

  .more-than__frame img.is-active {
    transform: translate3d(0, 0, 0);
  }

  .more-than__frame img.is-from-left,
  .more-than__frame img.is-to-left {
    transform: translate3d(-100%, 0, 0);
  }

  .work-tile__chip {
    height: 0;
    bottom: calc(var(--chip-h) / 2);
    opacity: 0;
    transform: none;
  }

  .work-tile:hover .work-tile__chip,
  .work-tile:focus-visible .work-tile__chip {
    height: var(--chip-h);
    bottom: 0;
    opacity: 1;
    transform: none;
  }

  .case-item__media:hover img,
  .case-item__media:focus-within img,
  .collage__item:hover img,
  .collage__item:focus-within img,
  .what-we-do .card-feature:hover .card-feature__media img,
  .what-we-do .card-feature:focus-within .card-feature__media img,
  .what-we-do .card-feature:hover .display-sm,
  .what-we-do .card-feature:focus-within .display-sm,
  .what-we-do .card-feature:hover .mono,
  .what-we-do .card-feature:hover .text-meta,
  .what-we-do .card-feature:focus-within .mono,
  .what-we-do .card-feature:focus-within .text-meta,
  .what-we-do .card-feature:hover .btn-secondary,
  .what-we-do .card-feature:focus-within .btn-secondary {
    transform: none;
  }

  .js-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
