/* Ericka Hipólito Arquitetura
   Editorial de arquitetura com profundidade: vidro fosco sobre formas de cor suaves,
   marcas d'água que respiram com a rolagem. */

:root {
  --off: #F5F1EC;
  --areia: #D7C8BA;
  --areia-clara: #EAE2D8;
  --terra: #A24B33;
  --terra-escura: #8C3F2A;
  --coral: #E97863;
  --grafite: #35312F;
  --texto: #574E47;
  --muted: #6E645C;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--off);
  color: var(--grafite);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--terra); }
a:hover { color: #7E3726; }
h1, h2, h3 { text-wrap: balance; }
section[id] { scroll-margin-top: 84px; }
[hidden] { display: none !important; }

.wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.sec { position: relative; overflow: clip; }
.serif { font-family: var(--serif); }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--terra); }

/* vidro */
.glass {
  background: rgba(255, 252, 248, .42);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 18px 50px rgba(122, 62, 40, .10), inset 0 1px 0 rgba(255, 255, 255, .75);
}
.glass-dark {
  background: rgba(255, 255, 255, .09);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
.glass-pill {
  background: rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .55);
}

/* formas de cor */
.orb {
  position: absolute; z-index: 0; border-radius: 50%; pointer-events: none;
  filter: blur(70px);
  animation: drift 22s ease-in-out infinite alternate;
}
.orb.b { animation-duration: 28s; animation-direction: alternate-reverse; }
.orb.c { animation-duration: 34s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(40px, -30px, 0) scale(1.08); }
  100% { transform: translate3d(-30px, 30px, 0) scale(.95); }
}

/* marcas d'água que crescem com a rolagem */
.wm { position: absolute; z-index: 1; pointer-events: none; transform-origin: center; }
@supports (animation-timeline: view()) {
  .wm { animation: wmZoom linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  .wm.out { animation-name: wmShrink; }
}
.wm.js-scroll { transition: transform .1s linear; }
@keyframes wmZoom { from { transform: scale(.82) translateY(60px); } to { transform: scale(1.18) translateY(-60px); } }
@keyframes wmShrink { from { transform: scale(1.2) translateY(-40px); } to { transform: scale(.86) translateY(50px); } }
.wm-lines path { fill: none; stroke: var(--terra); stroke-width: 1; stroke-linecap: round; }
.wm-word { margin: 0; line-height: 1; font-style: italic; font-weight: 300; color: var(--terra); white-space: nowrap; }

/* botões */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 28px;
  font-size: 15px; font-weight: 500; text-decoration: none; letter-spacing: .01em;
  border-radius: 999px;
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--terra); color: #FFFFFF; border: 1px solid var(--terra); box-shadow: 0 12px 30px rgba(162, 75, 51, .28); }
.btn-solid:hover { background: var(--terra-escura); border-color: var(--terra-escura); color: #FFFFFF; }
.btn-glass { color: var(--grafite); }
.btn-glass:hover { color: var(--terra); }
.btn:focus-visible, .chip:focus-visible, .tab:focus-visible, .wa:focus-visible, .nav a:focus-visible {
  outline: 2px solid var(--terra); outline-offset: 3px;
}

/* cabeçalho */
.site-header { position: sticky; top: 0; z-index: 50; border-width: 0 0 1px 0; box-shadow: 0 8px 30px rgba(122, 62, 40, .06); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--grafite); }
.brand img { height: 32px; width: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name .serif { font-size: 22px; font-weight: 500; color: var(--terra); }
.brand-name small { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 32px; }
.nav a { color: var(--grafite); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--terra); }

/* cards */
.card { transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 28px 60px rgba(122, 62, 40, .16), inset 0 1px 0 rgba(255, 255, 255, .75); }

/* filtros e abas */
.chip {
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  font: 500 14px var(--sans); background: transparent; color: var(--grafite);
  transition: background .25s ease, color .25s ease;
}
.chip[aria-pressed="true"] { background: var(--terra); color: #FFFFFF; }
.tab {
  display: flex; justify-content: space-between; align-items: baseline; width: 100%;
  background: none; border: 0; border-bottom: 1px solid rgba(162, 75, 51, .18); cursor: pointer;
  padding: 14px 4px; text-align: left; color: var(--grafite);
  font: 400 24px var(--serif);
}
.tab:last-child { border-bottom: 0; }
.tab[aria-selected="true"] { color: var(--terra); }
.tab small { font: 400 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* antes e depois */
.ab {
  --pos: 50%;
  position: relative; width: 100%; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 28px;
  background: var(--areia); user-select: none; -webkit-user-select: none;
  box-shadow: 0 40px 80px rgba(122, 62, 40, .2);
  touch-action: pan-y;
}
.ab img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ab .ab-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ab-label { position: absolute; z-index: 3; top: 18px; padding: 7px 16px; border-radius: 999px; color: #FFFFFF; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; }
.ab-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 4; }
.ab-handle { position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--pos); width: 0; pointer-events: none; }
.ab-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: rgba(255, 255, 255, .9); }
.ab-knob {
  position: absolute; top: 50%; left: -30px; width: 60px; height: 60px; margin-top: -30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .28); border-color: rgba(255, 255, 255, .7);
}
.ab-range:focus-visible ~ .ab-handle .ab-knob { outline: 2px solid #FFFFFF; outline-offset: 3px; }

/* projetos */
.proj {
  position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 26px;
  background: var(--areia-clara); box-shadow: 0 24px 60px rgba(122, 62, 40, .12);
}
.proj.arch { border-radius: 999px 999px 26px 26px; }
.proj > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.proj:hover > img { transform: scale(1.05); }
.proj-ph { position: absolute; inset: 0; background: #E4D8CB; }
.proj-ph::before { content: ""; position: absolute; width: 70%; height: 60%; left: 10%; top: 8%; border-radius: 50%; background: var(--coral); opacity: .25; filter: blur(50px); }
.proj-ph-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #A08876; padding-bottom: 80px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; }
.proj-cap { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 18px; }
.proj-cap h3 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1.15; color: var(--grafite); }
.proj-cap span { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--terra-escura); white-space: nowrap; }

