/* =========================================================
   M.A. Knights — Clean unified stylesheet
   (Single header system, no conflicting old nav/menu rules)
   ========================================================= */

/* ---------- Theme tokens ---------- */
:root{
  --bg:#f3eee5;
  --paper:#fbf8f2;
  --ink:#1f1d1c;
  --muted:#5a544f;
  --line:rgba(31,29,28,.12);
  --accent:#2f6b3f;
  --shadow:0 12px 30px rgba(0,0,0,.08);
  --radius:18px;
  --max:1100px;
}

/* ---------- Base ---------- */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.6;
}

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

.container{max-width:var(--max);margin:0 auto;padding:0 18px}

/* Skip link */
.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:18px;
  top:12px;
  width:auto;
  height:auto;
  padding:10px 12px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:999px;
  z-index:9999;
}

/* ---------- Header (single system) ---------- */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:color-mix(in srgb,var(--bg) 88%,transparent);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(10px);
  overflow:visible;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 0;
  overflow:visible;
}
/* Desktop: keep nav + CTA on ONE row */
.nav-group{
  display:flex;
  align-items:center;
  gap:14px;
  margin-left:auto;        /* pushes nav group to the right */
  flex-wrap:nowrap;        /* prevents the button dropping */
}


/* If you want a little safety on smaller desktop widths */
@media (max-width: 1050px){
  .site-nav{ gap:12px; }
  .btn{ padding:10px 12px; }
}

/* Brand container = the visible box */
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 18px;              /* rectangle padding */
  border-radius:22px;             /* soft rounded rectangle */
  background:color-mix(in srgb,var(--paper) 94%,transparent);
  border:1px solid var(--line);
}

/* Logo image itself */
.brand-logo{
  width:100px;
  height:auto;                    /* IMPORTANT: keep natural ratio */
  max-height:100px;
  object-fit:contain;
  border-radius:6px;              /* subtle, not pill-shaped */
  padding:0;                      /* remove internal box feel */
  background:none;
}

.brand-name{
  font-weight:800;
  color:var(--ink);
  white-space:nowrap;
}

.site-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  flex:1;
  min-width:0;
}

.site-nav a{
  text-decoration:none;
  color:var(--ink);
  padding:8px 10px;
  border-radius:999px;
}

.site-nav a:hover{
  background:rgba(0,0,0,.05);
}

.site-nav a.active,
.site-nav a[aria-current="page"]{
  background:rgba(0,0,0,.08);
  font-weight:800;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:11px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  text-decoration:none;
  font-weight:800;
  color:inherit;
  background:color-mix(in srgb,var(--paper) 90%,transparent);
  white-space:nowrap;
}

.btn-primary,
.btn.primary{
  background:var(--accent);
  color:var(--paper);
  border-color:color-mix(in srgb,var(--accent) 70%,var(--line) 30%);
}

.btn.ghost{
  background:transparent;
}

/* Header responsiveness */
@media (max-width: 900px){
  .header-inner{flex-wrap:wrap}
  .site-nav{
    flex-basis:100%;
    justify-content:flex-start;
    gap:10px;
    overflow-x:auto;
    padding-bottom:2px;
  }
  .brand-logo{width:76px;height:76px;padding:7px}
}

/* ---------- Cards / layout ---------- */
.card{
  background:color-mix(in srgb,var(--paper) 92%,transparent);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.section{padding:20px 0 28px}

/* Page title blocks */
.page-title{padding:30px 0 10px}
.page-title h1{font-size:34px;line-height:1.15;margin:0}
.page-title p{color:var(--muted);margin:8px 0 0}

/* ---------- Hero ---------- */
.hero{padding:44px 0 26px}
.hero-grid{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:26px;
}
@media(max-width:900px){
  .hero-grid{grid-template-columns:1fr}
}
.hero .card{padding:22px}

.kicker{
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:800;
}

h1{
  font-size:42px;
  line-height:1.12;
  margin:10px 0;
}
.lede{font-size:18px;color:var(--muted)}

.btn-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

.note{font-size:13px;color:var(--muted)}

/* ---------- Author card ---------- */
.author{
  padding:16px;
  display:grid;
  grid-template-columns:96px 1fr;
  gap:14px;
  align-items:center;
}
.author img{
  width:96px;
  height:96px;
  border-radius:18px;
  object-fit:cover;
  border:1px solid var(--line);
}

/* ---------- Grids ---------- */
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
@media(max-width:900px){.grid-2{grid-template-columns:1fr}}

.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media(max-width:900px){.grid-3{grid-template-columns:1fr}}

/* ---------- Series cards / covers ---------- */
.series-card{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:16px;
  padding:16px;
}
@media(max-width:620px){
  .series-card{grid-template-columns:1fr}
}

.cover{
  width:100%;
  border-radius:16px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

/* ---------- Book grid ---------- */
.book-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:12px;
}
@media(max-width:1100px){.book-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:650px){.book-grid{grid-template-columns:repeat(2,1fr)}}

.book{
  padding:12px;
  text-decoration:none;
  color:inherit;
}
.book img{
  width:100%;
  border-radius:14px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

/* ---------- Callout ---------- */
.callout{
  padding:18px;
  border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line) 78%);
  background:color-mix(in srgb,var(--accent) 9%,var(--paper) 91%);
  border-radius:var(--radius);
}

/* Divider */
.sep{border:0;border-top:1px solid var(--line);margin:18px 0}

/* ---------- “How it works” card layout (Newsletter) ---------- */
.how-head{
  display:block;
  text-align:center;
  margin-bottom:14px;
}
.how-head h3{margin:0}
.how-icon{
  display:block;
  width:72px;
  height:auto;
  margin:10px auto 0;
}

