/* ============================== PROJETOS INDEX ============================== */

.pi-hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 4vw, 56px);
  background: var(--paper);
  text-align: center;
}
.pi-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 820px;
}
.pi-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.pi-hero__sub {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 620px;
  opacity: 0.78;
}

/* ============================== PROJECTS LIST ============================== */
.pi-list {
  padding: clamp(32px, 5vw, 64px) 0 var(--section-y);
  background: var(--paper);
}
.pi-list .container {
  display: flex;
  flex-direction: column;
  gap: clamp(64px, 8vw, 120px);
}

.pi-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  color: var(--ink);
  cursor: none;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.pi-card--reverse { direction: rtl; }
.pi-card--reverse > * { direction: ltr; }

.pi-card__index {
  position: absolute;
  top: -8px;
  left: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(14px, 1.1vw, 16px);
  letter-spacing: 0.1em;
  color: var(--accent);
  z-index: 1;
}
.pi-card--reverse .pi-card__index { left: auto; right: 0; }

.pi-card__media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: var(--paper-alt);
}
.pi-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s ease;
}
.pi-card:hover .pi-card__media img {
  transform: scale(1.05);
}

.pi-card__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: 8px;
}
.pi-card__tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  line-height: 1;
}
.pi-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  transition: color .3s ease;
}
.pi-card:hover .pi-card__title { color: var(--accent); }
.pi-card__desc {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(15px, 1.05vw, 16px);
  line-height: 1.55;
  color: var(--ink);
  max-width: 520px;
  margin: 0;
  opacity: 0.85;
}
.pi-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.pi-card__chips li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(36, 41, 51, 0.06);
  color: var(--ink);
  line-height: 1.2;
}

@media (max-width: 880px) {
  .pi-card {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .pi-card--reverse { direction: ltr; }
  .pi-card__index { position: static; margin-bottom: 0; display: block; }
}

@media (hover: none), (max-width: 760px) {
  .pi-card { cursor: pointer; }
}

/* ============================== PROJECT DETAIL ============================== */
.pd-back {
  padding: clamp(24px, 3vw, 32px) 0 0;
  background: var(--paper);
}
.pd-back__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: opacity .25s ease, transform .25s ease, color .25s ease;
}
.pd-back__link:hover {
  opacity: 1;
  color: var(--accent);
  transform: translateX(-3px);
}

.pd-hero {
  padding: clamp(32px, 4vw, 64px) 0 clamp(32px, 4vw, 64px);
  background: var(--paper);
}
.pd-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 980px;
}
.pd-hero__tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  line-height: 1;
}
.pd-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}
.pd-hero__sub {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 720px;
  margin: 0;
  opacity: 0.8;
}

.pd-cover {
  padding: clamp(16px, 2vw, 24px) 0 clamp(48px, 6vw, 80px);
}
.pd-cover__media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--paper-alt);
  box-shadow: 0 30px 60px -30px rgba(36, 41, 51, 0.25);
}
.pd-cover__media img,
.pd-cover__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overview + Meta sidebar */
.pd-overview {
  padding: clamp(32px, 5vw, 80px) 0;
}
.pd-overview__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.pd-overview__main h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 24px;
}
.pd-overview__main p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(16px, 1.1vw, 17px);
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 16px;
  opacity: 0.88;
  max-width: 620px;
}

.pd-meta {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--paper-alt);
}
.pd-meta__row { display: flex; flex-direction: column; gap: 6px; }
.pd-meta__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.pd-meta__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.4;
}
.pd-meta__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.pd-meta__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.pd-meta__link:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateX(2px);
}
.pd-meta__link svg { flex-shrink: 0; }

@media (max-width: 880px) {
  .pd-overview__grid { grid-template-columns: 1fr; }
  .pd-meta { position: static; }
}

/* Video section */
.pd-video {
  padding: clamp(32px, 5vw, 64px) 0;
}
.pd-video__head {
  margin-bottom: 32px;
  max-width: 720px;
}
.pd-video__head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 12px;
}
.pd-video__head p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.78;
  margin: 0;
}
.pd-video__player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 40px 70px -30px rgba(36, 41, 51, 0.4);
}
.pd-video__player video,
.pd-video__player iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}
.pd-video__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--paper);
  background: linear-gradient(135deg, #1a1e26 0%, #2d3340 100%);
}
.pd-video__placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.8;
}
.pd-video__placeholder p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  margin: 0;
  opacity: 0.7;
  text-transform: uppercase;
}

