/* ============================
   DESIGNADO - Designer Digital
   Style CSS
   ============================ */

/* CSS Variables */
:root {
  --bg: #08090b;
  --white: #f5f5f2;
  --muted: rgba(245, 245, 242, 0.62);
  --ease: cubic-bezier(0.22, 0.8, 0.22, 1);
  --led-colors: #78d9ff, #c7ff6b 12%, #fff4d6 14%, #ffd978 18%, #ff785a 27%, #78d9ff 50%, #c7ff6b 62%, #fff4d6 64%, #ffd978 68%, #ff785a 77%, #78d9ff;
}

@property --panel-led-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* Reset & Base */
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--white);
}

body {
  font-family: Manrope, sans-serif;
}

html.is-loading .site-shell {
  visibility: hidden;
  opacity: 0;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: var(--bg);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader.is-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(230px, calc(100vw - 48px));
}

.page-loader-brand {
  color: var(--white);
  font: 700 16px 'Orbitron', sans-serif;
  letter-spacing: 0.18em;
}

.page-loader-meter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-loader-progress {
  position: relative;
  flex: 1;
  height: 1px;
  background: rgba(245, 245, 242, 0.24);
}

.page-loader-bar {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: 0;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, #78d9ff, #c7ff6b 45%, #fff4d6 70%, #78d9ff);
  background-size: 200% 100%;
  box-shadow: 0 0 5px rgba(120, 217, 255, 0.9), 0 0 12px rgba(199, 255, 107, 0.5);
  animation: page-loader-led-flow 1.8s linear infinite;
  transition: width 0.18s ease;
}

@keyframes page-loader-led-flow {
  to { background-position: -200% 0; }
}

.page-loader-percent {
  min-width: 34px;
  color: var(--white);
  font: 10px 'DM Mono', monospace;
  text-align: right;
}

.page-loader-label {
  margin: 0;
  color: var(--muted);
  font: 9px 'DM Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Layout */
.site-shell {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 560px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

#depth-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.38;
  pointer-events: none;
}

/* Header & Footer */
.topbar,
.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
  flex-shrink: 0;
}

.topbar {
  height: 54px;
  padding: 0 8px 14px;
}

/* Brand */
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: min-content;
  text-decoration: none;
  color: inherit;
}

.brand-main {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  position: relative;
}

.brand-sub {
  width: 100%;
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 8.5px;
  font-weight: 300;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  text-align: justify;
  text-align-last: justify;
  white-space: nowrap;
}

/* WhatsApp Contact Button */
.whatsapp-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--white);
  font: 10px 'DM Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 0;
  transition: all 0.3s ease;
}

.whatsapp-cta:hover {
  transform: translateX(-2px);
}

.whatsapp-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.whatsapp-cta:hover .whatsapp-icon {
  filter: drop-shadow(0 0 12px rgba(37, 211, 102, 1)) drop-shadow(0 0 20px rgba(37, 211, 102, 0.6));
  animation: neon-pulse 1.5s ease-in-out infinite;
}

.whatsapp-cta span {
  transition: text-shadow 0.3s ease;
}

.whatsapp-cta:hover span {
  text-shadow: 0 0 10px rgba(37, 211, 102, 0.6), 0 0 20px rgba(37, 211, 102, 0.4);
}

@keyframes neon-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(37, 211, 102, 1)) drop-shadow(0 0 20px rgba(37, 211, 102, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(37, 211, 102, 1)) drop-shadow(0 0 30px rgba(37, 211, 102, 0.8));
  }
}

