/* ============================================================================
   RuSelfMade — shared design system
   Built Different. Since 1998.

   One stylesheet for every page on ruselfmade.com. The old site had five
   different palettes and three different navs; this replaces all of them.
   ========================================================================= */

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

:root{
  /* Surfaces — warm dark, not pure black. The old homepage was cream (#f2ede6)
     with dark sections dropped into it, which fought the brand; the first pass
     at this overcorrected to near-black (#050403) and read as a void. These sit
     high enough to show the warm brown cast and let the crimson bloom register.
     Each step stays lighter than the one before so card-on-page layering holds.

     This is as light as the surfaces can go. One step further puts --crimson2
     label text on --black at 4.31:1, under the 4.5:1 AA floor — so the ceiling
     here is set by contrast, not taste. Lighten further only by lightening the
     label colour with it. */
  --void:#17140e;
  --black:#1e1a13;
  --deep:#241f17;
  --raise:#2b251c;
  --border:#39311f;
  --border2:#4c4131;

  /* Crimson — the signal colour.
     --crimson2 is almost always small uppercase label text (eyebrows, tags,
     stat labels), so it carries a readability bar the deeper reds don't. At
     #b02020 it measured 2.78:1 on the page background — well under the 4.5:1
     WCAG AA needs for text that size. Lightened to clear it. The deep reds
     below are unchanged and still carry borders, fills and glows. */
  --crimson:#8b1a1a;
  --crimson2:#e64d4d;
  --crimson3:#d42828;
  --crimson-glow:rgba(212,40,40,0.35);

  /* Gold — reserved for founder tier and CTAs */
  --gold:#c9a84c;
  --gold2:#e2c469;

  /* Type. --stone is body copy, so it has to clear 4.5:1 on every surface
     above; #7a6a5a only reached 3.65:1. */
  --stone:#9c8b7a;
  --pale:#b8ab9c;
  --white:#ede5d8;

  --display:'Uncial Antiqua',Georgia,serif;
  --body:'IM Fell English',Georgia,serif;
  --sans:'Oswald',sans-serif;
  --mono:'Source Code Pro',ui-monospace,monospace;

  --nav-h:54px;
  --maxw:1080px;
}

html{scroll-behavior:smooth;scroll-padding-top:calc(var(--nav-h) + 20px)}
html,body{overflow-x:hidden}
body{
  font-family:var(--body);
  background:var(--void);
  color:var(--pale);
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
  position:relative;
}

/* ── Atmosphere ───────────────────────────────────────────────────────────
   Three fixed layers behind everything: an ember field drifting up, a slow
   crimson bloom, and CRT scanlines. Cheap enough to leave running. */
.atmos{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.atmos-bloom{
  position:absolute;left:50%;top:-20%;width:120vmax;height:120vmax;
  transform:translateX(-50%);
  background:radial-gradient(circle at 50% 40%,rgba(139,26,26,0.2),transparent 64%);
  animation:bloom 18s ease-in-out infinite;
}
/* Scanlines sit on top of the page, so multiply here compounds against the
   background and crushes it. Softer lines at lower opacity, normal blend. */
.atmos-scan{
  position:absolute;inset:0;
  background:repeating-linear-gradient(180deg,transparent 0 2px,rgba(0,0,0,0.22) 2px 4px);
  opacity:0.5;
}
.atmos-grain{
  position:absolute;inset:-50%;opacity:0.035;
  background-image:radial-gradient(var(--white) 0.5px,transparent 0.6px);
  background-size:3px 3px;
  animation:grain 0.6s steps(3) infinite;
}
#embers{position:absolute;inset:0;width:100%;height:100%}

@keyframes bloom{0%,100%{opacity:0.85;transform:translateX(-50%) scale(1)}
                 50%{opacity:1;transform:translateX(-50%) scale(1.08)}}
@keyframes grain{0%{transform:translate(0,0)}33%{transform:translate(-2px,1px)}
                 66%{transform:translate(1px,-2px)}100%{transform:translate(0,0)}}

/* Everything above the atmosphere */
nav,main,section,footer,.wrap{position:relative;z-index:1}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
nav{
  position:fixed;top:0;left:0;right:0;z-index:100;height:var(--nav-h);
  display:flex;align-items:center;justify-content:space-between;
  padding:0 clamp(18px,4vw,44px);
  background:rgba(23,20,14,0.82);backdrop-filter:blur(20px);
  border-bottom:1px solid var(--border);
  transition:background .3s,border-color .3s;
}
nav.scrolled{background:rgba(23,20,14,0.96);border-bottom-color:var(--border2)}
.nav-brand{
  font-family:var(--sans);font-size:12px;font-weight:700;letter-spacing:5px;
  text-transform:uppercase;color:var(--white);text-decoration:none;
  display:flex;align-items:center;gap:9px;
}
.nav-brand .pulse{
  width:6px;height:6px;border-radius:50%;background:var(--crimson3);
  box-shadow:0 0 8px var(--crimson-glow);animation:pulse 2.4s ease-in-out infinite;
}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.3;transform:scale(.8)}}
.nav-links{display:flex;align-items:center;gap:clamp(14px,2.4vw,26px)}
.nav-links a{
  font-family:var(--sans);font-size:9.5px;font-weight:500;letter-spacing:3px;
  text-transform:uppercase;color:var(--pale);text-decoration:none;
  position:relative;padding:4px 0;transition:color .25s;
}
.nav-links a::after{
  content:'';position:absolute;left:0;bottom:0;width:0;height:1px;
  background:var(--gold);transition:width .3s ease;
}
.nav-links a:hover{color:var(--gold)}
.nav-links a:hover::after{width:100%}
.nav-links a.ig{color:var(--stone)}

