/* ZNest site — global styles built on the design system */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");
@import url("./tokens.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--fg-1);
  background: var(--bg-page);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ============ Layout ============ */
.zn-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
.zn-section { padding: 96px 0; }
.zn-section--tight { padding: 64px 0; }
.zn-section--xt { padding: 120px 0; }
.zn-section--dark { background: var(--znest-navy); color: #fff; }
.zn-section--cream { background: var(--znest-off-white); }
.zn-section--white { background: #fff; }

/* ============ Type helpers ============ */
.zn-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--znest-gold-bronze);
  display: inline-block;
}
.zn-eyebrow--light { color: var(--znest-gold-300); }
.zn-gold-rule {
  display: inline-block;
  width: 36px;
  height: 2px;
  background: transparent;
  transform: skewX(-20deg);
  margin: 12px 0 16px;
}
.zn-gold-rule--light { background: transparent; }

.zn-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 0;
  color: var(--fg-1);
  text-wrap: balance;
}
.zn-display--xl { font-size: clamp(48px, 6.4vw, 84px); line-height: 1.02; }
.zn-display--lg { font-size: clamp(40px, 4.8vw, 60px); line-height: 1.05; }
.zn-display--md { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.08; }
.zn-display--sm { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.18; font-weight: 700; letter-spacing: -0.012em; }
.zn-display--inverse { color: #fff; }

.zn-lede { font-size: 18px; line-height: 1.6; color: var(--fg-2); max-width: 60ch; text-wrap: pretty; }
.zn-lede--inverse { color: rgba(255,255,255,0.78); }
.zn-body { font-size: 15px; line-height: 1.6; color: var(--fg-2); }
.zn-body--inverse { color: rgba(255,255,255,0.72); }
.zn-mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

/* ============ Buttons ============ */
.zn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 200ms var(--ease-standard),
              border-color 200ms var(--ease-standard),
              color 200ms var(--ease-standard),
              transform 120ms var(--ease-standard);
  text-decoration: none;
  white-space: nowrap;
}
.zn-btn:active { transform: translateY(1px); }
.zn-btn .zn-arrow { display: inline-block; transition: transform 200ms var(--ease-standard); }
.zn-btn:hover .zn-arrow { transform: translateX(3px); }

.zn-btn--primary { background: var(--znest-navy); color: #fff; }
.zn-btn--primary:hover { background: var(--znest-navy-700); }
.zn-btn--secondary { background: transparent; color: var(--znest-navy); border-color: var(--znest-navy-200); }
.zn-btn--secondary:hover { background: var(--znest-navy-50); border-color: var(--znest-navy-300); }
.zn-btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.30); }
.zn-btn--ghost-light:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.55); }
.zn-btn--accent {
  background: var(--znest-gold-bronze);
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  box-shadow: 0 2px 0 rgba(122, 83, 0, 0.20);
}
.zn-btn--accent:hover { background: var(--znest-gold-700); }
.zn-btn--lg { padding: 16px 28px; font-size: 15px; }
.zn-btn--sm { padding: 9px 14px; font-size: 13px; }

/* arrow link */
.zn-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--znest-navy);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-standard);
  cursor: pointer;
}
.zn-arrow-link:hover { border-bottom-color: var(--znest-gold-bronze); }
.zn-arrow-link .zn-arrow { transition: transform 200ms var(--ease-standard); }
.zn-arrow-link:hover .zn-arrow { transform: translateX(3px); }
.zn-arrow-link--light { color: var(--znest-gold-300); }
.zn-arrow-link--light:hover { color: #fff; border-bottom-color: var(--znest-gold-400); }

/* ============ Header ============ */
.zn-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 251, 246, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(14, 41, 70, 0.07);
}
.zn-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 32px;
}
.zn-header__logo { display: inline-flex; align-items: center; }
.zn-header__logo img { height: 26px; width: auto; }
.zn-header__nav { display: flex; align-items: center; gap: 30px; }
.zn-nav-link {
  font-size: 14px; font-weight: 500; color: var(--fg-1);
  letter-spacing: 0.005em;
  padding: 8px 0;
  position: relative;
  transition: color 200ms var(--ease-standard);
}
.zn-nav-link:hover { color: var(--znest-navy-600); }
.zn-nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--znest-gold-bronze);
  transform: skewX(-20deg);
}
.zn-header__actions { display: flex; align-items: center; gap: 18px; }
.zn-header__login { font-size: 14px; font-weight: 500; color: var(--fg-1); }
.zn-header__login:hover { color: var(--znest-navy-600); }