/* Glitch Effect */
.brand-main.glitch {
  animation: glitch-anim 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.brand-main.glitch::before,
.brand-main.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.brand-main.glitch::before {
  animation: glitch-anim-1 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  color: #00ffff;
  z-index: -1;
}

.brand-main.glitch::after {
  animation: glitch-anim-2 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  color: #ff00ff;
  z-index: -2;
}

@keyframes glitch-anim {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-anim-1 {
  0%,
  100% {
    transform: translate(0);
    opacity: 0.8;
  }
  20% {
    transform: translate(-3px, 3px);
  }
  40% {
    transform: translate(-3px, -3px);
  }
  60% {
    transform: translate(3px, 3px);
  }
  80% {
    transform: translate(3px, -3px);
  }
}

@keyframes glitch-anim-2 {
  0%,
  100% {
    transform: translate(0);
    opacity: 0.8;
  }
  20% {
    transform: translate(3px, -3px);
  }
  40% {
    transform: translate(3px, 3px);
  }
  60% {
    transform: translate(-3px, -3px);
  }
  80% {
    transform: translate(-3px, 3px);
  }
}

/* Panels */
.panels {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 5px;
  perspective: 1200px;
}

.panel {
  --accent: #d6e6ff;
  --panel-radius: 3px;
  position: relative;
  min-width: 0;
  min-height: 0;
  flex: 1 1 0;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--panel-radius);
  background: #17191d;
  transform-style: preserve-3d;
  transition: flex 0.9s var(--ease), border-color 0.6s ease, filter 0.6s ease;
}

.panel.is-active {
  flex: 4.7 1 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow:
    0 7px 18px rgba(0, 0, 0, 0.72),
    0 0 12px rgba(120, 217, 255, 0.46),
    0 0 28px rgba(255, 120, 90, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 1px 0 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 0 rgba(0, 0, 0, 0.82),
    inset -2px 0 0 rgba(0, 0, 0, 0.42);
}

.panel.is-active::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 4px solid transparent;
  border-radius: inherit;
  background: conic-gradient(from var(--panel-led-angle), var(--led-colors)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(120, 217, 255, 0.7)) drop-shadow(0 0 10px rgba(199, 255, 107, 0.28));
  animation: panel-led-flow 3s linear infinite;
}

.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12) 35%, rgba(0, 0, 0, 0.78));
  transition: opacity 0.7s ease;
}

.panel:hover::after,
.panel.is-active::after {
  opacity: 0.72;
}

.panel.is-active::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.1) 3px, transparent 7px, transparent calc(100% - 7px), rgba(0, 0, 0, 0.28) calc(100% - 3px), rgba(0, 0, 0, 0.96)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08) 3px, transparent 7px, transparent calc(100% - 7px), rgba(0, 0, 0, 0.2) calc(100% - 3px), rgba(0, 0, 0, 0.9)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12) 35%, rgba(0, 0, 0, 0.78));
}

.panel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.64) saturate(0.65);
  transform: scale(1.08);
  transition: filter 0.9s ease, transform 1.5s var(--ease);
}

.panel.is-playing video {
  filter: grayscale(0) brightness(0.82) saturate(1.18);
  transform: scale(1.015);
}

.panel:not(.is-active) video {
  transform: scale(1.16);
}

.panel:hover video {
  filter: grayscale(0) brightness(0.82) saturate(1.18);
}

/* Panel Content */
.panel-content {
  position: absolute;
  z-index: 3;
  left: clamp(18px, 3vw, 48px);
  right: 24px;
  bottom: clamp(25px, 5vh, 58px);
}

@keyframes panel-led-flow {
  to {
    --panel-led-angle: 360deg;
  }
}

/* Expanded panel copy follows the available panel width */
.panel.is-active .panel-content {
  right: 8px;
}

.panel[data-index="0"].is-active .panel-content,
.panel[data-index="1"].is-active .panel-content {
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 8px clamp(25px, 5vh, 58px) clamp(18px, 3vw, 48px);
}

/* Contato panel needs more right breathing room for the form */
.panel[data-index="4"].is-active .panel-content {
  right: clamp(24px, 6vw, 80px);
}

/* Hide form when contact panel is inactive */
.panel[data-index="4"]:not(.is-active) .contact-form {
  display: none;
}

.panel.is-active .panel-copy {
  max-width: none;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease, transform 0.3s ease;
  min-height: 100px;
}

/* Text Navigation Squares */
.text-navigation {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.5s ease 0.25s, transform 0.6s var(--ease) 0.25s;
}

.panel[data-index="0"].is-active .text-navigation,
.panel[data-index="1"].is-active .text-navigation {
  position: absolute;
  right: 16px;
  bottom: 16px;
  margin-top: 0;
}

