/* =========================================================
   SKB Advisors — dark premium redesign
   Design tokens → base → layout → components → responsive → motion
   ========================================================= */

:root {
  /* canvas & surfaces — refined neutral graphite */
  --bg: #111012;
  --bg-2: #151417;
  --surface: #1B1A1E;
  --surface-2: #211F24;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* brand accents — the logo's red, used with restraint */
  --accent: #E2342E;          /* the logo red */
  --accent-2: #F23A33;        /* a brighter red for small accents (legibility on dark) */
  --accent-soft: rgba(226, 52, 46, 0.13);
  --brand-red: #E2342E;       /* from the logo compass */
  --brand-blue: #1F84D6;      /* from the logo compass — cool counterpoint */

  /* text — crisp neutral */
  --text: #ECEDF0;
  --text-2: #ABAEB6;
  --muted: #7A7E87;

  /* shape & motion */
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --grad: linear-gradient(100deg, #EE433B, #C5222A);
}

/* ----------------------------- reset / base ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: clamp(15px, 0.5vw + 14px, 17px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
}

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 200;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ----------------------------- layout ----------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(72px, 11vw, 130px); position: relative; }
.section-alt { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.section-alt::before,
.section-alt::after {
  content: "";
  position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.section-alt::before { top: 0; }
.section-alt::after { bottom: 0; }

.section-head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head h2 { font-size: clamp(30px, 4.5vw, 46px); margin-bottom: 14px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 14px;
}

.lead { color: var(--text-2); font-size: clamp(16px, 1.4vw, 19px); margin: 0; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ----------------------------- buttons ----------------------------- */
.btn {
  --bg-btn: transparent;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn .ic { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .ic { transform: translateX(3px); }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(226, 52, 46, 0.5);
}
.btn-primary:hover { box-shadow: 0 16px 38px -8px rgba(226, 52, 46, 0.68); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

.btn-lg { padding: 16px 30px; font-size: 16px; }

/* svg icon defaults (line style) */
svg[viewBox] { fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }

/* ----------------------------- header ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 14, 26, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 34px; width: auto; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav > a:not(.btn) {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; border-radius: 2px;
  background: var(--grad);
  transition: width 0.25s var(--ease);
}
.nav > a:not(.btn):hover { color: var(--text); }
.nav > a:not(.btn):hover::after { width: 100%; }
.nav-cta { padding: 10px 18px; font-size: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; margin-inline: auto;
  background: var(--text); border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

/* ----------------------------- hero ----------------------------- */
.hero { position: relative; padding-block: clamp(90px, 16vw, 170px) clamp(60px, 9vw, 110px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.5; pointer-events: none;
}
.glow-a {
  width: 620px; height: 620px; top: -200px; left: -120px;
  background: radial-gradient(circle, rgba(226, 52, 46, 0.42), transparent 65%);
}
.glow-b {
  width: 560px; height: 560px; top: -120px; right: -140px;
  background: radial-gradient(circle, rgba(150, 28, 28, 0.3), transparent 65%);
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 0%, transparent 75%);
  opacity: 0.6;
}

.hero-inner { max-width: 920px; }
.hero .eyebrow {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-2);
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-red { background: var(--brand-red); }
.dot-blue { background: var(--brand-blue); margin-left: -3px; }

.hero-title {
  font-size: clamp(34px, 6.4vw, 70px);
  margin: 22px 0 24px;
  max-width: 16ch;
}
.hero-sub { color: var(--text-2); font-size: clamp(17px, 1.6vw, 21px); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-tags {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 44px;
}
.hero-tags li {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

/* ----------------------------- grids ----------------------------- */
.grid { display: grid; gap: clamp(16px, 1.8vw, 22px); }
.grid-services { grid-template-columns: repeat(4, 1fr); }
.grid-why { grid-template-columns: repeat(4, 1fr); }
.grid-media { grid-template-columns: repeat(3, 1fr); }

/* ----------------------------- service cards ----------------------------- */
.card {
  position: relative;
  padding: 28px 24px 26px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px circle at 50% -20%, var(--accent-soft), transparent 70%);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card:hover::before { opacity: 1; }
.card-num {
  position: absolute; top: 20px; right: 22px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--muted);
}
.card-icon, .tile-icon, .media-icon, .fact-ic {
  display: inline-grid; place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(226, 52, 46, 0.25);
  color: var(--accent-2);
}
.card-icon { width: 52px; height: 52px; margin-bottom: 18px; }
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 20px; margin-bottom: 14px; }
.card-list { display: grid; gap: 9px; }
.card-list li {
  position: relative; padding-left: 20px;
  color: var(--text-2); font-size: 15px;
}
.card-list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--grad);
}

/* ----------------------------- why tiles ----------------------------- */
.tile {
  padding: 26px 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
              background 0.35s var(--ease);
}
.tile:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}
.tile-icon { width: 48px; height: 48px; margin-bottom: 16px; }
.tile-icon svg { width: 24px; height: 24px; }
.tile h3 { font-size: 18px; margin-bottom: 8px; }
.tile p { margin: 0; color: var(--text-2); font-size: 15px; }

