/* ==========================================================================
   THE 1% CLOSER - Design System
   Elite Sales Strategy LLC · Wyoming, USA
   Art direction: obsidian + gold laurel + 1960s boardroom photography.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Surfaces - warm blacks, never pure #000 except the void behind the grain */
  --ink:        #08080A;
  --ink-1:      #0C0C0F;
  --ink-2:      #111116;
  --ink-3:      #17171D;
  --ink-4:      #1F1F27;

  /* Ink on ink */
  --bone:       #F4F1EA;   /* primary text, warm off-white */
  --bone-dim:   #C9C4B9;
  --ash:        #8E8A81;   /* muted body */
  --ash-dim:    #5E5B55;   /* captions, legal */

  /* The gold - three stops so it can be a gradient, not a flat fill */
  --gold:       #C8A44C;
  --gold-hi:    #EFD79A;
  --gold-lo:    #8A6E28;
  --gold-glow:  rgba(200,164,76,.30);

  /* Signal colours, used with restraint */
  --blood:      #B4382C;
  --jade:       #4E8C63;

  /* Hairlines - the single most important premium detail */
  --hair:       rgba(200,164,76,.20);
  --hair-soft:  rgba(244,241,234,.09);
  --hair-hard:  rgba(200,164,76,.42);

  /* Type */
  --ff-display: "Instrument Serif", "Playfair Display", Georgia, serif;
  --ff-sans:    "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ff-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Fluid scale */
  --t-xs:   .6875rem;
  --t-sm:   .8125rem;
  --t-base: clamp(1rem, .96rem + .18vw, 1.0625rem);
  --t-lg:   clamp(1.125rem, 1.05rem + .34vw, 1.3125rem);
  --t-xl:   clamp(1.5rem, 1.3rem + .9vw, 2rem);
  --t-2xl:  clamp(1.85rem, 1.5rem + 1.5vw, 3rem);
  /* These two live inside a ~630px column, not the full viewport, so the vw
     coefficient stays small. A large coefficient makes the headline outgrow its
     column on wide screens and shatter into a ragged three-line block. */
  --t-3xl:  clamp(2.25rem, 1.7rem + 1.8vw, 3.5rem);
  --t-4xl:  clamp(2.75rem, 2rem + 2.6vw, 4.75rem);

  /* Space */
  --gut:    clamp(1.25rem, .8rem + 2.2vw, 2.5rem);
  --bay:    clamp(4.5rem, 3rem + 6.5vw, 9rem);   /* vertical section rhythm */
  --shelf:  min(1240px, 100% - (var(--gut) * 2));
  --shelf-narrow: min(760px, 100% - (var(--gut) * 2));

  --radius:   3px;   /* almost square - luxury is not rounded */
  --radius-lg: 5px;

  --ease:     cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --shadow-lift: 0 24px 60px -22px rgba(0,0,0,.85), 0 2px 8px rgba(0,0,0,.4);
  --shadow-gold: 0 18px 50px -20px rgba(200,164,76,.28);
}

/* ---------- 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

body {
  background: var(--ink);
  color: var(--bone-dim);
  font-family: var(--ff-sans);
  font-size: var(--t-base);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:where(h1, h2, h3, h4, h5) { font-weight: 400; line-height: 1.05; text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--gold); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link - required for keyboard users, invisible otherwise */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold); color: var(--ink);
  padding: .75rem 1.25rem; font-family: var(--ff-mono);
  font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- 3. Film grain - the analog signature -------------------------- */
