/* =========================================================
   GLOBAL RESET
========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: url("assets/cronebg4.png") repeat #f7efe3;
  color: #111;
  position: relative;
  z-index: 0;
}

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

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


/* =========================================================
   GENERAL PAGE LAYERING
========================================================= */

.page-wrap,
.subpage-grid,
.sidebar-ads,
.ad-box,
.ad-box-inner {
  position: relative;
  z-index: 2;
}


/* =========================================================
   SITE HEADER
========================================================= */

.site-header {
  padding: 14px 20px 0 0;
}

.site-header-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}


/* =========================================================
   SITE LOGO
========================================================= */

.site-logo {
  flex-shrink: 0;
  line-height: 0;
  position: relative;
  transform: rotate(-1deg);
}

.site-logo img {
  width: clamp(170px, 17vw, 300px);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.22));
}

/* Small page label attached to logo */
.site-logo::after {
  content: attr(data-page);
  position: absolute;
  right: -8px;
  bottom: 10px;
  padding: 5px 9px;

  background: #ffd83b;
  border: 2px solid #111;
  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;

  transform: rotate(6deg);
}


/* =========================================================
   HEADER RIGHT SIDE
========================================================= */

.header-right {
  flex: 1;
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 8px;
}


/* =========================================================
   MAIN NAVIGATION
========================================================= */

.main-nav {
  width: 100%;
  line-height: 0;
}

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

  display: flex;
  flex-wrap: wrap;
  gap: 14px;

  line-height: 0;
}

.nav-list li {
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;

  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}

.nav-list a:hover {
  transform: translateY(-3px) rotate(-1deg);
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.28));
}

.nav-list img {
  width: auto;
  max-height: 64px;
}


/* =========================================================
   SUBPAGE TITLE STRIP
========================================================= */

.subpage-title-strip {
  margin-top: 0;
  max-width: 1080px;
  line-height: 0;
}

.subpage-title-strip img {
  width: 100%;
  max-height: 280px;

  object-fit: contain;
  object-position: left top;

  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.20));
}


/* =========================================================
   MAIN PAGE WRAPPER
========================================================= */

.page-wrap {
  max-width: 1500px;
  margin: 28px auto 60px;
  padding: 0 24px;
}


/* =========================================================
   SUBPAGE GRID

   Desktop layout:
   Main content | Side graphics | Ads
========================================================= */

.subpage-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    270px
    320px;

  gap: 28px;
  align-items: start;
}


/* =========================================================
   MAIN CONTENT PANEL
========================================================= */

.content-panel {
  min-width: 0;

  background: rgba(251,253,187,0.68);

  border: 3px solid rgba(0,0,0,0.14);
  border-radius: 22px;

  box-shadow: 0 12px 32px rgba(0,0,0,0.14);

  padding: clamp(24px, 4vw, 52px);
}

.content-panel h1,
.content-panel h2 {
  font-family: 'Protest Revolution', sans-serif;

  margin-top: 0;

  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.content-panel p,
.content-panel li {
  font-size: 1.08rem;
  line-height: 1.75;
}


/* =========================================================
   CONTENT CALLOUT
========================================================= */

.content-panel .callout {
  margin: 26px 0;
  padding: 20px;

  border-left: 10px solid #111;

  background: #fff2a8;

  font-weight: 700;
}


/* =========================================================
   TWO-COLUMN CONTENT
========================================================= */

.content-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 24px;
  margin-top: 26px;
}


/* =========================================================
   MINI CARDS
========================================================= */

.mini-card {
  padding: 22px;

  background: #f7efe3;

  border: 2px solid rgba(0,0,0,0.16);
  border-radius: 18px;
}

.mini-card h3 {
  margin-top: 0;
}


/* =========================================================
   SIDE IMAGE COLUMN
========================================================= */

.side-image-column {
  width: 270px;

  display: flex;
  flex-direction: column;
  gap: 20px;

  align-items: center;
}

.side-image-column img {
  width: 250px;
  max-width: 100%;

  height: auto;

  display: block;
}


/* =========================================================
   ADVERTISING SIDEBAR

   Important:
   This uses CSS Grid instead of Flexbox so the ad slots
   always have a measurable width when AdSense initializes.
========================================================= */