/* Live browser preview */
.pd-preview {
  padding: clamp(32px, 5vw, 64px) 0;
}
.pd-browser {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f3f3ef;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.04),
    0 8px 20px -8px rgba(36, 41, 51, 0.18),
    0 40px 80px -40px rgba(36, 41, 51, 0.45);
  border: 1px solid rgba(36, 41, 51, 0.08);
}
.pd-browser__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #ededea, #e6e5e0);
  border-bottom: 1px solid rgba(36, 41, 51, 0.08);
}
.pd-browser__dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}
.pd-browser__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}
.pd-browser__dot--red    { background: #ff5f57; }
.pd-browser__dot--yellow { background: #febc2e; }
.pd-browser__dot--green  { background: #28c840; }

.pd-browser__url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--paper);
  border-radius: 999px;
  min-width: 0;
  color: rgba(36, 41, 51, 0.6);
}
.pd-browser__url svg { flex-shrink: 0; }
.pd-browser__url-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.pd-browser__open {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
  transition: background .25s ease, color .25s ease, transform .25s ease;
  flex-shrink: 0;
}
.pd-browser__open:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}
.pd-browser__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--paper);
  overflow: hidden;
}
.pd-browser__frame {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  opacity: 0;
  transition: opacity .8s cubic-bezier(.2,.7,.2,1);
}
.pd-browser__frame.is-loaded { opacity: 1; }
.pd-browser__loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}
.pd-browser__spinner {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid rgba(36, 41, 51, 0.15);
  border-top-color: var(--accent);
  animation: pd-spin 1s linear infinite;
}
@keyframes pd-spin {
  to { transform: rotate(360deg); }
}
.pd-browser__fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  background: linear-gradient(135deg, #f6f4ef 0%, #e8e5dd 100%);
}
.pd-browser__fallback p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin: 0;
  opacity: 0.7;
}
.pd-browser__fallback a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid rgba(36, 41, 51, 0.12);
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.pd-browser__fallback a:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

/* Gallery */
.pd-gallery {
  padding: clamp(32px, 5vw, 64px) 0;
}
.pd-gallery__head {
  margin-bottom: 32px;
  max-width: 720px;
}
.pd-gallery__head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 12px;
}
.pd-gallery__head p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.78;
  margin: 0;
}
.pd-gallery__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.pd-gallery__item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-alt);
  aspect-ratio: 4 / 3;
}
.pd-gallery__item--wide { grid-column: span 4; }
.pd-gallery__item--tall { grid-column: span 2; aspect-ratio: 3 / 4; }
.pd-gallery__item--full { grid-column: span 6; aspect-ratio: 16 / 7; }
.pd-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.pd-gallery__item:hover img { transform: scale(1.04); }
@media (max-width: 760px) {
  .pd-gallery__grid { grid-template-columns: 1fr; }
  .pd-gallery__item, .pd-gallery__item--wide, .pd-gallery__item--tall, .pd-gallery__item--full {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }
}

/* Process — horizontal connected steps */
.pd-process {
  padding: clamp(48px, 6vw, 96px) 0;
}
.pd-process__head {
  margin-bottom: 48px;
  max-width: 720px;
}
.pd-process__head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 12px;
}
.pd-process__head p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.78;
  margin: 0;
}
.pd-process__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.pd-process__steps::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(36,41,51,0.15) 8%, rgba(36,41,51,0.15) 92%, transparent);
  z-index: 0;
}
.pd-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 1;
}
.pd-step__dot {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--paper);
  border: 2px solid var(--accent);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  transition: background .3s ease, color .3s ease, transform .3s ease;
}
.pd-step:hover .pd-step__dot {
  background: var(--accent);
  color: var(--paper);
  transform: scale(1.08);
}
.pd-step__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}
.pd-step__body {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
  opacity: 0.78;
}
@media (max-width: 760px) {
  .pd-process__steps { grid-template-columns: 1fr; }
  .pd-process__steps::before { display: none; }
}

/* Next project */
.pd-next {
  padding: clamp(48px, 6vw, 96px) 0;
  background: var(--paper);
  border-top: 1px solid rgba(36,41,51,0.08);
}
.pd-next__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.pd-next__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.pd-next__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  transition: color .25s ease;
}
.pd-next a:hover .pd-next__title { color: var(--accent); }
.pd-next__arrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 56px);
  color: var(--ink);
  line-height: 1;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), color .25s ease;
}
.pd-next a:hover .pd-next__arrow {
  transform: translateX(8px);
  color: var(--accent);
}
.pd-next a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
}