/* ----------------------------- about ----------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.about-copy h2 { font-size: clamp(30px, 4.2vw, 44px); margin-bottom: 22px; }
.about-text { color: var(--text-2); font-size: clamp(16px, 1.3vw, 18px); margin: 0 0 28px; }

.about-panel {
  position: relative;
  padding: 30px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
}
.panel-mark {
  position: absolute; right: -50px; top: -50px;
  width: 220px; height: 220px;
  background: url("../assets/logo-mark.png") center / contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
}
.facts { display: grid; gap: 18px; position: relative; }
.facts li { display: flex; gap: 14px; align-items: flex-start; }
.fact-ic { width: 44px; height: 44px; flex: 0 0 44px; }
.fact-ic svg { width: 22px; height: 22px; }
.facts strong, .contact-details strong {
  display: block; font-family: "Space Grotesk", sans-serif;
  font-weight: 600; font-size: 16px; color: var(--text);
}
.facts span, .contact-details span { font-size: 14px; color: var(--muted); }

/* ----------------------------- media ----------------------------- */
.media-card {
  display: flex; flex-direction: column;
  padding: 26px 24px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}
.media-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.media-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.media-icon { width: 44px; height: 44px; }
.media-icon svg { width: 22px; height: 22px; }
.media-tag {
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2);
}
.media-date { font-size: 13px; color: var(--muted); font-weight: 500; }
.media-text { color: var(--text-2); font-size: 15px; margin: 10px 0 20px; flex: 1; }
.media-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 15px; color: var(--accent);
  align-self: flex-start;
}
.media-link .ic { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.media-link:hover { color: var(--accent-2); }
.media-link:hover .ic { transform: translate(2px, -2px); }

/* ----------------------------- contact ----------------------------- */
.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
  padding: clamp(32px, 5vw, 60px);
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
}
.contact-bg { position: absolute; inset: 0; z-index: 0; }
.glow-c {
  position: absolute; width: 480px; height: 480px;
  right: -120px; bottom: -200px;
  background: radial-gradient(circle, rgba(226, 52, 46, 0.28), transparent 65%);
  filter: blur(80px);
}
.contact-copy, .contact-details { position: relative; z-index: 1; }
.contact-copy h2 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 16px; max-width: 18ch; }
.contact-copy .btn { margin-top: 26px; }
.contact-details { display: grid; gap: 22px; }
.contact-details li { display: flex; gap: 14px; align-items: flex-start; }
.contact-details a { color: var(--accent); transition: color 0.2s var(--ease); }
.contact-details a:hover { color: var(--accent-2); }

/* ----------------------------- footer ----------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding-top: clamp(50px, 7vw, 80px);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(28px, 5vw, 60px);
  padding-bottom: 44px;
}
.footer-logo { height: 32px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); font-size: 15px; max-width: 38ch; margin: 0; }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav h4, .footer-contact h4 {
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 6px; font-weight: 600;
}
.footer-nav a { color: var(--text-2); font-size: 15px; transition: color 0.2s var(--ease); width: max-content; }
.footer-nav a:hover { color: var(--accent); }
.footer-contact address { font-style: normal; color: var(--text-2); font-size: 15px; line-height: 1.9; }
.footer-contact a { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  padding-block: 24px;
  border-top: 1px solid var(--border);
}
.footer-bottom p { margin: 0; color: var(--muted); font-size: 14px; }
.to-top {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: color 0.2s var(--ease);
}
.to-top .ic { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.to-top:hover { color: var(--accent); }
.to-top:hover .ic { transform: translateY(-3px); }

/* ----------------------------- reveal animation ----------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
/* stagger children within a grid */
.grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.grid .reveal:nth-child(5) { transition-delay: 0.10s; }
.grid .reveal:nth-child(6) { transition-delay: 0.16s; }
.grid .reveal:nth-child(7) { transition-delay: 0.22s; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1024px) {
  .grid-services { grid-template-columns: repeat(2, 1fr); }
  .grid-why { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 84vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    padding: 96px 28px 32px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: -30px 0 60px -30px rgba(0,0,0,0.8);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 90;
  }
  .nav.open { transform: translateX(0); }
  .nav > a:not(.btn) { font-size: 18px; padding: 12px 0; width: 100%; }
  .nav > a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: 14px; width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
  .nav-toggle { display: flex; z-index: 95; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .grid-media { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .grid-services { grid-template-columns: 1fr; }
  .grid-why { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 400px) {
  .grid-why { grid-template-columns: 1fr; }
}

/* ----------------------------- reduced motion ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
