/* MARQUETANDO — Agency-grade motion, interactive showcase, magnetic cursor & elevated editorial polish */

/* Sticky frosted header on scroll + active nav indicator */
.site-header {
  position: sticky;
  top: 0;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease), height .35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(241, 242, 236, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(17, 17, 16, .12);
}
.nav-links a.is-active:after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Magnetic CTA smoothing */
.nav-contact,
.hero-cta,
.round-link,
.contact-submit,
.circle-arrow {
  will-change: transform;
}
.nav-contact {
  position: relative;
  overflow: hidden;
}
.nav-contact:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--lime);
}

/* ==========================================================================
   HERO COMPOSITION FIX: True 2-column grid (zero text/image overlap at any size)
   ========================================================================== */
.hero .hero-composition {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
  min-height: clamp(430px, calc(100svh - 320px), 620px);
  margin-top: 34px;
}

.hero h1 {
  font-size: clamp(46px, min(5.35vw, 11svh), 96px);
  line-height: 1.03;
  letter-spacing: -.055em;
  font-weight: 700;
  max-width: 100%;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.hero h1 em:after {
  height: .055em;
  bottom: .06em;
}

.hero .hero-art {
  position: relative;
  inset: auto;
  translate: none;
  width: 100%;
  max-width: 580px;
  justify-self: end;
  margin: 0;
  z-index: 1;
}

.hero .hero-scene {
  height: 445px;
}

.hero .hero-primary-device {
  top: 36px;
  right: 0;
  width: 92%;
  background: #171914;
  border-color: #3a4131;
  color: var(--paper);
}

.hero-primary-device .device-chrome {
  background: #1d201a;
  border-bottom-color: #2f3528;
  color: #aeb7a2;
  position: relative;
}

.showcase-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--lime);
  transform-origin: left;
  transform: scaleX(0);
}

.hero-showcase-stage {
  display: block;
  background: #141612;
  padding: 14px 16px 14px;
}

.showcase-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.showcase-tag {
  font: 600 7.5px/1.4 var(--font-display);
  letter-spacing: .1em;
  color: var(--lime);
  text-transform: uppercase;
}

.showcase-tabs {
  display: inline-flex;
  gap: 4px;
}

.showcase-tab {
  font: 600 7.5px/1 var(--font-display);
  letter-spacing: .06em;
  padding: 5px 8px;
  border-radius: 99px;
  background: rgba(241, 242, 236, .08);
  color: #b4bda8;
  border: 1px solid transparent;
  transition: background .25s, color .25s, border-color .25s;
}

.showcase-tab[aria-pressed="true"] {
  background: var(--lime);
  color: var(--ink);
}

.showcase-visual-link {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  text-align: left;
  color: inherit;
}

.showcase-media-frame {
  display: block;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16/9.4;
  background: #21241d;
  border: 1px solid #2e3427;
}

.showcase-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease), opacity .4s var(--ease);
}

.hero-primary-device:hover .showcase-media-frame img {
  transform: scale(1.03);
}

/* Info bar positioned cleanly below the image and padded past the floating badge */
.showcase-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 4px 2px 32%;
  border-top: 1px solid #2a3023;
}

.showcase-overlay-copy {
  min-width: 0;
}