body::before {
  content: "";
  position: fixed; inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
  will-change: transform;
}
@keyframes grain {
  0%,100% { transform: translate(0,0) }
  10% { transform: translate(-4%,-4%) }  20% { transform: translate(-8%,3%) }
  30% { transform: translate(6%,-8%) }   40% { transform: translate(-4%,7%) }
  50% { transform: translate(-8%,4%) }   60% { transform: translate(7%,0) }
  70% { transform: translate(0,6%) }     80% { transform: translate(3%,8%) }
  90% { transform: translate(-6%,3%) }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

/* ---------- 4. Layout ---------------------------------------------------- */
.shelf   { width: var(--shelf); margin-inline: auto; }
.shelf-n { width: var(--shelf-narrow); margin-inline: auto; }
section  { position: relative; z-index: 2; }
.bay     { padding-block: var(--bay); }
.bay-t   { padding-top: var(--bay); }
.bay-b   { padding-bottom: var(--bay); }

.rule    { height: 1px; background: var(--hair); border: 0; }
.rule-fade {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--hair-hard) 22%, var(--hair-hard) 78%, transparent);
}

/* Ornament: gold rule broken by a diamond */
.ornament {
  display: flex; align-items: center; gap: 1rem;
  color: var(--gold); margin-block: 2rem;
}
.ornament::before, .ornament::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hair-hard));
}
.ornament::after { background: linear-gradient(90deg, var(--hair-hard), transparent); }
.ornament span { font-size: .6rem; letter-spacing: .3em; }

/* ---------- 5. Type styles ----------------------------------------------- */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex; align-items: center; gap: .7rem;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--gold); opacity: .7; flex: none;
}
.eyebrow--center { justify-content: center; }
.eyebrow--plain::before { display: none; }

.display {
  font-family: var(--ff-display);
  font-size: var(--t-3xl);
  line-height: .96;
  letter-spacing: -.015em;
  color: var(--bone);
}
.display--xl { font-size: var(--t-4xl); }
.display em  { font-style: italic; color: var(--gold-hi); }

/* Punch headlines: heavy sans, tight tracking - for the hard sales lines */
.punch {
  font-family: var(--ff-sans);
  font-weight: 800;
  font-size: var(--t-2xl);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: var(--bone);
  text-transform: uppercase;
}

.lede {
  font-size: var(--t-lg);
  line-height: 1.6;
  color: var(--bone-dim);
  max-width: 62ch;
}
.muted { color: var(--ash); }
.dim   { color: var(--ash-dim); }
.gold  { color: var(--gold); }
.mono  {
  font-family: var(--ff-mono); font-size: var(--t-xs);
  letter-spacing: .18em; text-transform: uppercase;
}

.gold-grad {
  background: linear-gradient(102deg, var(--gold-lo) 0%, var(--gold-hi) 38%, var(--gold) 62%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Numerals: big, thin, gold, editorial */
.numeral {
  font-family: var(--ff-display);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1; color: var(--gold);
  opacity: .38;
}

/* ---------- 6. Buttons --------------------------------------------------- */
.btn {
  --btn-bg: var(--gold);
  --btn-fg: #14100A;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 1.05rem 2.1rem;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--ff-mono);
  font-size: var(--t-sm); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), color .25s;
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, var(--shadow-gold);
}
.btn::before {   /* the sheen that sweeps on hover */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(102deg, var(--gold-lo), var(--gold-hi) 45%, var(--gold) 70%, var(--gold-lo));
}
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transition: left .7s var(--ease-out);
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 22px 48px -18px rgba(200,164,76,.5); }
.btn:hover::after { left: 140%; }
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent; color: var(--bone);
  border: 1px solid var(--hair-hard);
  box-shadow: none;
}
.btn--ghost::before { background: transparent; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-hi); box-shadow: none; }

.btn--lg   { padding: 1.25rem 2.75rem; font-size: var(--t-base); letter-spacing: .1em; }
.btn--full { display: flex; width: 100%; }

/* A button carrying a sub-label stacks: headline over detail, always centred. */
.btn:has(.btn__sub) { flex-direction: column; gap: .2rem; text-align: center; }
.btn__sub  {
  display: block; font-size: .625rem; letter-spacing: .1em; line-height: 1.3;
  opacity: .7; font-weight: 500; text-transform: none;
}
/* Fallback for engines without :has() - stack via wrapping instead. */
@supports not selector(:has(*)) {
  .btn { flex-wrap: wrap; }
  .btn__sub { flex-basis: 100%; text-align: center; }
}

