:root{
  --bg:#f4f3f1; --ink:#0d0d0d; --muted:#8a8a86; --line:rgba(0,0,0,0.16);
  --font:"Helvetica Neue","Inter",-apple-system,BlinkMacSystemFont,Arial,sans-serif;
}
*{ margin:0; padding:0; box-sizing:border-box; }
html,body{
  width:100%; background:var(--bg); color:var(--ink); font-family:var(--font);
  -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:350vh; }                                   /* desktop scroll height drives rotation */
a{ color:inherit; text-decoration:none; }

.site-header{ position:fixed; inset:0 0 auto 0; z-index:50; display:flex; align-items:center;
  justify-content:space-between; padding:1.9em 2.4em; font-size:13px; letter-spacing:0.02em; }
.header-left{ display:flex; align-items:center; gap:3em; }
.brand{ font-weight:600; font-size:16px; letter-spacing:0.06em; }
.brand-dot{ font-size:9px; vertical-align:super; margin-left:2px; }
.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; }
/* Animated underline: slides from left on hover, permanent on active */
.nav a::after{
  content:""; position:absolute; left:0; bottom:-6px;
  width:100%; height:1px; background:var(--ink);
  transform:scaleX(0); transform-origin:left center;
  transition:transform .32s cubic-bezier(0.76,0,0.24,1);
}
.nav a:hover::after, .nav a.is-active::after{ transform:scaleX(1); }
.lang{ display:flex; gap:0.5em; font-weight:500; }
.menu-toggle{ display:none; flex-direction:column; justify-content:center; gap:5px; width:26px; height:18px;
  padding:0; background:none; border:none; cursor:pointer; }
.menu-toggle span{ display:block; width:100%; height:1.5px; background:var(--ink); }
.lang .sep, .lang .muted{ opacity:0.4; }

.corner{ position:fixed; bottom:2.2em; z-index:50; background:none; border:none; cursor:pointer;
  font-family:var(--font); 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--left{ left:2.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(520px,42vw);
  text-align:center; pointer-events:none; z-index:5; }
.center-eyebrow{ font-size:12px; letter-spacing:0.16em; text-transform:uppercase; color:var(--muted); margin-bottom:1.4em; }
.center-title{ font-size:clamp(34px,4.4vw,60px); font-weight:500; line-height:1.02; letter-spacing:-0.02em; }
.center-title em{ font-style:italic; font-weight:400; }
.center-sub{ margin-top:1.3em; font-size:14px; color:var(--muted); }
.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:#e7e6e3; }
.preview-img img{ width:100%; height:100%; object-fit:cover; }
.preview-cat{ margin-top:1.1em; font-size:12px; letter-spacing:0.14em; text-transform:uppercase; color:var(--muted); }
.preview-title{ margin-top:0.4em; font-size:clamp(20px,2vw,26px); font-weight:500; letter-spacing:-0.01em; }

.labels{ position:absolute; inset:0; pointer-events:none; }
.label{ position:absolute; transform:translate(-50%,-50%); white-space:nowrap; font-size:14px; font-weight:500;
  letter-spacing:0.01em; pointer-events:none; opacity:0.85; }
.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; }
  .nav, .lang{ display:none; }
  .menu-toggle{ display:flex; }
  .corner{ bottom:auto; top:3.6em; font-size:13px; }
  .corner--left{ left:1em; }
  .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-size:10px; letter-spacing:0.14em; text-transform:uppercase; color:var(--muted); margin-bottom:5px; }
  .mp-title{ font-size:23px; line-height:1.05; font-weight:500; letter-spacing:-0.01em; margin-bottom:14px; }
  .mp-img{ width:100%; aspect-ratio:16/10; overflow:hidden; background:#e7e6e3; }
  .mp-img img{ width:100%; height:100%; object-fit:cover; display:block; }
  .mp-view{ display:inline-block; margin-top:11px; font-size:14px; font-weight:700;
    border-bottom:1px solid var(--ink); padding-bottom:2px; pointer-events:auto; }
  .mp-view i{ font-style:normal; margin-left:0.35em; }
}

.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:#000; 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-brand{ font-weight:600; font-size:20px; letter-spacing:0.06em; }
.loading-brand span{ font-size:10px; vertical-align:super; margin-left:2px; }
.loading-text{ margin-top:1.1em; font-size:11px; letter-spacing:0.26em; text-transform:uppercase;
  color:var(--muted); animation:load-pulse 1.8s ease-in-out infinite; }
.loading-bar{ width:120px; height:1px; margin:1.6em auto 0; background:rgba(0,0,0,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; } }

/* =================================================================
   LANGUAGE TOGGLE
================================================================= */
.lang-btn{
  background:none; border:none; cursor:pointer;
  font-family:var(--font); font-size:13px; font-weight:500;
  color:var(--ink); opacity:0.38; transition:opacity .25s ease; padding:0;
}
.lang-btn.is-active{ opacity:1; }
.lang-btn:hover{ opacity:0.7; }