.sidebar-ads {
  width: 320px;
  min-width: 320px;

  display: grid;
  grid-template-columns: 1fr;

  gap: 24px;
}


/* =========================================================
   AD BOX
========================================================= */

.ad-box {
  width: 100%;
  min-width: 0;

  min-height: 300px;

  border: 1px solid #111;

  background:
    repeating-linear-gradient(
      45deg,
      #f4ead7,
      #f4ead7 12px,
      #efe1c8 12px,
      #efe1c8 24px
    );

  background-color: #f4ead7;

  position: relative;

  box-shadow:
    0 6px 18px rgba(0,0,0,0.14);

  padding:
    48px
    10px
    16px;

  overflow: visible;
}


/* Taller advertising position */

.ad-box.tall {
  min-height: 600px;
}


/* =========================================================
   ADVERTISEMENT LABEL
========================================================= */

.ad-box::before {
  content: "ADVERTISEMENT";

  position: absolute;

  top: 12px;
  left: 12px;

  font-size: 0.78rem;
  letter-spacing: 1px;
  font-weight: bold;

  color: rgba(0,0,0,0.55);

  z-index: 1;
}


/* =========================================================
   ADSENSE INNER CONTAINER

   DO NOT use display:flex here.

   The AdSense <ins> element needs a measurable width
   at the moment adsbygoogle.push() runs.
========================================================= */

.ad-box-inner {
  display: block;

  width: 100%;
  min-width: 0;

  min-height: 220px;

  border: 1px dashed rgba(0,0,0,0.35);

  margin: 0;
  padding: 0;

  text-align: center;

  font-size: 1rem;
  line-height: 1.5;

  color: rgba(0,0,0,0.65);

  background: rgba(255,255,255,0.20);

  position: relative;
}


/* Taller first advertising block */

.ad-box.tall .ad-box-inner {
  min-height: 520px;
}


/* =========================================================
   GOOGLE ADSENSE SLOT

   Explicit width helps prevent:

   adsbygoogle.push() error:
   No slot size for availableWidth=0
========================================================= */

.ad-box-inner > ins.adsbygoogle,
.adsbygoogle {
  display: block !important;

  width: 100% !important;
  min-width: 250px;

  margin: 0;
  padding: 0;
}


/* =========================================================
   FORMS
========================================================= */

.form-grid {
  display: grid;
  gap: 16px;
}

label {
  font-weight: 800;
}

input,
textarea {
  width: 100%;

  margin-top: 6px;

  padding: 13px 14px;

  border: 2px solid #111;
  border-radius: 12px;

  font: inherit;

  background: #fffaf0;
}

textarea {
  min-height: 170px;
  resize: vertical;
}


/* =========================================================
   BUTTONS
========================================================= */

button {
  width: fit-content;

  padding: 13px 22px;

  border: 2px solid #111;
  border-radius: 999px;

  background: #ffd83b;

  font-weight: 900;

  cursor: pointer;

  box-shadow:
    4px 4px 0 rgba(0,0,0,0.25);
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
  margin-top: 40px;
  padding: 0;

  line-height: 0;
}


/* Three-column footer image row */

.footer-image-row {
  display: flex;
  align-items: stretch;

  gap: 0;

  line-height: 0;
}


/* Remove spacing from footer images */

.footer-image-row img {
  display: block;

  margin: 0;
  padding: 0;

  border: 0;
}


/* Footer left */

.footer-left {
  width: 33%;
  height: auto;
}


/* Footer center */

.footer-center {
  width: 34%;
  height: auto;
}


/* =========================================================
   FOOTER RIGHT WRAPPER

   The wrapper owns the 33% column so the links can be
   positioned relative to the footer-right image.
========================================================= */

.footer-right-wrapper {
  position: relative;

  width: 33%;

  line-height: 0;

  align-self: flex-end;
}


/* Footer right image */

.footer-right {
  display: block;

  width: 100%;
  height: auto;
}


/* =========================================================
   FOOTER OVERLAY LINKS
========================================================= */

.footer-overlay-link {
  position: absolute;

  display: block;

  z-index: 10;
}


/* Privacy */

.footer-privacy {
  left: 5%;
  top: 25%;

  width: 22%;
  height: 15%;
}


