/* ==========================================================
   THEME: NavyPulse — Labsky DNA Transfer
   Color mood: deep navy + medium blue on near-white
   Typography: system sans (geometric/medium weight headings)
   Layout: full-width sections, diagonal clip-paths, 
           asymmetric two-col splits, contained grids
   ========================================================== */

:root {
  --c-primary: #3368C6;
  --c-primary-light: #4a7fd9;
  --c-primary-dark: #2550a0;
  --c-secondary: #8A91AC;
  --c-dark: #031B4E;
  --c-dark-soft: #0a2a66;
  --c-light: #F6FAFF;
  --c-white: #ffffff;
  --c-body: #4a5568;
  --c-border: #dde4f0;
  --c-muted: #94a3b8;

  --font-heading: "Segoe UI", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --w-container: 1140px;
  --gap: 2rem;
  --radius-sm: 3px;
  --radius-md: 6px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--c-body);
  background: var(--c-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--c-primary); text-decoration: none; transition: color .25s; }
a:hover { color: var(--c-primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--c-dark);
  line-height: 1.25;
  font-weight: 700;
}

.container {
  width: 100%;
  max-width: var(--w-container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- SKIP LINK ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--c-primary);
  color: var(--c-white);
  padding: .5rem 1rem;
  z-index: 9999;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: var(--c-white); }

/* ==========================================================
   HEADER / TOPBAR
   ========================================================== */
.topbar {
  background: var(--c-dark);
  color: rgba(255,255,255,.6);
  font-size: .8125rem;
  padding: .5rem 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: rgba(255,255,255,.6); }
.topbar a:hover { color: var(--c-white); }
.topbar__email::before {
  content: "✉";
  margin-right: .35rem;
}

/* ---- BRAND BAR ---- */
.brand-bar {
  background: var(--c-primary);
  color: var(--c-white);
  padding: 1.1rem 0 2.4rem;
}
.brand-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-bar__logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: -.02em;
}
.brand-bar__logo span {
  color: var(--c-dark);
}

/* ---- NAVBAR ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--c-white);
  box-shadow: 0 2px 12px rgba(3,27,78,.08);
  margin-top: -1.4rem;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 0;
}
.nav-list a {
  display: block;
  padding: 1rem 1.25rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--c-dark);
  position: relative;
}
.nav-list a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background: var(--c-primary);
  transform: scaleX(0);
  transition: transform .3s;
}
.nav-list a:hover::after,
.nav-list a:focus::after { transform: scaleX(1); }
.nav-list a:hover { color: var(--c-primary); }

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  position: relative;
}
.hamburger span,
.hamburger span::before,
.hamburger span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-dark);
  position: absolute;
  left: 11px;
  transition: .3s;
}
.hamburger span { top: 21px; }
.hamburger span::before { content: ""; top: -7px; }
.hamburger span::after { content: ""; top: 7px; }
.hamburger.active span { background: transparent; }
.hamburger.active span::before { top: 0; transform: rotate(45deg); }
.hamburger.active span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-list {
    display: none;
    position: absolute;
    top: 3.5rem;
    left: 0; right: 0;
    background: var(--c-white);
    flex-direction: column;
    box-shadow: 0 8px 20px rgba(3,27,78,.1);
    border-top: 1px solid var(--c-border);
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: .875rem 1.25rem; }
  .nav-list a::after { display: none; }
  .brand-bar { display: none; }
  .topbar { display: none; }
  .navbar { margin-top: 0; }
  .mobile-brand {
    display: flex !important;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--c-dark);
  }
  .mobile-brand span { color: var(--c-primary); }
}
@media (min-width: 769px) {
  .mobile-brand { display: none !important; }
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative;
  background: var(--c-dark);
  color: var(--c-white);
  padding: 5rem 0 6rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(51,104,198,.25) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(51,104,198,.15) 0%, transparent 50%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero__inner {
  max-width: 680px;
}
.hero__title {
  font-size: 2.75rem;
  color: var(--c-white);
  margin-bottom: 1.25rem;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.hero__subtitle {
  font-size: 1.125rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero__subtitle p { margin-bottom: .5rem; }
.hero__cta {
  display: inline-block;
  padding: .875rem 2rem;
  background: var(--c-primary);
  color: var(--c-white);
  font-weight: 600;
  font-size: .9375rem;
  border-radius: var(--radius-sm);
  transition: background .3s, transform .3s;
}
.hero__cta:hover {
  background: var(--c-primary-light);
  color: var(--c-white);
  transform: translateY(-2px);
}

/* Decorative diagonal at bottom of hero */
.hero__diag {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 60px;
  background: var(--c-white);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

@media (max-width: 768px) {
  .hero { padding: 3rem 0 4.5rem; }
  .hero__title { font-size: 2rem; }
}

/* ==========================================================
   SECTION SHARED
   ========================================================== */
.section { padding: 4.5rem 0; }
.section--light { background: var(--c-light); }
.section--dark { background: var(--c-dark); color: var(--c-white); }

.section__header {
  margin-bottom: 2.5rem;
}
.section__header h2 {
  font-size: 2rem;
  margin-bottom: .5rem;
  letter-spacing: -.01em;
}
.section__header p {
  color: var(--c-secondary);
  max-width: 520px;
}

/* Decorative dot before section heading — echoes Labsky icon-box offset circles */
.section__header h2::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--c-primary);
  border-radius: 50%;
  margin-right: .6rem;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