/* =================================================================
   SLIDE-IN PANELS (Info / Contact)
================================================================= */

.panel-backdrop{
  position:fixed; inset:0; z-index:148;
  background:rgba(13,13,13,0.22); backdrop-filter:blur(3px);
  opacity:0; pointer-events:none;
  transition:opacity .45s ease;
}
.panel-backdrop.is-open{ opacity:1; pointer-events:auto; }

.panel{
  position:fixed; top:0; right:0; bottom:0; z-index:149;
  width:min(680px,100vw); background:var(--bg);
  overflow-y:auto; overflow-x:hidden;
  transform:translateX(100%);
  transition:transform .58s cubic-bezier(0.76,0,0.24,1);
  box-shadow:-4px 0 40px rgba(0,0,0,0.08);
}
.panel.is-open{ transform:translateX(0); }

.panel-head{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:1.9em 2.4em;
  background:var(--bg); border-bottom:1px solid var(--line);
}
.panel-brand{ font-weight:600; font-size:15px; letter-spacing:0.06em; }
.panel-brand sup{ font-size:8px; vertical-align:super; margin-left:1px; }
.panel-close{
  display:flex; align-items:center; justify-content:center;
  width:32px; height:32px; background:none; border:none;
  cursor:pointer; font-size:16px; color:var(--ink);
  opacity:0.45; transition:opacity .2s ease;
}
.panel-close:hover{ opacity:1; }

.panel-body{ padding:3em 2.4em 5em; }
.panel-heading{
  font-size:clamp(28px,3vw,42px); font-weight:500;
  letter-spacing:-0.02em; line-height:1.05; margin-bottom:0.3em;
}
.panel-founded{
  font-size:11px; letter-spacing:0.18em; text-transform:uppercase;
  color:var(--muted); margin-bottom:2.8em;
}

/* Info sections */
.info-section{ border-top:1px solid var(--line); padding-top:2em; margin-bottom:2.8em; }
.info-label{
  font-size:10px; letter-spacing:0.22em; text-transform:uppercase;
  color:var(--muted); margin-bottom:1.3em;
}
.info-text{ font-size:14.5px; line-height:1.72; }
.info-text + .info-text{ margin-top:0.9em; }
.info-philosophy{
  font-size:19px; font-weight:500; font-style:italic;
  letter-spacing:-0.01em; line-height:1.35; margin:2.2em 0 0.4em;
}
.info-grid{ display:grid; grid-template-columns:1fr 1fr; gap:1.4em 2em; }
.info-team-member{ border-top:1px solid var(--line); padding-top:0.75em; }
.info-team-name{ font-size:14px; font-weight:500; }
.info-team-role{ font-size:12px; color:var(--muted); margin-top:2px; }
.info-award{
  display:flex; gap:1.6em; align-items:baseline;
  padding:0.65em 0; border-bottom:1px solid var(--line);
}
.info-award:first-child{ border-top:1px solid var(--line); }
.info-award-year{ font-size:11px; color:var(--muted); min-width:32px; flex-shrink:0; }
.info-award-title{ font-size:13px; line-height:1.4; }
.info-services{ display:flex; flex-wrap:wrap; gap:0.5em; }
.info-service-tag{
  font-size:11px; letter-spacing:0.08em; text-transform:uppercase;
  border:1px solid var(--line); padding:0.32em 0.75em; border-radius:2px;
  transition:border-color .2s;
}
.info-service-tag:hover{ border-color:var(--ink); }

/* Contact sections */
.contact-intro{
  font-size:19px; font-weight:500; line-height:1.45;
  letter-spacing:-0.01em; margin-bottom:3em;
}
.contact-offices{ display:grid; grid-template-columns:1fr 1fr; gap:2em 2.5em; }
.contact-city{
  font-size:10px; letter-spacing:0.22em; text-transform:uppercase;
  color:var(--muted); margin-bottom:0.75em;
}
.contact-address{ font-size:13.5px; line-height:1.7; white-space:pre-line; }
.contact-phone, .contact-email{
  display:block; font-size:13px; margin-top:0.55em;
  color:var(--ink); text-decoration:none; transition:opacity .2s;
}
.contact-phone:hover, .contact-email:hover{ opacity:0.55; }
.contact-link-row{ margin-bottom:1.8em; }
.contact-link-label{
  font-size:10px; letter-spacing:0.22em; text-transform:uppercase;
  color:var(--muted); margin-bottom:0.6em;
}
.contact-link{
  display:inline-block; font-size:14px; font-weight:500;
  border-bottom:1px solid var(--ink); padding-bottom:3px;
  transition:opacity .2s;
}
.contact-link:hover{ opacity:0.55; }
.contact-socials{ display:flex; flex-wrap:wrap; gap:2em; }
.contact-social{
  font-size:13px; font-weight:500;
  border-bottom:1px solid var(--line); padding-bottom:3px;
  transition:border-color .25s;
}
.contact-social:hover{ border-color:var(--ink); }

