/* ==========================================================================
   Phones and small tablets. Loaded last so it can refine the desktop rules.
   Same look and feel as desktop: dark canvas, tight serif, hairlines, soft glows.
   ========================================================================== */

/* ---------- Nav: solid-ish backdrop once you scroll, tucks away while scrolling down ---------- */
@media (max-width: 900px) {
  .nav { padding: max(16px, env(safe-area-inset-top)) var(--pad) 16px; transition: color .4s, transform .5s var(--ease), background .4s, backdrop-filter .4s; }
  .nav.is-bg { background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  .nav.is-media.is-bg { background: rgba(15, 15, 15, .66); border-bottom-color: rgba(243, 241, 236, .14); }
  .nav.is-hide { transform: translateY(-110%); }
  .nav__logo img { height: 24px; }
  .nav__menu { width: 48px; height: 44px; }
  .menu { padding: 110px var(--pad) max(40px, env(safe-area-inset-bottom)); }
  .menu__list a { font-size: clamp(2.2rem, 11vw, 3.6rem); }
}

/* ---------- Hero on portrait screens: the photo becomes a cinematic band between the two words ---------- */
@media (max-aspect-ratio: 1/1) {
  .hs img { top: 50%; left: 50%; translate: -50% -50%; height: auto; width: max(150vw, 100svh * .9); transform-origin: 50% 50%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 76%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 76%, transparent 100%); }
  .hs--tedx img { translate: -53% -50%; }
  .hshade { background: linear-gradient(180deg, #0f0f0f 0%, rgba(15, 15, 15, .88) 12%, rgba(15, 15, 15, 0) 30%, rgba(15, 15, 15, 0) 70%, rgba(15, 15, 15, .88) 88%, #0f0f0f 100%); }
  .hero__mark { font-size: clamp(3rem, 15.5vw, 6rem); line-height: .9; }
  .hero__mark--l { top: 17%; left: var(--pad); translate: 0 0; }
  .hero__mark--r { top: auto; bottom: 17%; right: var(--pad); translate: 0 0; }
  .hui { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .hero__meta { bottom: calc(28px + env(safe-area-inset-bottom)); font-size: .85rem; }
  /* soft glows above and below the band instead of at the sides */
  .g1 { background: radial-gradient(70% 20% at 50% 16%, rgba(150, 70, 235, .24), rgba(150, 70, 235, 0) 72%), radial-gradient(70% 20% at 50% 86%, rgba(240, 90, 35, .22), rgba(240, 90, 35, 0) 72%); }
  .g2 { background: radial-gradient(70% 20% at 50% 16%, rgba(255, 168, 62, .2), rgba(255, 168, 62, 0) 72%), radial-gradient(70% 20% at 50% 86%, rgba(255, 150, 50, .2), rgba(255, 150, 50, 0) 72%); }
  .g3 { background: radial-gradient(70% 20% at 50% 16%, rgba(255, 120, 40, .22), rgba(255, 120, 40, 0) 72%), radial-gradient(70% 20% at 50% 86%, rgba(70, 130, 235, .22), rgba(70, 130, 235, 0) 72%); }
}
/* bigger touch targets for the three scene lines */
@media (pointer: coarse) {
  .hui__bars button { height: 36px; width: 62px; }
  .hui__bars button::before, .hui__bars button b { top: 17px; }
}

/* ---------- Everything else on phones ---------- */
@media (max-width: 700px) {
  :root { --pad: 20px; }

  /* lighter blurs: they are expensive on phones */
  .orb { filter: blur(40px); }
  .cone { filter: blur(24px); }

  /* About */
  .about { height: 280vh; }
  .about__text { font-size: clamp(1.5rem, 6.4vw, 2.2rem); }

  /* Services */
  .services { padding-top: 5rem; }
  .row { padding: 1.6rem 0; }
  .row__t { font-size: clamp(2.2rem, 10.5vw, 3rem); }
  .row__p { font-size: .95rem; }

  /* Portfolio slideshow: label and counter above the photo, caption and link below it */
  .works { height: 560vh; }
  .works__vf { width: 88vw; height: 58vw; min-width: 0; min-height: 0; }
  .works__label { left: var(--pad); top: calc(max(16px, env(safe-area-inset-top)) + 78px); translate: 0 0; font-size: 1.7rem; }
  .works__count { right: var(--pad); top: calc(max(16px, env(safe-area-inset-top)) + 78px); translate: 0 0; font-size: 1.7rem; }
  .works__cap { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .works__all { left: 50%; right: auto; translate: -50% 0; bottom: calc(30px + env(safe-area-inset-bottom)); }

  /* Portfolio list: number, title, then the category underneath */
  .portfolio { padding-top: 4.5rem; }
  .portfolio__h { font-size: clamp(2.6rem, 12.5vw, 3.6rem); }
  .pf { grid-template-columns: 2rem 1fr; grid-template-areas: "n t" ". c"; gap: .25rem .6rem; align-items: baseline; padding: 1.05rem 0; }
  .pf__n { grid-area: n; }
  .pf__t { grid-area: t; font-size: 1.35rem; line-height: 1.12; }
  .pf__c { grid-area: c; text-align: left; font-size: .88rem; }
  .pf__a { display: none; }
  .pf:hover { padding-left: 0; }

  /* Process */
  .process { padding-top: 4.5rem; }
  .step h3 { font-size: 1.05rem; }

  /* Track record */
  .track__h { font-size: clamp(3rem, 15vw, 4.4rem); }
  .bars { gap: 8px; }
  .bar div { height: 200px; }

  /* Reviews */
  .quote p { font-size: clamp(1.3rem, 5.6vw, 1.7rem); }

  /* Closing call to action */
  .cta { height: 210vh; }
  .cta__h { font-size: clamp(3.2rem, 16vw, 5rem); }

  /* Footer */
  .footer { padding-bottom: max(1.6rem, calc(env(safe-area-inset-bottom) + 1rem)); }
  .ft__cv { font-size: clamp(1.7rem, 8.4vw, 2.4rem); }
  .ft__col:nth-child(4) { grid-column: 1 / -1; }
  .ft__bar { gap: .9rem; }
  .ft__top { margin-top: .2rem; }

  /* Forms: 16px stops iPhones zooming in when a field is focused */
  .news input[type="email"], .news input { font-size: 16px; }
  .news button { font-size: 16px; padding: .8rem 1.2rem; }

  /* Buttons: comfortable tap size */
  .btn b, .btn i { padding: .8rem 1.1rem; }
  .chip { padding: .55rem 1.1rem; }
}

@media (max-width: 380px) {
  .hero__mark { font-size: 3rem; }
  .pf__t { font-size: 1.25rem; }
}

/* ---------- Footer on phones: roomy tap targets, tidy social row, clear hierarchy ---------- */
@media (max-width: 700px) {
  .footer { padding-top: 3rem; }
  /* the arrows next to the contact lines stay visible (there is no hover on a phone) */
  .ft__cv span { opacity: 1; transform: none; }
  .ft__c { padding: 1.4rem 0; }
  .ft__cols { gap: 2rem 1.4rem; padding: 2.2rem 0 2rem; }
  .ft__brand img { height: 30px; }
  .ft__col h4 { margin-bottom: .8rem; }
  .ft__col ul { gap: 0; }
  .ft__col ul a { display: block; padding: .5rem 0; }
  .ft__col address { font-size: .98rem; }
  .ft__news .news { max-width: none; }
  .ft__news .news input[type="email"] { height: 52px; padding: 0 1rem; }
  .ft__news .news button { height: 52px; }
  /* bottom bar: socials left, back-to-top right, small print underneath */
  .ft__bar { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "social top" "copy copy"; gap: 1.4rem 1rem; align-items: center; padding-top: 1.6rem; }
  .ft__bar .social { grid-area: social; gap: .55rem; }
  .ft__bar .social a { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; opacity: 1; font-size: 1.1rem; }
  .ft__bar > span { grid-area: copy; font-size: .76rem; line-height: 1.55; }
  .ft__top { grid-area: top; margin: 0; min-height: 44px; align-self: center; }
}
