:root{
  --dark:#120611;
  --dark2:#22101f;
  --light:#1b0d1a;
  --text:#FDECF6;
  --muted:#C8A9BA;

  /* Accent (rosa) */
  --blue:#FF4FA3;

  --container: 1120px;
  --pad: clamp(20px, 5vw, 80px);
  --radius: 16px;

  /* Reserva lateral aproximada para a sidebar no desktop */
  --sidebarW: 160px;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }

body{
  background: var(--dark);
  color: var(--text);
  font: 16px/1.6 "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  position: relative;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(50% 38% at 78% 12%, rgba(255,79,163,.26), transparent 72%),
    radial-gradient(32% 28% at 10% 30%, rgba(218,95,255,.12), transparent 78%);
}

/* Layout base */
.page{ width:100%; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Seções */
.section{
  padding: clamp(64px, 9vw, 122px) 0;
  scroll-margin-top: 90px; /* ajuda no mobile/topbar */
}
.section--tight{ padding: clamp(60px, 8.5vw, 102px) 0; }

.section--dark{ background: var(--dark); color: var(--text); }
.section--light{ background: linear-gradient(180deg, #1b0d1a 0%, #160b16 100%); color: var(--text); }

.hero{
  min-height: 100vh;
  display:flex;
  align-items:center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(180deg, #130812 0%, #110610 100%);
}

.hero::before{
  content:"";
  position:absolute;
  inset: 0;
  background-image: url("assets/ray1.png");
  background-repeat: no-repeat;
  background-size: auto 110%;
  background-position: -56px 50%;
  opacity: .38;
  z-index: -2;
}

.hero::after{
  content:"";
  position:absolute;
  inset: 0;
  background: transparent;
  z-index: -1;
}

.kicker{
  color: rgba(155,163,175,.9);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 16px;
}

.title{
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(56px, 8vw, 108px);
  letter-spacing: -0.02em;
  line-height: 0.9;
  font-weight: 700;
  text-shadow: 0 10px 30px rgba(255,79,163,.18);
}

.lead{
  margin-top: 18px;
  max-width: 60ch;
  color: rgba(224,189,208,.95);
  font-size: 17px;
}

.actions{
  margin-top: 28px;
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Botões */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration:none;
  border: 1px solid transparent;
  cursor:pointer;
  font-weight: 700;
  letter-spacing: .01em;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease, border-color .22s ease;
}

.btn--primary{
  background: linear-gradient(135deg, #ff7fbe 0%, #ff4fa3 55%, #db3f8a 100%);
  color:#2A0F21;
  border-color: rgba(255,255,255,.24);
  box-shadow: 0 12px 26px rgba(255,79,163,.34);
}
.btn--primary:hover{
  filter: brightness(.97);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(255,79,163,.42);
}

.btn--ghost{
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-color: rgba(255,255,255,.28);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover{
  border-color: color-mix(in srgb, var(--blue) 70%, transparent);
  color: #ffd9ec;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(255,79,163,.16);
}

/* Cabeçalho das seções */
.sectionhead{ margin-bottom: 28px; }

.sectiontitle{
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(28px, 5vw, 76px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-transform: none;
  color: rgba(234,234,234,.95);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .55s ease, transform .55s ease;
}

.sectiontitle.is-visible{
  opacity: 1;
  transform: translateY(0);
}

.sectiondesc{
  margin-top: 14px;
  max-width: 72ch;
  color: rgba(155,163,175,.95);
  letter-spacing: -0.01em;
}

/* Grid */
.grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
  max-width: 1040px;
}

/* Story Maker com proporcao de Instagram Stories (9:16) */
.section--story .grid{
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1200px;
}

.section--story .thumb{
  aspect-ratio: 9/16;
}

/* Cards */
.card{
  display:block;
  text-decoration:none;
  color: inherit;
  border-radius: 20px;
  overflow:hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.2);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(6,2,6,.32);
}
.section--light .card{
  border-color: rgba(255,255,255,.2);
}

.card:hover{
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--blue) 55%, transparent);
  box-shadow: 0 18px 34px rgba(255,79,163,.15);
}

.thumb{
  aspect-ratio: 4/3;
  background: #0e070d;
  overflow:hidden;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.section--light .thumb{ background: var(--dark2); }

/* Oficinas com imagem quadrada */
#cultural .thumb{
  aspect-ratio: 1/1;
}

.thumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.04);
  transition: transform .55s ease, filter .55s ease;
}
.card:hover .thumb img{
  transform: scale(1.09);
  filter: saturate(1.16) contrast(1.08);
}

.section--story .thumb{
  position: relative;
  border-bottom: 0;
}

.meta{
  padding: 12px 12px 14px;
  background: linear-gradient(180deg, rgba(9,4,9,.28), rgba(18,6,16,.64));
}
.section--light .meta{
  background: linear-gradient(180deg, rgba(9,4,9,.28), rgba(18,6,16,.64));
}

.cardtitle{
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  min-height: calc(1.3em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.cardsub{
  font-size: 13px;
  color: rgba(155,163,175,.95);
}
.section--light .cardsub{
  color: rgba(155,163,175,.95);
}

#cinema .meta{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#cinema .cardtitle{
  margin-bottom: 0;
  min-height: 0;
}

#cinema .cardsub{
  line-height: 1.35;
  min-height: 0;
}

#cinema .cardsub .roleline{
  display: block;
  color: rgba(185,193,205,.95);
}

