/* ALMOST GODS — concept redesign · shared design system
   Unaffiliated portfolio piece. See footer on every page for credit. */

@import url("https://api.fontshare.com/v2/css?f[]=bespoke-stencil@700,500&f[]=khand@500,600&display=swap");

:root{
  /* six values, every one sampled from real Almost Gods assets — see PLAN.md */
  --bone:   #D6D1C5; /* their studio backdrop */
  --brick:  #8A3A2E; /* Emberstripe / Loom King warm */
  --mulberry:#4A1C2A;/* Kantha stitch mulberry */
  --petrol: #2C4A48; /* Loom King petrol teal */
  --ink:    #16120F; /* Aari sweatshirt black, warmed off #000 */
  --brass:  #B8A06A; /* Veteran Cap cord */

  --bone-rgb: 214,209,197;
  --ink-rgb: 22,18,15;
  --brass-rgb: 184,160,106;

  --fg: var(--ink);
  --bg: var(--bone);

  --display: "Bespoke Stencil", "Khand", sans-serif;
  --label:   "Khand", sans-serif;

  --fs-mega:  clamp(5.5rem, 24vw, 22rem);
  --fs-h1:    clamp(2.6rem, 6.6vw, 6rem);
  --fs-h2:    clamp(1.7rem, 3.6vw, 3rem);
  --fs-h3:    clamp(1.15rem, 2vw, 1.6rem);
  --fs-body:  1.075rem;      /* 17.2px */
  --fs-data:  0.92rem;       /* 14.7px */
  --fs-label: 0.78rem;       /* 12.5px */

  --gauge-w: 22%;
  --ease: cubic-bezier(.16,.84,.32,1);
}

*{box-sizing:border-box;}
html{scroll-behavior:auto;}
html,body{margin:0;padding:0;}
body{
  background:var(--bg);
  color:var(--fg);
  font-family:var(--label);
  font-size:var(--fs-body);
  line-height:1.5;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  transition:background-color .6s var(--ease), color .6s var(--ease);
}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
ul{margin:0;padding:0;list-style:none;}
h1,h2,h3,p{margin:0;}
button{font-family:inherit;background:none;border:none;color:inherit;cursor:pointer;}

.mono, .khand{font-family:var(--label);}
.display{font-family:var(--display);}

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

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

/* ---------- custom cursor ---------- */
#cursor{
  position:fixed;top:0;left:0;width:14px;height:14px;border-radius:50%;
  background:var(--ink);pointer-events:none;z-index:9999;
  transform:translate(-50%,-50%);
  mix-blend-mode:difference;
  transition:width .25s var(--ease), height .25s var(--ease), background .25s var(--ease);
  will-change:transform;
}
#cursor.hover{width:44px;height:44px;background:var(--brass);}
@media (hover:none){#cursor{display:none;}}

/* ---------- loading screen ---------- */
#loader{
  position:fixed;inset:0;z-index:10000;background:var(--ink);color:var(--bone);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;
  transition:opacity .8s var(--ease), visibility .8s var(--ease);
}
#loader.done{opacity:0;visibility:hidden;pointer-events:none;}
#loader .mark{width:34px;height:59px;opacity:.9;}
#loader .mark svg{width:100%;height:100%;fill:var(--brass);}
#loader .pct{font-family:var(--display);font-weight:700;font-size:1.6rem;letter-spacing:.02em;}
#loader .lbl{font-family:var(--label);font-size:var(--fs-label);letter-spacing:.22em;text-transform:uppercase;color:var(--brass);}

/* ---------- nav ---------- */
.site-nav{
  position:fixed;top:0;left:0;right:0;z-index:500;
  display:flex;align-items:center;justify-content:space-between;
  padding:1.4rem clamp(1.2rem,3vw,2.6rem);
  mix-blend-mode:normal;
  pointer-events:none;
}
.site-nav > *{pointer-events:auto;}
.site-nav .brand{
  display:flex;align-items:center;gap:.6rem;font-family:var(--label);
  font-size:.82rem;letter-spacing:.18em;text-transform:uppercase;
}
.site-nav .brand svg{width:14px;height:24px;fill:currentColor;}
.site-nav .links{display:flex;gap:clamp(1.1rem,2.4vw,2.2rem);}
.site-nav .links a{
  font-family:var(--label);font-weight:600;font-size:.82rem;letter-spacing:.14em;
  text-transform:uppercase;position:relative;padding-bottom:.3rem;
}
.site-nav .links a::after{
  content:"";position:absolute;left:0;bottom:0;height:1px;width:0;background:currentColor;
  transition:width .35s var(--ease);
}
.site-nav .links a:hover::after,
.site-nav .links a[aria-current="page"]::after{width:100%;}
.site-nav .links a[aria-current="page"]{color:var(--brass);}
.nav-toggle{display:none;}

