/* ============================================================
   THE COMPATIBLE COLLECTIVE — STYLES
   ============================================================
   Look for "EDIT ME" comments — those are the easiest, safest
   places to make changes. Everything else you can leave alone
   unless you're comfortable with CSS.
   ============================================================ */

/* ---------- 1. EDIT ME: COLORS, FONTS & SIZES ---------- */
/* Change any value below and it updates the whole site.     */
:root {
  --color-bg: #ffffff;             /* main page background */
  --color-bg-sidebar: #dfe0e1;     /* left sidebar background — matches the gray section background on compatiblecomms.com */
  --color-text: #000000;           /* main body text color (true black) */
  --color-text-muted: #75706a;     /* lighter/secondary text (warm gray) */
  --color-accent: #45332b;         /* brand brown — pulled directly from the Compatible Communications logo */
  --color-accent-soft: rgba(69, 51, 43, 0.08); /* faint accent tint for backgrounds */
  --color-border: #ddd8d2;         /* thin lines / card borders (warm gray, matches the deck) */

  --font-heading: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; /* big titles — matches the nav font */
  --font-body: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;    /* everything else — matches the nav font */
  --weight-body: 600;   /* "Semi-Bold" — bumped up so black text doesn't look thin/gray */
  --weight-heading: 700; /* "Bold" */

  --sidebar-width: 560px;          /* how wide the left nav is on desktop */
  --content-max-width: 720px;      /* how wide paragraphs get before wrapping */
  --radius: 10px;                  /* corner roundness for cards/buttons/inputs */
}

/* ---------- 2. Reset & base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 16.5px;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-heading);
}

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

a {
  color: inherit;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
}

em, i {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--color-accent);
}

/* ============================================================
   3. PASSWORD GATE
   ============================================================ */
#gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(900px 500px at 50% -10%, var(--color-accent-soft), rgba(0, 0, 0, 0) 65%);
}

#gate.hidden {
  display: none;
}

.gate-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  padding: 24px;
}

.gate-logo {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: 28px;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.gate-logo em {
  font-style: normal;
}

.gate-rule {
  width: 48px;
  height: 2px;
  background: var(--color-accent);
  margin: 0 auto 28px;
  border: none;
}

.gate-card h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  margin: 0 0 12px;
}

.gate-card p {
  color: var(--color-text-muted);
  margin: 0 0 22px;
}

#gate-password {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #ffffff;
}

#gate-password:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

#gate-error {
  color: var(--color-accent);
  font-size: 14px;
  min-height: 20px;
  margin-bottom: 8px;
}

.btn-primary {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  color: #ffffff;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

/* ============================================================
   4. LAYOUT — SIDEBAR + MAIN
   ============================================================ */
#site {
  display: flex;
  min-height: 100vh;
}

#site.hidden {
  display: none;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: #ffffff;
  padding: 36px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-logo-wrap {
  background: #ffffff;
  padding: 14px 16px;
  border-radius: 8px;
  display: inline-block;
  margin: 0 0 14px;
}

.site-logo-image {
  width: 100%;
  max-width: 444px;
  height: auto;
  display: block;
}

.sidebar-logo {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: 21px;
  line-height: 1.3;
  color: var(--color-accent);
  margin: 0 0 18px;
  white-space: nowrap;
}

.sidebar-logo em {
  font-style: normal;
}

.sidebar-rule {
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  border: none;
  margin: 0 0 26px;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav li {
  margin-bottom: 4px;
}

.sidebar-nav a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  text-decoration: none;
  padding: 9px 10px;
  border-left: 2px solid transparent;
  color: var(--color-text);
  font-family: "Nunito Sans", var(--font-body);
  font-size: 21px;
  font-weight: 400;
  border-radius: 0 6px 6px 0;
  transition: background 0.15s ease;
}

.sidebar-nav a:hover {
  background: rgba(0, 0, 0, 0.03);
}

.sidebar-nav a .num {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--color-text-muted);
  width: 17px;
}

.sidebar-nav a.active {
  border-left-color: var(--color-accent);
  color: var(--color-accent);
  font-weight: 700;
}

.sidebar-nav a.active .num {
  color: var(--color-accent);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.sidebar-footer strong {
  color: var(--color-text);
}

/* Mobile menu toggle button (hidden on desktop) */
.menu-toggle {
  display: none;
}

/* ============================================================
   5. MAIN CONTENT
   ============================================================ */
main {
  flex: 1;
  min-width: 0;
  padding: 64px 40px 120px 24px;
}

.content {
  max-width: var(--content-max-width);
  margin: 0;
}

section.page {
  padding-top: 24px;
  margin-top: -24px; /* offsets scroll-margin for anchor jumps */
}

section.page + section.page {
  border-top: 1px solid var(--color-accent);
  margin-top: 90px;
  padding-top: 70px;
}

.section-photo {
  margin-top: 80px;
  padding-top: 80px;
  border-top: 1px solid var(--color-accent);
}

.section-photo img {
  width: 100%;
  aspect-ratio: 1147 / 785; /* matches the proportions of the large photos on compatiblecomms.com */
  object-fit: cover;
  display: block;
  border-radius: 0; /* compatiblecomms.com uses square corners on its photos */
}

.section-photo + section.page {
  border-top: none;
  margin-top: 40px;
  padding-top: 0;
}

section.page h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 18px;
}