.panel.is-active .text-navigation {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-circle {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  background: rgba(23, 25, 29, 0.6);
  color: rgba(255, 255, 255, 0.45);
  font: 10px 'DM Mono', monospace;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.nav-circle:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
  background: rgba(23, 25, 29, 0.8);
}

/* Home panel - green */
.panel:first-child .nav-circle.active {
  border-color: #c7ff6b;
  color: #c7ff6b;
  background: rgba(199, 255, 107, 0.12);
}

/* Sobre panel - orange */
.panel:nth-child(2) .nav-circle.active {
  border-color: #ff785a;
  color: #ff785a;
  background: rgba(255, 120, 90, 0.12);
}

.about-photo-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-photo-viewer[hidden] {
  display: none;
}

.about-photo-viewer {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 11, 0.94);
  backdrop-filter: blur(8px);
}

.portfolio-photo-viewer {
  position: fixed;
  padding: 16px;
}

.about-photo-viewer img {
  display: block;
  width: 75%;
  height: auto;
  aspect-ratio: 1 / 1;
  border: 1px solid #ff785a;
  border-radius: var(--panel-radius);
  object-fit: cover;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.portfolio-photo-viewer img {
  box-sizing: border-box;
  display: block;
  width: 100%;
  padding: clamp(14px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-bottom: none;
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.22)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.14));
}

.portfolio-viewer-image-wrap {
  position: relative;
  width: 100%;
}

@keyframes portfolio-glow-drift {
  0% {
    background-position: 0% 0%, 100% 100%, 100% 0%, 0 0;
  }
  33% {
    background-position: 100% 50%, 0% 50%, 50% 100%, 50% 50%;
  }
  66% {
    background-position: 50% 100%, 50% 0%, 0% 50%, 100% 0%;
  }
  100% {
    background-position: 100% 0%, 0% 100%, 50% 50%, 0 0;
  }
}

/* Portfolio viewer wrap + info caption */
.portfolio-viewer-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(90%, 720px);
  max-height: calc(100vh - 32px);
  border-radius: var(--panel-radius);
  background:
    radial-gradient(circle at 20% 20%, rgba(120, 217, 255, 1), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(199, 255, 107, 0.95), transparent 50%),
    radial-gradient(circle at 75% 15%, rgba(255, 120, 90, 0.7), transparent 40%),
    linear-gradient(135deg, #b9efff 0%, #c9efda 48%, #f5e9bd 100%);
  background-size: 350% 350%;
  background-position: 0% 0%, 100% 100%, 100% 0%, 0 0;
  animation: portfolio-glow-drift 6s ease-in-out infinite alternate;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.portfolio-viewer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 0;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-top: none;
  border-radius: 0 0 var(--panel-radius) var(--panel-radius);
  background: rgba(23, 25, 29, 0.88);
  backdrop-filter: blur(6px);
}

.portfolio-viewer-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  text-align: center;
}

.portfolio-viewer-service {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #78d9ff;
  text-transform: uppercase;
  text-align: center;
}

.portfolio-photo-viewer img {
  max-height: calc(100vh - 112px);
}

@supports (height: 100dvh) {
  .portfolio-viewer-wrap {
    max-height: calc(100dvh - 32px);
  }

  .portfolio-photo-viewer img {
    max-height: calc(100dvh - 112px);
  }
}

.portfolio-viewer-site-link {
  position: absolute;
  right: clamp(12px, 2vw, 22px);
  bottom: clamp(12px, 2vw, 22px);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 3px;
  background: rgba(8, 9, 11, 0.64);
  color: var(--white);
  font: 9px 'DM Mono', monospace;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0.8;
  backdrop-filter: blur(3px);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.portfolio-viewer-site-link[hidden] {
  display: none;
}

.portfolio-viewer-site-link:hover {
  background: var(--white);
  border-color: var(--white);
  color: #08090b;
  opacity: 1;
}

.portfolio-photo-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 44px;
  height: 44px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 25px;
  transform: translateY(-50%);
  background: rgba(8, 9, 11, 0.58);
}

.portfolio-photo-prev { left: clamp(12px, 4vw, 36px); }
.portfolio-photo-next { right: clamp(12px, 4vw, 36px); }

.about-photo-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  font-size: 17px;
}

.eyebrow {
  font: 10px 'DM Mono', monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 14px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease 0.05s, transform 0.55s var(--ease) 0.05s;
}

