/* ============================================================
   B2B Profit — Shared Design System
   Common CSS for all templates (landing, article, category)
   ============================================================ */

/* ── CSS Variables ───────────────────────────────── */
:root {
  --bg: #0d0d0f;
  --bg2: #131316;
  --bg3: #1a1a1f;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text: #f0ede8;
  --muted: #8a8780;
  --accent: #c9a96e;
  --accent2: #8b6fff;
  --danger: #ff4d4d;
  --white: #ffffff;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Onest', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none !important;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Container ───────────────────────────────────── */
.inner {
  max-width: 1500px;
  margin: 0 auto;
  width: 100%;
}

/* ── Navigation ──────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(13,13,15,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

nav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  padding: 0.55rem 1.4rem;
  border-radius: 2px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav-cta:hover {
  opacity: 0.88;
}

/* ── Hamburger (mobile) ──────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile menu overlay ─────────────────────────── */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: rgba(13,13,15,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.nav-mobile-menu.is-open {
  display: flex;
}

.nav-mobile-menu a {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-mobile-menu a:hover {
  color: var(--accent);
}

.nav-mobile-menu a.nav-cta {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--bg);
  background: var(--accent);
  padding: 0.8rem 2rem;
  border-radius: 2px;
  margin-top: 1rem;
}

/* ── Footer ──────────────────────────────────────── */
footer {
  padding: 3rem 3rem 2rem;
  border-top: 1px solid var(--border);
}

footer .inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col-title {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.footer-col a {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-col a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-left {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-left span {
  opacity: 0.5;
}

.footer-right {
  display: flex;
  gap: 2rem;
}

.footer-right a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-right a:hover {
  color: var(--text);
}

/* ── Buttons ─────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  padding: 1rem 2rem;
  border-radius: 2px;
  text-decoration: none;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.btn-ghost:hover {
  color: var(--text);
}

/* ── Section divider ─────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0;
  border: none;
}

/* ── CTA Section (reusable) ──────────────────────── */
.cta-section {
  padding: 3.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(ellipse at center, rgba(139,111,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.cta-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  position: relative;
}

.cta-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  position: relative;
}

.cta-text {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  padding: 0.9rem 2.2rem;
  border-radius: 2px;
  text-decoration: none;
  transition: opacity 0.2s;
  position: relative;
  border: none;
  cursor: pointer;
}

.cta-btn:hover {
  opacity: 0.88;
}

/* ── Animations ──────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
}

.fade-up.is-visible {
  animation: fadeUp 0.7s ease forwards;
}

/* ── Highlight box (articles) ────────────────────── */
.highlight-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 4px;
  padding: 1.8rem;
  margin: 2.5rem 0;
}

.highlight-box p {
  margin: 0;
  font-size: 0.95rem;
}

.highlight-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

/* ── Form styles (shared) ────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.form-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.form-input:focus {
  border-color: rgba(201,169,110,0.4);
}

.form-input option {
  background: var(--bg2);
  color: var(--text);
}

.form-submit {
  display: block;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  padding: 0.9rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: var(--sans);
}

.form-submit:hover {
  opacity: 0.88;
}

.form-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 0.8rem;
  opacity: 0.6;
}

/* ── Section Tag (shared) ───────────────────────── */
.section-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ── CTA Section (shared across pages) ──────────── */
section.cta {
  background: var(--bg2);
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 5rem 1.5rem;
}

section.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50vw;
  height: 50vw;
  background: radial-gradient(ellipse at center, rgba(201,169,110,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

section.cta .cta-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
}

section.cta .cta-title em {
  font-style: italic;
  color: var(--accent);
}

.cta-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 3rem;
  line-height: 1.7;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Responsive — shared breakpoints ─────────────── */
@media (max-width: 1024px) {
  nav .inner {
    padding: 1rem 1.25rem;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  footer {
    padding: 2rem 1.25rem;
  }

  .footer-nav {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }

  .footer-right {
    justify-content: center;
  }

  .cta-section {
    padding: 2.5rem 1.5rem;
  }

  .cta-form {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-cta {
    font-size: 12px;
    padding: 0.5rem 1rem;
  }
}
