:root {
  --bg: #050506;
  --text: #f4f4f3;
  --muted: #a3a3aa;
  --line: #282830;
  --accent: #009ca8;
  --accent-2: #27d3dc;
  --screen-offset-x: clamp(1rem, 2.78vw, 2.5rem);
  --screen-header-height: 4rem;
  --screen-wrapper-max: 3440px;
}

@font-face {
  font-family: Futura;
  src: url("/assets/futura-medium-BYpzSkPa.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: Futura, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 84% 16%, rgba(0, 156, 168, 0.18), transparent 30vw),
    radial-gradient(circle at 20% 80%, rgba(39, 211, 220, 0.08), transparent 26vw),
    #050505;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 1400;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #050506;
  font-weight: 700;
}

.skip-link:focus-visible {
  left: 1rem;
  top: 1rem;
}

#transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  background: var(--bg);
  pointer-events: none;
}

.loader {
  width: min(340px, 75vw);
  display: grid;
  gap: 1.2rem;
}

#loader-number {
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
}

.loader-track {
  height: 2px;
  background: #1d1d22;
  overflow: hidden;
}

#loader-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0.02);
  transform-origin: left center;
}

.project-rotonde-section,
.project-rotonde {
  width: 100%;
  min-height: 100dvh;
  background: #050505;
  overflow: hidden;
}

.project-rotonde {
  position: relative;
  height: 100dvh;
  min-height: 640px;
}

.rotonde-stage,
.rotonde-overlay {
  position: absolute;
  inset: 0;
}

.rotonde-stage {
  z-index: 1;
  pointer-events: auto;
}

.rotonde-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.rotonde-stage canvas[data-dragging="true"] {
  cursor: grabbing;
}

.rotonde-project-copy {
  position: absolute;
  z-index: 7;
  top: clamp(7.5rem, 18vh, 10.75rem);
  left: clamp(1.25rem, 8vw, 5.5rem);
  width: min(34rem, calc(100% - 2.5rem));
  color: #fff;
  pointer-events: none;
  text-align: left;
}

.rotonde-project-category,
.rotonde-project-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(0.66rem, 1.1vw, 0.78rem);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rotonde-project-category {
  color: var(--accent);
}

.rotonde-project-title {
  max-width: 18ch;
  margin: 0.35rem 0 0.5rem;
  color: #fff;
  font-size: clamp(2rem, 6.2vw, 4.75rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0;
  text-align: left;
  text-wrap: balance;
}

.rotonde-project-meta {
  max-width: min(42ch, 100%);
  color: rgba(255, 255, 255, 0.5);
  overflow-wrap: anywhere;
}

.rotonde-project-action {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: clamp(8rem, 17vh, 9.75rem);
  transform: translateX(-50%);
  pointer-events: auto;
}

.rotonde-visit-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.25rem;
  height: 2.35rem;
  padding: 0 1.35rem;
  border: 1px solid rgba(0, 156, 168, 0.48);
  border-radius: 999px;
  background: rgba(0, 156, 168, 0.1);
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    border-color 0.24s ease,
    background-color 0.24s ease,
    color 0.24s ease,
    transform 0.24s ease;
}

.rotonde-visit-link::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.68rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.72;
}

.rotonde-visit-link:hover,
.rotonde-visit-link:focus-visible {
  border-color: rgba(0, 156, 168, 0.74);
  background: rgba(0, 156, 168, 0.14);
  color: #fff;
  transform: translateY(-1px);
}

.rotonde-visit-link:focus-visible {
  outline: 2px solid rgba(0, 156, 168, 0.52);
  outline-offset: 4px;
}

.rotonde-visit-link:active {
  transform: translateY(0);
}

.rotonde-overlay {
  z-index: 8;
  pointer-events: none;
}

.rotonde-index {
  position: absolute;
  top: calc(72px + 2.5rem);
  left: clamp(1.25rem, 2vw, 2rem);
  margin: 0;
  color: #fff;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rotonde-hint {
  position: absolute;
  left: 50%;
  bottom: calc(4rem + 22px);
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(-50%);
  transition:
    opacity 0.9s cubic-bezier(0.19, 1, 0.22, 1),
    transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
}

.rotonde-hint[data-hidden="true"] {
  opacity: 0;
  transform: translate(-50%, 6px);
}

.rotonde-hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: rotonde-hint-pulse 1.8s ease-in-out infinite;
}

.rotonde-hint-text {
  color: #888;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes rotonde-hint-pulse {
  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 1;
  }
}