/* Text link with an underline that grows */
.link {
  color: var(--gold); position: relative;
  font-family: var(--ff-mono); font-size: var(--t-sm);
  letter-spacing: .1em; text-transform: uppercase;
}
.link::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.link:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- 7. Cards & panels -------------------------------------------- */
.panel {
  position: relative;
  background: linear-gradient(168deg, var(--ink-2), var(--ink-1) 60%);
  border: 1px solid var(--hair-soft);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
}
.panel--gold { border-color: var(--hair); }
.panel--lift { box-shadow: var(--shadow-lift); }

/* Card that lights a gold edge on hover */
.card {
  position: relative;
  background: linear-gradient(168deg, var(--ink-2), var(--ink-1) 65%);
  border: 1px solid var(--hair-soft);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 1.4vw, 2.25rem);
  overflow: hidden;
  transition: border-color .45s var(--ease), transform .45s var(--ease-out), background .45s;
}
.card::after {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .45s var(--ease);
}
.card:hover { border-color: var(--hair); transform: translateY(-4px); }
.card:hover::after { opacity: 1; }
.card h3 { font-size: var(--t-xl); color: var(--bone); font-family: var(--ff-display); }

/* Grids */
.grid { display: grid; gap: clamp(1rem, .6rem + 1.4vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---------- 8. Duotone photography --------------------------------------- */
/* Vintage B&W stock treated to sit inside the gold/obsidian world */
.duo {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-3);
  isolation: isolate;
}
/* The source photography is already low-key (mean luminance ~38/255). Darkening
   it further collapsed it to within 17 levels of the page background, so it read
   as a black rectangle rather than a photograph. It gets lifted, not crushed. */
.duo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.04) brightness(1.28);
  transition: transform 1.1s var(--ease-out), filter .6s var(--ease);
}
.duo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  /* Only enough veil at the bottom edge to keep captions legible. */
  background: linear-gradient(0deg, rgba(8,8,10,.86) 0%, rgba(8,8,10,.10) 42%, transparent 66%);
}
.duo::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--hair-soft);
  border-radius: inherit;
}
.duo:hover img { transform: scale(1.045); filter: grayscale(.72) contrast(1.06) brightness(1.34); }