/* Terms */

.footer-terms {
  left: 36%;
  top: 25%;

  width: 15%;
  height: 15%;
}


/* Sitemap */

.footer-sitemap {
  left: 67%;
  top: 25%;

  width: 30%;
  height: 15%;
}


/* Keyboard accessibility */

.footer-overlay-link:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
}


/* =========================================================
   RESPONSIVE — BELOW 1180px

   Main content + side graphics stay together.
   Ads move beneath them in three columns.
========================================================= */

@media (max-width: 1180px) {

  .subpage-grid {
    grid-template-columns:
      minmax(0, 1fr)
      270px;
  }


  /* Advertising moves below main grid */

  .sidebar-ads {
    grid-column: 1 / -1;

    width: 100%;
    min-width: 0;

    display: grid;

    grid-template-columns:
      repeat(3, minmax(250px, 1fr));

    gap: 24px;
  }


  /* Ads become shorter when horizontal */

  .ad-box,
  .ad-box.tall {
    width: 100%;

    min-width: 250px;
    min-height: 300px;
  }


  .ad-box.tall .ad-box-inner {
    min-height: 220px;
  }
}


/* =========================================================
   RESPONSIVE — BELOW 1050px
========================================================= */

@media (max-width: 1050px) {

  .site-header-inner {
    flex-direction: column;

    padding-left: 18px;
  }

  .header-right {
    width: 100%;
  }

  .subpage-title-strip img {
    max-height: none;
  }
}


/* =========================================================
   RESPONSIVE — BELOW 760px

   Content, side graphics, and ads all stack.
========================================================= */

@media (max-width: 760px) {

  .subpage-grid {
    grid-template-columns: 1fr;
  }


  /* Side graphics */

  .side-image-column {
    width: 100%;
  }

  .side-image-column img {
    width: min(250px, 100%);
  }


  /* Advertising */

  .sidebar-ads {
    width: 100%;
    min-width: 0;

    grid-template-columns: 1fr;
  }


  .ad-box,
  .ad-box.tall {
    width: min(320px, 100%);

    min-width: 250px;
    min-height: 250px;

    margin-left: auto;
    margin-right: auto;
  }


  .ad-box-inner,
  .ad-box.tall .ad-box-inner {
    width: 100%;

    min-width: 250px;
    min-height: 220px;
  }
}


/* =========================================================
   RESPONSIVE — BELOW 700px
========================================================= */

@media (max-width: 700px) {

  /* Header */

  .site-header {
    padding: 12px;
  }

  .site-logo img {
    width: 190px;
  }


  /* Navigation */

  .nav-list {
    display: grid;

    grid-template-columns:
      1fr
      1fr;

    gap: 10px;
  }

  .nav-list img {
    width: 100%;

    max-height: 70px;

    object-fit: contain;
  }


  /* Main page */

  .page-wrap {
    padding: 0 14px;

    margin-top: 20px;
  }


  /* Content */

  .content-columns {
    grid-template-columns: 1fr;
  }

  .content-panel {
    padding: 24px;
  }


  /* Footer stacks vertically */

  .footer-image-row {
    flex-direction: column;
  }

  .footer-left,
  .footer-center,
  .footer-right-wrapper {
    width: 100%;
  }

  .footer-right {
    width: 100%;
  }
}


/* =========================================================
   RESPONSIVE — BELOW 430px
========================================================= */

