/* ==========================================================
   FILIPE BULHÕES · ATELIÊ DIGITAL
   Brand system from the official presentations:
   white ground, thin geometric type with wide tracking,
   brass, bordeaux and black marble accents
   ========================================================== */

:root {
  --paper: #ffffff;
  --paper-2: #f7f5f1;
  --ink: #1c1c1c;
  --muted: #8b8579;
  --hairline: #e7e3db;
  --brass: #b08d3e;
  --brass-hi: #d9b96e;
  --brass-deep: #8a6a2e;
  --bordeaux: #4a0f13;
  --marble: #17130f;
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-line: rgba(28, 28, 28, 0.1);
  --font: 'Jost', 'Century Gothic', 'Futura', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --ease-cine: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: auto; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brass); color: #fff; }

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

[hidden] { display: none !important; }

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

/* ---------- WebGL stage + overlays ---------- */

#stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

/* ---------- Preloader ---------- */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--paper);
  display: grid;
  place-items: center;
}
.pre-core {
  display: grid;
  justify-items: center;
  gap: 22px;
  text-align: center;
}
.pre-logo { width: min(64vw, 380px); }
.pre-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.46em;
  color: var(--muted);
}
.pre-count {
  font-weight: 200;
  font-size: clamp(44px, 7vw, 80px);
  letter-spacing: 0.22em;
  color: var(--ink);
}

/* ---------- Fixed HUD ---------- */

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 44px);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0));
}
.hud-logo { width: 150px; }
.hud-nav { display: flex; gap: 6px; }
.hud-nav a {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.35s var(--ease-cine), border-color 0.35s, background 0.35s;
}
.hud-nav a:hover { color: var(--ink); border-color: var(--hairline); }
.hud-nav a.hud-cta {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}
.hud-nav a.hud-cta:hover { background: var(--brass); border-color: var(--brass); color: #fff; }
.hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.32em;
  color: var(--muted);
}
.hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 10px var(--brass-hi);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }

.hud-frame { position: fixed; inset: 12px; z-index: 49; pointer-events: none; }
.hf { position: absolute; width: 22px; height: 22px; border: 1px solid rgba(28, 28, 28, 0.16); }
.hf.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hf.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hf.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hf.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* ---------- Sections ---------- */

#content { position: relative; z-index: 10; }