/* Hamburger button — hidden by default, shown on mobile */
.zn-header__hamburger {
  display: none;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.zn-header__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--znest-navy);
  border-radius: 2px;
  transition: transform 200ms var(--ease-standard), opacity 200ms var(--ease-standard);
}
.zn-header__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.zn-header__hamburger.is-open span:nth-child(2) { opacity: 0; }
.zn-header__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.zn-header__mobile-panel {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--znest-off-white);
  z-index: 49;
  padding: 24px 24px 40px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 200ms var(--ease-standard), transform 200ms var(--ease-standard);
  pointer-events: none;
}
.zn-header__mobile-panel.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.zn-header__mobile-panel nav {
  display: flex;
  flex-direction: column;
}
.zn-mobile-nav-link {
  font-size: 22px;
  font-weight: 600;
  color: var(--fg-1);
  letter-spacing: -0.01em;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border-1);
  display: block;
}
.zn-mobile-nav-link.is-active { color: var(--znest-gold-bronze); }
.zn-mobile-nav-link--muted {
  font-size: 16px;
  color: var(--fg-3);
  margin-top: 24px;
  border-bottom: none;
}

@media (max-width: 820px) {
  .zn-header__nav { display: none; }
  .zn-header__actions { display: none; }
  .zn-header__hamburger { display: inline-flex; }
  .zn-header__mobile-panel { display: block; }
  .zn-header__inner { height: 64px; gap: 16px; }
  .zn-header__logo img { height: 22px; }
}

.zn-cta-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--znest-gold-bronze);
  color: #fff;
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 200ms var(--ease-standard), transform 120ms var(--ease-standard);
}
.zn-cta-pill .zn-cta-pill__price {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 8px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.zn-cta-pill:hover { background: var(--znest-gold-700); }
.zn-cta-pill:active { transform: translateY(1px); }

/* ============ Footer ============ */
.zn-footer {
  background: var(--znest-navy-900);
  color: rgba(255,255,255,0.72);
  padding: 80px 0 32px;
}
.zn-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.zn-footer__brand img { height: 24px; }
.zn-footer__tagline { margin-top: 18px; font-size: 13px; line-height: 1.6; max-width: 28ch; color: rgba(255,255,255,0.58); }
.zn-footer__col h6 {
  margin: 0 0 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: #fff;
}
.zn-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.zn-footer__col a {
  font-size: 13.5px; color: rgba(255,255,255,0.62);
  transition: color 200ms var(--ease-standard);
}
.zn-footer__col a:hover { color: #fff; }
.zn-footer__base {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 26px;
  font-size: 12px; color: rgba(255,255,255,0.42);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ============ Decorative ============ */
.zn-slash {
  display: inline-block;
  width: 36px; height: 5px;
  background: var(--znest-gold-bronze);
  transform: skewX(-20deg);
}
.zn-slash--lg { width: 54px; height: 8px; }

/* gold parallelogram echoes the wordmark slash */
.zn-parallel {
  position: absolute;
  background: var(--znest-gold-bronze);
  transform: skewX(-20deg);
  opacity: 0.18;
  pointer-events: none;
}

/* ============ Tags / badges ============ */
.zn-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 2px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--znest-navy-50); color: var(--znest-navy);
  border: 1px solid var(--znest-navy-100);
}
.zn-tag--gold { background: rgba(184, 134, 11, 0.10); color: var(--znest-gold-bronze); border-color: rgba(184, 134, 11, 0.30); }
.zn-tag--inverse { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.16); }
.zn-tag--dot::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--znest-gold-bronze);
  display: inline-block;
}

/* ============ Card primitive ============ */
.zn-card {
  background: #fff;
  border: 1px solid var(--border-1);
  border-radius: 6px;
  padding: 28px;
  transition: border-color 200ms var(--ease-standard),
              box-shadow 200ms var(--ease-standard),
              transform 200ms var(--ease-standard);
}
.zn-card--hover:hover {
  border-color: var(--znest-navy-200);
  box-shadow: var(--shadow-md);
}

/* gold focus rule on cards */
.zn-card__rule { display: inline-block; width: 28px; height: 2px; background: var(--znest-gold-bronze); transform: skewX(-20deg); margin-bottom: 16px; }