@media (max-width:760px){
  .site-nav .links{
    position:fixed;inset:0;background:var(--ink);color:var(--bone);
    flex-direction:column;align-items:flex-start;justify-content:center;
    padding:2rem clamp(1.4rem,6vw,2.4rem);gap:1.6rem;
    transform:translateX(100%);transition:transform .5s var(--ease);
  }
  .site-nav .links.open{transform:translateX(0);}
  .site-nav .links a{font-size:1.4rem;}
  .nav-toggle{
    display:flex;flex-direction:column;gap:5px;pointer-events:auto;z-index:600;
    padding:.5rem;min-width:44px;min-height:44px;align-items:center;justify-content:center;
  }
  .nav-toggle span{display:block;width:22px;height:2px;background:currentColor;}
}

/* ---------- footer ---------- */
.site-footer{
  background:var(--bone);color:var(--ink);
  padding:clamp(3rem,7vw,6rem) clamp(1.2rem,3vw,2.6rem) 2rem;
  position:relative;z-index:2;
}
.site-footer .foot-top{
  display:flex;flex-wrap:wrap;gap:3rem;justify-content:space-between;
  padding-bottom:2.4rem;border-bottom:1px solid rgba(22,18,15,.18);
}
.site-footer h3{font-family:var(--display);font-weight:500;font-size:var(--fs-h3);max-width:34ch;}
.foot-col{display:flex;flex-direction:column;gap:.7rem;min-width:150px;}
.foot-col .h{font-family:var(--label);font-weight:600;font-size:var(--fs-label);letter-spacing:.16em;text-transform:uppercase;color:var(--brick);margin-bottom:.3rem;}
.foot-col a, .foot-col span{font-size:.92rem;}
.foot-legal{
  padding-top:1.6rem;display:flex;flex-wrap:wrap;gap:1.2rem 2rem;justify-content:space-between;
  font-size:.8rem;color:rgba(22,18,15,.68);
}
.foot-legal .credit{max-width:62ch;line-height:1.55;}
.foot-legal .credit b{color:var(--ink);}

/* ---------- magnetic buttons ---------- */
.btn{
  display:inline-flex;align-items:center;gap:.6rem;
  padding:.85rem 1.6rem;border:1px solid currentColor;border-radius:999px;
  font-family:var(--label);font-weight:600;font-size:.85rem;letter-spacing:.1em;text-transform:uppercase;
  position:relative;overflow:hidden;transition:background .3s var(--ease), color .3s var(--ease);
}
.btn.solid{background:var(--brass);color:var(--ink);border-color:var(--brass);}
.btn:hover{background:var(--brass);color:var(--ink);border-color:var(--brass);}
.magnetic{will-change:transform;}

/* ---------- gauge (depth ruler) ---------- */
.gauge{
  position:fixed;top:0;left:0;height:100vh;width:var(--gauge-w);
  min-width:150px;max-width:260px;
  border-right:1px solid rgba(var(--ink-rgb),.22);
  z-index:60;display:flex;flex-direction:column;justify-content:flex-end;
  padding:6.5rem 0 2.4rem;
  cursor:ns-resize;
  color:var(--ink);
  mix-blend-mode:normal;
}
.gauge .track{position:relative;flex:1;margin:0 0 0 clamp(1rem,2.4vw,1.6rem);border-left:1px solid rgba(var(--ink-rgb),.35);}
.gauge .tick{position:absolute;left:0;display:flex;align-items:center;gap:.5rem;transform:translateY(-50%);white-space:nowrap;}
.gauge .tick::before{content:"";width:10px;height:1px;background:currentColor;}
.gauge .tick .yr{font-family:var(--display);font-weight:700;font-size:.95rem;}
.gauge .tick .m{font-family:var(--label);font-size:.72rem;opacity:.65;}
.gauge .handle{
  position:absolute;left:-6px;width:13px;height:13px;border-radius:50%;
  background:var(--brass);border:2px solid var(--ink);transform:translateY(-50%);
  box-shadow:0 0 0 4px rgba(var(--brass-rgb),.25);
}
.gauge .readout{
  padding:0 0 1.2rem clamp(1rem,2.4vw,1.6rem);font-family:var(--display);font-weight:700;
  font-size:1.5rem;letter-spacing:.01em;
}
.gauge .readout .stratum-label{display:block;font-family:var(--label);font-weight:600;font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;opacity:.7;margin-top:.25rem;}

