/* =========================================================
   RAREWAKE TRADING CO. — core stylesheet
   Palette: near-black / deep aubergine / warm metallic gold
   Type: Fraunces (display) + Inter (body) + JetBrains Mono (labels)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root{
  /* --- color --- */
  --black:        #0b0a09;
  --black-soft:   #141213;
  --black-panel:  #171514;
  --black-line:   #2a2624;
  --purple:       #1e1024;
  --purple-2:     #33184a;
  --purple-line:  #4a2966;
  --gold:         #c6a15b;
  --gold-bright:  #e8c77e;
  --gold-dim:     #8a7042;
  --ivory:        #efe7da;
  --ivory-dim:    #b6ac9d;
  --ivory-faint:  #7d7669;
  --white:        #f8f5ef;

  /* --- type --- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* --- layout --- */
  --container: 1180px;
  --container-narrow: 760px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 2px;

  /* --- motion --- */
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body{
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--white);
  letter-spacing: -.01em;
}
h1{ font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-weight: 500; }
h2{ font-size: clamp(1.9rem, 3.6vw, 2.85rem); }
h3{ font-size: clamp(1.3rem, 2vw, 1.6rem); }
p{ margin: 0 0 1.1em; color: var(--ivory-dim); }
strong{ color: var(--ivory); font-weight: 600; }

::selection{ background: var(--gold); color: var(--black); }

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

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow{ max-width: var(--container-narrow); }

