/* ============================================================
   FELMAC — Felipe Franco Arquitetura
   Tokens
   ============================================================ */
:root {
  --ink: #17181a;
  --ink-70: rgba(23, 24, 26, .7);
  --ink-45: rgba(23, 24, 26, .45);
  --paper: #f5f1e8;
  --paper-dim: #ece5d6;
  --stone: #c9c2b4;
  --stone-line: rgba(23, 24, 26, .12);
  --graphite: #1f3142;
  --graphite-2: #284055;
  --on-graphite: #eef1f4;
  --on-graphite-dim: rgba(238, 241, 244, .6);
  --signature: #47645a;
  --signature-strong: #38504a;
  --signature-tint: #dbe4de;
  --brass: #a9865a;

  --font-display: 'Jost', 'Helvetica Neue', sans-serif;
  --font-body: 'Archivo', 'Helvetica Neue', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --section-pad: clamp(4.5rem, 9vw, 8rem);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
body, h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: 0; line-height: 1.08; }

.mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: .75rem 1.25rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid var(--signature);
  outline-offset: 3px;
  border-radius: 2px;
}

/* film grain texture overlay */
.grain {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--signature-strong); font-weight: 700; margin-bottom: 1.1rem;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--brass); }

.text-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; border-bottom: 1px solid var(--stone-line); padding-bottom: 2px; transition: border-color .3s var(--ease-soft), gap .3s var(--ease-soft); }
.text-link:hover { border-color: var(--ink); gap: .65em; }
.arrow { display: inline-block; transition: transform .3s var(--ease-soft); }
.text-link:hover .arrow { transform: translateX(3px); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .95rem 1.6rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: transform .35s var(--ease), background-color .35s var(--ease-soft), color .35s var(--ease-soft), box-shadow .35s var(--ease-soft);
}
.btn-signature { background: var(--signature); color: var(--paper); box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.btn-signature:hover { background: var(--signature-strong); transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(56, 80, 74, .55); }
.btn-ghost-dark { border: 1px solid rgba(245, 241, 232, .35); color: var(--paper); }
.btn-ghost-dark:hover { background: rgba(245, 241, 232, .12); border-color: rgba(245,241,232,.6); }
.btn-lg { padding: 1.15rem 2rem; font-size: 1.02rem; }

/* ============================================================
   Nav
   ============================================================ */
.nav-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; padding: 1.1rem var(--pad) 0; }
.nav {
  width: 100%; max-width: 1180px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(245, 241, 232, .78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(23,24,26,.08);
  border-radius: 999px;
  padding: .55rem .6rem .55rem 1.1rem;
  box-shadow: 0 8px 30px -12px rgba(23,24,26,.18);
  transition: box-shadow .4s var(--ease-soft);
}
.nav-mark { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); }
.nav-logo { width: 26px; height: 26px; filter: invert(1) brightness(0); }
.nav-word { display: flex; flex-direction: column; line-height: 1.15; font-size: .92rem; font-weight: 500; letter-spacing: .045em; }
.nav-word em { font-style: normal; font-size: .58rem; font-weight: 400; letter-spacing: .16em; color: var(--ink-45); margin-top: .1rem; }
@media (max-width: 640px) { .nav-word em { display: none; } }
.nav-links { display: flex; gap: 1.9rem; }
.nav-links a { font-size: .88rem; font-weight: 500; position: relative; padding: .3rem 0; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--signature);
  transition: right .35s var(--ease-soft);
}
.nav-links a:hover::after { right: 0; }
.nav-cta { padding: .68rem 1.3rem; font-size: .85rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: .6rem; }
.nav-toggle span { width: 20px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease-soft), opacity .3s var(--ease-soft); }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-drawer {
  max-width: 1180px; margin: .5rem auto 0; width: 100%;
  background: var(--paper); border: 1px solid rgba(23,24,26,.08); border-radius: 22px;
  padding: 1rem 1.4rem 1.4rem; box-shadow: 0 20px 40px -16px rgba(0,0,0,.2);
  display: none; flex-direction: column; gap: 1rem;
}
.nav-drawer.open { display: flex; }
.nav-drawer ul { display: flex; flex-direction: column; gap: .1rem; }
.nav-drawer a { display: block; padding: .7rem .2rem; font-weight: 600; border-bottom: 1px solid var(--stone-line); }
.nav-drawer .btn { justify-content: center; margin-top: .3rem; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; color: var(--paper);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(23,20,17,.25) 0%, rgba(20,18,16,.35) 45%, rgba(15,14,12,.86) 100%),
    linear-gradient(90deg, rgba(15,14,12,.55) 0%, rgba(15,14,12,0) 46%);
}
.crop-mark { position: absolute; width: 22px; height: 22px; z-index: 3; opacity: .55; }
.crop-mark::before, .crop-mark::after { content: ''; position: absolute; background: var(--paper); }
.crop-mark::before { width: 100%; height: 1px; top: 0; }
.crop-mark::after { width: 1px; height: 100%; left: 0; }
.crop-tl { top: 108px; left: var(--pad); }
.crop-tr { top: 108px; right: var(--pad); }
.crop-tr::before { position: absolute; }
.crop-bl { bottom: 84px; left: var(--pad); }
.crop-br { bottom: 84px; right: var(--pad); }