@media (max-width: 430px) {

  .nav-list {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   BLOG POST PAPER INSERT

   Replaces the normal content-panel appearance with
   the aged-paper / Crone post styling.
========================================================= */

.content-panel {
  background: transparent;

  border: 0;
  border-radius: 0;

  box-shadow: none;

  padding: 0;
}


/* =========================================================
   POST PAPER
========================================================= */

.post-paper {

  /* Theme variables */

  --post-ink: #211515;
  --post-blood: #6e1118;
  --post-blood-dark: #3d090d;
  --post-paper: #f3dfbd;
  --post-paper-light: #fff1d2;
  --post-aged: #c49a67;
  --post-shadow: rgba(20, 6, 8, .35);


  position: relative;
  isolation: isolate;

  min-width: 0;

  color: var(--post-ink);

  padding:
    clamp(1.35rem, 3.5vw, 2.7rem);


  /* Paper texture */

  background:
    linear-gradient(
      90deg,
      rgba(110,17,24,.12),
      transparent 9%,
      transparent 91%,
      rgba(110,17,24,.12)
    ),

    radial-gradient(
      circle at 10% 10%,
      rgba(255,255,255,.38),
      transparent 16rem
    ),

    linear-gradient(
      180deg,
      var(--post-paper-light),
      var(--post-paper)
    );


  border:
    4px solid var(--post-blood-dark);


  box-shadow:
    0 16px 30px var(--post-shadow),
    inset 0 0 0 2px rgba(255,255,255,.2);


  /* Torn-paper edge */

  clip-path:
    polygon(
      0 1.2%,
      3% 0,
      8% 1.1%,
      15% .3%,
      22% 1.4%,
      31% .4%,
      39% 1.2%,
      50% .2%,
      61% 1.1%,
      70% .4%,
      81% 1.3%,
      91% .2%,
      100% 1.1%,
      99.2% 8%,
      100% 17%,
      99.1% 29%,
      100% 38%,
      99.3% 49%,
      100% 62%,
      99.1% 73%,
      100% 84%,
      99.2% 96%,
      96% 100%,
      88% 98.8%,
      78% 100%,
      67% 98.9%,
      55% 100%,
      44% 98.8%,
      34% 100%,
      24% 98.7%,
      14% 100%,
      6% 98.8%,
      0 100%,
      .8% 90%,
      0 78%,
      .8% 66%,
      0 54%,
      .9% 43%,
      0 31%,
      .8% 18%
    );
}


/* =========================================================
   INNER PAPER BORDER
========================================================= */

.post-paper::before {
  content: "";

  position: absolute;

  inset: .8rem;

  border:
    2px dashed rgba(61,9,13,.45);

  pointer-events: none;

  z-index: -1;
}


/* =========================================================
   POST META TEXT
========================================================= */

.post-paper .post-kicker,
.post-paper .filed-under {
  font-family:
    Arial,
    Helvetica,
    sans-serif;

  text-transform: uppercase;

  letter-spacing: .11em;

  color: var(--post-blood);

  font-weight: 900;
}


/* Post number */

.post-paper .post-kicker {
  margin:
    0
    0
    .3rem;

  font-size: .95rem;
  line-height: 1.2;
}


/* =========================================================
   POST TITLE
========================================================= */

.post-paper h1 {
  font-family:
    'Protest Revolution',
    cursive;

  margin:
    0
    0
    .4rem;

  color:
    var(--post-blood-dark);

  font-size:
    clamp(2rem, 4.8vw, 4.1rem);

  line-height: .95;

  letter-spacing: .01em;

  text-shadow:
    2px
    2px
    0
    rgba(196,154,103,.55);
}


/* =========================================================
   FILED UNDER
========================================================= */

.post-paper .filed-under {
  margin:
    0
    0
    1.35rem;

  font-size: .82rem;
  line-height: 1.45;
}


/* =========================================================
   POST BODY COPY
========================================================= */

.content-panel .post-paper p,
.post-paper p {
  max-width: 920px;

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  font-size:
    clamp(1.05rem, 1.3vw, 1.18rem);

  line-height: 1.78;

  margin:
    0
    0
    1.1rem;
}


/* Colored first letter */

.post-paper p::first-letter {
  color: var(--post-blood);
  font-weight: 900;
}


/* =========================================================
   POST SIGNOFF
========================================================= */

.post-paper .signoff {
  margin-top:
    1.6rem !important;

  font-family:
    'Permanent Marker',
    cursive;

  font-size:
    clamp(1.35rem, 2.4vw, 2rem) !important;

  line-height: 1.1;

  font-weight: 900;

  color:
    var(--post-blood-dark);

  text-transform: uppercase;

  transform:
    rotate(-1deg);
}


/* =========================================================
   BLOG POST MOBILE OVERRIDES
========================================================= */

@media (max-width: 700px) {

  .content-panel {
    padding: 0;
  }

  .post-paper {
    padding: 24px;

    clip-path: none;

    border-radius: 14px;
  }

  .post-paper::before {
    inset: .55rem;
  }
}