@media (max-width:820px){
  .gauge{width:70px;min-width:70px;padding-top:5.5rem;}
  .gauge .tick .yr{font-size:.72rem;}
  .gauge .tick .m{display:none;}
  .gauge .readout{font-size:1rem;padding-left:.8rem;}
  .gauge .readout .stratum-label{display:none;}
  .gauge .track{margin-left:.8rem;}
}

/* ---------- shared section scaffolding ---------- */
.shaft-canvas, .hoard-canvas, .order-canvas{
  position:fixed;inset:0;z-index:1;
}
main{position:relative;z-index:2;}
.content-col{
  margin-left:var(--gauge-w);
  padding:0 clamp(1.2rem,4vw,4rem);
}
@media (max-width:820px){.content-col{margin-left:70px;padding:0 1.1rem;}}

.section{padding:min(18vh,9rem) 0;position:relative;}
.eyebrow{
  font-family:var(--label);font-weight:600;font-size:var(--fs-label);letter-spacing:.22em;
  text-transform:uppercase;color:var(--brick);margin-bottom:1rem;display:flex;align-items:center;gap:.6rem;
}
.eyebrow::before{content:"";width:22px;height:1px;background:currentColor;}

.reveal{opacity:0;transform:translateY(28px);}

.hairline{border:none;border-top:1px solid rgba(var(--ink-rgb),.2);margin:2.2rem 0;}

.plate{
  background:rgba(var(--ink-rgb),.04);
  border:1px solid rgba(var(--ink-rgb),.14);
}

/* type utilities */
.mega{font-family:var(--display);font-weight:700;font-size:var(--fs-mega);line-height:.82;letter-spacing:-.01em;}
.h1{font-family:var(--display);font-weight:700;font-size:var(--fs-h1);line-height:.98;letter-spacing:-.005em;}
.h2{font-family:var(--display);font-weight:500;font-size:var(--fs-h2);line-height:1.04;}
.lede{font-size:1.2rem;line-height:1.6;max-width:38ch;}
.data-row{font-family:var(--label);font-size:var(--fs-data);}
.price{font-family:var(--display);font-weight:700;}

.tag-pill{
  font-family:var(--label);font-weight:600;font-size:.74rem;letter-spacing:.12em;text-transform:uppercase;
  padding:.3rem .65rem;border:1px solid currentColor;border-radius:999px;
}

/* image hover response */
.imgwrap{overflow:hidden;position:relative;}
.imgwrap img{transition:transform .7s var(--ease), filter .7s var(--ease);will-change:transform;}
.imgwrap:hover img{transform:scale(1.045);}
.imgwrap::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg, rgba(var(--ink-rgb),0) 60%, rgba(var(--ink-rgb),.28));
  opacity:0;transition:opacity .5s var(--ease);
}
.imgwrap:hover::after{opacity:1;}

/* ---------- cutout product plates: fixed ratio, transparent ground, no crop box ---------- */
/* Real garment photography, background removed — the product floats on the
   page's own colour instead of sitting in a raw rectangular studio crop.
   A fixed aspect-ratio box + object-fit:contain means every plate holds the
   same shape regardless of the source photo's framing (portrait on-model vs
   flat lay), so nothing on the page reads too thin or too wide next to it. */
