/* =============================================================
   HLP CREDIT SOLUTIONS · LUXURY BRAND CSS v3.0
   Wealth-advisory restraint. Black, white, signal red only.
   No gold. No navy. No blur. No hype.
   ============================================================= */

/* --- Fonts (self-hosted where possible, google fallback) ------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Allison&display=swap');

/* --- Design tokens as CSS variables ---------------------------- */
:root {
  /* Color · Ink family */
  --ink:            #0A0A0A;
  --obsidian:       #141414;
  --graphite:       #1E1E1E;
  --iron:           #2A2A2A;

  /* Color · Neutrals */
  --smoke:          #6B6B6B;
  --ash:            #9E9E9E;
  --silver:         #D6D6D6;
  --cloud:          #EEEEEE;
  --paper:          #F7F5F2;
  --bone:           #FBFAF7;
  --pure:           #FFFFFF;

  /* Color · Signal */
  --signal:         #ED1C24;
  --signal-deep:    #C41219;
  --signal-ink:     #7A0A0F;
  --signal-veil:    #FDE7E8;

  /* Semantic · Light theme */
  --bg:             var(--paper);
  --bg-alt:         var(--bone);
  --bg-card:        var(--pure);
  --text:           var(--ink);
  --text-muted:     var(--smoke);
  --text-quiet:     var(--ash);
  --rule:           #E5E3DE;
  --accent:         var(--signal);
  --accent-hover:   var(--signal-deep);

  /* Type */
  --font-display:   'Playfair Display', 'GT Super Display', Georgia, serif;
  --font-editorial: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:      'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --font-script:    'Allison', 'Sunset Script', cursive;

  /* Space */
  --gutter:         clamp(1.25rem, 4vw, 4rem);

  /* Containers */
  --w-narrow:       720px;
  --w-reading:      820px;
  --w-prose:        980px;
  --w-default:      1200px;
  --w-wide:         1440px;

  /* Border */
  --hairline:       1px solid rgba(10, 10, 10, 0.08);
  --hairline-strong: 1px solid rgba(10, 10, 10, 0.14);

  /* Shadow */
  --shadow-card:    0 1px 2px rgba(10, 10, 10, 0.04), 0 4px 12px rgba(10, 10, 10, 0.05);
  --shadow-raised:  0 4px 20px rgba(10, 10, 10, 0.08);
  --shadow-editorial: 0 30px 60px -20px rgba(10, 10, 10, 0.18);
}

/* Dark theme mode */
[data-theme="dark"] {
  --bg:             var(--obsidian);
  --bg-alt:         var(--graphite);
  --bg-card:        var(--graphite);
  --text:           var(--pure);
  --text-muted:     #B8B8B8;
  --text-quiet:     #7A7A7A;
  --rule:           var(--iron);
  --hairline:       1px solid rgba(255, 255, 255, 0.08);
  --hairline-strong: 1px solid rgba(255, 255, 255, 0.14);
}

/* --- Reset + base ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
::selection { background: var(--signal); color: var(--pure); }

/* --- Typography ------------------------------------------------ */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--signal);
}

.display-xl { font-family: var(--font-display); font-weight: 700; font-size: clamp(4.5rem, 10vw, 9rem); line-height: 0.95; letter-spacing: -0.03em; }
.display-lg { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.5rem, 7vw, 6.5rem); line-height: 1.02; letter-spacing: -0.025em; }
.display-md { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.75rem, 5vw, 4.5rem); line-height: 1.08; letter-spacing: -0.02em; }
.display-sm { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.15; letter-spacing: -0.015em; }
.h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1.15; letter-spacing: -0.015em; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.2; letter-spacing: -0.01em; }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; line-height: 1.3; }
.h4 { font-family: var(--font-body); font-weight: 600; font-size: 1.125rem; line-height: 1.4; }
.lede { font-family: var(--font-editorial); font-weight: 400; font-size: clamp(1.125rem, 1.6vw, 1.5rem); line-height: 1.55; color: var(--text-muted); letter-spacing: -0.005em; }
.script { font-family: var(--font-script); font-weight: 400; }
.italic-serif { font-family: var(--font-display); font-style: italic; font-weight: 400; }

/* --- Signal accent utilities ----------------------------------- */
.signal-mark { color: var(--signal); }
.signal-underline {
  background-image: linear-gradient(var(--signal), var(--signal));
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: 0 100%;
  padding-bottom: 4px;
}