.sec {
  position: relative;
  min-height: 100vh;
  padding: 16vh clamp(20px, 6vw, 90px) 12vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kicker {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.5em;
  color: var(--brass);
  margin-bottom: 22px;
}

.display {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.8vw, 72px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.lede {
  max-width: 620px;
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 54px;
}

/* split chars */
[data-split] .ch { display: inline-block; will-change: transform; }
[data-split] .wd { display: inline-block; white-space: pre; }

/* ---------- Glassmorphism (frosted white) ---------- */

.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  box-shadow:
    0 30px 70px rgba(28, 22, 12, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* ---------- Hero ---------- */

.hero { align-items: flex-start; text-align: left; }

.hero-meta {
  display: inline-flex;
  gap: 26px;
  padding: 10px 22px;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.32em;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  margin-bottom: 4vh;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 8.2vw, 124px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* top padding keeps Cinzel's tilde/accents from being clipped by the reveal mask */
.hero-title .line { display: block; overflow: hidden; padding-top: 0.16em; margin-top: -0.06em; }
.hero-title .brass .ch {
  background: linear-gradient(160deg, var(--brass-hi) 10%, var(--brass) 55%, var(--brass-deep) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* pad the paint box so accents above the em box (Õ) still get the gradient */
  padding: 0.3em 0.02em 0.08em;
  margin: -0.3em -0.02em -0.08em;
}

.hero-sub {
  margin-top: 3vh;
  font-size: clamp(11px, 1.4vw, 15px);
  font-weight: 400;
  letter-spacing: 0.55em;
  color: var(--ink);
}

.hero-motto {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: clamp(10px, 1.2vw, 13px);
  font-weight: 400;
  letter-spacing: 0.42em;
  color: var(--brass-deep);
}

.hero-desc {
  margin-top: 18px;
  max-width: 520px;
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.85;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tag {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--brass-deep);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.65);
}

.scroll-hint {
  position: absolute;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 12px;
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.42em;
  color: var(--muted);
}
.scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(var(--brass), transparent);
  overflow: hidden;
  position: relative;
}
.scroll-line::after {
  content: '';
  position: absolute;
  left: 0; top: -20px;
  width: 1px; height: 20px;
  background: var(--brass-deep);
  animation: drop 1.8s var(--ease-cine) infinite;
}
@keyframes drop { to { top: 60px; } }

/* ---------- Cards ---------- */

.cards3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1080px;
}
.card { padding: 30px 26px; transition: transform 0.5s var(--ease-cine), border-color 0.5s, box-shadow 0.5s; }
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(176, 141, 62, 0.4);
  box-shadow: 0 36px 80px rgba(28, 22, 12, 0.14);
}
.card-num {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: var(--brass);
}
.card h3 {
  margin: 16px 0 12px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.22em;
}
.card p { font-size: 14px; line-height: 1.75; letter-spacing: 0.02em; color: var(--muted); }

/* ---------- Obras ---------- */

.obra { justify-content: center; }
.obra .obra-panel {
  width: min(480px, 92vw);
  padding: 38px 34px;
}
.obra.right { align-items: flex-end; }

.obra-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.obra-panel p { font-size: 14.5px; line-height: 1.8; letter-spacing: 0.02em; color: var(--muted); }

.obra-foto {
  margin-top: 22px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.obra-foto img { width: 100%; height: 170px; object-fit: cover; }
.obra-foto figcaption {
  padding: 9px 14px;
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
}

.specs {
  list-style: none;
  margin-top: 22px;
  border-top: 1px solid var(--hairline);
}
.specs li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 12.5px;
}
.specs b {
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.3em;
  color: var(--brass-deep);
  align-self: center;
}
.specs span { color: var(--ink); letter-spacing: 0.06em; }

/* Bordeaux act: the stage behind turns deep red, panel adapts */
.dark-act .obra-panel {
  background: rgba(255, 252, 248, 0.9);
}

.obra-cta {
  display: inline-block;
  margin-top: 20px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--brass-deep);
  border: 1px solid rgba(176, 141, 62, 0.45);
  border-radius: 999px;
  padding: 12px 22px;
  transition: background 0.4s var(--ease-cine), color 0.4s, letter-spacing 0.4s;
}
.obra-cta:hover {
  background: var(--brass);
  color: #fff;
  letter-spacing: 0.4em;
}

/* ---------- Encomenda (conversion act) ---------- */

.encomenda { align-items: center; text-align: center; }
.encomenda .lede { margin-inline: auto; }

.inclui-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  width: min(1080px, 100%);
  text-align: left;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 44px;
}
.btn {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  padding: 17px 34px;
  border-radius: 999px;
  transition: transform 0.4s var(--ease-cine), box-shadow 0.4s, background 0.4s, color 0.4s;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--brass-hi), var(--brass) 55%, var(--brass-deep));
  box-shadow: 0 18px 44px rgba(138, 106, 46, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 26px 60px rgba(138, 106, 46, 0.45); }
.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.65);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--brass); color: var(--brass-deep); }

.cta-note {
  margin-top: 26px;
  max-width: 480px;
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 2;
  color: var(--muted);
}

/* ---------- Acervo (2025 catalog) ---------- */

.acervo { padding-top: 10vh; }