/* ── Shared bits ─────────────────────────────────────────────────────────── */
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 clamp(18px,4vw,32px)}

.orn{display:flex;align-items:center;gap:14px;max-width:420px;margin:0 auto}
.orn-line{flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--border2))}
.orn-line.rev{background:linear-gradient(90deg,var(--border2),transparent)}
.orn-dia{width:7px;height:7px;background:var(--gold);transform:rotate(45deg);flex:0 0 auto}
.orn-sm{width:3px;height:3px;background:var(--crimson2);transform:rotate(45deg);flex:0 0 auto}

.eyebrow{
  font-family:var(--sans);font-size:9px;font-weight:600;letter-spacing:6px;
  text-transform:uppercase;color:var(--crimson2);
}
.sec-title{
  font-family:var(--display);font-size:clamp(26px,4vw,40px);color:var(--white);
  line-height:1.15;margin:12px 0 0;
}
.sec-sub{
  font-family:var(--body);font-style:italic;font-size:clamp(13px,1.7vw,15px);
  color:var(--stone);line-height:1.8;max-width:620px;margin:14px auto 0;
}
section{padding:clamp(64px,9vw,104px) 0}
.sec-head{text-align:center;margin-bottom:clamp(36px,5vw,56px)}

/* Ghost section numerals */
.ghost-num{
  position:absolute;top:-6px;right:2%;z-index:-1;
  font-family:var(--sans);font-weight:700;font-size:clamp(90px,17vw,220px);
  line-height:1;color:var(--white);opacity:0.022;letter-spacing:-6px;
  pointer-events:none;user-select:none;
}

/* Buttons */
.btn{
  font-family:var(--sans);font-size:10px;font-weight:600;letter-spacing:3.5px;
  text-transform:uppercase;text-decoration:none;display:inline-block;
  padding:12px 26px;border:1px solid;cursor:pointer;background:transparent;
  transition:all .28s ease;position:relative;overflow:hidden;
}
.btn-gold{color:var(--gold);border-color:rgba(201,168,76,0.3)}
.btn-gold:hover{border-color:var(--gold);background:rgba(201,168,76,0.08);
                box-shadow:0 0 24px rgba(201,168,76,0.14)}
.btn-red{color:var(--crimson2);border-color:rgba(212,40,40,0.32)}
.btn-red:hover{border-color:var(--crimson2);background:rgba(212,40,40,0.09);
               box-shadow:0 0 24px var(--crimson-glow)}
.btn-ghost{color:var(--stone);border-color:var(--border2)}
.btn-ghost:hover{color:var(--pale);border-color:var(--stone)}
.btn.sm{font-size:9px;letter-spacing:2.5px;padding:9px 18px}
.btn[aria-disabled="true"]{opacity:.42;pointer-events:none}

