/* =========================================================
   GIOVANA FERREIRA — Arquitetura e Design
   Sistema base: tokens, tipografia, componentes compartilhados
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..500&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  /* Paleta — identidade visual Giovana Ferreira */
  --brown:    #4c250c;   /* marrom escuro — marca / texto forte */
  --ink:      #38332d;   /* quase-preto quente — texto corrido */
  --cream:    #fff9e4;   /* creme — fundo base */
  --olive:    #929c63;   /* verde oliva */
  --rose:     #d6b7b5;   /* rosa acinzentado */
  --sky:      #b9d0d4;   /* azul claro */

  --cream-2:  #f6efd6;   /* creme levemente mais fechado p/ blocos */
  --line:     rgba(76, 37, 12, 0.18);  /* fios finos */
  --brown-60: rgba(76, 37, 12, 0.60);

  /* Tipografia */
  --display: 'Fraunces', Georgia, serif;
  --body:    'Poppins', system-ui, sans-serif;

  /* Espaçamento / ritmo */
  --pad-x: clamp(1.5rem, 5vw, 6rem);
  --maxw: 1400px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--body);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brown-60);
}

h1, h2, h3 { font-family: var(--display); font-weight: 300; line-height: 1.05; color: var(--brown); }

.display-xl { font-size: clamp(2.8rem, 8vw, 6.5rem); letter-spacing: -0.02em; }
.display-lg { font-size: clamp(2.2rem, 5.5vw, 4.2rem); letter-spacing: -0.015em; }
.display-md { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 300;
  max-width: 52ch;
  color: var(--ink);
}

/* =========================================================
   HEADER — fixo, legível sobre qualquer fundo
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--pad-x);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease);
  mix-blend-mode: normal;
}
.site-header.scrolled {
  background: rgba(255, 249, 228, 0.94);
  padding: 0.9rem var(--pad-x);
  border-bottom: 1px solid var(--line);
}

/* Marca no header — monograma + nome */
.brand { display: flex; align-items: baseline; gap: 0.7rem; color: var(--brown); }
.brand .mono {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  font-style: italic;
}
.brand .name {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1;
}
/* Header sobre hero escuro: marca em creme */
.site-header:not(.scrolled) .brand { color: var(--cream); }
.site-header:not(.scrolled) .nav-links a { color: var(--cream); }
.site-header:not(.scrolled) .nav-toggle span { background: var(--cream); }

.nav-links { display: flex; gap: 2.2rem; align-items: center; }
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--brown);
  position: relative;
  transition: opacity 0.3s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  border: 1px solid currentColor;
  padding: 0.55rem 1.3rem !important;
  border-radius: 40px;
}
.nav-cta::after { display: none; }

/* toggle mobile */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--brown); transition: 0.3s var(--ease); }

/* =========================================================
   OVERLAY DE NAVEGAÇÃO MOBILE — ancorado no <body>
   Fica fora do header de propósito: nenhum ancestral tem
   transform/filter/backdrop-filter, então seu position:fixed
   SEMPRE resolve contra a viewport (a "initial containing
   block"), inclusive no Safari do iOS e com a página rolada.
   ========================================================= */
.mobile-nav {
  position: fixed;
  inset: 0;                 /* cobre a viewport inteira, não uma altura fixa */
  z-index: 3000;
  display: none;            /* escondido por padrão — inclusive no desktop */
}
.mobile-nav.open { display: block; }

.mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 16, 6, 0.55);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.mobile-nav.open .mobile-nav__backdrop { opacity: 1; }

.mobile-nav__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(80vw, 340px);
  background: var(--brown);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.8rem;
  padding: 5rem var(--pad-x) 2rem;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
}
.mobile-nav.open .mobile-nav__panel { transform: translateX(0); }