.acervo-head {
  position: relative;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 26px;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
}
.acervo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.acervo-head-inner {
  position: relative;
  padding: 44px clamp(24px, 4vw, 54px);
  background: linear-gradient(to top, rgba(4, 3, 2, 0.82), rgba(4, 3, 2, 0.15) 70%, transparent);
  width: 100%;
  color: #f2ede4;
}
.acervo-head-inner .kicker { color: var(--brass-hi); }
.acervo-head-inner .display { margin-bottom: 10px; color: #f6f1e7; }
.acervo-head-inner p {
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: rgba(242, 237, 228, 0.75);
}

.acervo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
  width: 100%;
}
.acervo-item {
  position: relative;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 18px 20px 22px;
  display: grid;
  gap: 6px;
  transition: transform 0.5s var(--ease-cine), box-shadow 0.5s, border-color 0.4s;
}
.acervo-item:hover {
  transform: translateY(-6px);
  border-color: rgba(176, 141, 62, 0.45);
  box-shadow: 0 34px 70px rgba(28, 22, 12, 0.14);
}
.acervo-item figure {
  height: 240px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #fbfaf7;
  margin-bottom: 10px;
}
.acervo-item figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-cine);
}
.acervo-item:hover figure img { transform: scale(1.05); }
.ai-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.14em;
}
.ai-type {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: var(--muted);
}
.ai-meta {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.65;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.ai-cta {
  margin-top: 10px;
  justify-self: start;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--brass-deep);
  cursor: pointer;
  transition: letter-spacing 0.4s var(--ease-cine);
}
.ai-cta:hover { letter-spacing: 0.42em; }
.ai-badge {
  position: absolute;
  top: 30px;
  right: 32px;
  z-index: 2;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: #fff;
  background: var(--bordeaux);
  border-radius: 999px;
  padding: 7px 14px;
}
.acervo-note {
  margin-top: 26px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-align: center;
  align-self: center;
}

/* ---------- Processo (4 etapas) ---------- */

.cards4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 1240px;
}
.cards4 .card { padding: 26px 22px; }

/* ---------- Press marquee ---------- */

.press {
  position: relative;
  z-index: 10;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 18px 0;
}
.press-track {
  display: flex;
  gap: 38px;
  width: max-content;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.36em;
  color: var(--muted);
  white-space: nowrap;
  animation: marquee 32s linear infinite;
}
.press-track i { color: var(--brass); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Conexões ---------- */

.conexoes { align-items: center; text-align: center; }
.conexoes .lede { margin-inline: auto; }

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  width: min(1080px, 100%);
}
.link-card {
  position: relative;
  display: grid;
  justify-items: start;
  text-align: left;
  gap: 8px;
  padding: 26px 24px;
  overflow: hidden;
  transition: transform 0.5s var(--ease-cine), border-color 0.4s, box-shadow 0.5s;
}
.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(217, 185, 110, 0.16), transparent 45%);
  opacity: 0;
  transition: opacity 0.5s;
}
.link-card:hover {
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(176, 141, 62, 0.5);
  box-shadow: 0 34px 80px rgba(28, 22, 12, 0.16);
}
.link-card:hover::before { opacity: 1; }
.lc-id { font-size: 8.5px; font-weight: 400; letter-spacing: 0.36em; color: var(--brass); }
.lc-name { font-size: 19px; font-weight: 500; letter-spacing: 0.18em; }
.lc-desc { font-size: 12.5px; line-height: 1.6; letter-spacing: 0.02em; color: var(--muted); }
.lc-go {
  margin-top: 10px;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.32em;
  color: var(--brass-deep);
  transition: letter-spacing 0.4s var(--ease-cine);
}
.link-card:hover .lc-go { letter-spacing: 0.48em; }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 10;
  padding: 70px clamp(20px, 6vw, 90px) 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.foot-logo { width: min(70vw, 320px); }
.foot-motto {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.44em;
  color: var(--brass-deep);
}
.foot-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 34px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.foot-contacts a:hover { color: var(--brass-deep); }
.foot-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
}
.foot-grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.32em;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .cards4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .cards3 { grid-template-columns: 1fr; }
  .cards4 { grid-template-columns: 1fr; }
  .acervo-item figure { height: 210px; }
  .hud-nav a:not(.hud-cta) { display: none; }
  .hud-right { display: none; }
  .hud-logo { width: 118px; }
  .obra.right { align-items: flex-start; }
  .hero-meta { gap: 14px; flex-wrap: wrap; }
  .obra-foto img { height: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-line::after { animation: none; }
  .press-track { animation-duration: 90s; }
}