.imgwrap.cutout{
  aspect-ratio:700/1018;overflow:visible;background:none;
}
.imgwrap.cutout img{
  width:100%;height:100%;object-fit:contain;object-position:center bottom;
  filter:drop-shadow(0 18px 22px rgba(var(--ink-rgb),.38));
}
.imgwrap.cutout::after{display:none;}
.imgwrap.cutout:hover img{transform:scale(1.03);}

::-webkit-scrollbar{width:9px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:rgba(var(--ink-rgb),.35);}

.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);}

/* ================= PAGE 01 — THE SHAFT ================= */
body[data-page="shaft"]{color:var(--fg);}
body[data-page="shaft"].dark-text{--fg:var(--bone);}
body[data-page="shaft"] .site-nav{color:var(--fg);}
body[data-page="shaft"] .gauge{color:var(--fg);}
body[data-page="shaft"].dark-text .eyebrow{color:var(--brass);}
body[data-page="shaft"].dark-text .hairline{border-top-color:rgba(214,209,197,.2);}

/* ---------- background crossfade: the descent dissolves into the real
   storefront photograph as the floor approaches. Fixed, full-bleed, same
   z-index as the shaft canvas but painted after it, so raising its opacity
   (driven by scroll progress in shaft.js) reveals it over the WebGL colour
   field — a real crossfade, not a hard cut. Same duotone/grain treatment
   used elsewhere on real photography across the site, just full-bleed
   here. This is the only place this photograph appears on the page —
   see .fp-copy below, which sits on its own solid ground rather than
   repeating the image in the foreground. ---------- */
.shaft-photo-bg{
  position:fixed;inset:0;z-index:1;opacity:0;pointer-events:none;
}
.shaft-photo-bg img{
  width:100%;height:100%;object-fit:cover;display:block;
  filter:grayscale(.2) contrast(1.14) brightness(.82) saturate(.8);
}
.shaft-photo-bg::after{
  content:"";position:absolute;inset:0;mix-blend-mode:color;background:var(--brick);opacity:.24;pointer-events:none;
}
.shaft-photo-bg .grain{
  position:absolute;inset:0;pointer-events:none;opacity:.055;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%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");
}

.hero-open{
  min-height:100vh;display:flex;align-items:center;position:relative;padding-top:6rem;
}
.hero-open .content-col{max-width:640px;}
.hero-plate{
  position:absolute;right:0;top:6vh;width:min(42vw,520px);margin:0;
  filter:drop-shadow(0 30px 40px rgba(0,0,0,.35));
}
.hero-plate figcaption{margin-top:.7rem;font-size:.82rem;}
@media (max-width:900px){
  .hero-plate{position:static;width:88%;margin:2rem auto 0;}
  .hero-open{flex-direction:column;padding-top:8rem;}
}

.stratum{min-height:82vh;display:flex;align-items:center;}
.stratum .content-col{max-width:640px;}
.rep-card{display:flex;gap:1.8rem;align-items:flex-end;margin-top:2.2rem;max-width:560px;}
.rep-card .imgwrap{width:clamp(180px,26vw,260px);flex:none;}
.rep-meta{padding-bottom:.2rem;}
@media (max-width:640px){
  .rep-card{gap:1.2rem;}
  .rep-card .imgwrap{width:clamp(140px,42vw,200px);}
}

.mega-section{min-height:70vh;display:flex;align-items:center;}
#megaNumber{color:var(--brass);}

.floor-close{min-height:64vh;display:flex;align-items:center;}
.floor-close .content-col{max-width:640px;}

/* ---------- the closing moment: the fixed background (.shaft-photo-bg
   above) has just crossfaded to the real storefront photograph full-bleed
   behind this whole section, so no second copy of that image belongs on
   top of it — the copy sits left, on its own solid ground, so it reads
   clearly with nothing overlapping it. ---------- */
.fp-copy{
  padding:2.6rem clamp(1.2rem,4vw,3rem);
  background:rgba(var(--ink-rgb),.82);
  border-left:2px solid var(--brass);
}
@media (max-width:820px){
  .fp-copy{padding:1.8rem 1.2rem;}
}

.reduced-note{display:none;}
@media (prefers-reduced-motion: reduce){
  .reveal{opacity:1 !important;transform:none !important;}
  .imgwrap img{transition:none;}
}