/* Cards */
.card{
  border:1px solid var(--border);background:var(--black);position:relative;
  transition:transform .4s ease,border-color .3s,box-shadow .4s;
}
.card::before{
  content:'';position:absolute;top:0;left:0;right:0;height:2px;z-index:2;
  background:linear-gradient(90deg,var(--crimson),var(--gold),var(--crimson));
  opacity:0;transition:opacity .35s;
}
.card:hover{transform:translateY(-5px);border-color:var(--border2);
            box-shadow:0 20px 56px rgba(0,0,0,.6),0 0 44px rgba(139,26,26,.12)}
.card:hover::before{opacity:.85}

/* ── Scroll reveal ───────────────────────────────────────────────────────────
   Gated on .js (set by an inline snippet in <head>). Without scripting the
   content is simply visible — otherwise a no-JS visitor gets a blank page. */
.js .rv{opacity:0;transform:translateY(24px);
        transition:opacity .7s cubic-bezier(.2,.7,.3,1),transform .7s cubic-bezier(.2,.7,.3,1)}
.js .rv.in{opacity:1;transform:none}

/* ── Drop list (mailing capture) ─────────────────────────────────────────── */
.drop{
  border:1px solid var(--border2);background:
    linear-gradient(180deg,rgba(43,37,28,.9),rgba(30,26,19,.9));
  padding:clamp(30px,5vw,52px) clamp(20px,4vw,44px);text-align:center;
  position:relative;overflow:hidden;
}
.drop::after{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse at 50% 0%,rgba(139,26,26,.16),transparent 68%);
}
.drop-form{
  display:flex;gap:10px;max-width:460px;margin:22px auto 0;flex-wrap:wrap;
  justify-content:center;position:relative;z-index:1;
}
.drop-form input{
  flex:1 1 240px;min-width:0;background:rgba(23,20,14,.85);border:1px solid var(--border2);
  color:var(--white);font-family:var(--sans);font-size:12px;letter-spacing:1.6px;
  padding:13px 16px;outline:none;transition:border-color .25s,box-shadow .25s;
}
.drop-form input::placeholder{color:var(--stone);letter-spacing:2px;font-size:11px;
                              text-transform:uppercase}