.hero-content { position: relative; z-index: 2; padding: 0 var(--pad) 5.5rem; max-width: 980px; }
.hero-eyebrow { color: var(--paper); opacity: .85; }
.hero-eyebrow::before { background: var(--paper); opacity: .6; }
.hero-title { font-size: clamp(2.5rem, 6.4vw, 5.4rem); font-weight: 400; letter-spacing: -.005em; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title em { font-style: normal; color: var(--signature-tint); }
.hero-sub { max-width: 46ch; font-size: clamp(1rem, 1.3vw, 1.18rem); color: rgba(245,241,232,.82); margin: 1.6rem 0 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-foot {
  position: relative; z-index: 2; display: flex; justify-content: space-between;
  padding: 0 var(--pad) 2.2rem; font-size: .72rem; letter-spacing: .12em; color: rgba(245,241,232,.55);
}

/* ============================================================
   Reveal animation
   ============================================================ */
[data-reveal] { opacity: 0; }
[data-reveal="up"] { transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal="clip"] .line, [data-reveal="clip"] { }
[data-reveal="scale"] { transform: scale(1.08); transition: opacity 1.1s var(--ease), transform 1.4s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

.hero-title .line { position: relative; }
.hero-title .line span, .hero-title .line { }
[data-reveal="clip"] { clip-path: inset(0 0 100% 0); opacity: 1; transition: clip-path .9s var(--ease); }
[data-reveal="clip"].is-visible { clip-path: inset(0 0 0 0); }

/* ============================================================
   Stats
   ============================================================ */
.stats { background: var(--graphite); color: var(--on-graphite); padding: 3.6rem var(--pad); }
.stats-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.stat { display: flex; flex-direction: column; gap: .5rem; border-left: 1px solid rgba(239,233,219,.16); padding-left: 1.4rem; }
.stat-num { font-size: clamp(2.1rem, 3.6vw, 3rem); color: var(--signature-tint); }
.stat-text { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.stat-label { font-size: .88rem; color: var(--on-graphite-dim); max-width: 32ch; }

@media (max-width: 720px) {
  .stats-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}

/* ============================================================
   Sections shared
   ============================================================ */
section { padding: var(--section-pad) var(--pad); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }

/* ============================================================
   Sobre
   ============================================================ */
.sobre { position: relative; overflow: hidden; }
.sobre-watermark {
  position: absolute; z-index: 0; pointer-events: none; user-select: none;
  width: min(48vw, 620px); top: 50%; left: 50%;
  transform: translate(-50%, -50%); opacity: .05; filter: invert(1) brightness(0);
}
.sobre-grid { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.sobre-media { position: relative; }
.sobre-photo { border-radius: 999px 999px 24px 24px; width: 100%; max-width: 320px; aspect-ratio: 3/4; object-fit: cover; filter: grayscale(.35) contrast(1.05); border: 1px solid var(--stone-line); }
.sobre-caption { margin-top: 1.1rem; font-size: .72rem; letter-spacing: .1em; color: var(--ink-45); line-height: 1.6; }
.sobre-copy p { color: var(--ink-70); font-size: 1.05rem; margin: 1.1rem 0; max-width: 58ch; }
.sobre-copy h2 { max-width: 14ch; }

@media (max-width: 880px) {
  .sobre-grid { grid-template-columns: 1fr; }
  .sobre-photo { max-width: 220px; }
}

/* ============================================================
   Serviços
   ============================================================ */
.servicos { background: var(--paper-dim); }
.servicos > .eyebrow, .servicos > h2 { max-width: 1180px; margin-left: auto; margin-right: auto; display: block; }
.servicos > h2 { margin-bottom: 3rem; max-width: 18ch; }
.servicos-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--stone-line); border: 1px solid var(--stone-line); border-radius: 20px; overflow: hidden; }
.servico-card { background: var(--paper-dim); padding: 2.6rem 2.2rem; display: flex; flex-direction: column; gap: 1rem; transition: background-color .4s var(--ease-soft); }
.servico-card:hover { background: var(--paper); }
.servico-index { color: var(--brass); font-size: .82rem; letter-spacing: .06em; }
.servico-card h3 { font-size: 1.35rem; }
.servico-card p { color: var(--ink-70); font-size: .98rem; max-width: 34ch; }

@media (max-width: 880px) {
  .servicos-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Projetos
   ============================================================ */
.projetos-head { max-width: 1180px; margin: 0 auto 3.5rem; }
.projetos-sub { color: var(--ink-70); max-width: 52ch; font-size: 1.05rem; margin-top: 1rem; }
.projetos-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 300px; grid-auto-flow: dense;
  gap: 1.1rem;
}
.projeto-card { position: relative; grid-column: span 1; border-radius: 14px; overflow: hidden; background: var(--graphite); }
.projeto-card.size-lg { grid-column: span 2; }
.projeto-media { position: absolute; inset: 0; }
.projeto-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.projeto-card:hover .projeto-media img { transform: scale(1.045); }
.projeto-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23,20,17,0) 45%, rgba(15,14,12,.86) 100%);
  z-index: 1;
}
.projeto-annotation {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; color: var(--paper);
  padding: 1.1rem 1.25rem 1.15rem; display: flex; flex-direction: column; gap: .3rem;
  border-top: 1px solid rgba(169, 134, 90, .55);
  transform: translateY(calc(100% - 3.3rem)); transition: transform .5s var(--ease);
}
.projeto-card:hover .projeto-annotation, .projeto-card:focus-within .projeto-annotation { transform: translateY(0); }
.proj-tag { font-size: .68rem; letter-spacing: .1em; color: #cddad3; }
.proj-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }
.proj-specs { font-size: .74rem; letter-spacing: .03em; color: rgba(245,241,232,.82); }