.showcase-overlay-copy strong {
  display: block;
  font: 600 15px/1.15 var(--font-display);
  letter-spacing: -.03em;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.showcase-overlay-copy span {
  display: block;
  font: 400 9.5px/1.45 var(--font-body);
  color: #bcc4b1;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.showcase-pill {
  flex-shrink: 0;
  font: 700 7.5px/1 var(--font-display);
  letter-spacing: .07em;
  padding: 8px 11px;
  border-radius: 99px;
  background: var(--lime);
  color: var(--ink);
  transition: transform .3s var(--ease);
}

.showcase-visual-link:hover .showcase-pill {
  transform: translate(2px, -1px);
}

/* Secondary floating card: properly proportioned so "Tráfego." never clips */
.hero .hero-secondary-device {
  left: 0;
  bottom: 2px;
  width: 31.5%;
  min-width: 148px;
  padding: 16px 14px;
  z-index: 3;
}

.hero .secondary-label {
  margin-top: 18px;
  font-size: 6px;
}

.hero .secondary-title {
  font-size: clamp(14px, 1.3vw, 18.5px);
  line-height: 1.12;
  letter-spacing: -.04em;
  margin-top: 10px;
}

.hero .secondary-rule {
  margin-top: 15px;
  width: 28px;
}

.hero .secondary-bottom {
  margin-top: 10px;
  font-size: 5.5px;
}

.round-link {
  font: 600 10px/1.45 var(--font-display);
  letter-spacing: .06em;
}

/* Kinetic Studio Ticker Band */
.studio-ticker {
  background: #161813;
  color: var(--paper);
  border-top: 1px solid #2b3024;
  border-bottom: 1px solid #2b3024;
  overflow: hidden;
  padding-block: 13px;
  user-select: none;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: marquetando-marquee 34s linear infinite;
}
.studio-ticker:hover .ticker-track,
.motion-paused .ticker-track {
  animation-play-state: paused;
}
.ticker-group {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font: 500 10px/1 var(--font-display);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #cfd6c5;
}
.ticker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}
@keyframes marquetando-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Staggered reveal refinement */
.motion-ready [data-reveal] {
  transition: opacity .85s var(--ease), transform .95s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

/* Agency Custom Spring Cursor & Floating Secondary Preview */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor .project-cursor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 95;
    padding: 10px 15px;
    border-radius: 999px;
    background: var(--lime);
    color: var(--ink);
    font: 700 10px/1 var(--font-display);
    letter-spacing: .08em;
    box-shadow: 0 12px 30px rgba(17, 17, 16, .26);
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-100px, -100px, 0) scale(.72);
    transition: opacity .22s var(--ease), background .22s var(--ease), color .22s var(--ease);
    will-change: transform, opacity;
  }
  body.has-custom-cursor .project-cursor.is-visible {
    opacity: 1;
  }
  body.has-custom-cursor .project-cursor.is-lab {
    background: var(--ink);
    color: var(--lime);
    border: 1px solid rgba(197, 255, 0, .45);
  }
  body.has-custom-cursor .work-grid .project-open,
  body.has-custom-cursor .study-grid .project-open,
  body.has-custom-cursor .project-featured .project-open {
    cursor: pointer;
  }
  body.has-custom-cursor .work-grid .project-view,
  body.has-custom-cursor .study-grid .project-view {
    opacity: 0;
  }

  /* Subtle floating detail card on portfolio grid hover */
  .floating-case-preview {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 90;
    width: 210px;
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    background: var(--ink);
    border: 1px solid rgba(197, 255, 0, .45);
    box-shadow: 0 22px 48px rgba(17, 17, 16, .32);
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-300px, -300px, 0) scale(.86);
    transition: opacity .26s var(--ease);
    will-change: transform, opacity;
  }
  .floating-case-preview.is-visible {
    opacity: 1;
  }
  .floating-case-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .floating-case-preview span {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(17, 17, 16, .84);
    color: var(--paper);
    font: 600 8px/1 var(--font-display);
    letter-spacing: .07em;
  }
}

.motion-paused .project-cursor,
.motion-paused .floating-case-preview {
  display: none !important;
}

/* Featured case & service accordion polish */
.project-featured .project-open {
  transition: border-color .35s var(--ease), box-shadow .45s var(--ease), transform .45s var(--ease);
}
.project-featured .project-open:hover {
  border-color: #96a47d;
  box-shadow: 0 22px 54px rgba(17, 17, 16, .08);
}
.service {
  transition: background-color .3s var(--ease);
}
.service[open] {
  background: rgba(231, 237, 223, .38);
}

/* Tablet & medium viewports: stack Hero cleanly before any horizontal squeeze */
@media (max-width: 1120px) {
  .hero .hero-composition {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 34px;
    margin-top: 28px;
  }
  .hero h1 {
    font-size: clamp(54px, 8.6vw, 84px);
  }
  .hero .hero-art {
    max-width: 620px;
    justify-self: start;
  }
}

/* Mobile adjustments for Hero Showcase */
@media (max-width: 760px) {
  .hero .hero-composition {
    gap: 24px;
    margin-top: 24px;
  }
  .hero h1 {
    font-size: clamp(40px, 11.4vw, 64px);
    line-height: 1.02;
    letter-spacing: -.055em;
  }
  .hero .hero-scene {
    height: auto;
    padding-bottom: 14px;
  }
  .hero .hero-primary-device {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    transform: none;
  }
  .hero-showcase-stage {
    padding: 11px 12px 12px;
  }
  .showcase-top-row {
    margin-bottom: 8px;
  }
  .showcase-tag {
    font-size: 6px;
  }
  .showcase-tab {
    font-size: 6px;
    padding: 4px 7px;
  }
  .showcase-info-bar {
    padding-left: 0;
    margin-top: 10px;
    padding-top: 9px;
  }
  .showcase-overlay-copy strong {
    font-size: 14px;
  }
  .showcase-overlay-copy span {
    font-size: 8.5px;
  }
  .showcase-pill {
    font-size: 6.5px;
    padding: 6px 9px;
  }
  .hero .hero-secondary-device {
    display: none;
  }
  .ticker-group {
    font-size: 8.5px;
    gap: 20px;
    padding-right: 20px;
  }
}