@media (max-width:768px){
  .panel-body{ padding:2em 1.2em 4em; }
  .panel-head{ padding:1.2em; }
  .info-grid, .contact-offices{ grid-template-columns:1fr; }
}

/* =================================================================
   LEFT-SIDE PANEL VARIANT (Filter Projects)
================================================================= */
.panel--left{
  left:0; right:auto;
  transform:translateX(-100%);
  box-shadow:4px 0 40px rgba(0,0,0,0.08);
}
.panel--left.is-open{ transform:translateX(0); }

/* =================================================================
   FILTER CHIPS
================================================================= */
.filter-header{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:2.2em;
}
.filter-status{ font-size:12px; color:var(--muted); }
.filter-clear{
  background:none; border:none; cursor:pointer;
  font-family:var(--font); font-size:12px; font-weight:500;
  color:var(--ink); padding:0;
  border-bottom:1px solid var(--ink); padding-bottom:2px;
  transition:opacity .2s;
}
.filter-clear:hover{ opacity:0.55; }
.filter-chips{ display:flex; flex-direction:column; }
.filter-chip{
  display:flex; justify-content:space-between; align-items:center;
  padding:0.9em 0; background:none; border:none; border-bottom:1px solid var(--line);
  cursor:pointer; font-family:var(--font); text-align:left; width:100%;
  transition:background .18s ease, padding-left .22s ease, color .18s ease;
}
.filter-chip:first-child{ border-top:1px solid var(--line); }
.filter-chip:hover{ background:rgba(13,13,13,0.04); padding-left:0.6em; }
.filter-chip.is-active{
  background:var(--ink); color:var(--bg);
  padding-left:0.75em; padding-right:0.75em;
  border-bottom-color:transparent;
}
.filter-chip-name{ font-size:13px; font-weight:500; letter-spacing:0.005em; }
.filter-chip-count{ font-size:11px; color:var(--muted); }
.filter-chip.is-active .filter-chip-count{ color:rgba(255,255,255,0.42); }

/* Badge on the "Filter Projects +" corner button */
.filter-badge{
  display:inline-flex; align-items:center; justify-content:center;
  width:15px; height:15px; background:var(--ink); color:var(--bg);
  border-radius:50%; font-size:8.5px; font-weight:700;
  margin-left:0.45em; vertical-align:middle;
}

/* =================================================================
   GRID VIEW OVERLAY
================================================================= */
.grid-view{
  position:fixed; inset:0; z-index:200;
  background:var(--bg); overflow-y:auto;
  transform:translateY(100%);
  transition:transform .58s cubic-bezier(0.76,0,0.24,1);
}
.grid-view.is-open{ transform:translateY(0); }
body.grid-open{ overflow:hidden; }

.grid-view-head{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:1.9em 2.4em; background:var(--bg);
  border-bottom:1px solid var(--line); font-size:13px;
}
.grid-view-meta{ color:var(--muted); letter-spacing:0.01em; }
.grid-view-meta strong{ color:var(--ink); font-weight:500; }
.grid-view-close{
  background:none; border:none; cursor:pointer;
  font-family:var(--font); font-size:13px; font-weight:500; color:var(--ink);
  padding-bottom:4px; border-bottom:1px solid var(--ink); transition:opacity .2s;
}
.grid-view-close:hover{ opacity:0.55; }

/* Grid layout */
.grid-body{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1px; background:var(--line);
}
.grid-item{
  background:var(--bg); overflow:hidden; cursor:default;
  transition:background .22s ease;
}
.grid-item:hover{ background:#eceae7; }
.grid-item-img{
  aspect-ratio:16/10; overflow:hidden;
}
.grid-item-img img{
  width:100%; height:100%; object-fit:cover; display:block;
  filter:saturate(0.92) brightness(0.99);
  transition:transform .45s ease;
}
.grid-item:hover .grid-item-img img{ transform:scale(1.03); }
.grid-item-meta{
  display:flex; justify-content:space-between; align-items:baseline;
  padding:0.8em 1em 0.25em;
}
.grid-item-cat{
  font-size:10px; letter-spacing:0.16em; text-transform:uppercase; color:var(--muted);
}
.grid-item-num{ font-size:10px; color:var(--muted); }
.grid-item-title{
  padding:0 1em 1.3em;
  font-size:13.5px; font-weight:500; letter-spacing:-0.01em; line-height:1.3;
}

/* Responsive grid */
@media (max-width:1200px){ .grid-body{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:768px){
  .grid-body{ grid-template-columns:repeat(2,1fr); }
  .grid-view-head{ padding:1.2em 1em; }
}
@media (max-width:480px){ .grid-body{ grid-template-columns:1fr; } }