/* ==========================================================
   TOPICS (thematic cards)
   ========================================================== */
.topics-section {
  position: relative;
  padding: 5rem 0 4rem;
}
/* Diagonal clip-path background — core Labsky DNA */
.topics-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--c-light);
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 65%);
  z-index: 0;
}
.topics-section > .container { position: relative; z-index: 1; }

.topics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.topic-card {
  position: relative;
  background: var(--c-white);
  padding: 2rem 1.75rem;
  box-shadow: 0 2px 24px rgba(3,27,78,.06);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
/* Bottom fill hover — Labsky service card DNA */
.topic-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--c-primary);
  transition: height .4s;
}
.topic-card:hover::after { height: 100%; }
.topic-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(3,27,78,.12); }

.topic-card__inner { position: relative; z-index: 1; }
.topic-card__name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: .5rem;
  transition: color .4s;
}
.topic-card__desc {
  font-size: .9rem;
  line-height: 1.65;
  transition: color .4s;
}
.topic-card__desc p { margin-bottom: .35rem; }
.topic-card:hover .topic-card__name,
.topic-card:hover .topic-card__desc,
.topic-card:hover .topic-card__desc p { color: var(--c-white); }

/* Icon dot — echoes Labsky icon-box-primary offset circle */
.topic-card__dot {
  width: 28px;
  height: 28px;
  background: var(--c-primary);
  border-radius: 50%;
  margin-bottom: 1rem;
  position: relative;
  transition: background .4s;
}
.topic-card__dot::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  background: var(--c-dark);
  border-radius: 50%;
  top: -4px; right: -4px;
  transition: background .4s;
}
.topic-card:hover .topic-card__dot { background: rgba(255,255,255,.3); }
.topic-card:hover .topic-card__dot::after { background: var(--c-white); }

@media (max-width: 768px) {
  .topics-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   LATEST POSTS — magazine asymmetric layout
   ========================================================== */
.posts-section { padding: 4.5rem 0; }

.posts-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

.post-card {
  position: relative;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow .3s, transform .3s;
}
.post-card:hover {
  box-shadow: 0 6px 28px rgba(3,27,78,.1);
  transform: translateY(-3px);
}
.post-card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.post-card__body { padding: 1.5rem; }
.post-card__date {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .5rem;
}
.post-card__title {
  font-size: 1.125rem;
  margin-bottom: .6rem;
}
.post-card__title a { color: var(--c-dark); }
.post-card__title a:hover { color: var(--c-primary); }
.post-card__excerpt {
  font-size: .875rem;
  color: var(--c-secondary);
  line-height: 1.6;
}
.post-card__excerpt p { margin-bottom: .25rem; }
.post-card__link {
  display: inline-block;
  margin-top: .75rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-primary);
}
.post-card__link::after {
  content: " →";
  transition: margin-left .2s;
}
.post-card__link:hover::after { margin-left: .25rem; }

/* First card spans full left column height — magazine feel */
.post-card--featured { grid-row: span 2; }
.post-card--featured .post-card__img { height: 100%; min-height: 260px; }
.post-card--featured .post-card__body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(3,27,78,.85));
  padding: 3rem 1.5rem 1.5rem;
}
.post-card--featured .post-card__date { color: rgba(255,255,255,.7); }
.post-card--featured .post-card__title a { color: var(--c-white); }
.post-card--featured .post-card__excerpt { color: rgba(255,255,255,.7); }
.post-card--featured .post-card__link { color: rgba(255,255,255,.9); }

@media (max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr; }
  .post-card--featured { grid-row: span 1; }
  .post-card--featured .post-card__img { height: 220px; min-height: unset; }
}

/* ==========================================================
   FAQ — editorial expand/collapse style with dashed dividers
   ========================================================== */
.faq-section {
  position: relative;
  padding: 4.5rem 0;
  background: var(--c-dark);
  color: var(--c-white);
}
/* Diagonal top — Labsky DNA mirrored */
.faq-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--c-dark);
  clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
}
.faq-section > .container { position: relative; z-index: 1; }