@media (max-width: 980px) {
  .projetos-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 260px; }
}
@media (max-width: 620px) {
  .projetos-grid { grid-template-columns: 1fr; grid-auto-rows: 320px; }
  .projeto-card.size-lg { grid-column: span 1; }
  .projeto-annotation { transform: translateY(0); position: relative; }
  .projeto-card::after { display: none; }
  .projeto-media { position: relative; height: 100%; }
  .projeto-card { display: flex; flex-direction: column; }
  .projeto-media { flex: 1; min-height: 220px; }
  .projeto-annotation { background: var(--graphite); border-top: 1px solid rgba(169,134,90,.55); }
}

/* ============================================================
   Processo
   ============================================================ */
.processo { background: var(--graphite); color: var(--on-graphite); }
.processo-head { max-width: 1180px; margin: 0 auto 3.5rem; }
.processo .eyebrow { color: var(--signature-tint); }
.processo-list { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(239,233,219,.14); border-top: 1px solid rgba(239,233,219,.14); border-bottom: 1px solid rgba(239,233,219,.14); }
.processo-list li { background: var(--graphite); padding: 2.2rem 1.6rem 2.4rem; display: flex; flex-direction: column; gap: .9rem; }
.processo-num { color: var(--brass); font-size: .95rem; }
.processo-list h3 { font-size: 1.15rem; }
.processo-list p { font-size: .92rem; color: var(--on-graphite-dim); }