/* ---------- 9. Scroll reveal --------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 10. Header --------------------------------------------------- */
.masthead {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  transition: background .4s var(--ease), border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.masthead.is-stuck {
  background: rgba(8,8,10,.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--hair-soft);
}
.masthead__in {
  width: var(--shelf); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { width: 34px; height: 34px; }
.brand__wm {
  font-family: var(--ff-display); font-size: 1.15rem; color: var(--bone);
  letter-spacing: .01em; line-height: 1;
}
.brand__wm b { color: var(--gold); font-weight: 400; }
.brand__sub {
  display: block; font-family: var(--ff-mono); font-size: .5rem;
  letter-spacing: .26em; color: var(--ash-dim); text-transform: uppercase; margin-top: .28rem;
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  font-family: var(--ff-mono); font-size: var(--t-xs);
  letter-spacing: .16em; text-transform: uppercase; color: var(--ash);
  transition: color .3s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
.nav .btn { padding: .7rem 1.4rem; font-size: .6875rem; }

.burger { display: none; width: 40px; height: 40px; place-items: center; color: var(--bone); }
.burger svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .burger { display: grid; }
  .nav {
    position: fixed; inset: 76px 0 auto; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(8,8,10,.97);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-block: 1px solid var(--hair-soft);
    padding: 1rem var(--gut) 2rem;
    clip-path: inset(0 0 100% 0); opacity: 0;
    transition: clip-path .5s var(--ease-out), opacity .3s;
  }
  .nav.is-open { clip-path: inset(0 0 0 0); opacity: 1; }
  .nav a { padding: 1.05rem 0; border-bottom: 1px solid var(--hair-soft); font-size: var(--t-sm); }
  .nav .btn { margin-top: 1.5rem; justify-content: center; padding: 1rem; }
}

/* ---------- 11. Ticker (trading-floor texture) ---------------------------- */
.ticker {
  border-block: 1px solid var(--hair-soft);
  background: var(--ink-1);
  overflow: hidden;
  padding-block: .85rem;
  position: relative; z-index: 2;
}
.ticker__track {
  display: flex; gap: 3rem; width: max-content;
  animation: slide 46s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker span {
  font-family: var(--ff-mono); font-size: var(--t-xs);
  letter-spacing: .22em; text-transform: uppercase; color: var(--ash-dim);
  display: flex; align-items: center; gap: 3rem; white-space: nowrap;
}
.ticker span::after { content: "◆"; color: var(--gold); font-size: .5rem; letter-spacing: 0; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- 12. Footer --------------------------------------------------- */
.foot {
  border-top: 1px solid var(--hair-soft);
  background: var(--ink-1);
  padding-block: clamp(3rem, 2rem + 3vw, 5rem) 2rem;
  position: relative; z-index: 2;
}
.foot__grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  padding-bottom: 3rem;
}
.foot h4 {
  font-family: var(--ff-mono); font-size: var(--t-xs); letter-spacing: .24em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1.25rem;
}
.foot ul { list-style: none; padding: 0; display: grid; gap: .7rem; }
.foot a { color: var(--ash); font-size: var(--t-sm); transition: color .3s; }
.foot a:hover { color: var(--bone); }
.foot__legal {
  border-top: 1px solid var(--hair-soft); padding-top: 2rem;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between;
  font-size: var(--t-xs); color: var(--ash-dim);
}
.foot__disclaimer {
  margin-top: 2rem; font-size: var(--t-xs); line-height: 1.7;
  color: var(--ash-dim); max-width: 78ch;
}

/* ---------- 13. Forms ---------------------------------------------------- */
.field { position: relative; display: grid; gap: .5rem; }
.field label {
  font-family: var(--ff-mono); font-size: var(--t-xs);
  letter-spacing: .16em; text-transform: uppercase; color: var(--ash);
}
.input {
  width: 100%; padding: 1.05rem 1.15rem;
  background: var(--ink-1);
  border: 1px solid var(--hair-soft);
  border-radius: var(--radius);
  color: var(--bone); font-size: var(--t-base);
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.input::placeholder { color: var(--ash-dim); }
.input:focus {
  outline: none; border-color: var(--gold);
  background: var(--ink-2);
  box-shadow: 0 0 0 3px rgba(200,164,76,.12);
}
.input[aria-invalid="true"] { border-color: var(--blood); }

.form-note { font-size: var(--t-xs); color: var(--ash-dim); line-height: 1.6; }
.form-msg {
  font-family: var(--ff-mono); font-size: var(--t-xs); letter-spacing: .1em;
  padding: .85rem 1rem; border-radius: var(--radius); display: none;
}
.form-msg.is-on { display: block; }
.form-msg--ok  { background: rgba(78,140,99,.12);  border: 1px solid rgba(78,140,99,.4);  color: #8FCBA4; }
.form-msg--err { background: rgba(180,56,44,.12); border: 1px solid rgba(180,56,44,.45); color: #E08379; }

/* ---------- 14. Utilities ------------------------------------------------ */
.stack   { display: grid; gap: 1.25rem; }
.stack-s { display: grid; gap: .6rem; }
.stack-l { display: grid; gap: 2rem; }
.row     { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.center  { text-align: center; }
.center .lede, .center .display { margin-inline: auto; }
.center .eyebrow { justify-content: center; }
.mw-60   { max-width: 60ch; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pad-top-nav { padding-top: 76px; }
