/* =========================================================
   Barbarroja Consulting Services — main.css
   Design system: dark, bold, editorial
   Fonts: Playfair Display (display) + Inter (body/UI)
   ========================================================= */

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

:root {
  --red:        #C0272D;
  --red-dark:   #9a1e23;
  --red-faint:  rgba(192, 39, 45, 0.12);
  --red-border: rgba(192, 39, 45, 0.30);
  --ice:        #5B9BC8;
  --ice-faint:  rgba(91, 155, 200, 0.12);
  --ice-border: rgba(91, 155, 200, 0.30);
  --gold:       #C89A3A;
  --gold-faint: rgba(200, 154, 58, 0.12);

  --bg:         #0f0f0f;
  --bg2:        #141414;
  --bg3:        #1a1a1a;
  --bg4:        #202020;

  --text:       #e2ddd6;
  --text-muted: rgba(226, 221, 214, 0.50);
  --text-faint: rgba(226, 221, 214, 0.28);

  --border:     rgba(255, 255, 255, 0.07);
  --border-md:  rgba(255, 255, 255, 0.12);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --max-w:  1140px;
  --nav-h:  68px;
  --section-gap: 96px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* --- Typography ------------------------------------------ */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.01em;
}
.display-lg {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.01em;
}
.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
.display-em   { color: var(--red); font-style: italic; }
.display-em-w { color: #fff; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; color: #fff; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

.eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
  display: block;
}
.eyebrow--gold { color: var(--gold); }
.eyebrow--ice  { color: var(--ice); }

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 56ch;
}

/* --- Layout --------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section        { padding: var(--section-gap) 0; border-bottom: 0.5px solid var(--border); }
.section--dark  { background: var(--bg2); }
.section--darker{ background: var(--bg); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* --- Navigation ----------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 0.5px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-text      { display: flex; flex-direction: column; gap: 0; }
.logo-name      { font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; line-height: 1.1; }
.logo-sub       { font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); line-height: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}
.nav-link:hover,
.nav-link--active { color: #fff; }

.nav-cta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  margin-left: 8px;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--red-dark); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

/* --- Buttons -------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--text-muted);
  border: 0.5px solid var(--border-md);
}
.btn--outline:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

.btn--ghost {
  background: transparent;
  color: var(--ice);
  border: 0.5px solid var(--ice-border);
  padding: 10px 20px;
  font-size: 0.72rem;
}
.btn--ghost:hover { background: var(--ice-faint); color: var(--ice); }

.btn-group { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* --- Cards ---------------------------------------------- */
.card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-md); }
.card--red-accent { border-left: 2px solid var(--red); border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--red-faint);
  border: 0.5px solid var(--red-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--red);
  margin-bottom: 16px;
}
.card-icon--ice {
  background: var(--ice-faint);
  border-color: var(--ice-border);
  color: var(--ice);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}