.panel[data-index="0"] .eyebrow { color: #c7ff6b; }
.panel[data-index="1"] .eyebrow { color: #ff785a; }
.panel[data-index="2"] .eyebrow { color: #a9a2ff; }
.panel[data-index="3"] .eyebrow { color: #78d9ff; }
.panel[data-index="4"] .eyebrow { color: #ffd978; }

h2 {
  margin: 0;
  font-family: 'Oxanium', sans-serif;
  font-size: clamp(22px, 3.8vw, 60px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transform-origin: left center;
  transition: transform 0.8s var(--ease);
  opacity: 0;
  color: var(--white);
}

h2.scramble-ready {
  opacity: 1;
}

.panel.is-active h2 {
  transition: none;
}

.panel:not(.is-active) h2 {
  font-size: clamp(14px, 1.6vw, 20px);
  position: absolute;
  top: 50%;
  left: 50%;
  bottom: auto;
  writing-mode: horizontal-tb;
  transform: translate(-50%, -50%);
}

.panel:not(.is-active) .panel-content {
  inset: 0;
}

@media (min-width: 701px) {
  .panel:not(.is-active) h2 {
    font-size: clamp(16px, 1.8vw, 23px);
    top: 80%;
    transform-origin: center;
    transform: translate(-50%, -50%) rotate(270deg);
  }

  .panel.is-active h2 {
    transform-origin: center;
  }
}

.panel[data-index="2"]:not(.is-active) .panel-content::after {
  display: none;
}

@media (min-width: 701px) {
  .panel[data-index="3"]:not(.is-active) .panel-content::after {
    display: none;
  }
}

.panel-copy {
  max-width: 410px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.65;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(10px);
  transition: max-height 0.7s ease, opacity 0.5s ease, transform 0.7s var(--ease);
}

.panel[data-index="0"] .panel-copy .text {
  white-space: pre-line;
}

.panel.is-active .eyebrow {
  opacity: 1;
  transform: translateY(0);
}

.panel.is-active .panel-copy {
  max-height: 100px;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}

.panel[data-index="0"].is-active .panel-copy {
  max-height: 190px;
}

.typewriter-cursor {
  display: inline-block;
  margin-left: 2px;
  color: currentColor;
  animation: typewriter-cursor-blink 0.8s steps(1, end) infinite;
}

@keyframes typewriter-cursor-blink {
  50% { opacity: 0; }
}

.panel[data-index="3"].is-active .panel-copy {
  min-height: 0;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  max-width: none;
  min-height: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}

.services-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: rgba(255, 255, 255, 0.92);
}

.services-list li::before {
  content: '';
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-top: 6px;
  background: #a9a2ff;
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(169, 162, 255, 0.45);
}

.panel.is-active .services-list {
  max-height: 180px;
}

.portfolio-carousel {
  width: 100%;
  margin-top: 0;
  overflow-x: clip;
  overflow-y: visible;
  clip-path: inset(-8px 0);
}

.portfolio-row-title {
  margin: 14px 0 5px;
  color: rgba(255, 255, 255, 0.82);
  font: 9px 'DM Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portfolio-track {
  display: flex;
  width: max-content;
  animation: portfolio-scroll 38s linear infinite;
  will-change: transform;
}

.portfolio-sites-carousel {
  margin-top: 0;
}

.portfolio-sites-track {
  animation-direction: reverse;
  animation-duration: 56.3s;
}

.panel:not(.is-active) .portfolio-carousel {
  display: none;
}

.panel:not(.is-active) .portfolio-row-title {
  display: none;
}

.panel:not(.is-active) .portfolio-track {
  animation-play-state: paused;
}

.portfolio-carousel:hover .portfolio-track,
.portfolio-carousel:has(.portfolio-set img:focus-visible) .portfolio-track {
  animation-play-state: paused;
}

.portfolio-set {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  padding-right: 12px;
}

/* Portfolio Item wrapper */
.portfolio-item {
  position: relative;
  z-index: 0;
  flex: 0 0 144px;
  width: 144px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 240ms var(--ease), box-shadow 240ms ease;
  transform-origin: center;
  cursor: pointer;
}

.portfolio-item img {
  display: block;
  width: 100%;
  height: 144px;
  padding: 4px;
  background: linear-gradient(135deg, #d9f3fa 0%, #dcefe0 52%, #f3e9c9 100%);
  object-fit: contain;
}

.portfolio-sites-carousel .portfolio-item img {
  height: 144px;
  padding: 0;
  object-fit: cover;
}

@media (min-width: 701px) and (max-height: 760px) {
  .portfolio-item {
    flex-basis: clamp(72px, 15vh, 112px);
    width: clamp(72px, 15vh, 112px);
  }

  .portfolio-item img,
  .portfolio-sites-carousel .portfolio-item img {
    height: clamp(72px, 15vh, 112px);
  }

  .portfolio-row-title {
    margin: 8px 0 3px;
  }

  .panel[data-index="3"].is-active .panel-copy {
    min-height: 0;
    max-height: 48px;
    margin-top: 10px;
  }
}

.portfolio-item-info {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: rgba(23, 25, 29, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.portfolio-item-info span {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  line-height: 1.3;
  white-space: nowrap;
}

.portfolio-item-name {
  width: 100%;
  padding: 3px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.portfolio-item-info .portfolio-item-service {
  display: none;
}

@media (hover: hover) {
  .portfolio-item:hover {
    z-index: 1;
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  }
}

.portfolio-item:focus-visible {
  outline: 2px solid #78d9ff;
  outline-offset: 3px;
}

@keyframes portfolio-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-track { animation: none; }
}

.panel-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 23px;
  color: white;
  text-decoration: none;
  font: 10px 'DM Mono', monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease 0.25s, transform 0.6s var(--ease) 0.25s;
}

.panel.is-active .panel-cta {
  opacity: 1;
  transform: translateY(0);
}

.cta-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  font-size: 15px;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}

.panel-cta:hover .cta-arrow {
  background: white;
  color: #111;
  transform: translateX(4px);
}

/* ============================
   Contact Form
   ============================ */
.contact-form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease 0.15s, transform 0.6s var(--ease) 0.15s;
}

.panel.is-active .contact-form {
  opacity: 1;
  transform: translateY(0);
}

.contact-form.is-submitted .contact-fields,
.contact-form.is-submitted .contact-actions {
  display: none;
}

/* Honeypot — completamente oculto de humanos */
.contact-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

.contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.contact-field {
  min-width: 0;
}

.contact-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 3px;
  color: var(--white);
  font: 10px 'DM Mono', monospace;
  letter-spacing: 0.1em;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.contact-input:hover:not(:focus):not(.is-invalid) {
  border-color: rgba(255, 255, 255, 0.55);
}

.contact-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.contact-input:focus {
  border-color: #ffd978;
  background: rgba(255, 217, 120, 0.06);
}

.contact-input.is-invalid {
  border-color: #ff785a;
}

.contact-select {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
}

.contact-select.has-value {
  color: var(--white);
}

.contact-select option {
  background: #17191d;
  color: var(--white);
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 3px;
  color: var(--white);
  font: 10px 'DM Mono', monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.contact-submit:hover {
  background: var(--white);
  border-color: var(--white);
  color: #08090b;
}

.contact-submit:hover .cta-arrow {
  background: #08090b;
  color: var(--white);
}

.contact-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.contact-status {
  font: 9px 'DM Mono', monospace;
  letter-spacing: 0.1em;
  min-height: 14px;
  margin: 0;
}

.contact-status.is-success { color: #c7ff6b; }
.contact-status.is-error   { color: #ff785a; }

/* Footer */
.bottombar {
  height: 43px;
  padding: 14px 8px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: start;
}

.copyright,
.privacy-link {
  color: var(--muted);
  font: 9px 'DM Mono', monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.copyright {
  justify-self: center;
  text-align: center;
}

.privacy-link {
  justify-self: end;
  text-decoration: none;
}

.privacy-link:hover,
.privacy-link:focus-visible {
  color: var(--white);
}

.social-link {
  display: inline-flex;
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.social-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.social-link.instagram:hover {
  filter: brightness(0) invert(1) drop-shadow(0 0 8px #e4405f);
}

.social-link.twitter:hover {
  filter: brightness(0) invert(1) drop-shadow(0 0 8px #1da1f2);
}

.social-link.behance:hover {
  filter: brightness(0) invert(1) drop-shadow(0 0 8px #1769ff);
}

.social-link.github:hover {
  filter: brightness(0) invert(1) drop-shadow(0 0 8px #ffffff);
}

.copyright-short {
  display: none;
}

/* Mobile Styles */
@media (max-width: 700px) {
  .site-shell {
    min-height: 0;
    padding: 12px;
  }

  .topbar {
    height: 42px;
    padding: 0 4px 10px;
  }

  .brand {
    gap: 2px;
  }

  .brand-main {
    font-size: 20px;
  }

  .brand-sub {
    font-size: 8px;
  }

  .whatsapp-cta span {
    display: none;
  }

  .whatsapp-icon {
    width: 18px;
    height: 18px;
  }

  .panels {
    flex-direction: column;
    gap: 4px;
  }

  .panel {
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    touch-action: manipulation;
  }

  .panel.is-active {
    flex: 8 1 0;
  }

  .panel[data-index="3"].is-active {
    flex: 9 1 0;
  }

  .panel-content {
    left: 18px;
    right: 16px;
    bottom: 16px;
  }

  .panel.is-active .panel-content {
    right: 6px;
    top: 16px;
    bottom: auto;
    align-items: flex-start;
  }

  .panel[data-index="0"].is-active .panel-content,
  .panel[data-index="1"].is-active .panel-content {
    inset: 0;
    justify-content: flex-start;
    padding: 16px 6px 0 18px;
  }

  .panel.is-active .panel-copy {
    max-height: 180px;
    min-height: 110px;
  }

  .text-navigation {
    margin-top: 12px;
    gap: 6px;
  }

  .nav-circle {
    width: 24px;
    height: 24px;
    font-size: 9px;
  }

  .about-photo-button svg {
    width: 13px;
    height: 13px;
  }

  .about-photo-close {
    top: 10px;
    right: 10px;
  }

  .portfolio-carousel {
    margin-top: 0;
  }

  .portfolio-set {
    gap: 8px;
    padding-right: 8px;
  }

  .portfolio-item {
    flex-basis: 76px;
    width: 76px;
  }

  .portfolio-item img {
    height: 76px;
  }

  .portfolio-sites-carousel .portfolio-item img {
    height: 76px;
  }

  .portfolio-row-title {
    margin: 8px 0 3px;
  }

  .panel[data-index="3"].is-active .eyebrow {
    display: none;
  }

  .panel[data-index="3"].is-active .panel-copy {
    margin-top: 5px;
  }

  .panel:not(.is-active) .panel-content {
    inset: 0;
  }

  .panel[data-index="2"]:not(.is-active) .panel-content::after {
    display: none;
  }

  .panel:not(.is-active) h2 {
    writing-mode: horizontal-tb;
    top: 50%;
    left: clamp(18px, 3vw, 48px);
    transform: translateY(-50%);
    font-size: clamp(13px, 3.8vw, 17px);
  }

  .panel:not(.is-active) .eyebrow {
    display: none;
  }

  .panel:not(.is-active) .panel-copy {
    display: none;
  }

  .panel:not(.is-active) .panel-cta {
    display: none;
  }

  .panel.is-active h2 {
    font-size: clamp(20px, 6.5vw, 36px);
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 9px;
  }

  .panel-copy {
    margin-top: 9px;
    font-size: 11px;
    line-height: 1.45;
  }

  .panel.is-active .panel-copy {
    max-height: 54px;
  }

  .panel[data-index="0"].is-active .panel-copy {
    max-height: 190px;
  }

  .services-list {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 9px;
    font-size: 11px;
  }

  .panel.is-active .services-list {
    max-height: 180px;
  }

  .panel-cta {
    margin-top: 12px;
    font-size: 9px;
  }

  .cta-arrow {
    width: 23px;
    height: 23px;
  }

  .bottombar {
    height: 34px;
    padding: 10px 4px 0;
    font-size: 9px;
  }

  .copyright,
  .privacy-link {
    font-size: 7px;
  }

  .copyright-full {
    display: none;
  }

  .copyright-short {
    display: inline;
  }

  .social-link {
    width: 16px;
    height: 16px;
  }

  .social-links {
    gap: 12px;
  }

  .contact-fields {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contact-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .contact-captcha {
    flex: 1 1 100%;
  }

  .contact-submit {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (max-width: 700px) and (max-height: 620px) {
  .panel[data-index="3"].is-active {
    flex: 12 1 0;
  }

  .panel[data-index="3"].is-active .panel-copy {
    display: none;
  }

  .portfolio-item {
    flex-basis: 64px;
    width: 64px;
  }

  .portfolio-item img,
  .portfolio-sites-carousel .portfolio-item img {
    height: 64px;
  }

  .portfolio-row-title {
    margin: 5px 0 2px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .typewriter-cursor {
    animation: none;
  }
}