.visually-hidden{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link{
  position: absolute; left: 12px; top: -48px;
  background: var(--gold); color: var(--black); font-weight: 600;
  padding: 10px 16px; z-index: 1000; transition: top .2s var(--ease);
  border-radius: var(--radius);
}
.skip-link:focus{ top: 12px; }

/* --- eyebrow / label --- */
.eyebrow{
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin-bottom: 1em;
}
.eyebrow::before{
  content: "";
  width: 22px; height: 1px;
  background: var(--gold-dim);
}

/* =============== NAV =============== */
.site-header{
  position: sticky; top: 0; z-index: 500;
  background: rgba(11,10,9,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--black-line);
}
.nav{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
.brand{
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
}
.brand img{
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  background: var(--black-soft);
}
.brand span{ letter-spacing: .02em; }
.brand small{
  display: block; font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .18em; color: var(--gold); text-transform: uppercase;
  margin-top: 2px;
}

.nav-links{
  display: flex; align-items: center; gap: 34px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a{
  font-size: .88rem; color: var(--ivory-dim);
  position: relative; padding: 4px 0;
  transition: color .2s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"]{ color: var(--white); }
.nav-links a[aria-current="page"]::after{
  content:""; position: absolute; left:0; right:0; bottom:-6px; height:1px; background: var(--gold);
}

.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-weight: 600; font-size: .88rem;
  letter-spacing: .03em;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .25s var(--ease);
  white-space: nowrap;
}
.btn--gold{
  background: var(--gold);
  color: var(--black);
}
.btn--gold:hover{ background: var(--gold-bright); transform: translateY(-1px); }
.btn--ghost{
  background: transparent; color: var(--ivory); border-color: var(--black-line);
}
.btn--ghost:hover{ border-color: var(--gold); color: var(--white); }
.btn--purple{
  background: var(--purple-2); color: var(--white); border-color: var(--purple-line);
}
.btn--purple:hover{ border-color: var(--gold); }
.btn--sm{ padding: 10px 18px; font-size: .8rem; }
.btn--block{ width: 100%; }

.nav-cta{ display: flex; align-items: center; gap: 16px; }
.nav-toggle{
  display: none;
  background: none; border: 1px solid var(--black-line); color: var(--ivory);
  width: 42px; height: 42px; border-radius: var(--radius); cursor: pointer;
}
.nav-toggle svg{ width: 18px; height: 18px; }

@media (max-width: 900px){
  .nav-links{
    position: fixed; inset: 66px 0 0 0; background: var(--black);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px var(--gutter) 28px;
    transform: translateY(-8px);
    opacity: 0; pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
    border-bottom: 1px solid var(--black-line);
  }
  .nav-links.is-open{ opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-links li{ width: 100%; border-bottom: 1px solid var(--black-line); }
  .nav-links a{ display: block; padding: 16px 2px; font-size: 1rem; }
  .nav-toggle{ display: inline-flex; align-items: center; justify-content: center; }
  .nav-cta .btn--sm{ padding: 10px 14px; font-size: .78rem; }
}

/* =============== HERO / FRAMED IMAGE (signature corner-bracket motif) =============== */
.framed{
  position: relative;
  padding: 14px;
}
.framed::before, .framed::after,
.framed .frame-tr, .framed .frame-bl{
  content: ""; position: absolute; width: 26px; height: 26px;
  border: 1px solid var(--gold);
}
.framed::before{ top: 0; left: 0; border-right: none; border-bottom: none; }
.framed::after{ bottom: 0; right: 0; border-left: none; border-top: none; }
.framed .frame-tr{ top: 0; right: 0; border-left: none; border-bottom: none; }
.framed .frame-bl{ bottom: 0; left: 0; border-right: none; border-top: none; }
.framed img{ width: 100%; height: 100%; object-fit: cover; }
.framed figcaption{
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em;
  color: var(--ivory-faint); margin-top: 14px;
}

/* =============== SECTIONS =============== */
section{ padding: clamp(64px, 9vw, 128px) 0; }
.section--tight{ padding: clamp(40px, 6vw, 76px) 0; }
.section--purple{
  background: linear-gradient(180deg, var(--purple) 0%, #170c1c 100%);
  border-top: 1px solid var(--purple-line);
  border-bottom: 1px solid var(--purple-line);
}
.section--panel{ background: var(--black-soft); }
.section-head{ max-width: 640px; margin-bottom: 48px; }
.section-head p{ font-size: 1.05rem; }
.hr{ border: none; border-top: 1px solid var(--black-line); margin: 0; }
.hr--gold{ border-top: 1px solid var(--gold-dim); width: 60px; margin: 0 0 24px; }

/* =============== HERO =============== */
.hero{
  padding: clamp(56px,9vw,110px) 0 clamp(48px,7vw,90px);
  position: relative;
  overflow: clip;
}
.hero-grid{
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px,5vw,72px);
  align-items: center;
}
.hero-kicker{
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 20px;
}
.hero h1{ margin-bottom: .38em; }
.hero .lede{ font-size: 1.14rem; max-width: 46ch; margin-bottom: 2em; }
.hero-actions{ display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-trust{
  display: flex; gap: 28px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--ivory-faint); text-transform: uppercase;
}
.hero-trust strong{ color: var(--gold); font-family: var(--font-body); font-size: .95rem; letter-spacing: 0; display: block; text-transform: none; }

@media (max-width: 880px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-grid .framed{ order: -1; max-width: 460px; margin: 0 auto 8px; }
}

/* =============== CARD GRID / WHAT WE BUY =============== */
.buy-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--black-line);
  border: 1px solid var(--black-line);
}
.buy-item{
  background: var(--black); padding: 30px 26px;
  transition: background .25s var(--ease);
}
.buy-item:hover{ background: var(--black-soft); }
.buy-item .num{ font-family: var(--font-mono); font-size: .7rem; color: var(--gold-dim); }
.buy-item h3{ margin: 14px 0 8px; font-size: 1.18rem; }
.buy-item p{ font-size: .93rem; margin: 0; }
@media (max-width: 780px){ .buy-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px){ .buy-grid{ grid-template-columns: 1fr; } }

/* =============== EDITORIAL SPLIT (image + copy) =============== */
.split{
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,80px);
  align-items: center;
}
.split.reverse .split-media{ order: 2; }
@media (max-width: 860px){
  .split{ grid-template-columns: 1fr; }
  .split.reverse .split-media{ order: -1; }
}
.split-copy .eyebrow{ margin-bottom: 18px; }
.split-copy ul{ margin: 22px 0; padding: 0; list-style: none; }
.split-copy li{
  padding: 10px 0 10px 26px; position: relative; color: var(--ivory-dim);
  border-top: 1px solid var(--black-line);
}
.split-copy li:first-child{ border-top: none; }
.split-copy li::before{
  content: "—"; position: absolute; left: 0; color: var(--gold);
}

/* =============== PROCESS (numbered — genuine sequence) =============== */
.process{
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--black-line); border: 1px solid var(--black-line);
}
.process-step{ background: var(--black); padding: 34px 28px; }
.process-step .step-num{
  font-family: var(--font-display); font-size: 2.2rem; color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  margin-bottom: 18px; display: block;
}
.process-step h3{ font-size: 1.08rem; margin-bottom: 10px; }
.process-step p{ font-size: .9rem; margin: 0; }
@media (max-width: 900px){ .process{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .process{ grid-template-columns: 1fr; } }

/* =============== QUOTE / STATEMENT BAND =============== */
.statement{
  text-align: center; max-width: 780px; margin: 0 auto; padding: 0 var(--gutter);
}
.statement h2{ font-weight: 400; font-style: italic; }

/* =============== FOOTER =============== */
.site-footer{
  background: var(--black-soft);
  border-top: 1px solid var(--black-line);
  padding: 64px 0 28px;
}
.footer-grid{
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid var(--black-line);
}
.footer-brand .brand{ margin-bottom: 14px; }
.footer-brand p{ font-size: .9rem; max-width: 34ch; }
.footer-col h4{
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 16px; font-weight: 500;
}
.footer-col ul{ list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a{ color: var(--ivory-dim); font-size: .9rem; transition: color .2s; }
.footer-col a:hover{ color: var(--white); }
.footer-bottom{
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 24px;
  font-family: var(--font-mono); font-size: .74rem; color: var(--ivory-faint);
}
.footer-bottom a{ color: var(--ivory-faint); }
.footer-bottom a:hover{ color: var(--gold); }
@media (max-width: 780px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px){ .footer-grid{ grid-template-columns: 1fr; } }

/* =============== PAGE HEADER (interior pages) =============== */
.page-header{
  padding: clamp(48px,7vw,84px) 0 clamp(32px,5vw,56px);
  border-bottom: 1px solid var(--black-line);
}
.page-header .eyebrow{ margin-bottom: 18px; }
.page-header p{ max-width: 60ch; font-size: 1.05rem; }

/* =============== FORMS =============== */
.form-card{
  background: var(--black-soft);
  border: 1px solid var(--black-line);
  padding: clamp(24px,4vw,48px);
}
fieldset{ border: none; margin: 0 0 34px; padding: 0; }
fieldset legend{
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 20px; padding: 0;
}
.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-row.single{ grid-template-columns: 1fr; }
@media (max-width: 620px){ .form-row{ grid-template-columns: 1fr; } }

.field{ display: flex; flex-direction: column; gap: 8px; }
.field label{ font-size: .85rem; color: var(--ivory); font-weight: 500; }
.field .hint{ font-size: .78rem; color: var(--ivory-faint); margin-top: -2px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea{
  background: var(--black);
  border: 1px solid var(--black-line);
  color: var(--ivory);
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: .95rem;
  border-radius: var(--radius);
  transition: border-color .2s;
  width: 100%;
}
.field textarea{ resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus{
  outline: none; border-color: var(--gold);
}
.field input::placeholder, .field textarea::placeholder{ color: var(--ivory-faint); }

.choice-group{ display: flex; flex-wrap: wrap; gap: 10px; }
.choice{
  position: relative;
}
.choice input{ position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.choice span{
  display: inline-flex; align-items: center; padding: 9px 16px;
  border: 1px solid var(--black-line); border-radius: var(--radius);
  font-size: .85rem; color: var(--ivory-dim);
  transition: all .18s var(--ease);
}
.choice input:checked + span{ border-color: var(--gold); color: var(--white); background: rgba(198,161,91,.08); }
.choice input:focus-visible + span{ outline: 2px solid var(--gold-bright); outline-offset: 2px; }

.consent{ display: flex; gap: 12px; align-items: flex-start; margin-bottom: 28px; }
.consent input{ margin-top: 4px; accent-color: var(--gold); width: 16px; height: 16px; flex-shrink: 0; }
.consent label{ font-size: .85rem; color: var(--ivory-dim); }

.file-drop{
  border: 1px dashed var(--black-line);
  padding: 28px; text-align: center; border-radius: var(--radius);
  transition: border-color .2s;
}
.file-drop:hover{ border-color: var(--gold-dim); }
.file-drop input{ width: 100%; color: var(--ivory-dim); font-size: .85rem; }

.form-status{
  display: none; padding: 16px 18px; border-radius: var(--radius);
  font-size: .9rem; margin-bottom: 24px; font-family: var(--font-body);
}
.form-status.is-visible{ display: block; }
.form-status.success{ background: rgba(198,161,91,.12); border: 1px solid var(--gold-dim); color: var(--white); }
.form-status.error{ background: rgba(180,60,60,.12); border: 1px solid #7a3535; color: #f0c9c9; }
.form-status.loading{ background: var(--black); border: 1px solid var(--black-line); color: var(--ivory-dim); }

/* =============== MISC BLOCKS: privacy/terms, about, contact =============== */
.prose{ max-width: var(--container-narrow); }
.prose h2{ margin-top: 2em; font-size: 1.5rem; }
.prose h3{ font-size: 1.15rem; margin-top: 1.6em; }
.prose ul, .prose ol{ color: var(--ivory-dim); padding-left: 1.3em; }
.prose li{ margin-bottom: .5em; }
.prose .placeholder-note{
  background: var(--purple); border: 1px solid var(--purple-line);
  padding: 14px 18px; font-size: .85rem; color: var(--ivory-dim);
  font-family: var(--font-mono); margin: 1.5em 0;
}
.updated{ font-family: var(--font-mono); font-size: .8rem; color: var(--ivory-faint); margin-bottom: 2em; }

.info-list{ display: grid; gap: 0; border-top: 1px solid var(--black-line); }
.info-list > div{
  display: grid; grid-template-columns: 200px 1fr; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid var(--black-line);
}
.info-list dt{ font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; color: var(--gold); text-transform: uppercase; }
.info-list dd{ margin: 0; color: var(--ivory-dim); }
@media (max-width: 620px){ .info-list > div{ grid-template-columns: 1fr; gap: 6px; } }

/* =============== REVEAL ON SCROLL =============== */
/* Base .reveal is fully visible by default — this is the no-JS-safe state.
   JS only arms the hidden/animated state (adds .reveal-armed) when
   IntersectionObserver is actually available, so content is never
   stuck invisible if a script fails to load. */
.reveal.reveal-armed{ opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.reveal-armed.is-visible{ opacity: 1; transform: translateY(0); }

/* =============== UTILITIES =============== */
.center{ text-align: center; margin-left: auto; margin-right: auto; }
.mt-0{ margin-top: 0; }
.gold-text{ color: var(--gold); }
.stack{ display: flex; flex-direction: column; gap: 14px; }
.cta-band{
  text-align: center; padding: clamp(56px,8vw,96px) var(--gutter);
  border-top: 1px solid var(--black-line);
}
.cta-band h2{ max-width: 20ch; margin: 0 auto .3em; }
.cta-band .actions{ display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
