/* ================================================================
   FabCore Consulting — Shared Stylesheet
   ─────────────────────────────────────
   Sections:
   1.  Fonts
   2.  Design Tokens
   3.  Reset & Base
   4.  Skip Link
   5.  Navigation
   6.  Mobile Menu
   7.  Buttons
   8.  Page Hero (inner pages)
   9.  Section Layouts & Typography
   10. Footer
   11. Scroll Reveal
   12. Responsive
   ================================================================ */

/* 1. Fonts (self-hosted — no external requests)
   ────────────────────────────────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* 2. Design Tokens
   ──────────────── */
:root {
  /* Brand palette */
  --brand:         #521262;
  --brand-hover:   #6b1a80;
  --brand-light:   #7b3bbd;
  --lilac:         #dcc8ff;
  --pale:          #f3eeff;

  /* Neutrals */
  --ink:           #1a0b2e;
  --body:          #2d1f45;
  --muted:         #7a6b90;
  --border:        #e2d9f0;
  --surface:       #fafafe;
  --tint:          #f0ebf8;
  --white:         #ffffff;

  /* Elevation */
  --shadow-sm:     0 2px 8px rgba(82, 18, 98, 0.08);
  --shadow-md:     0 4px 24px rgba(82, 18, 98, 0.12);
  --shadow-lg:     0 8px 48px rgba(82, 18, 98, 0.22);

  /* Motion */
  --ease:          0.25s ease;
  --ease-bounce:   0.35s cubic-bezier(0.22, 0.68, 0, 1.2);

  /* Layout */
  --nav-h:         68px;
  --content-max:   1120px;
  --gutter:        6%;
}


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

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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--white);
  color: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--lilac);
  color: var(--brand);
}

/* Accessible focus ring for keyboard users */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Remove default button styles */
button {
  font-family: inherit;
}


/* 4. Skip Link
   ─────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 18px;
  background: var(--brand);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  transition: top var(--ease);
}

.skip-link:focus {
  top: 0;
}


/* 5. Navigation
   ───────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease);
}

.site-nav.scrolled {
  box-shadow: var(--shadow-md);
}

/* Logo */
.nav-logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: inline-block;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 7px;
  transition: color var(--ease), background var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--brand);
  background: var(--pale);
}

/* CTA button in nav */
.nav-cta a {
  background: var(--brand) !important;
  color: var(--white) !important;
  padding: 8px 20px !important;
  font-weight: 700 !important;
  transition: background var(--ease), transform var(--ease) !important;
}

.nav-cta a:hover {
  background: var(--brand-hover) !important;
  transform: translateY(-1px);
}

/* Hamburger toggle button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 7px;
  transition: background var(--ease);
}

.nav-toggle:hover {
  background: var(--tint);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
  transform-origin: center;
}

/* Animated X when open */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* 6. Mobile Menu
   ────────────── */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  z-index: 190;
  background: var(--white);
  padding: 24px var(--gutter) 40px;
  overflow-y: auto;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  display: block;
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 500;
  color: var(--body);
  border-radius: 10px;
  transition: background var(--ease), color var(--ease);
}

.nav-mobile a:hover,
.nav-mobile a[aria-current="page"] {
  background: var(--pale);
  color: var(--brand);
}

.nav-mobile .mobile-cta {
  display: block;
  margin-top: 16px;
  padding: 16px;
  background: var(--brand);
  color: var(--white) !important;
  text-align: center;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  transition: background var(--ease);
}

.nav-mobile .mobile-cta:hover {
  background: var(--brand-hover);
}


/* 7. Buttons
   ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(82, 18, 98, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--lilac);
}

.btn-outline:hover {
  border-color: var(--brand);
  background: var(--pale);
}


/* 8. Page Hero (inner pages)
   ──────────────────────────── */
main {
  padding-top: var(--nav-h);
}

.page-hero {
  padding: 80px var(--gutter) 72px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 85% 50%, rgba(123, 59, 189, 0.2), transparent);
  pointer-events: none;
}

.page-hero__tag {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lilac);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.page-hero__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.page-hero__lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 16px;
  max-width: 540px;
  line-height: 1.75;
  position: relative;
  z-index: 1;
}


/* 9. Section Layouts & Typography
   ─────────────────────────────── */
.section {
  padding: 88px var(--gutter);
}

.section--surface { background: var(--surface); }
.section--tint    { background: var(--tint); }
.section--pale    { background: var(--pale); }

.section--ink {
  background: var(--ink);
}