#cinema .cardsub .typeline{
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--blue);
}

/* Sobre */
.about{ max-width: 78ch; color: rgba(155,163,175,.95); }

/* Contato */
.contact{
  display:flex;
  justify-content: flex-start;
}

.links{
  display:flex;
  flex-direction: row;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.link{
  width: 96px;
  height: 96px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 12px;
  color: rgba(234,234,234,.82);
  text-decoration:none;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
  padding: 0 18px;
}
.link:hover{
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 60%, transparent);
  transform: translateY(-2px);
}

.link svg{
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.linktext{
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}

.link[href^="mailto:"]{
  width: auto;
}

.footer{
  margin-top: 46px;
  color: rgba(155,163,175,.9);
}

/* Sidebar fixa - esquerda, centralizada */
.sidebar{
  --scroll-progress: 0%;
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  display:flex;
  flex-direction: column;
  gap: 6px;
  z-index: 999;

  padding: 12px 16px 12px 12px;
  border-radius: 18px;
  backdrop-filter: blur(14px) saturate(125%);
  background: linear-gradient(180deg, rgba(38,18,33,.62), rgba(23,10,21,.62));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  transition: transform .28s ease, opacity .28s ease, background .28s ease;
}

.sidebar::before,
.sidebar::after{
  content:"";
  position:absolute;
  top: 12px;
  bottom: 12px;
  right: 7px;
  width: 2px;
  border-radius: 999px;
}

.sidebar::before{
  background: rgba(255,255,255,.14);
}

.sidebar::after{
  background:
    linear-gradient(var(--blue), var(--blue)) no-repeat center bottom / 2px var(--scroll-progress);
}

.sidebar.sidebar--hidden{
  transform: translate(-18px, -50%);
  opacity: .28;
}

.sidebar.sidebar--hidden:hover{
  transform: translateY(-50%);
  opacity: 1;
}

.navlink{
  display:block;
  font-size: 15px;
  font-weight: 600;
  color: rgba(234,234,234,.68);
  text-decoration:none;
  letter-spacing: .01em;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
  position: relative;
  padding: 9px 14px;
  border-radius: 10px;
}

.navlink:hover{
  color: #fff;
  background: rgba(255,255,255,.09);
  transform: translateX(2px);
}

.navlink.is-active{
  color: #fff !important;
  background: linear-gradient(90deg, rgba(255,79,163,.28), rgba(255,79,163,.12));
  box-shadow: inset 0 0 0 1px rgba(255,79,163,.4);
}
.navlink.is-active::before{
  content:"";
  position:absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--blue);
  border-radius: 999px;
}

:where(a, button, input, textarea):focus-visible{
  outline: 2px solid color-mix(in srgb, var(--blue) 72%, #ffffff 28%);
  outline-offset: 3px;
}

/* ==== Correção principal: espaço para sidebar no desktop ==== */
@media (min-width: 921px){
  .page{
    padding-left: calc(var(--sidebarW) + 28px);
  }
  .section{
    scroll-margin-top: 24px;
  }
}

/* ==== Responsivo: sidebar vira topbar e NÃO cobre conteúdo ==== */
@media (max-width: 920px){
  .page{
    padding-left: 0;
    padding-top: 74px; /* espaço da topbar */
  }

  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section--story .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact{ justify-content: flex-start; }

  .hero::before{
    background-image: url("assets/ray1.png");
    background-size: auto 106%;
    background-position: 18% 0%;
    opacity: .34;
  }

  .sidebar{
    left: 12px;
    right: 12px;
    top: 12px;
    bottom: auto;
    transform: none;

    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;

    padding: 10px 12px;
    border-radius: 14px;

    background: rgba(0,0,0,.22);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
  }

  .sidebar::before,
  .sidebar::after{
    display:none;
  }

  .sidebar.sidebar--hidden{
    transform: none;
    opacity: 1;
  }

  .navlink{
    padding: 7px 10px;
    font-size: 14px;
  }
  .navlink.is-active::before{
    display:none;
  }

  .sectiontitle{
    font-size: clamp(24px, 8vw, 42px);
  }
}

@media (max-width: 640px){
  .hero::before{
    background-size: auto 102%;
    background-position: 20% 0%;
  }

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

@media (max-width: 420px){
  .section--story .grid{
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce){
  .sectiontitle{
    opacity: 1;
    transform: none;
    transition: none;
  }
}
