/* ═══════════════════════════════════════════════════════════════
   global.css — FirstEdit shared styles
   All pages link to this file. Page-specific styles stay in
   each page's own <style> block.
═══════════════════════════════════════════════════════════════ */

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

/* ── VARIABLES ── */
:root {
  /* Brand colours */
  --canvas:   #F4F1ED;
  --white:    #FFFFFF;
  --navy:     #00073A;
  --teal:     #003f52;
  --sky:      #7bbdd0;
  --red:      #ad173e;
  --red-dk:   #8c1a32;
  /* Greys */
  --grey-lt:  #e6e6e6;
  --grey-mid: #b3b3b3;
  --grey-dk:  #555;
  /* Typography */
  --font:     'Poppins', sans-serif;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body {
  background: var(--canvas);
  color: var(--navy);
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */
.container   { max-width: 1140px; margin: 0 auto; padding: 0 2.5rem; }
.section-pad { padding: 6rem 0; }

/* ── NAV ── */
nav.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--canvas);
  border-bottom: 1px solid var(--grey-lt);
  padding: 0.85rem 0;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1140px; margin: 0 auto; padding: 0 2.5rem;
}
.nav-logo     { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo img { display: block; }
.nav-links    { display: flex; align-items: center; gap: 2.5rem; list-style: none; }
.nav-links a  {
  font-size: 0.82rem; font-weight: 300; color: var(--navy);
  text-decoration: none; opacity: 0.65; transition: opacity 0.2s;
}
.nav-links a:hover        { opacity: 1; }
.nav-links a.active       { opacity: 1; font-weight: 600; }
.nav-auth { display: flex; align-items: center; gap: 1rem; }
.nav-login {
  font-size: 0.82rem; font-weight: 400; color: var(--navy);
  text-decoration: none; opacity: 0.55;
  padding-right: 1rem;
  border-right: 1px solid rgba(0,7,58,0.15);
  transition: opacity 0.2s;
}
.nav-login:hover { opacity: 1; }
.nav-avatar {
  display: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal);
  align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 600; color: var(--white);
  letter-spacing: 0.05em; cursor: pointer;
  border: 2px solid transparent; transition: border-color 0.2s;
  text-decoration: none;
}
.nav-avatar:hover { border-color: rgba(0,63,82,0.35); }
.nav-cta {
  background: var(--navy); color: var(--white) !important;
  padding: 0.55rem 1.4rem;
  font-weight: 600 !important; opacity: 1 !important;
  font-size: 0.8rem !important; letter-spacing: 0.03em;
  text-decoration: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--teal) !important; }

/* Dropdown */
.nav-dropdown-wrap    { position: relative; }
.nav-dropdown-trigger { display: flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.nav-chevron {
  display: inline-block; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: 0.45;
  transition: transform 0.2s, opacity 0.2s; flex-shrink: 0;
}
.nav-dropdown-wrap:hover .nav-chevron,
.nav-dropdown-wrap.open  .nav-chevron { transform: rotate(225deg) translateY(-2px); opacity: 0.7; }
/* Invisible bridge fills the gap so hover doesn't break */
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  background: var(--white); border: 1px solid var(--grey-lt);
  border-radius: 6px; padding: 0.35rem 0; min-width: 150px;
  box-shadow: 0 6px 20px rgba(0,7,58,0.12);
  list-style: none; z-index: 200; margin-top: 0;
}
.nav-dropdown-menu::before { content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.nav-dropdown-menu li a {
  display: block; padding: 0.6rem 1.1rem;
  font-size: 0.82rem; font-weight: 300; color: var(--navy);
  opacity: 0.75; text-decoration: none;
  transition: opacity 0.15s, background 0.15s; white-space: nowrap;
}
.nav-dropdown-menu li a:hover { opacity: 1; background: rgba(0,7,58,0.03); }
.nav-dropdown-wrap:hover .nav-dropdown-menu,
.nav-dropdown-wrap.open  .nav-dropdown-menu { display: block; }

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 44px; height: 44px;
  background: none; border: none; cursor: pointer; padding: 0; flex-shrink: 0;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease; transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE DRAWER ── */
.nav-drawer {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: var(--canvas); padding: 5rem 2rem 2rem;
  flex-direction: column; overflow-y: auto;
}
.nav-drawer.open { display: flex; }
.nav-drawer ul   { list-style: none; display: flex; flex-direction: column; gap: 0; }
.nav-drawer ul li a {
  display: block; padding: 1rem 0;
  font-size: 1.1rem; font-weight: 300; color: var(--navy);
  text-decoration: none; opacity: 0.75;
  border-bottom: 1px solid rgba(0,7,58,0.08);
}
.nav-drawer ul li a:hover           { opacity: 1; }
.nav-drawer ul li a.active          { font-weight: 600; opacity: 1; }
.nav-drawer ul li.drawer-sub a      { padding-left: 1.75rem; font-size: 0.95rem; opacity: 0.55; }
.nav-drawer-auth { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.nav-drawer-login {
  font-size: 0.9rem; font-weight: 400; color: var(--navy);
  text-decoration: none; opacity: 0.6;
}
.nav-drawer-cta {
  display: inline-block; background: var(--navy); color: var(--white) !important;
  padding: 0.85rem 1.75rem; font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.03em; text-decoration: none; text-align: center;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.nav-drawer-cta:hover { background: var(--teal) !important; }

/* ── NAV MOBILE ── */
@media (max-width: 820px) {
  .nav-links    { display: none !important; }
  .nav-login    { display: none !important; }
  .nav-cta      { display: none !important; }
  .nav-hamburger { display: flex; }
  body.nav-open { overflow: hidden; }
}

/* ── SLASH ICON ── */
.slash-icon {
  display: inline-block;
  width: 16px; height: 13px;
  clip-path: polygon(28% 0%, 100% 0%, 72% 100%, 0% 100%);
  flex-shrink: 0;
}

/* ── SECTION LABELS ── */
.sec-label {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; margin-bottom: 1.25rem;
}
.sec-label.red   { color: var(--red);      } .sec-label.red   .slash-icon { background: var(--red);      }
.sec-label.teal  { color: var(--teal);     } .sec-label.teal  .slash-icon { background: var(--teal);     }
.sec-label.sky   { color: var(--sky);      } .sec-label.sky   .slash-icon { background: var(--sky);      }
.sec-label.muted { color: var(--grey-mid); } .sec-label.muted .slash-icon { background: var(--grey-mid); }
.sec-label.light { color: rgba(244,241,237,0.85); } .sec-label.light .slash-icon { background: rgba(244,241,237,0.3); }

/* ── TYPOGRAPHY ── */
.section-h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.1; color: var(--navy);
}
.section-h2 em  { font-style: italic; font-weight: 600; color: inherit; }
.section-intro  {
  font-size: 1rem; line-height: 1.8;
  color: var(--grey-dk); max-width: 520px; margin-top: 0.75rem;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--red); color: var(--white);
  padding: 0.9rem 2rem;
  font-weight: 600; font-size: 0.88rem;
  letter-spacing: 0.03em; text-decoration: none;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--red-dk); transform: translateY(-1px); }