.section--ink .tag,
.section--ink .section-tag {
  color: var(--lilac);
}

.section--ink .section-title {
  color: var(--white);
}

.section--ink .section-lead {
  color: rgba(255, 255, 255, 0.5);
}

/* Label above headings */
.section-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: 14px;
}

/* Section headings */
.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 14px;
}

/* Section lead paragraph */
.section-lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 580px;
}

/* Text-centred section header block */
.section-header--center {
  text-align: center;
}

.section-header--center .section-lead {
  margin: 0 auto;
}


/* 10. Footer
    ──────── */
.site-footer {
  background: var(--ink);
  padding: 64px var(--gutter) 32px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand__logo {
  height: 36px;
  width: auto;
  display: block;
  margin-bottom: 14px;
  filter: brightness(0) invert(1);
}

.footer-brand__tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.7;
  max-width: 230px;
}

.footer-col__heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 10px;
  transition: color var(--ease);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
}


/* 11. Scroll Reveal
    ──────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}


/* 12. Article / Blog Post Pages
   ──────────────────────────── */

/* Hero image banner */
.post-hero {
  position: relative;
  height: 480px;
  overflow: hidden;
  background: var(--ink);
}

.post-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.45;
}

.post-hero__overlay {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px var(--gutter);
  background: linear-gradient(to top, rgba(15,10,26,.82) 0%, transparent 55%);
}

.post-hero__tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(220,200,255,.18);
  border: 1px solid rgba(220,200,255,.3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lilac);
  margin-bottom: 16px;
  width: fit-content;
}

.post-hero__title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 820px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.post-meta__item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
  font-weight: 500;
}

.post-meta__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
}

/* Article layout: narrow reading column + optional sidebar */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px var(--gutter) 88px;
  align-items: start;
}

/* Reading column */
.article-body {
  min-width: 0;
}

.article-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 40px 0 14px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 28px 0 10px;
  font-style: italic;
}

.article-body p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 20px;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body ul,
.article-body ol {
  margin: 8px 0 20px 22px;
}

.article-body li {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--body);
  font-weight: 700;
}

.article-body blockquote {
  border-left: 3px solid var(--brand);
  background: var(--pale);
  padding: 20px 24px;
  border-radius: 0 10px 10px 0;
  margin: 32px 0;
}

.article-body blockquote p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  font-style: italic;
  line-height: 1.65;
  margin-bottom: 0;
}

.article-body .section-intro {
  font-size: 1.1rem;
  color: var(--body);
  line-height: 1.85;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.sidebar-card {
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}

.sidebar-card__heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.sidebar-toc a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  padding: 5px 10px;
  border-left: 2px solid var(--border);
  margin-bottom: 2px;
  border-radius: 0 5px 5px 0;
  line-height: 1.4;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}

.sidebar-toc a:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--pale);
}

.sidebar-author {
  text-align: center;
}

.sidebar-author__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.sidebar-author__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: block;
}

.sidebar-author__role {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

/* Back to blog breadcrumb */
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.post-breadcrumb a {
  color: var(--brand);
  font-weight: 600;
  transition: color var(--ease);
}

.post-breadcrumb a:hover {
  color: var(--brand-hover);
}

/* End-of-post CTA */
.post-cta {
  background: var(--ink);
  padding: 72px var(--gutter);
  text-align: center;
}

.post-cta__tag {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lilac);
  margin-bottom: 16px;
}

.post-cta__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.025em;
  max-width: 520px;
  margin: 0 auto 14px;
  line-height: 1.2;
}

.post-cta__lead {
  font-size: 1rem;
  color: rgba(255,255,255,.48);
  line-height: 1.8;
  max-width: 460px;
  margin: 0 auto 32px;
}

/* Article responsive */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px var(--gutter) 72px;
  }

  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .post-hero {
    height: 360px;
  }
}

@media (max-width: 580px) {
  .post-hero {
    height: 300px;
  }

  .post-hero__overlay {
    padding: 32px var(--gutter);
  }

  .article-sidebar {
    grid-template-columns: 1fr;
  }

  .article-layout {
    padding: 40px var(--gutter) 64px;
  }
}

/* 14. Responsive
    ──────────── */
@media (max-width: 860px) {
  .section {
    padding: 72px var(--gutter);
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 5%;
  }

  /* Show hamburger, hide desktop links */
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 64px var(--gutter);
  }

  .page-hero {
    padding: 64px var(--gutter) 56px;
  }

  .footer-grid {
    gap: 36px;
  }
}