.rotonde-progress {
  position: absolute;
  left: 50%;
  bottom: 4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateX(-50%);
}

.rotonde-progress li {
  width: 44px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  transition:
    width 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    height 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background-color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rotonde-progress li[data-active="true"] {
  width: 56px;
  height: 2px;
  background: var(--accent);
}

.rotonde-fallback-grid {
  position: absolute;
  inset: clamp(7rem, 16vh, 9rem) var(--screen-offset-x) 4rem;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  overflow: auto;
}

.rotonde-fallback-card {
  min-height: 15rem;
  padding: 1rem;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 -12rem 8rem rgba(0, 0, 0, 0.62);
}

.rotonde-fallback-card strong {
  display: block;
  color: #fff;
  font-size: clamp(1.3rem, 2.5vw, 2.4rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.rotonde-fallback-card span {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  :root {
    --screen-header-height: 3.5rem;
  }

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

@media (max-width: 767px) {
  :root {
    --screen-offset-x: 1rem;
    --screen-header-height: 3.75rem;
  }

  .rotonde-index {
    top: calc(64px + 1.5rem);
  }

  .rotonde-project-copy {
    top: calc(64px + 4.25rem);
    left: clamp(1rem, 5vw, 2rem);
    width: min(30rem, calc(100% - 2rem));
  }

  .rotonde-project-title {
    font-size: clamp(1.8rem, 6.5vw, 3rem);
    line-height: 0.98;
  }

  .rotonde-project-meta {
    max-width: 30ch;
    font-size: 0.62rem;
    letter-spacing: 0.09em;
  }

  .rotonde-project-action {
    bottom: calc(2.5rem + 64px);
  }

  .rotonde-visit-link {
    height: 2.2rem;
    min-width: 5.8rem;
    padding-inline: 1.1rem;
    font-size: 0.62rem;
  }

  .project-rotonde {
    min-height: 560px;
  }

  .rotonde-hint {
    bottom: calc(2.5rem + 22px);
  }

  .rotonde-progress {
    bottom: 2.5rem;
    gap: 0.7rem;
  }

  .rotonde-progress li {
    width: 28px;
  }

  .rotonde-progress li[data-active="true"] {
    width: 38px;
  }

  .rotonde-fallback-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .rotonde-project-copy {
    top: calc(64px + 4rem);
  }

  .rotonde-project-title {
    max-width: 15ch;
    font-size: clamp(1.65rem, 7vw, 2rem);
  }

  .rotonde-project-meta {
    max-width: 25ch;
    font-size: 0.58rem;
  }

  .rotonde-project-action {
    bottom: calc(2.4rem + 58px);
  }

}

@media (prefers-reduced-motion: reduce) {
  .rotonde-hint,
  .rotonde-progress li {
    transition: none;
  }

  .rotonde-hint-dot {
    animation: none;
  }
}


/* ==========================================================================
   PROJECT IFRAME MODAL OVERLAY & BACK BUTTON
   ========================================================================== */

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  background: #090d12;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-modal.--is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project-modal__bar {
  height: 60px;
  min-height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 194, 209, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.project-modal__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(0, 194, 209, 0.15);
  border: 1px solid #00c2d1;
  color: #00c2d1;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.24s ease;
}

.project-modal__back-btn:hover {
  background: #00c2d1;
  color: #0d1117;
  box-shadow: 0 0 20px rgba(0, 194, 209, 0.5);
  transform: translateY(-1px);
}

.project-modal__title {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
  text-align: center;
}

.project-modal__ext-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8b949e;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-modal__ext-btn:hover {
  color: #00c2d1;
}

.project-modal__body {
  flex: 1;
  width: 100%;
  height: calc(100% - 60px);
  position: relative;
  background: #000;
}

.project-modal__body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 767px) {
  .project-modal__bar { padding: 0 12px; height: 54px; min-height: 54px; }
  .project-modal__title { display: none; }
  .project-modal__back-btn { padding: 6px 14px; font-size: 12px; }
}


/* ====================================================================

/* ====================================================================

/* ==========================================================================
   EXACT LOGO SIZE MATCH (130px x 40px) FOR PROJETOS TOPBAR
   ========================================================================== */

.project-topbar__logo {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 130px !important;
  height: 40px !important;
  cursor: pointer !important;
  display: block !important;
  z-index: 10 !important;
}

.project-topbar__logo:hover {
  transform: translate(-50%, -50%) scale(0.95) !important;
}

.project-topbar__logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}
