/* =============================================================
   PUBLEX — Shared Stylesheet
   Dark theme · Yellow accent · Funnel Display headings
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ─── Custom Properties ─────────────────────────────────────── */
:root {
  --bg:       #08080d;
  --bg-2:     #0f0f16;
  --bg-3:     #15151e;
  --yellow:   #f5c800;
  --yellow-d: #d4ae00;
  --white:    #f0f0f8;
  --grey:     #8a8a9a;
  --grey-l:   #b0b0c0;
  --border:   rgba(255,255,255,0.08);
  --border-y: rgba(245,200,0,0.3);
  --shadow:   0 4px 40px rgba(0,0,0,0.5);

  --font-head: 'Funnel Display', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --container: 1160px;
  --radius:    4px;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.display {
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.h1 { font-size: clamp(2.2rem, 4vw, 3.8rem); }
.h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }
.h4 { font-size: 1.1rem; font-weight: 600; }

.label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
}

.lead {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--grey-l);
  line-height: 1.7;
  font-weight: 300;
}

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.section--lg {
  padding: 8rem 0;
}

.section--sm {
  padding: 4rem 0;
}

/* ─── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 100;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(8, 8, 13, 0.9);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.nav__logo-mark {
  width: 28px;
  height: 28px;
}

.nav__logo-text {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--grey-l);
  transition: color 0.2s;
  letter-spacing: 0;
}

.nav__links a:hover,
.nav__links a.active { color: var(--white); }

.nav__home {
  display: flex;
  align-items: center;
  line-height: 1;
}

.nav__cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bg) !important;
  background: var(--yellow);
  padding: 0.55em 1.2em;
  transition: background 0.2s !important;
}

.nav__cta:hover {
  background: var(--yellow-d);
  color: var(--bg) !important;
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: all 0.25s;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.75em;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  transition: all 0.22s var(--ease);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #000;
}

.btn--primary:hover {
  background: var(--yellow-d);
  border-color: var(--yellow-d);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--white);
}

.btn--outline:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--grey-l);
  padding-left: 0;
  padding-right: 0;
}

.btn--ghost:hover {
  color: var(--yellow);
}

.btn svg { flex-shrink: 0; }

/* ─── Yellow accent line ─────────────────────────────────────── */
.accent-line {
  display: inline-block;
  width: 40px;
  height: 3px;
  background: var(--yellow);
  margin-bottom: 1.5rem;
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 2rem;
  transition: border-color 0.25s, transform 0.25s;
  position: relative;
}

.card:hover {
  border-color: var(--border-y);
  transform: translateY(-3px);
}

.card__number {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(245,200,0,0.12);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* ─── Tag ────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(245,200,0,0.1);
  color: var(--yellow);
  border: 1px solid var(--border-y);
  padding: 0.3em 0.75em;
}

/* ─── Dividers ───────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ─── Trust Logos ────────────────────────────────────────────── */
.trust-bar {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-bar__label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 1.5rem;
}

.trust-bar__logos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
  opacity: 0.5;
  filter: grayscale(1) brightness(1.5);
}

.trust-bar__logos svg,
.trust-bar__logos img {
  height: var(--h, 22px); /* override per-logo with style="--h: 30px" */
  width: auto;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2.5rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand p {
  font-size: 0.85rem;
  color: var(--grey);
  margin-top: 1rem;
  line-height: 1.7;
  max-width: 260px;
}

.footer__col h5 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 1.25rem;
}

.footer__col a {
  display: block;
  font-size: 0.85rem;
  color: var(--grey-l);
  margin-bottom: 0.6rem;
  transition: color 0.2s;
}

.footer__col a:hover { color: var(--white); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--grey);
}

/* ─── Hero (shared) ──────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 1;
}

/* ─── Page Hero (inner pages) ────────────────────────────────── */
.page-hero {
  padding-top: 10rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Scroll Indicator ───────────────────────────────────────── */
.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ─── Grid helpers ───────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 1.5rem; }

/* ─── Fade-in animation ──────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in--delay-1 { transition-delay: 0.1s; }
.fade-in--delay-2 { transition-delay: 0.2s; }
.fade-in--delay-3 { transition-delay: 0.3s; }
.fade-in--delay-4 { transition-delay: 0.4s; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  html { font-size: 16px; }

  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(8, 8, 13, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem 1.5rem;
  }

  .nav__links.open a {
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }

  .nav__links.open a:last-child { border-bottom: none; }

  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

  .section { padding: 4rem 0; }
  .section--lg { padding: 5rem 0; }
}