.how-body{
  display:grid;
  grid-template-columns:1.2fr 0.9fr;
  gap:18px;
  align-items:start;
}
.how-steps{
  margin:0;
  padding-left:18px;
}
.how-side{
  display:flex;
  flex-direction:column;
  gap:12px;
  border-left:1px solid rgba(0,0,0,.08);
  padding-left:18px;
}
.how-note{margin:0}

.how-actions a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  color:var(--ink);
  background:color-mix(in srgb,var(--paper) 92%,transparent);
  margin-right:10px;
}
.how-actions a:hover{transform:translateY(-1px)}

@media (max-width: 860px){
  .how-body{grid-template-columns:1fr}
  .how-head{text-align:left}
  .how-icon{margin-left:0}
  .how-side{
    border-left:none;
    padding-left:0;
    border-top:1px solid rgba(0,0,0,.08);
    padding-top:14px;
    margin-top:6px;
  }
}

/* ---------- Footer ---------- */
footer{
  padding:26px 0 34px;
  border-top:1px solid var(--line);
  color:var(--muted);
}
.footer-grid{
  display:grid;
  grid-template-columns:1fr auto;
  gap:14px;
  align-items:center;
}
.footer-links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.footer-links a{color:inherit;text-decoration:none}
.footer-links a:hover{text-decoration:underline}
@media (max-width: 820px){
  .site-header .btn-primary,
  .site-header .cta,
  .site-header .pill {
    display: none;
  }
}
@media (max-width: 820px){
  .brand-logo {
    display: none;
  }
}
/* =========================================================
   MOBILE BURGER
   ========================================================= */

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
}

.nav-panel {
  display: none;
}

@media (max-width: 820px){

  .nav-group { display: none; }
  .nav-toggle { display: block; }

  .nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 16px;
    box-shadow: var(--shadow);
    z-index: 999;
  }

  .nav-panel.open { display: block; }

  .nav-panel a{
    display: block;
    padding: 10px 0;
    font-weight: 650;
  }

  .nav-panel .mobile-cta{
    margin-top: 12px;
    width: 100%;
    text-align: center;
  }
}

/* =========================================================
   FINAL MOBILE BURGER OVERRIDES (paste at end of file)
   ========================================================= */

/* desktop defaults */
.nav-toggle { display: none; }
.nav-panel { display: none; }

/* mobile behaviour */
@media (max-width: 820px){

  /* hide the desktop nav+cta group entirely */
  .nav-group { display: none !important; }

  /* show burger */
  .nav-toggle { display: block !important; }

  /* show dropdown panel only when JS adds .open */
  .nav-panel { 
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 16px;
    box-shadow: var(--shadow);
    z-index: 999;
  }
  .nav-panel.open { display: block; }

  /* make panel links stack */
  .nav-panel a{
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: var(--ink);
    font-weight: 650;
  }

  /* mobile CTA inside panel */
  .nav-panel .mobile-cta{
    margin-top: 12px;
    width: 100%;
    text-align: center;
  }
}
/* -----------------------------------
   Mobile header styling tweak
----------------------------------- */
@media (max-width: 820px){
  .brand-name{
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    letter-spacing: .02em;
    font-weight: 800;
  }

  .brand-name{
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  }
}
/* Mobile: single pop of colour next to the name */
@media (max-width: 820px){
  .brand-name{
    position: relative;
    padding-left: 26px;
    font-weight: 800;
  }

  .brand-name::before{
    content:"";
    position:absolute;
    left:4px;
    top:50%;
    width:10px;
    height:10px;
    transform:translateY(-50%);
    border-radius:999px;
    background: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  }
}


/* Remove link styling from brand */
.brand {
  text-decoration: none;
}

.brand-name {
  text-decoration: none;
}

.brand:visited,
.brand:active,
.brand:hover {
  text-decoration: none;
}
@media (max-width: 820px){
  .brand {
    background: none;
    border: 0;
    padding: 0;
  }
}
.hero-title-img{
  width: 100%;
  height: auto;
  display: block;
}

/* Flourish styling */
.about-flourish{
  margin-top:28px;
  padding-top:18px;
  border-top:1px solid var(--line);
  font-size:15px;
  color:var(--muted);
}

/* Mobile */
@media(max-width: 900px){
  .about-layout{
    grid-template-columns: 1fr;
  }

  .about-photo{
    order:-1; /* Photo appears above text on mobile */
  }

  .about-text{
    padding: 26px 24px;
  }
}
/* ---------- About Layout ---------- */

.about-layout{
  display:grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 40px;
  align-items:start;
  margin-bottom: 48px;
}

.about-text{
  padding: 40px 48px;
}

.about-inner{
  max-width: 70ch;
}

.about-text p{
  line-height: 1.75;
}

.about-flourish{
  margin-top:28px;
  padding-top:18px;
  border-top:1px solid var(--line);
  font-size:15px;
  color:var(--muted);
}

/* Photo card */

.about-photo-card{
  padding:24px;
  text-align:center;
  position:sticky;
  top:110px; /* subtle editorial feel */
}

.about-photo-card img{
  width:100%;
  border-radius:22px;
  object-fit:cover;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  margin-bottom:16px;
}

.photo-caption{
  font-weight:700;
  color:var(--ink);
}

.photo-caption span{
  display:block;
  font-weight:500;
  font-size:14px;
  color:var(--muted);
  margin-top:4px;
}

/* Mobile */
@media(max-width: 900px){
  .about-layout{
    grid-template-columns: 1fr;
  }

  .about-photo-card{
    position:static;
    order:-1;
  }

  .about-text{
    padding: 28px 24px;
  }
}
.btn:hover{
  transform: translateY(-2px);
  transition: .15s ease;
}