.mobile-nav__panel a {
  color: var(--cream);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
}
.mobile-nav__panel .nav-cta {
  border: 1px solid currentColor;
  padding: 0.55rem 1.3rem;
  border-radius: 40px;
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* Trava de rolagem à prova de iOS: em vez de overflow:hidden no
   body (que no Safari mobile deixa o fixed "escorregar" pelo scroll),
   congelamos o body em position:fixed no offset atual. */
body.nav-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

/* =========================================================
   HERO — scroll scrubbing (frames controlados pelo scroll)
   ========================================================= */
.hero {
  position: relative;
  height: 320vh;              /* altura de "pista" p/ o scrub */
  background: var(--ink);
}
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.hero-frames { position: absolute; inset: 0; }
.hero-frames img,
.hero-frames canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* leve véu p/ garantir leitura do texto claro */
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(38,34,28,0.78) 0%, rgba(38,34,28,0.45) 32%, rgba(38,34,28,0.05) 62%, rgba(38,34,28,0) 100%),
    linear-gradient(0deg, rgba(38,34,28,0.55) 0%, rgba(38,34,28,0) 45%);
  z-index: 2;
}

.hero-copy {
  position: absolute;
  left: var(--pad-x);
  bottom: clamp(3rem, 12vh, 9rem);
  z-index: 3;
  max-width: 40ch;
  color: var(--cream);
}
.hero-copy .eyebrow { color: rgba(255,249,228,0.75); }
.hero-copy h1 { color: var(--cream); margin: 1rem 0 1.4rem; }
.hero-copy .lead { color: rgba(255,249,228,0.92); }

/* reveal em sequência — os itens sobem de baixo */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal-up.in { opacity: 1; transform: none; }

/* indicador de scroll */
.scroll-hint {
  position: absolute;
  left: 50%; bottom: 2rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  color: rgba(255,249,228,0.7);
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.scroll-hint .bar {
  width: 1px; height: 46px;
  background: rgba(255,249,228,0.4);
  position: relative; overflow: hidden;
}
.scroll-hint .bar::after {
  content: ''; position: absolute; inset: 0;
  background: var(--cream);
  animation: hintdrop 2.2s var(--ease) infinite;
}
@keyframes hintdrop {
  0% { transform: translateY(-100%); }
  60%,100% { transform: translateY(100%); }
}

/* =========================================================
   SECTIONS genéricas
   ========================================================= */
.section { padding: clamp(5rem, 12vh, 9rem) var(--pad-x); }
.container { max-width: var(--maxw); margin: 0 auto; }

.section-head { display: flex; flex-direction: column; gap: 1.2rem; margin-bottom: clamp(2.5rem, 6vh, 4.5rem); max-width: 60ch; }

/* fio fino "costurado" — assinatura visual (eco do traço manuscrito da identidade) */
.stitch {
  height: 1px;
  width: 100%;
  background-image: linear-gradient(90deg, var(--line) 60%, transparent 60%);
  background-size: 14px 1px;
  margin: 0;
}

/* ---------- Filosofia (bloco conceitual) ---------- */
/* About (página Sobre) — texto + retrato */
.about-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.philosophy { background: var(--cream-2); }
.philosophy .container { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.philosophy .big-quote {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  line-height: 1.18;
  color: var(--brown);
  max-width: 22ch;
}
.philosophy .support { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-top: 1rem; }
.philosophy .support .item h3 { font-size: 1.1rem; font-family: var(--body); font-weight: 500; color: var(--brown); margin-bottom: 0.5rem; letter-spacing: 0.01em; }
.philosophy .support .item p { font-size: 0.92rem; color: var(--ink); opacity: 0.85; }

/* ---------- Grid de projetos (home preview) ---------- */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 2.5vw, 2rem); }
.work-card { position: relative; overflow: hidden; cursor: pointer; }
.work-card .frame { overflow: hidden; background: var(--cream-2); aspect-ratio: 4/5; }
.work-card.wide .frame { aspect-ratio: 16/10; }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.work-card:hover img { transform: scale(1.05); }
.work-card .meta { padding: 1.1rem 0 0; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.work-card .meta .title { font-family: var(--display); font-size: 1.35rem; color: var(--brown); }
.work-card .meta .cat { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brown-60); white-space: nowrap; }