.faq-section .section__header h2 { color: var(--c-white); }
.faq-section .section__header h2::before { background: rgba(255,255,255,.4); }
.faq-section .section__header p { color: rgba(255,255,255,.5); }

.faq-list {
  max-width: 760px;
}
.faq-item {
  border-bottom: 1px dashed rgba(255,255,255,.15);
  padding: 1.25rem 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--c-white);
  padding: .25rem 0;
  line-height: 1.4;
}
.faq-question:focus { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.faq-question__icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 1rem;
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  transition: transform .3s, border-color .3s;
}
.faq-item.active .faq-question__icon {
  transform: rotate(45deg);
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .4s;
  color: rgba(255,255,255,.65);
  font-size: .9375rem;
  line-height: 1.7;
}
.faq-answer p { margin-bottom: .5rem; }
.faq-item.active .faq-answer {
  max-height: 600px;
  padding-top: .75rem;
}

/* ==========================================================
   BLOG INDEX
   ========================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* Pagination — echoes Labsky btn styling */
.pagination {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 3rem;
  list-style: none;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-dark);
  transition: .25s;
}
.pagination a:hover {
  background: var(--c-primary);
  color: var(--c-white);
  border-color: var(--c-primary);
}
.pagination .active {
  background: var(--c-primary);
  color: var(--c-white);
  border-color: var(--c-primary);
}

/* ==========================================================
   SINGLE POST
   ========================================================== */
.post-header { padding: 3.5rem 0 2rem; background: var(--c-light); }
.post-header__title {
  font-size: 2.25rem;
  max-width: 760px;
}
.post-header__date {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: .75rem;
}
.post-cover {
  max-width: 900px;
  margin: -1rem auto 0;
  position: relative;
  z-index: 1;
}
.post-cover img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(3,27,78,.12);
}
.post-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.post-content h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; }
.post-content h3 { font-size: 1.25rem; margin: 1.5rem 0 .6rem; }
.post-content p { margin-bottom: 1.15rem; }
.post-content ul, .post-content ol { margin: 1rem 0 1rem 1.5rem; }
.post-content li { margin-bottom: .4rem; }
.post-content blockquote {
  border-left: 3px solid var(--c-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--c-light);
  color: var(--c-dark);
  font-style: italic;
}
.post-content img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}
.post-content a { text-decoration: underline; }
.post-excerpt {
  font-size: 1.0625rem;
  color: var(--c-secondary);
  border-bottom: 1px dashed var(--c-border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ==========================================================
   PAGE
   ========================================================== */
.page-header-section {
  padding: 3.5rem 0 2rem;
  background: var(--c-light);
}
.page-header-section h1 {
  font-size: 2.25rem;
}
.page-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.page-body h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; }
.page-body h3 { font-size: 1.25rem; margin: 1.5rem 0 .6rem; }
.page-body p { margin-bottom: 1.15rem; }
.page-body ul, .page-body ol { margin: 1rem 0 1rem 1.5rem; }
.page-body li { margin-bottom: .4rem; }
.page-body img { border-radius: var(--radius-md); margin: 1.5rem 0; }
.page-body a { text-decoration: underline; }

/* ==========================================================
   FOOTER — dark bg, dashed dividers (Labsky DNA)
   ========================================================== */
.site-footer {
  background: var(--c-dark);
  color: rgba(255,255,255,.6);
  padding: 3.5rem 0 0;
  position: relative;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
}
.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 1rem;
  display: inline-block;
}
.footer-brand span { color: var(--c-primary); }
.footer-desc { margin-bottom: 1.25rem; line-height: 1.7; }

.footer-email a {
  color: rgba(255,255,255,.6);
}
.footer-email a:hover { color: var(--c-primary); }
.footer-email::before {
  content: "✉";
  margin-right: .35rem;
}

.footer-nav-title {
  color: var(--c-white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a {
  color: rgba(255,255,255,.55);
  font-size: .9rem;
  position: relative;
  padding-left: .85rem;
}
.footer-links a::before {
  content: "›";
  position: absolute;
  left: 0;
  color: rgba(255,255,255,.35);
  transition: color .2s;
}
.footer-links a:hover { color: var(--c-primary); }
.footer-links a:hover::before { color: var(--c-primary); }

/* Dashed top border on copyright — Labsky DNA */
.footer-copy {
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px dashed rgba(255,255,255,.15);
  font-size: .8125rem;
  text-align: center;
  color: rgba(255,255,255,.4);
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ==========================================================
   BACK TO TOP
   ========================================================== */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px; height: 42px;
  background: var(--c-primary);
  color: var(--c-white);
  border: none;
  border-radius: 50%;
  font-size: 1.125rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: .3s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--c-primary-dark); transform: translateY(-3px); }

/* ==========================================================
   UTILITY
   ========================================================== */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