.drop-form input:focus{border-color:var(--crimson2);box-shadow:0 0 0 3px rgba(139,26,26,.14)}
.drop-msg{
  font-family:var(--sans);font-size:10px;letter-spacing:2.5px;text-transform:uppercase;
  margin-top:14px;min-height:15px;position:relative;z-index:1;
}
.drop-msg.ok{color:var(--gold)}
.drop-msg.err{color:var(--crimson2)}
.drop-fine{
  font-family:var(--sans);font-size:9px;letter-spacing:2px;text-transform:uppercase;
  color:var(--stone);margin-top:16px;position:relative;z-index:1;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer{
  border-top:1px solid var(--border);background:var(--black);
  padding:38px clamp(20px,4vw,44px) 30px;text-align:center;
}
.foot-brand{
  font-family:var(--sans);font-size:13px;font-weight:700;letter-spacing:7px;
  text-transform:uppercase;color:var(--white);margin-bottom:8px;
}
.foot-tag{font-family:var(--body);font-style:italic;font-size:13px;color:var(--stone);
          margin-bottom:18px}
.foot-links{display:flex;gap:22px;justify-content:center;flex-wrap:wrap;margin-bottom:18px}
.foot-links a{
  font-family:var(--sans);font-size:9.5px;letter-spacing:3px;text-transform:uppercase;
  color:var(--stone);text-decoration:none;transition:color .25s;
}
.foot-links a:hover{color:var(--crimson2)}
.foot-copy{
  font-family:var(--sans);font-size:9px;letter-spacing:2.2px;text-transform:uppercase;
  color:var(--stone);opacity:.75;
}
.foot-copy span{color:var(--crimson)}

/* ── Back link on interior pages ─────────────────────────────────────────── */
.backlink{
  font-family:var(--sans);font-size:10px;letter-spacing:3px;text-transform:uppercase;
  color:var(--stone);text-decoration:none;transition:color .25s;
}
.backlink:hover{color:var(--gold)}

/* ── Seal ────────────────────────────────────────────────────────────────────
   The circular RUSELFMADE stamp. A round mark with a crosshair is the one shape
   that actually earns rotation, so it turns rather than sitting still.

   Everything below references the file via CSS or a plain <img>; if seal.png is
   missing the watermark simply paints nothing and rsm-motion.js drops the empty
   <img> tags, so a missing asset degrades to the page as it was. */

/* Giant watermark behind the whole page. Two nested layers because one element
   cannot both spin continuously (CSS) and track scroll (JS) on the same
   transform — the outer drifts, the inner answers the scroll wheel. */
/* inset:0 + margin:auto + a fixed square centres this exactly, at any viewport.
   The obvious left/top:50% with negative margins does NOT work here: the width
   is clamped by min(), so a margin of half the *unclamped* value throws it off
   centre — it was landing ~260px left of true. It also cannot use translate(),
   because the spin animation owns this element's transform. */
.atmos-seal{
  position:absolute;inset:0;margin:auto;
  width:min(124vmin,1150px);height:min(124vmin,1150px);
  animation:sealDrift 300s linear infinite;
  /* Dark red ink on a near-black page: below ~.10 it is invisible rather than
     subtle. */
  opacity:.13;
}
.atmos-seal i{
  display:block;width:100%;height:100%;
  background:url('/img/seal.png') center/contain no-repeat;
  transform:rotate(var(--seal-rot,0deg));
  will-change:transform;
}
@keyframes sealDrift{to{transform:rotate(360deg)}}

/* Footer stamp — the natural home for a seal. */
.seal-foot{
  width:84px;height:auto;display:block;margin:0 auto 16px;opacity:.92;
  filter:drop-shadow(0 0 18px rgba(212,40,40,.38));
  animation:sealDrift 110s linear infinite;
}

/* Drop-list stamp: presses in like wax when it scrolls into view. */
.seal-stamp{
  width:clamp(94px,13vw,138px);height:auto;display:block;margin:0 auto 22px;
  filter:drop-shadow(0 0 24px rgba(212,40,40,.42));
  position:relative;z-index:1;
}
.js .seal-stamp{opacity:0;transform:scale(2.5) rotate(-22deg)}
.js .seal-stamp.stamped{animation:stampIn .8s cubic-bezier(.2,.8,.25,1) forwards}
@keyframes stampIn{
  0%  {opacity:0;transform:scale(2.5) rotate(-22deg)}
  50% {opacity:1;transform:scale(.93) rotate(3deg)}
  68% {transform:scale(1.05) rotate(-2deg)}
  84% {transform:scale(.98) rotate(.8deg)}
  100%{opacity:1;transform:scale(1) rotate(0deg)}
}

/* ── Crown mark ──────────────────────────────────────────────────────────────
   Jade's own brush-drawn crown (img/crownfin.png), used as the file — never
   traced, redrawn or rebuilt as SVG. Transparent PNG, so the glow comes from
   drop-shadow on the alpha rather than a box around it. */
.nav-crown{
  height:21px;width:auto;display:block;flex:0 0 auto;
  animation:crownPulse 3.4s ease-in-out infinite;
}
@keyframes crownPulse{
  0%,100%{filter:drop-shadow(0 0 4px rgba(212,40,40,.45))}
  50%    {filter:drop-shadow(0 0 12px rgba(212,40,40,.9))}
}
.crown-mark{
  width:clamp(88px,11vw,138px);height:auto;display:block;margin:0 auto;
  filter:drop-shadow(0 0 30px rgba(212,40,40,.42));
  animation:crownFloat 7.5s ease-in-out infinite;
}
@keyframes crownFloat{
  0%,100%{transform:translateY(0) rotate(0deg)}
  50%    {transform:translateY(-10px) rotate(-1.2deg)}
}
.crown-foot{
  width:48px;height:auto;display:block;margin:0 auto 14px;opacity:.9;
  filter:drop-shadow(0 0 14px rgba(212,40,40,.4));
}

/* ── Marquee band ────────────────────────────────────────────────────────────
   Streetwear staple, and the cheapest continuous motion on the page: it moves
   whether or not you scroll, so the site never sits completely still. The track
   holds the slogan list twice and translates exactly -50%, so the loop is
   seamless. Hovering pauses it so the words stay readable. */
.marquee{
  overflow:hidden;display:flex;user-select:none;padding:15px 0;
  border-top:1px solid var(--border);border-bottom:1px solid var(--border);
  background:linear-gradient(90deg,transparent,rgba(139,26,26,.07),transparent);
  mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);
}
/* First element on the page sits beneath a fixed nav, so it needs the clearance
   the hero used to provide. */