/* colspans */
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; }
.col-4 { grid-column: span 4; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--brown); color: var(--cream); text-align: center; }
.cta-band h2 { color: var(--cream); margin-bottom: 1.8rem; }
.cta-band .lead { color: rgba(255,249,228,0.8); margin: 0 auto 2.4rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--body); font-weight: 500;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.95rem 2rem;
  border-radius: 40px;
  border: 1px solid var(--brown);
  background: var(--brown); color: var(--cream);
  cursor: pointer;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--brown); }
.btn-outline:hover { background: var(--brown); color: var(--cream); }
.btn-cream { background: var(--cream); color: var(--brown); border-color: var(--cream); }
.btn-cream:hover { background: transparent; color: var(--cream); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--ink); color: var(--cream); padding: clamp(4rem,9vh,6rem) var(--pad-x) 2.5rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; max-width: var(--maxw); margin: 0 auto; }
.footer-top .mono-big { font-family: var(--display); font-style: italic; font-size: 3.5rem; color: var(--cream); line-height: 1; margin-bottom: 1rem; }
.footer-top p { color: rgba(255,249,228,0.7); font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 { font-family: var(--body); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,249,228,0.5); margin-bottom: 1.2rem; }
.footer-col a { display: block; font-size: 0.95rem; color: rgba(255,249,228,0.85); margin-bottom: 0.7rem; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--olive); }
.footer-bottom { max-width: var(--maxw); margin: 3.5rem auto 0; padding-top: 1.8rem; border-top: 1px solid rgba(255,249,228,0.14); display: flex; justify-content: space-between; font-size: 0.75rem; color: rgba(255,249,228,0.5); letter-spacing: 0.04em; }

/* =========================================================
   Reveal on scroll (seções internas)
   ========================================================= */
.fade-in { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.fade-in.in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 860px) {
  /* No mobile o menu horizontal do header some; quem aparece é o
     overlay .mobile-nav (ancorado no <body>). */
  .nav-links { display: none; }
  .nav-toggle { display: flex; z-index: 3001; }

  /* No mobile o header usa fundo SÓLIDO (sem backdrop-filter). */
  .site-header.scrolled {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 249, 228, 0.98);
  }
  /* X quando aberto */
  .nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2){ opacity: 0; }
  .nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
  .site-header:not(.scrolled) .nav-toggle.open span { background: var(--cream); }

  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.6rem; }

  .work-grid > * { grid-column: span 12 !important; }
  .philosophy .support { grid-template-columns: 1fr; }

  /* Sobre: empilha texto e retrato numa coluna no mobile */
  .about-split { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .about-split .frame { max-width: 100%; }

  /* Hero no mobile: pista de scroll mais curta (menos rolagem até o conteúdo) */
  .hero { height: 220vh; }
  /* mais respiro: sobe o texto e afasta do indicador "role para explorar" */
  .hero-copy { bottom: clamp(5.5rem, 20vh, 8rem); max-width: 100%; padding-right: 1.2rem; }
  .hero-copy h1 { margin: 0.8rem 0 1rem; }
  .hero-copy .lead { font-size: 0.98rem; line-height: 1.5; }
  .scroll-hint { bottom: 1.4rem; }
  .scroll-hint .bar { height: 34px; }
  /* véu inferior mais forte no mobile p/ garantir leitura do parágrafo */
  .hero-veil {
    background:
      linear-gradient(0deg, rgba(38,34,28,0.82) 0%, rgba(38,34,28,0.2) 42%, rgba(38,34,28,0) 62%),
      linear-gradient(90deg, rgba(38,34,28,0.5) 0%, rgba(38,34,28,0.1) 55%, rgba(38,34,28,0) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal-up, .fade-in { opacity: 1 !important; transform: none !important; transition: none !important; }
}