/* depoimentos */
.dep {
  position: relative; margin: 0; width: 100%; aspect-ratio: 9 / 14; overflow: hidden; border-radius: 26px;
  background: var(--areia); box-shadow: 0 24px 60px rgba(122, 62, 40, .14);
}
.dep > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(1.5px) saturate(.9); transform: scale(1.04); }
.dep-shade { position: absolute; inset: 0; background: rgba(53, 49, 47, .18); }
.dep-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.dep-play span { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .6); }
.dep-tag { position: absolute; top: 16px; left: 16px; padding: 6px 14px; border-radius: 999px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: #FFFFFF; }
.dep figcaption { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-radius: 18px; }
.dep figcaption .serif { font-size: 22px; line-height: 1.15; color: var(--grafite); }
.dep figcaption small { font-size: 12px; color: var(--texto); }

/* WhatsApp flutuante */
.wa {
  position: fixed; z-index: 60;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px 0 18px;
  border-radius: 999px; text-decoration: none; color: var(--grafite); font-size: 14px; font-weight: 500;
}

/* hero: o traço vira foto */
.bp path {
  fill: none; stroke: var(--terra); stroke-width: 1.4; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.8s cubic-bezier(.6, .1, .3, 1) forwards;
}
.bp path:nth-child(2) { animation-delay: .25s; }
.bp path:nth-child(3) { animation-delay: .5s; }
.bp path:nth-child(4) { animation-delay: .7s; }
.bp path:nth-child(5) { animation-delay: .85s; }
.bp path:nth-child(6) { animation-delay: 1s; }
.bp path:nth-child(7) { animation-delay: 1.1s; }
.bp path:nth-child(8) { animation-delay: 1.2s; }
.bp path:nth-child(9) { animation-delay: 1.3s; }
.bp { animation: bpfade 1.2s ease 2.9s forwards; }
.hero-photo { opacity: .16; filter: grayscale(1) contrast(.9); animation: reveal 1.6s ease 2.5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes bpfade { to { opacity: 0; } }
@keyframes reveal { to { opacity: 1; filter: none; } }

/* carimbo */
.carimbo { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-radius: 18px; overflow: hidden; font-size: 12px; color: var(--texto); }
.carimbo > div { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; border-right: 1px solid rgba(162, 75, 51, .18); }
.carimbo > div:last-child { border-right: 0; }
.carimbo small { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #8A7D72; }

/* grades */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 72px; align-items: center; }
.svc-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.svc-grid > :nth-child(-n+3) { grid-column: span 2; }
.svc-grid > :nth-child(n+4) { grid-column: span 3; }
.proj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.proc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 96px; align-items: center; }
.dep-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ab-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 56px; align-items: center; }
.hero-stats { position: absolute; left: -56px; bottom: 56px; z-index: 3; }
.about-quote { position: absolute; right: -48px; bottom: 48px; z-index: 3; max-width: 300px; }

@media (max-width: 1000px) {
  .hero-grid, .about-grid, .ab-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-grid > :nth-child(n) { grid-column: span 1; }
  .svc-grid > :nth-child(5) { grid-column: span 2; }
  .proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
  .carimbo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carimbo > div { border-bottom: 1px solid rgba(162, 75, 51, .18); }
  .hero-stats { left: 16px; bottom: 16px; }
  .about-quote { right: 16px; bottom: 16px; }
}
@media (max-width: 640px) {
  .svc-grid, .proj-grid, .proc-grid { grid-template-columns: minmax(0, 1fr); }
  .svc-grid > :nth-child(5) { grid-column: span 1; }
  .dep-grid { grid-template-columns: repeat(3, minmax(240px, 78%)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .dep-grid > * { scroll-snap-align: start; }
  .hide-sm { display: none !important; }
  .h1 { font-size: 54px !important; }
  .h2 { font-size: 42px !important; }
  .wa span { display: none; }
  .wa { padding: 0 17px; }
  .header-cta { display: none !important; }
  .hero-stats { position: static; margin: -72px 16px 0; gap: 18px !important; padding: 18px 20px !important; }
  .hero-stats .serif { font-size: 32px !important; }
  .about-quote { position: static; margin: -64px 16px 0; max-width: none; }
  .orb { filter: blur(50px); }
  .wm-word { font-size: 140px !important; }
  .tab { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bp { display: none; }
  .hero-photo { opacity: 1; filter: none; animation: none; }
  .orb, .wm { animation: none !important; }
  .proj > img, .card, .btn { transition: none; }
}

@media (max-width: 640px) {
  .chip { padding: 0 14px; font-size: 13px; }
}