/* ============ Grid utilities ============ */
.zn-grid { display: grid; gap: 24px; }
.zn-grid--2 { grid-template-columns: repeat(2, 1fr); }
.zn-grid--3 { grid-template-columns: repeat(3, 1fr); }
.zn-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ============ Skyline strip (decorative) ============ */
.zn-skyline {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 180px;
  opacity: 0.10;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 180' preserveAspectRatio='none'><g fill='%23B7C7D6'><rect x='0' y='100' width='40' height='80'/><rect x='42' y='70' width='56' height='110'/><rect x='100' y='90' width='30' height='90'/><rect x='132' y='40' width='60' height='140'/><rect x='196' y='80' width='40' height='100'/><rect x='240' y='30' width='44' height='150'/><rect x='288' y='95' width='30' height='85'/><rect x='320' y='60' width='80' height='120'/><rect x='402' y='100' width='28' height='80'/><rect x='434' y='20' width='70' height='160'/><rect x='508' y='90' width='40' height='90'/><rect x='552' y='55' width='60' height='125'/><rect x='616' y='100' width='30' height='80'/><rect x='650' y='10' width='52' height='170'/><rect x='706' y='80' width='40' height='100'/><rect x='750' y='50' width='66' height='130'/><rect x='820' y='95' width='32' height='85'/><rect x='856' y='40' width='80' height='140'/><rect x='940' y='100' width='30' height='80'/><rect x='974' y='65' width='52' height='115'/><rect x='1030' y='90' width='40' height='90'/><rect x='1074' y='30' width='70' height='150'/><rect x='1148' y='100' width='30' height='80'/><rect x='1182' y='55' width='60' height='125'/><rect x='1246' y='90' width='36' height='90'/><rect x='1286' y='25' width='66' height='155'/><rect x='1356' y='100' width='30' height='80'/><rect x='1390' y='70' width='54' height='110'/><rect x='1448' y='85' width='40' height='95'/><rect x='1492' y='35' width='72' height='145'/><rect x='1568' y='100' width='32' height='80'/></g></svg>");
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
}

/* ============ Logo strip (text-style firm marks) ============ */
.zn-firm-mark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 17px;
  color: var(--znest-navy);
  opacity: 0.62;
  display: inline-flex; align-items: center; gap: 6px;
}
.zn-firm-mark--light { color: #fff; opacity: 0.62; }
.zn-firm-mark__dot {
  width: 6px; height: 6px;
  background: var(--znest-gold-bronze);
  transform: skewX(-20deg);
  display: inline-block;
}

/* ============ Scroll reveal stub ============ */
@media (prefers-reduced-motion: no-preference) {
  .zn-reveal { opacity: 0; transform: translateY(8px); transition: opacity 600ms var(--ease-standard), transform 600ms var(--ease-standard); }
  .zn-reveal.is-visible { opacity: 1; transform: none; }
}

/* ============ Forms ============ */
.zn-field {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: 4px;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg-1);
  transition: border-color 200ms var(--ease-standard), box-shadow 200ms var(--ease-standard);
}
.zn-field:focus { outline: none; border-color: var(--znest-gold-bronze); box-shadow: var(--shadow-focus); }
.zn-field-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-3);
}

/* small KPI block */
.zn-kpi { display: flex; flex-direction: column; gap: 4px; }
.zn-kpi__label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.zn-kpi__value { font-size: 28px; font-weight: 700; color: var(--fg-1); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.zn-kpi__delta { font-family: var(--font-mono); font-size: 12px; }
.zn-kpi__delta--up { color: var(--znest-success); }
.zn-kpi__delta--down { color: var(--znest-danger); }
.zn-kpi--inverse .zn-kpi__label { color: rgba(255,255,255,0.55); }
.zn-kpi--inverse .zn-kpi__value { color: #fff; }

/* =====================================================================
   GLOBAL MOBILE RULES
   ===================================================================== */

@media (max-width: 820px) {
  /* Tighter container padding on mobile */
  .zn-container { padding: 0 20px; }

  /* Section padding reduced */
  .zn-section { padding: 56px 0; }
  .zn-section--tight { padding: 40px 0; }
  .zn-section--xt { padding: 64px 0; }

  /* Footer collapses to a single column stack */
  .zn-footer { padding: 56px 0 24px; }
  .zn-footer__grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 40px;
  }
  .zn-footer__base {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 20px;
    font-size: 11px;
    text-align: left;
  }

  /* Display sizes scale down */
  .zn-display--xl { font-size: clamp(40px, 9vw, 60px); }
  .zn-display--lg { font-size: clamp(34px, 8vw, 48px); }
  .zn-display--md { font-size: clamp(28px, 7vw, 40px); }
  .zn-display--sm { font-size: clamp(22px, 6vw, 28px); }
  .zn-lede { font-size: 16px; }

  /* Buttons */
  .zn-btn { padding: 12px 18px; font-size: 13.5px; }
  .zn-btn--lg { padding: 14px 22px; font-size: 14px; }

  /* Card padding tighter */
  .zn-card { padding: 22px; }

  /* Generic grid collapses to single column */
  .zn-grid--2, .zn-grid--3, .zn-grid--4 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .zn-section { padding: 44px 0; }
  .zn-footer__base { font-size: 10.5px; }
}