section.page h2 {
  font-family: var(--font-heading);
  font-size: 25px;
  line-height: 1.3;
  margin: 46px 0 14px;
}

section.page h2:first-of-type {
  margin-top: 34px;
}

section.page p {
  margin: 0 0 18px;
}

section.page ol,
section.page ul {
  padding-left: 22px;
  margin: 0 0 18px;
}

section.page ol li,
section.page ul li {
  margin-bottom: 14px;
}

.lede {
  font-size: 18.5px;
  color: var(--color-text);
}

.welcome-note {
  padding: 2px 0;
  margin: 22px 0 32px;
}

.welcome-note p {
  color: var(--color-text);
}

/* ============================================================
   6. REINFORCEMENT — MONTH CARD GRID
   (This is the "graphics" style you asked to match.)
   ============================================================ */
.guide-download {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  margin: 8px 0 40px;
}

.guide-download:hover {
  border-color: var(--color-accent);
}

.guide-download .badge {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: var(--color-accent);
  padding: 5px 8px;
  border-radius: 5px;
}

.guide-download .label {
  font-weight: 600;
}

.guide-download .sub {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 400;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 8px 0 40px;
}

.month-card {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 26px 26px 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  text-align: left;
  background: var(--color-bg-sidebar);
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.month-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.month-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.month-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.month-card-top .month-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--color-accent);
  padding: 5px 10px;
  border-radius: 999px;
}

.month-card-top .arrow {
  color: var(--color-text-muted);
  font-size: 16px;
}

.month-card h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  margin: 0 0 18px;
  line-height: 1.25;
  white-space: nowrap;
}

.month-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14.5px;
  align-items: baseline;
}

.month-row .pillar {
  font-weight: 700;
  font-size: 11px;
  line-height: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.month-row .technique {
  color: var(--color-text);
}

.throughline {
  margin-top: 22px;
  color: var(--color-text);
}

.site-footer {
  margin-top: 70px;
  padding-top: 24px;
  border-top: 1px solid var(--color-accent);
  font-size: 13px;
  color: var(--color-text);
}

/* ============================================================
   7. MONTH MODULE (opens when a Month card is clicked)
   ============================================================ */
.month-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 26, 22, 0.45);
  z-index: 200;
}

.month-modal-backdrop.open {
  display: block;
}

.month-modal {
  display: none;
  position: fixed;
  z-index: 201;
  top: 4vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 44px 40px 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.month-modal.open {
  display: block;
}

.month-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #ffffff;
  font-size: 20px;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
}

.month-modal-close:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.month-modal h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  margin: 0 0 16px;
}

.modal-note {
  color: var(--color-text);
  margin: 0 0 30px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--color-accent);
}

.modal-pillar {
  margin-bottom: 20px;
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-sidebar);
}

.modal-pillar:last-child {
  margin-bottom: 0;
}

.pillar-tag {
  display: inline-block;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--color-accent);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.modal-pillar h4 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 0 0 10px;
}

.modal-pillar p {
  margin: 0 0 12px;
  font-size: 15px;
}

.focus-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 14px 0 8px;
}

.month-modal textarea {
  width: 100%;
  min-height: 70px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  resize: vertical;
}

.month-modal textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.save-indicator {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 6px;
  height: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.save-indicator.visible {
  opacity: 1;
}

@media (max-width: 600px) {
  .month-modal {
    padding: 34px 22px 40px;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* ============================================================
   8. RESPONSIVE — smaller screens
   ============================================================ */
@media (max-width: 880px) {
  .month-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #site {
    flex-direction: column;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    height: auto;
    padding: 16px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
  }

  .sidebar-logo {
    font-size: 17px;
    margin: 0;
  }

  .site-logo-wrap {
    padding: 8px 10px;
    margin: 0 0 6px;
  }

  .site-logo-image {
    max-width: 120px;
  }

  .sidebar-rule,
  .sidebar-footer {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    font-size: 18px;
    cursor: pointer;
  }

  .sidebar-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-sidebar);
    padding: 10px 20px 20px;
    border-bottom: 1px solid var(--color-border);
  }

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

  main {
    padding: 40px 22px 90px;
  }

  section.page h1 {
    font-size: 30px;
  }

  section.page h2 {
    font-size: 21px;
  }

  .section-photo {
    margin-top: 50px;
    padding-top: 40px;
  }
}
