@font-face{
  font-family:"Canela";
  src:url("public/fonts/Canela-Regular.woff2") format("woff2");
  font-style:normal;
  font-weight:400;
  font-display:swap;
}
@font-face{
  font-family:"Montserrat";
  src:url("public/fonts/Montserrat-Regular.woff2") format("woff2");
  font-style:normal;
  font-weight:400;
  font-display:swap;
}
@font-face{
  font-family:"Montserrat";
  src:url("public/fonts/Montserrat-Medium.woff2") format("woff2");
  font-style:normal;
  font-weight:500;
  font-display:swap;
}
@font-face{
  font-family:"Montserrat";
  src:url("public/fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-style:normal;
  font-weight:600;
  font-display:swap;
}

:root{
  --bg:#F6F3EE;      /* Marfim */
  --ink:#0D0D0D;     /* Carvão */
  --graphite:#2F2F2F;
  --stone:#D9D2C6;   /* Pedra */
  --olive:#727666;   /* Oliva */
  --muted:#727666;
  --line:rgba(13,13,13,0.16);
  --font-display:"Canela",Georgia,"Times New Roman",serif;
  --font-sans:"Montserrat",Arial,Helvetica,sans-serif;
}
*{ margin:0; padding:0; box-sizing:border-box; }
html,body{
  width:100%; background:var(--bg); color:var(--ink); font-family:var(--font-sans);
  -webkit-font-smoothing:antialiased;
  scrollbar-width:none; -ms-overflow-style:none;        /* hide scrollbar, keep scroll */
}
html::-webkit-scrollbar, body::-webkit-scrollbar{ display:none; width:0; height:0; }
body{ height:100svh; overflow:hidden; }                 /* o giro do anel vem da roda do mouse, sem scroll de página */
a{ color:inherit; text-decoration:none; }

.site-header{ position:fixed; inset:0 0 auto 0; z-index:310; display:flex; align-items:center;
  justify-content:space-between; padding:1.9em 2.4em; font-size:13px; letter-spacing:0.02em; }
/* na página do círculo, a faixa do cabeçalho não bloqueia cliques no que está sob ela */
body:not(.project-page) .site-header{ pointer-events:none; }
body:not(.project-page) .site-header a,
body:not(.project-page) .site-header button,
body:not(.project-page) .site-header .lang span{ pointer-events:auto; }
.header-left{ display:flex; align-items:center; gap:3em; }
.brand{ display:block; width:178px; line-height:0; flex-shrink:0; }
.brand img{ display:block; width:100%; height:auto; }
.nav{ display:flex; gap:2.2em; font-weight:500; }
.nav a{ position:relative; opacity:0.62; transition:opacity .3s ease; }
.nav a.is-active, .nav a:hover{ opacity:1; }
.nav a.is-active::after{ content:""; position:absolute; left:0; bottom:-6px; width:100%; height:1px; background:var(--ink); }
.lang{ display:flex; gap:0.5em; font-weight:500; }
.lang span:not(.sep){ cursor:pointer; }
.menu-toggle{ display:none; position:relative; width:26px; height:18px;
  padding:0; background:none; border:none; cursor:pointer; }
.menu-toggle span{ position:absolute; left:0; width:100%; height:1.5px; background:var(--ink);
  transition:transform .3s ease, top .3s ease; }
.menu-toggle span:first-child{ top:0; }
.menu-toggle span:last-child{ top:16.5px; }
.menu-toggle.is-open span:first-child{ top:8.25px; transform:rotate(45deg); }
.menu-toggle.is-open span:last-child{ top:8.25px; transform:rotate(-45deg); }
.lang .sep, .lang .muted{ opacity:0.4; }

.mobile-nav{ display:none; }

.corner{ position:fixed; bottom:2.2em; z-index:50; background:none; border:none; cursor:pointer;
  font-family:var(--font-sans); font-size:13px; font-weight:500; letter-spacing:0.02em; color:var(--ink);
  padding-bottom:4px; border-bottom:1px solid var(--ink); transition:opacity .3s ease; }
.corner:hover{ opacity:0.55; }
.corner i{ font-style:normal; margin-left:0.4em; }
.corner--right{ right:2.4em; }

.scene{ position:fixed; inset:0; overflow:hidden; perspective:1600px; perspective-origin:50% 50%; }
.gallery{ position:absolute; top:50%; left:50%; width:0; height:0; transform-style:preserve-3d; will-change:transform; }

/* CARD = stable hitbox. IMPORTANT: NO backface-visibility:hidden (it would hide half the ring -> "C"/spiral). */
.item{ position:absolute; top:0; left:0; width:78px; height:60px; transform-style:preserve-3d; }
.item-card{ position:absolute; inset:0; transform-style:preserve-3d; pointer-events:none;
  border:1px solid rgba(255,255,255,0.65); transition:box-shadow .4s ease; }
.item-card img{ width:100%; height:100%; object-fit:cover; display:block; filter:saturate(0.92) brightness(0.99); }
.item-card.is-active{ box-shadow:0 6px 16px -10px rgba(0,0,0,0.35); }

.center{ position:absolute; top:43%; left:50%; transform:translate(-50%,-50%); width:min(560px,44vw);
  text-align:center; pointer-events:none; z-index:5; }
.center-tagline{ font-family:var(--font-sans); font-size:clamp(12px,1.1vw,15px); font-weight:500;
  letter-spacing:0.24em; text-transform:uppercase; color:var(--ink); line-height:1.9; }
.center-default,.center-project{ transition:opacity .55s ease; }
.center-project{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; opacity:0; }
.center.show-project .center-default{ opacity:0; }
.center.show-project .center-project{ opacity:1; }
.preview-img{ width:380px; height:210px; flex-shrink:0; overflow:hidden; background:var(--stone); }
.preview-img img{ width:100%; height:100%; object-fit:cover; }
.preview-cat{ margin-top:1.1em; font-family:var(--font-sans); font-size:12px; letter-spacing:0.14em;
  text-transform:uppercase; color:var(--muted); }
.preview-title{ margin-top:0.4em; font-family:var(--font-display); font-size:clamp(22px,2.2vw,30px);
  font-weight:400; letter-spacing:-0.01em; }

.labels{ position:absolute; inset:0; pointer-events:none; }
.label{ position:absolute; transform:translate(-50%,-50%); white-space:nowrap; font-family:var(--font-sans);
  font-size:14px; font-weight:500; letter-spacing:0.01em; pointer-events:auto; opacity:0.85;
  transition:opacity .3s ease; }
.label:hover{ opacity:1; }
.label .ul{ border-bottom:1px solid var(--ink); padding-bottom:2px; }
.label sup{ font-size:10px; color:var(--muted); margin-left:3px; }

.mobile-preview{ display:none; }
.mobile-ring-hitbox{ display:none; }

@media (max-width:768px){
  .mobile-ring-hitbox{ display:block; position:fixed; left:0; right:0; bottom:0; top:50%;
    z-index:20; touch-action:none; pointer-events:auto; }
  body{ height:auto; }
  .scene{ height:100svh; overflow:hidden; }
  .center, .labels{ display:none; }
  .custom-cursor{ display:none !important; }
  .site-header{ padding:1.15em 1em; align-items:center; }
  .brand{ width:142px; }
  .nav, .lang{ display:none; }
  .menu-toggle{ display:block; }
  .mobile-nav{ display:flex; position:fixed; inset:0; z-index:300; background:var(--bg);
    flex-direction:column; justify-content:center; align-items:flex-start; gap:1.3em; padding:2em 1.4em;
    opacity:0; visibility:hidden; transform:translateY(-10px);
    transition:opacity .35s ease, transform .35s ease, visibility 0s linear .35s; }
  .mobile-nav.is-open{ opacity:1; visibility:visible; transform:translateY(0); transition:opacity .35s ease, transform .35s ease; }
  .mobile-nav a{ font-family:var(--font-display); font-size:32px; letter-spacing:-0.01em; color:var(--ink); }
  .mobile-nav a.is-active{ opacity:0.5; }
  .mobile-nav .lang{ display:flex; margin-top:0.8em; font-size:14px; }
  html.mobile-nav-open, html.mobile-nav-open body{ overflow:hidden; }
  .corner{ bottom:auto; top:3.6em; font-size:13px; }
  .corner--right{ right:1em; }
  .mobile-preview{ display:block; position:fixed; top:6.2em; left:0; right:0; z-index:6; padding:0 1em; pointer-events:none; }
  .mp-cat{ font-family:var(--font-sans); font-size:10px; letter-spacing:0.14em; text-transform:uppercase;
    color:var(--muted); margin-bottom:5px; }
  .mp-title{ font-family:var(--font-display); font-size:26px; line-height:1.02; font-weight:400;
    letter-spacing:-0.01em; margin-bottom:14px; }
  .mp-img{ width:100%; aspect-ratio:16/10; overflow:hidden; background:var(--stone); }
  .mp-img img{ width:100%; height:100%; object-fit:cover; display:block; }
  .mp-view{ display:inline-block; margin-top:11px; font-family:var(--font-sans); font-size:14px; font-weight:600;
    border-bottom:1px solid var(--ink); padding-bottom:2px; pointer-events:auto; }
  .mp-view i{ font-style:normal; margin-left:0.35em; }
}

/* ---------------- página de projeto ---------------- */
body.project-page{ height:auto; overflow:visible; cursor:auto; }
body.project-page .site-header{ background:var(--bg); }
.project-main{ max-width:1080px; margin:0 auto; padding:9em 2.4em 4em; }
.project-cat{ font-family:var(--font-sans); font-size:12px; font-weight:500; letter-spacing:0.18em;
  text-transform:uppercase; color:var(--olive); }
.project-title{ margin-top:0.35em; font-family:var(--font-display); font-size:clamp(34px,4.4vw,58px);
  font-weight:400; letter-spacing:-0.02em; line-height:1.02; }
.project-gallery{ margin-top:3em; display:flex; flex-direction:column; gap:1.6em; }
.project-gallery img{ width:100%; height:auto; display:block; background:var(--stone); }
.project-back{ display:inline-block; margin-top:3.5em; font-family:var(--font-sans); font-size:13px;
  font-weight:500; border-bottom:1px solid var(--ink); padding-bottom:3px; }
@media (max-width:768px){
  .project-main{ padding:7em 1em 3em; }
  .project-gallery{ margin-top:2em; gap:1em; }
}

/* ---------------- página de grade ---------------- */
.grade-main{ max-width:1240px; margin:0 auto; padding:9em 2.4em 6em; }
.grade-filtros{ display:flex; flex-wrap:wrap; gap:1.8em; margin-top:2.4em; }
.filtro{ background:none; border:none; cursor:pointer; padding:0 0 3px; font-family:var(--font-sans);
  font-size:13px; font-weight:500; letter-spacing:0.02em; color:var(--muted);
  border-bottom:1px solid transparent; transition:color .3s ease; }
.filtro sup{ font-size:9px; margin-left:3px; }
.filtro:hover{ color:var(--ink); }
.filtro.is-active{ color:var(--ink); border-bottom-color:var(--ink); }
.grade{ margin-top:2.8em; display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:2.6em 1.6em; }
.grade-item{ display:block; }
.gi-img{ display:block; aspect-ratio:16/11; overflow:hidden; background:var(--stone); }
.gi-img img{ width:100%; height:100%; object-fit:cover; display:block;
  filter:saturate(0.92) brightness(0.99); transition:transform .5s ease; }
.grade-item:hover .gi-img img{ transform:scale(1.04); }
.gi-nome{ display:block; margin-top:0.9em; font-family:var(--font-display); font-size:19px; letter-spacing:-0.01em; }
.gi-cat{ display:block; margin-top:0.25em; font-family:var(--font-sans); font-size:11px; font-weight:500;
  letter-spacing:0.14em; text-transform:uppercase; color:var(--muted); }
@media (max-width:768px){
  .grade-main{ padding:7em 1em 5em; }
  .grade{ grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:1.8em 1em; }
  .gi-nome{ font-size:16px; }
}

/* ---------------- página sobre ---------------- */
.sobre-main{ max-width:680px; margin:0 auto; padding:9em 2.4em 6em; }
.sobre-texto{ margin-top:2.6em; display:flex; flex-direction:column; gap:1.5em; }
.sobre-texto p{ font-family:var(--font-sans); font-size:16px; line-height:1.75; color:var(--graphite); }
@media (max-width:768px){
  .sobre-main{ padding:7em 1em 4em; }
  .sobre-texto p{ font-size:15px; line-height:1.7; }
}

/* ---------------- página contato ---------------- */
.contato-main{ max-width:680px; margin:0 auto; padding:9em 2.4em 6em; }
.contato-lista{ list-style:none; margin-top:2.8em; border-top:1px solid var(--line); }
.contato-item{ display:flex; align-items:center; gap:1.4em; padding:1.8em 0; border-bottom:1px solid var(--line);
  transition:opacity .3s ease; }
.contato-item:hover{ opacity:0.6; }
.ci-icon{ flex-shrink:0; width:44px; height:44px; border-radius:50%; border:1px solid var(--ink);
  display:flex; align-items:center; justify-content:center; color:var(--ink); }
.ci-icon svg{ width:20px; height:20px; }
.ci-texto{ display:flex; flex-direction:column; gap:0.3em; }
.ci-rotulo{ font-family:var(--font-sans); font-size:11px; font-weight:500; letter-spacing:0.16em;
  text-transform:uppercase; color:var(--olive); }
.ci-valor{ font-family:var(--font-display); font-size:22px; letter-spacing:-0.01em; }
@media (max-width:768px){
  .contato-main{ padding:7em 1em 4em; }
  .ci-icon{ width:38px; height:38px; }
  .ci-icon svg{ width:17px; height:17px; }
  .ci-valor{ font-size:18px; }
}

.custom-cursor{ display:none; }
@media (pointer:fine) and (hover:hover){
  body{ cursor:none; }                                  /* dot replaces the OS cursor */
  .custom-cursor{ display:block; position:fixed; top:0; left:0; width:13px; height:13px;
    border-radius:999px; background:var(--ink); pointer-events:none; z-index:99999; will-change:transform; transition:opacity .3s ease; }
  .custom-cursor.is-hidden{ opacity:0; }
}

body:not(.page-ready) .scene{ opacity:0; }              /* hide ring until fully built+painted */

.loading-screen{ position:fixed; inset:0; z-index:999999; background:var(--bg);
  display:flex; align-items:center; justify-content:center; cursor:default; }
.loading-screen.is-hidden{ pointer-events:none; }
.loading-inner{ text-align:center; opacity:0; animation:load-in .8s ease forwards; }
.loading-logo{ display:block; width:300px; max-width:62vw; height:auto; margin:0 auto; }
.loading-text{ margin-top:1.4em; font-family:var(--font-sans); font-size:10px; font-weight:500;
  letter-spacing:0.26em; text-transform:uppercase; color:var(--olive); animation:load-pulse 1.8s ease-in-out infinite; }
.loading-bar{ width:120px; height:1px; margin:1.6em auto 0; background:rgba(13,13,13,0.12); overflow:hidden; }
.loading-bar span{ display:block; width:100%; height:100%; background:var(--ink); transform:scaleX(0);
  transform-origin:left center; animation:load-bar 1.4s ease-in-out forwards; }
@keyframes load-in{ to{ opacity:1; } }
@keyframes load-pulse{ 0%,100%{ opacity:0.45; } 50%{ opacity:1; } }
@keyframes load-bar{ to{ transform:scaleX(1); } }
@media (max-width:768px){
  .loading-screen{ height:100svh; }
  .loading-logo{ width:240px; max-width:72vw; }
}
