/* =========================================================
   FORMA Studio — responsive.css
   Breakpoint overrides on top of the mobile-first base in
   main.css.
   ========================================================= */

/* ---------- Small phones: tighten gutters ---------- */
@media (max-width: 380px) {
  .hero__headline {
    font-size: clamp(2.6rem, 15vw, 3.4rem);
  }
}

/* ---------- Tablet and up (768px) ---------- */
@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .work-card--mobile .work-card__media {
    max-width: 55%;
  }

  .hero__actions {
    flex-direction: row;
    align-items: center;
  }

  .services-columns {
    flex-direction: row;
    gap: 3rem;
  }

  .services-list {
    flex: 1;
  }
}

/* ---------- Desktop (1024px) ---------- */
@media (min-width: 1024px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .primary-nav {
    display: flex;
    justify-self: center;
    gap: 2.4rem;
  }

  .primary-nav a {
    position: relative;
    font-size: 0.92rem;
    font-weight: 500;
    padding-block: 0.3rem;
  }

  .primary-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 100%;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--dur-fast) var(--ease);
  }

  .primary-nav a:hover::after,
  .primary-nav a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .header-cta {
    display: inline-flex;
    justify-self: end;
  }

  .menu-toggle {
    display: none;
  }

  /* Hero: split layout */
  .hero__grid {
    flex-direction: row;
    align-items: center;
  }

  .hero__copy {
    width: 47%;
    flex-shrink: 0;
  }

  .hero__visual {
    width: 53%;
  }

  .hero-plate {
    width: 112%;
    margin-left: -6%;
  }

  .hero__branch {
    top: -20%;
    left: -30%;
    width: 130%;
  }

  /* Work gallery: horizontal scroll with nav buttons */
  .work-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .work-nav {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
  }

  .work-nav button {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }

  .work-nav button svg {
    width: 18px;
    height: 18px;
  }

  .work-nav button:hover:not(:disabled) {
    border-color: var(--text);
    background: var(--text);
    color: var(--button-light);
  }

  .work-nav button:disabled {
    opacity: 0.3;
    cursor: default;
  }

  .work-track {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    gap: 2rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
  }

  .work-track::-webkit-scrollbar {
    display: none;
  }

  .work-card {
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .work-card--desktop.work-card--lg {
    width: 32vw;
    min-width: 420px;
  }

  .work-card--desktop.work-card--md {
    width: 26vw;
    min-width: 340px;
  }

  .work-card--mobile {
    width: 15vw;
    min-width: 220px;
  }

  .work-card--mobile .work-card__media {
    max-width: 100%;
  }

  /* Approach: statement left, list right */
  .approach-grid {
    flex-direction: row;
    gap: 5rem;
  }

  .approach-statement {
    width: 34%;
    flex-shrink: 0;
    position: sticky;
    top: 8rem;
    align-self: flex-start;
  }

  .approach-list {
    flex: 1;
  }

  /* Proof collage: overlapping arrangement.
     Each item is absolutely positioned by percentage within a
     fixed-height stage, with object-fit:cover filling its box —
     this keeps the layout deterministic regardless of each
     screenshot's own aspect ratio (a CSS Grid with auto-sized rows
     driven by intrinsic image height produced unpredictable gaps
     and overlap here, so it's avoided). */
  .proof-collage {
    display: block;
    position: relative;
    height: clamp(460px, 40vw, 620px);
  }

  .proof-collage__item {
    position: absolute;
    margin: 0;
  }

  .proof-collage__item img {
    height: 100%;
    object-fit: cover;
  }

  .proof-collage__item--1 {
    left: 0%;
    top: 0%;
    width: 44%;
    height: 60%;
    transform: rotate(-1deg);
    z-index: 2;
  }

  .proof-collage__item--2 {
    left: 33%;
    top: 24%;
    width: 46%;
    height: 58%;
    transform: rotate(1deg);
    z-index: 3;
  }

  .proof-collage__item--3 {
    left: 66%;
    top: 0%;
    width: 34%;
    height: 40%;
    transform: rotate(0.6deg);
    z-index: 1;
  }

  .proof-collage__item--4 {
    left: 9%;
    top: 66%;
    width: 36%;
    height: 34%;
    transform: rotate(0.8deg);
    z-index: 1;
  }

  .proof-collage__item--5 {
    display: block;
    left: 66%;
    top: 50%;
    width: 34%;
    height: 44%;
    transform: rotate(-0.7deg);
    z-index: 2;
  }

  /* Process: horizontal timeline */
  .process-timeline {
    flex-direction: row;
  }

  .process-step {
    flex-direction: column;
    padding-bottom: 0;
    padding-right: 2.5rem;
    flex: 1;
  }

  .process-step::before {
    left: 52px;
    right: 0;
    top: 22px;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .process-step__body {
    margin-top: 1.5rem;
  }

  /* Working together: 3 columns */
  .together-grid {
    flex-direction: row;
  }

  .together-item {
    flex: 1;
    border-top: 1px solid var(--line-soft);
    padding-right: 2rem;
  }

  .together-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* FAQ: two columns, flowing top-to-bottom then across */
  .faq-list {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(var(--faq-rows, 5), auto);
    grid-auto-flow: column;
    column-gap: 4rem;
  }

  /* Final CTA split */
  .cta-grid {
    flex-direction: row;
    align-items: center;
  }

  .cta-copy {
    width: 46%;
    flex-shrink: 0;
  }

  .cta-visual {
    width: 54%;
  }
}

/* ---------- Wide desktop (1280px) ---------- */
@media (min-width: 1280px) {
  .work-card--desktop.work-card--lg {
    min-width: 460px;
  }

  .work-card--desktop.work-card--md {
    min-width: 380px;
  }

  .work-card--mobile {
    min-width: 240px;
  }
}