/* --- Layout containers ----------------------------------------- */
.container { max-width: var(--w-default); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--w-narrow); margin: 0 auto; padding: 0 var(--gutter); }
.container-reading { max-width: var(--w-reading); margin: 0 auto; padding: 0 var(--gutter); }
.container-prose { max-width: var(--w-prose); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: var(--w-wide); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(4rem, 10vw, 10rem) 0; }
.section-sm { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-lg { padding: clamp(6rem, 14vw, 14rem) 0; }
.section-ink { background: var(--obsidian); color: var(--pure); }
.section-ink .text-muted { color: #B8B8B8; }

/* --- Navigation ------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px);
  border-bottom: var(--hairline);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--gutter);
  max-width: var(--w-wide);
  margin: 0 auto;
}
.nav__brand { display: flex; align-items: center; gap: 0.75rem; }
.nav__brand img { height: 40px; width: auto; }
.nav__brand-name { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 2.5rem; align-items: center; }
.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav__link:hover { color: var(--text); }
.nav__link--active { color: var(--text); }

/* --- Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border-radius: 2px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn__arrow { transition: transform 0.25s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--primary { background: var(--signal); color: var(--pure); }
.btn--primary:hover { background: var(--signal-deep); }
.btn--ink { background: var(--ink); color: var(--pure); }
.btn--ink:hover { background: var(--obsidian); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--pure); }
.btn--ghost { color: var(--text); background: transparent; padding-left: 0; padding-right: 0; }
.btn--ghost::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--ink);
  width: 100%;
  margin-top: 4px;
  transition: background 0.2s;
}
.btn--ghost:hover::after { background: var(--signal); }

/* --- Editorial cards ------------------------------------------- */
.editorial-card {
  background: var(--bg-card);
  border: var(--hairline);
  padding: clamp(1.75rem, 3vw, 3rem);
  position: relative;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.editorial-card:hover { border-color: var(--ink); }
.editorial-card__number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--signal);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}
.editorial-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.editorial-card__body {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* --- Rules & dividers ------------------------------------------ */
.rule { height: 1px; background: var(--rule); border: 0; margin: 3rem 0; }
.rule-signal { height: 2px; background: var(--signal); width: 60px; border: 0; margin: 1.5rem 0; }

/* --- Grid utilities -------------------------------------------- */
.grid { display: grid; gap: var(--gap, 2rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-editorial { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
@media (max-width: 780px) { .grid-editorial { grid-template-columns: 1fr; } }

/* --- Stat block ------------------------------------------------ */
.stat { padding: 2rem 0; border-top: 1px solid var(--rule); }
.stat__value { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.5rem, 4vw, 3.75rem); letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.stat__value .signal-mark { color: var(--signal); }
.stat__label { margin-top: 0.75rem; font-size: 0.85rem; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; font-weight: 500; }

/* --- Testimonial block ----------------------------------------- */
.pull-quote {
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}
.pull-quote::before { content: "\201C"; font-family: var(--font-display); font-size: 3em; color: var(--signal); line-height: 0; position: relative; top: 0.35em; margin-right: 0.05em; }

/* --- Footer ---------------------------------------------------- */
.footer { background: var(--obsidian); color: var(--pure); padding: 6rem 0 3rem; }
.footer a { color: #B8B8B8; transition: color 0.2s; }
.footer a:hover { color: var(--signal); }
.footer__legal { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--iron); font-size: 0.85rem; color: var(--text-quiet); display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }

/* --- Chekelah signature block ---------------------------------- */
.signature { font-family: var(--font-script); font-size: 3.5rem; line-height: 1; color: var(--signal); }

/* --- Utilities ------------------------------------------------- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-quiet { color: var(--text-quiet); }
.text-signal { color: var(--signal); }
.mono { font-family: var(--font-mono); }
.mt-6 { margin-top: 2rem; } .mt-8 { margin-top: 3rem; } .mt-10 { margin-top: 5rem; }
.mb-6 { margin-bottom: 2rem; } .mb-8 { margin-bottom: 3rem; } .mb-10 { margin-bottom: 5rem; }
.opacity-60 { opacity: 0.6; }
.tabular { font-variant-numeric: tabular-nums; }

/* --- Animations ------------------------------------------------ */
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; animation: fade-up 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.reveal-1 { animation-delay: 0.1s; }
.reveal-2 { animation-delay: 0.25s; }
.reveal-3 { animation-delay: 0.4s; }
.reveal-4 { animation-delay: 0.55s; }

/* Media queries */
@media (max-width: 780px) {
  .nav__links { gap: 1.5rem; }
  .nav__links .nav__link:not(.btn) { display: none; }
}