.btn-secondary {
  display: inline-block; color: rgba(244,241,237,0.5);
  padding: 0.9rem 1.5rem;
  font-size: 0.85rem; font-weight: 300; text-decoration: none;
  transition: color 0.2s;
}
.btn-secondary:hover { color: var(--white); }

.btn-white {
  display: inline-block; background: var(--white); color: var(--navy);
  padding: 0.7rem 1.8rem;
  font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em;
  text-decoration: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.2s;
}
.btn-white:hover { background: var(--canvas); }

/* ── PRE-FOOTER CTA ── */
.pre-footer-cta { background: var(--red); padding: 5.5rem 0; position: relative; overflow: hidden; }
.pre-footer-cta::before {
  content: ''; position: absolute; right: -8%; top: 0; bottom: 0; width: 45%;
  background: rgba(0,0,0,0.1); transform: skewX(-10deg); pointer-events: none;
}
.pre-footer-cta-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center;
}
.pre-footer-cta-text h3 {
  font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; color: var(--white);
  letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 1rem;
}
.pre-footer-cta-text p {
  font-size: 1rem; font-weight: 300; color: rgba(255,255,255,0.7);
  line-height: 1.75; margin-bottom: 2rem;
}
.cta-agenda       { display: flex; flex-direction: column; gap: 0; }
.cta-agenda-item  {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0.65rem 1.75rem; background: rgba(255,255,255,0.07); margin-bottom: 2px;
}
.cta-agenda-num   { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; color: rgba(255,255,255,0.4); flex-shrink: 0; }
.cta-agenda-text strong,
.cta-agenda-text span { display: block; }
.cta-agenda-text strong { font-size: 0.85rem; font-weight: 600; color: var(--white); }
.cta-agenda-text span   { font-size: 0.75rem; font-weight: 300; color: rgba(255,255,255,0.6); }

/* ── FOOTER ── */
footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
}
.footer-inner { max-width: 1140px; margin: 0 auto; padding: 0 2.5rem; }
.footer-top   {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 2rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.footer-logo     { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.footer-logo img { display: block; }
.footer-nav      { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-nav-group { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav-group-title {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(244,241,237,0.35); margin-bottom: 0.25rem;
}
.footer-nav a {
  font-size: 0.9rem; font-weight: 400;
  color: rgba(244,241,237,0.8); text-decoration: none; transition: color 0.2s;
}
.footer-nav a:hover { color: var(--canvas); }
.footer-bottom      { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 1.25rem; }
.footer-right       { font-size: 0.72rem; font-weight: 300; color: rgba(244,241,237,0.35); }

/* ── BLOG POST BYLINE ── */
.post-byline {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.byline-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover; object-position: center top;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.18);
}
.byline-details { display: flex; flex-direction: column; gap: 0.15rem; }
.byline-name {
  font-size: 0.82rem; font-weight: 600;
  color: rgba(244,241,237,0.92); line-height: 1.2;
}
.byline-role {
  font-size: 0.75rem; font-weight: 300;
  color: rgba(244,241,237,0.6);
}
.byline-meta {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.7rem; font-weight: 300;
  color: rgba(244,241,237,0.5);
  margin-top: 0.25rem;
}
.byline-sep { opacity: 0.35; }

/* Fix breadcrumb arrow — HTML entities don't parse in CSS content property */
.post-header .breadcrumb::before { content: "← "; }

/* Post-header tag: override inline colours so the tag is legible on the navy background */
.post-header .post-tag {
  background: rgba(255,255,255,0.15) !important;
  color: rgba(255,255,255,0.9) !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
  .container    { padding: 0 1.25rem; }
  .section-pad  { padding: 3.5rem 0; }
  .pre-footer-cta { padding: 3.5rem 0; }
  .pre-footer-cta-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-top { flex-direction: column; gap: 1.5rem; }
  .footer-nav { gap: 1.5rem; flex-direction: column; }
}