.marquee.top{margin-top:var(--nav-h)}
.marquee-track{display:flex;flex:0 0 auto;align-items:center;
               animation:marq 34s linear infinite;will-change:transform}
.marquee.rev .marquee-track{animation-direction:reverse}
.marquee:hover .marquee-track,.marquee:focus-within .marquee-track{animation-play-state:paused}
.marquee-item{
  display:flex;align-items:center;gap:clamp(22px,4vw,46px);white-space:nowrap;
  padding-right:clamp(22px,4vw,46px);
  font-family:var(--sans);font-size:clamp(12px,1.7vw,17px);font-weight:700;
  letter-spacing:clamp(3px,.7vw,6px);text-transform:uppercase;color:var(--pale);
}
.marquee-item b{color:var(--crimson2);font-weight:700}
.marquee-item i{width:6px;height:6px;background:var(--gold);transform:rotate(45deg);
                flex:0 0 auto;display:block}
@keyframes marq{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* ── Shimmering display type ─────────────────────────────────────────────────
   A slow highlight sweeps across the heading. The gradient stays in the light
   end of the palette so the text keeps its contrast while it moves. */
.shimmer{
  background:linear-gradient(100deg,
    var(--white) 0%,var(--white) 32%,var(--gold) 46%,
    var(--white) 60%,var(--white) 100%);
  background-size:220% auto;
  -webkit-background-clip:text;background-clip:text;
  color:transparent;-webkit-text-fill-color:transparent;
  animation:shim 7s linear infinite;
}
@keyframes shim{from{background-position:0% center}to{background-position:220% center}}

/* ── Cursor spotlight on cards ───────────────────────────────────────────────
   JS writes --mx/--my as percentages; the glow tracks the pointer inside the
   card rather than sitting in a fixed spot, so hovering feels responsive. */
.card,.p-card,.album,.single,.heart,.creed div{position:relative}
.card::after,.p-card::after,.album::after,.single::after{
  content:'';position:absolute;inset:0;pointer-events:none;z-index:0;
  opacity:0;transition:opacity .4s ease;
  background:radial-gradient(340px circle at var(--mx,50%) var(--my,50%),
             rgba(212,40,40,.13),transparent 62%);
}
.card:hover::after,.p-card:hover::after,.album:hover::after,.single:hover::after{opacity:1}
/* Keep card content above the glow layer. */
.r-body,.p-body,.info,.single>*{position:relative;z-index:1}

/* ── Count-up figures ────────────────────────────────────────────────────────
   Numbers animate from zero when scrolled into view. Tabular figures stop the
   layout jittering as digits change width mid-count. */
[data-count]{font-variant-numeric:tabular-nums}

/* ── Scramble headings ───────────────────────────────────────────────────────
   Section titles resolve out of random glyphs — the DESYNC/interference idea
   the label already trades on, applied to type. */
[data-scramble]{min-height:1em}
/* Headings carrying .shimmer paint their text via background-clip, so plain
   `color` has no effect on them — the fill colour has to be overridden too for
   the interference to read as crimson. */
.scrambling{color:var(--crimson2);-webkit-text-fill-color:var(--crimson2)}

/* ── Motion / accessibility ──────────────────────────────────────────────────
   Everything above is decoration. With reduced motion requested, the marquee
   parks, the shimmer resolves to solid, counters show their final value and
   headings render as plain text — the page still reads identically. */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important}
  .js .rv{opacity:1;transform:none}
  .atmos-grain,#embers{display:none}
  /* Hero elements animate in via keyframes; with animation off they'd be
     stuck at their opacity:0 start frame. */
  .hero-frame,.hero-tag,.hero-social,.console,.scroll-cue{opacity:1!important}
  .shimmer{background:none;color:var(--white);-webkit-text-fill-color:var(--white)}
  .marquee-track{transform:none!important}
  .card::after,.p-card::after,.album::after,.single::after{display:none}
  /* The seal stops turning and the wax stamp is simply present, not pressed. */
  .atmos-seal{animation:none}
  .js .seal-stamp{opacity:1;transform:none}
}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

@media(max-width:720px){
  .nav-links a:not(.ig){display:none}
  .ghost-num{font-size:clamp(70px,22vw,120px)}
}