.card-body {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Divider band --------------------------------------- */
.quote-band {
  padding: 48px 0;
  background: var(--bg2);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}
.quote-band-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.quote-rule {
  width: 3px;
  min-height: 60px;
  background: var(--red);
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 4px;
}
.quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-style: italic;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
}
.quote-text strong { color: #fff; font-style: normal; }

/* --- Stat bar ------------------------------------------- */
.stat-bar {
  display: flex;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  background: rgba(0,0,0,0.3);
}
.stat-item {
  flex: 1;
  padding: 28px 20px;
  text-align: center;
  border-right: 0.5px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--red);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --- Section headers ------------------------------------ */
.section-header { margin-bottom: 48px; }
.section-header .lead { margin-top: 12px; }

/* --- Callout block -------------------------------------- */
.callout {
  background: var(--bg3);
  border: 0.5px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 28px 28px 28px 32px;
  margin: 40px 0;
}
.callout--ice { border-left-color: var(--ice); }
.callout p:not(:last-child) { margin-bottom: 10px; }

/* --- FAQ accordion -------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 0.5px solid var(--border);
}
.faq-item:first-child { border-top: 0.5px solid var(--border); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  background: none;
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--red); }
.faq-question:hover .faq-icon { color: var(--red); }

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-faint);
  transition: transform 0.3s, color 0.2s;
}
.faq-item.is-open .faq-icon { transform: rotate(45deg); color: var(--red); }
.faq-item.is-open .faq-question { color: var(--red); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}
.faq-answer-inner {
  padding: 0 0 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.faq-answer-inner p:not(:last-child) { margin-bottom: 12px; }
.faq-answer-inner a { color: var(--ice); text-decoration: underline; text-underline-offset: 3px; }

/* --- Contact form --------------------------------------- */
.contact-form { max-width: 520px; }
.form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.form-row--half { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.form-input,
.form-select,
.form-textarea {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: rgba(192,39,45,0.5); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-faint); }
.form-select { color: var(--text-muted); }
.form-select option { background: #1a1a1a; color: var(--text); }
.form-textarea { resize: vertical; min-height: 100px; }

.form-submit {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.form-submit:hover { background: var(--red-dark); }
.form-disclaimer {
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.65;
  margin-top: 14px;
}

/* --- Page hero ------------------------------------------ */
.page-hero {
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
  border-bottom: 0.5px solid var(--border);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(192,39,45,0.14) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero--center { text-align: center; }
.page-hero--center .lead { margin: 12px auto 0; }

.hero-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
  border: 0.5px solid var(--ice-border);
  padding: 6px 16px;
  border-radius: 2px;
  margin: 20px 0 36px;
}

/* --- Footer --------------------------------------------- */
.site-footer { background: var(--bg); border-top: 0.5px solid var(--border); }

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 48px;
}

.footer-logo { display: inline-flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.footer-logo-name       { font-size: 1rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; }
.footer-logo-consulting { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }

.footer-mission {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.6;
}
.footer-tagline-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-faint);
  line-height: 1.55;
  border-left: 2px solid var(--red-border);
  padding-left: 12px;
  margin-top: 14px;
}

.footer-nav-head {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-nav a:hover { color: #fff; }
.footer-nav-col + .footer-nav-col { margin-top: 28px; }

.footer-cta-head {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.footer-cta-body {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.65;
}
.footer-cta-btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.footer-cta-btn:hover { background: var(--red-dark); color: #fff; }

.footer-bottom {
  border-top: 0.5px solid var(--border);
  background: rgba(0,0,0,0.3);
}
.footer-bottom-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-copy  { font-size: 0.75rem; color: var(--text-faint); }
.footer-legal { font-size: 0.7rem; color: rgba(255,255,255,0.18); max-width: 56ch; text-align: right; line-height: 1.6; }

/* --- Utility -------------------------------------------- */
.text-red    { color: var(--red); }
.text-ice    { color: var(--ice); }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-4  { margin-top: 1rem; }
.mt-8  { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-8  { margin-bottom: 2rem; }

/* --- Responsive ----------------------------------------- */
@media (max-width: 900px) {
  :root { --section-gap: 64px; }

  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-cta-block { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --section-gap: 48px; }

  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: var(--nav-h);
    right: 0;
    width: min(320px, 88vw);
    height: calc(100vh - var(--nav-h));
    background: var(--bg2);
    border-left: 0.5px solid var(--border);
    padding: 28px 24px;
    gap: 4px;
    z-index: 100;
    overflow-y: auto;
  }
  .nav-links.is-open .nav-link { width: 100%; padding: 10px 12px; font-size: 0.88rem; }
  .nav-links.is-open .nav-cta { margin-left: 0; margin-top: 12px; width: 100%; text-align: center; }
  .nav-backdrop.is-open { display: block; }
  .nav-toggle { display: flex; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row--half { grid-template-columns: 1fr; }
  .stat-bar { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 0.5px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-legal { text-align: left; }
  .footer-bottom-inner { flex-direction: column; gap: 10px; }
}

/* --- Reduced motion ------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* --- Logo coin (real badge on dark nav) ----------------- */
.nav-logo__coin {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #F5F3EE;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-logo__img { width: 40px; height: 40px; display: block; }