@media (max-width: 880px) {
  .processo-list { grid-template-columns: 1fr; }
  .processo-list li { border-bottom: 1px solid rgba(239,233,219,.14); }
}

/* ============================================================
   Depoimentos
   ============================================================ */
.depoimentos-grid { max-width: 1180px; margin: 3rem auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.depoimento-card { border: 1px solid var(--stone-line); border-radius: 18px; padding: 2rem 1.8rem; display: flex; flex-direction: column; gap: 1.4rem; justify-content: space-between; min-height: 220px; }
.depoimento-card p { font-size: 1.05rem; line-height: 1.6; }
.depoimento-card cite { font-style: normal; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .05em; color: var(--signature-strong); }

@media (max-width: 880px) {
  .depoimentos-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CTA final
   ============================================================ */
.cta-final { position: relative; color: var(--paper); overflow: hidden; padding: 0; min-height: 92vh; display: flex; align-items: center; }
.cta-media { position: absolute; inset: 0; z-index: -1; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; }
.cta-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,14,12,.72) 0%, rgba(15,14,12,.88) 100%); }
.cta-content { position: relative; z-index: 1; padding: 5rem var(--pad); max-width: 900px; }
.cta-final .eyebrow { color: var(--signature-tint); }
.cta-final .eyebrow::before { background: var(--signature-tint); }
.cta-sub { max-width: 48ch; color: rgba(245,241,232,.8); font-size: 1.08rem; margin: 1.3rem 0 2.2rem; }
.cta-actions { margin-bottom: 3rem; }
.cta-info { display: flex; flex-wrap: wrap; gap: 2.4rem; border-top: 1px solid rgba(245,241,232,.18); padding-top: 2rem; }
.cta-info-item { display: flex; flex-direction: column; gap: .4rem; }
.cta-info-item .mono { font-size: .68rem; letter-spacing: .1em; color: rgba(245,241,232,.5); }
.cta-info-item span:last-child { font-size: 1rem; }
a.cta-info-item { transition: opacity .3s; }
a.cta-info-item:hover { opacity: .7; }

/* ============================================================
   Footer
   ============================================================ */
.footer { position: relative; background: var(--graphite); color: var(--on-graphite); padding: 3.5rem var(--pad) 2rem; overflow: hidden; }
.footer::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url('../assets/img/logo.png');
  background-size: 46px 46px; background-repeat: repeat;
  opacity: .045;
}
.footer > * { position: relative; z-index: 1; }
.footer-top { max-width: 1180px; margin: 0 auto 2.4rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-logo { width: 34px; height: 34px; filter: brightness(0) invert(1); }
.footer-word { font-family: var(--font-display); display: flex; flex-direction: column; line-height: 1.15; font-size: .95rem; font-weight: 500; letter-spacing: .045em; padding-right: 1.4rem; border-right: 1px solid rgba(238,241,244,.16); }
.footer-word em { font-style: normal; font-size: .58rem; font-weight: 400; letter-spacing: .16em; color: var(--on-graphite-dim); margin-top: .15rem; }
.footer-top p { color: var(--on-graphite-dim); font-size: .95rem; max-width: 40ch; }
@media (max-width: 560px) { .footer-word { border-right: 0; padding-right: 0; } }
.footer-bottom { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 1.6rem; border-top: 1px solid rgba(239,233,219,.14); font-size: .8rem; color: var(--on-graphite-dim); }
.footer-bottom a:hover { color: var(--on-graphite); }

/* ============================================================
   WhatsApp FAB
   ============================================================ */
.whatsapp-fab {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--signature); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px -8px rgba(23,24,26,.4);
  transition: transform .3s var(--ease-soft), box-shadow .3s var(--ease-soft);
}
.whatsapp-fab svg { width: 24px; height: 24px; }
.whatsapp-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 30px -8px rgba(23,24,26,.5); }

@media (max-width: 880px) {
  .whatsapp-fab { display: none; }
}