/* Integration polish: readable controls, native navigation and reduced motion. */
.showcase-tab{font-size:12px;min-width:44px;min-height:44px;padding:8px 10px}
.showcase-tag{font-size:11px;letter-spacing:.055em}
.showcase-overlay-copy span{font-size:12px;white-space:normal}
.showcase-pill{font-size:11px;padding:10px 12px}
.showcase-tabs{flex-shrink:0}
.showcase-info-bar{padding-left:32%;min-height:70px}
.hero .hero-secondary-device{bottom:-12px;left:-16px;transform:translateY(40%)}
.hero .hero-scene{margin-bottom:62px}
.showcase-tab:focus-visible,.showcase-visual-link:focus-visible{outline:3px solid var(--lime);outline-offset:4px}
.motion-paused .project-open{cursor:pointer!important}
.hero-base>p,.manifesto-bottom p,.section-intro>p,.service-body>p,.studio-copy,
.process-grid p,.faq-list details>p,.contact-copy>p,.lab-heading>p{font-size:1rem;line-height:1.7}
.field label,.interest-field legend,.interest-options span,.contact-submit{font-size:1rem}
.form-note,.form-status,.form-fallback,.cookie-choice p,.cookie-actions button{font-size:.875rem;line-height:1.6}
.faq-list summary{font-size:1rem;line-height:1.5}
.motion-toggle{font-size:.875rem;min-height:44px}
.nav-contact,.hero-cta,.round-link,.text-link,.service-contact{font-size:.875rem}
.cookie-preferences{font-size:.875rem;min-height:44px}
.project-view{font-size:.875rem}
.dialog-copy>p,.dialog-copy ul{font-size:1rem;line-height:1.7}
.dialog-copy .concept-disclosure,.dialog-gallery figcaption{font-size:.875rem;line-height:1.6}
.ticker-group{font-size:12px}
@media(max-width:1120px){
 .hero .hero-scene{margin-bottom:65px}
 .hero .hero-secondary-device{left:0}
}
@media(max-width:760px){
 .hero .hero-scene{margin-bottom:0}
 .hero .hero-secondary-device{display:none}
 .showcase-tag{font-size:10px;max-width:45%;line-height:1.5}
 .showcase-tab{font-size:11px;min-width:40px;min-height:44px;padding:6px}
 .showcase-overlay-copy strong{font-size:16px;white-space:normal}
 .showcase-overlay-copy span{font-size:12px}
 .showcase-pill{font-size:10px;padding:10px}
 .showcase-info-bar{gap:8px;padding-left:0;min-height:70px}
 .hero-base{grid-template-columns:1fr;gap:22px}
 .hero-base>p{grid-column:1;grid-row:1;font-size:1rem;line-height:1.65}
 .hero-cta{grid-column:1;grid-row:2;justify-self:start;font-size:1rem}
 .round-link{grid-row:3;grid-column:1;font-size:.875rem}
 .hero-bottom>span{max-width:55%;font-size:9px;line-height:1.7}
 .motion-toggle{font-size:12px}
 .nav-contact{font-size:0}
 .studio-position{font-size:22px}
 .process-grid{grid-template-columns:1fr}
 .service-body ul{font-size:.875rem}
 .contact-channels{font-size:.875rem;overflow-wrap:anywhere}
 .project-type{font-size:10px}
 .project-discipline{font-size:12px}
 .footer-top,.footer-bottom{font-size:11px;line-height:1.7}
 .footer-bottom{align-items:center}
 .cookie-choice{max-height:calc(100dvh - 24px);overflow:auto}
 .cookie-choice h2{font-size:22px}
 .dialog-copy h2{overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce){
 .ticker-track{animation:none}
 .project-open{cursor:pointer!important}
 .project-cursor,.floating-case-preview{display:none!important}
}
