/* ===== Base ===== */
:root {
  --brand: #0d00ff;
  --cta-overlap: 28px;
  --lift-main: 24px;
  --blue: #0000ff;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: white;
  font-family: 'Raleway', sans-serif;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
}

img, video { max-width: 100%; height: auto; display: block; }

/* ===== Header com logo (desktop/tablet intocável) ===== */
.work-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;   /* desktop/tablet: à esquerda */
  padding: 24px 32px;
  position: relative;
  z-index: 10;
  width: 100%;
}
.work-header .logo { width: 100px; height: auto; }

/* ===== Main Content ===== */
.work-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 2rem;
  max-width: 1728px;
  margin: 0 auto;
  transform: translateY(calc(var(--lift-main) * -1));
}

/* Espaço para o CTA não empurrar o vídeo das áreas */
.work-content::after { content: ""; display: block; height: var(--cta-overlap); }

.top-cta {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--cta-overlap) * -1 + 25px);
  margin: 0;
  z-index: 20;
}
.see-projects {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 300;
  color: var(--brand);
  font-size: 14px;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.see-projects:hover,
.see-projects:focus-visible {
  background: var(--brand);
  color: #fff;
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 6px 16px rgba(13,0,255,.25);
}

/* ===== Vídeo hero / showcase ===== */
.video-showcase { width: 100%; max-width: 1728px; margin-bottom: 4rem; }

/* Por padrão não recorta (altura auto) */
.video-showcase video {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Ativa recorte quando quiseres: <div class="video-showcase crop"> */
.video-showcase.crop video {
  height: min(58vw, 720px);
  object-fit: cover;
}

/* ===== Info grid ===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1440px;
  text-align: center;
}
.info-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-weight: 300;
  font-size: clamp(18px, 2vw, 24px);
}
.info-link { color: black; text-decoration: underline; font-weight: 300; }
.info-center, .info-right {
  font-weight: 300;
  font-size: clamp(12px, 1.8vw, 18px);
  line-height: 1.5;
  color: black;
}
.info-text-work { margin: 0; }

/* ===== Banner (áreas) ===== */
.banner-video { width: 100%; height: 231px; overflow: hidden; }
.banner-video video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* ===== Projetos (cards) ===== */
.projects { display: flex; flex-direction: column; gap: 0; padding: 0; }

.project-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  height: 100vh;   /* fallback */
  height: 100svh;  /* mobile-safe viewport height */
  width: 100%;
  margin: 0;
}

.card { flex: 0 0 auto; }
.card .media {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin-bottom: 1rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}

.card.is-horizontal .media { max-width: 1100px; }
.card.is-vertical   .media { max-width: 400px; }

.card.align-left  { margin-left: 25px; text-align: left; }
.card.align-right { margin-right: 25px; text-align: right; }

.card h2 { font-size: clamp(1rem, 1.4vw, 2rem); font-weight: 300; margin: 0; }
.card p  { font-size: clamp(0.9rem, 1.5vw, 1rem); font-weight: 300; color: #666; margin-top: 0.5rem; }

/* Interações */
.card:hover .media { transform: scale(1.02); opacity: 0.95; }
.card.no-hover .media { cursor: default; transition: none; }
.card.no-hover:hover .media { transform: none; opacity: 1; }

.card.clickable { position: relative; }
.card .media-link { display: block; position: relative; }
.card.clickable .media { cursor: pointer; }
.card.clickable .hover-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .02em;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.card.clickable:hover .hover-indicator,
.card.clickable:focus-within .hover-indicator { opacity: 1; transform: translateY(0); }

/* Acessibilidade de foco */
.see-projects:focus-visible,
.back-to-top:focus-visible,
.card .media-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 10px 14px;
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-size: clamp(12px, 2vw, 14px);
  opacity: 0;
  transition: opacity .3s ease, background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
  z-index: 9999;
}
.back-to-top.visible { opacity: 1; }
.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--brand);
  color: #fff;
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 6px 16px rgba(13,0,255,.25);
}

/* ===== Respeita preferências ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .see-projects,
  .card .media,
  .back-to-top,
  .card.clickable .hover-indicator {
    transition: none !important;
  }
  .card:hover .media,
  .see-projects:hover,
  .back-to-top:hover {
    transform: none !important;
  }
}

/* ===== Responsivo ===== */
@media (max-width: 1024px) {
  .project-row { flex-direction: column; height: auto; padding: 2rem 0; }
  .card.align-left, .card.align-right { margin: 0; text-align: left; }
  .card.is-vertical .media, .card.is-horizontal .media { max-width: 100%; }
}

@media (max-width: 600px) {
  :root { --lift-main: 0px; }
  .banner-video { height: auto; }
  .card h2 { font-size: 1.3rem; }
  .card p  { font-size: 0.85rem; }
  .top-cta { position: static; transform: none; margin: 16px auto; }
  .work-content::after { height: 0; }
  .back-to-top { right: 1rem; bottom: 1rem; }
}

/* === Mobile: centralizar o logo do header.work-header (igual ao about) === */
@media (max-width: 479px) {
  header.work-header {
    padding: 12px !important;            /* mesmo padding do about no mobile */
    justify-content: center !important;  /* centra no eixo principal */
  }
  header.work-header .brand {
    margin: 0 auto !important;           /* garante centragem do link do logo */
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  header.work-header .logo {
    width: 100px;
    height: auto;
  }
}
