/* =============================================================================
   GREENBAR GHOST THEME — screen.css
   Design tokens at the top of this file are intentionally identical to the
   :root block in greenbar-child/style.css. Edit both files together when
   tuning colours or band height.
   ============================================================================= */

/* ── Google Font loaded via <link> in default.hbs ──────────────────────────── */

/* ── Shared design tokens ───────────────────────────────────────────────────── */
:root {
  --band-height:        48px;      /* 2 lines × 24 px line height              */
  --color-beige:        #f3f1ec;   /* nearly-white, low-saturation warm cream  */
  --color-green:        #d4e8d0;   /* pale sage — classic 1980s greenbar green */
  --color-outer:        #2a2a38;   /* dark "desk surface" surrounding the page */
  --color-nav:          #f5f0c0;   /* yellow header/footer bar                 */
  --color-nav-border:   #e0d870;
  --color-highlight:    rgba(255, 232, 74, 0.60);   /* semi-transparent highlighter */
  --color-postit:       #feff9c;   /* Post-It body                             */
  --color-postit-strip: #eaeb80;   /* slightly darker adhesive strip at top    */
  --color-quote-bar:    #7aaecf;   /* blue left border on blockquotes          */
  --color-text:         #1e1e1e;
  --color-text-muted:   #555;
  --color-link:         #2a5a8e;
  --font-typewriter:    'Special Elite', 'Courier New', Courier, monospace;
  --font-handwriting:   'Caveat', cursive;
  --content-width:      960px;
  --sprocket-width:     38px;
  --sprocket-pitch:     48px;
  --sprocket-radius:    5px;
  --sprocket-ring:      rgba(75, 65, 55, 0.4);
}


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

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


/* ── Base ───────────────────────────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-typewriter);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-outer);
}


/* =============================================================================
   POST-IT WIDGET — fixed upper-right corner, rotated -15° counterclockwise
   ============================================================================= */
.postit-widget {
  position: fixed;
  top: 72px;
  right: max(12px, calc(50vw - var(--content-width) / 2 - 305px));
  z-index: 200;
  pointer-events: none;
  width: 285px;
}

.postit-inner {
  background: var(--color-postit);
  padding: 20px 18px;
  min-height: 285px;
  position: relative;
  box-shadow:
    3px 4px 8px  rgba(0, 0, 0, 0.22),
    6px 10px 26px rgba(0, 0, 0, 0.16);
  transform: rotate(-15deg);
  transform-origin: top center;
  font-family: var(--font-handwriting);
  font-size: 1.3rem;
  line-height: 1.5;
  color: #333;
}

.postit-title {
  font-family: var(--font-handwriting);
  font-size: 1.4rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
}

.postit-tagline {
  font-family: var(--font-handwriting);
  font-size: 1.2rem;
  color: #555;
}


/* =============================================================================
   NAVIGATION HEADER
   ============================================================================= */
.gh-head {
  background: var(--color-nav);
  border-bottom: 2px solid var(--color-nav-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.gh-head-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.gh-head-logo {
  font-family: var(--font-typewriter);
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.gh-head-logo img {
  display: inline-block;
  height: 40px;
  width: auto;
}

.gh-head-menu {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.gh-head-menu ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.gh-head-menu a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-family: var(--font-typewriter);
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.gh-head-menu a:hover {
  background: var(--color-highlight);
}


/* =============================================================================
   INDEX MASTHEAD — large logo rendered only on the homepage
   ============================================================================= */
.gh-masthead {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.gh-masthead-logo {
  display: block;
  margin: 0 auto;
  max-height: 200px;
  width: auto;
  max-width: 70%;
}


/* =============================================================================
   MAIN CONTENT AREA — greenbar paper surface
   ============================================================================= */
.gh-main {
  max-width: var(--content-width);
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  padding: 2.5rem 2rem 4rem;
  position: relative;
  background-image:
    url('../images/coffee1.png'),
    url('../images/coffee2.png'),
    repeating-linear-gradient(
      to bottom,
      rgba(243, 241, 236, 0.35) 0px,
      rgba(243, 241, 236, 0.35) var(--band-height),
      rgba(212, 232, 208, 0.45) var(--band-height),
      rgba(212, 232, 208, 0.45) calc(var(--band-height) * 2)
    ),
    url('../images/Paper Textures (6).jpg');
  background-size:
    42% auto,
    38% auto,
    auto,
    auto;
  background-position:
    10% 180px,
    64% 680px,
    0 0,
    0 0;
  background-repeat:
    no-repeat,
    no-repeat,
    repeat,
    repeat;
  background-attachment: local;
}


/* =============================================================================
   SPROCKET HOLES — decorative edge strips on the paper column
   ============================================================================= */
.gh-main::before,
.gh-main::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--sprocket-width);
  background-color: rgba(0, 0, 0, 0.03);
  background-image: radial-gradient(
    circle at 50% 50%,
    var(--color-outer) var(--sprocket-radius),
    var(--sprocket-ring) var(--sprocket-radius),
    var(--sprocket-ring) calc(var(--sprocket-radius) + 2px),
    transparent calc(var(--sprocket-radius) + 2.5px)
  );
  background-size: var(--sprocket-width) var(--sprocket-pitch);
  background-repeat: repeat-y;
  background-position: center 0;
  pointer-events: none;
  z-index: 1;
}

.gh-main::before {
  left: 0;
  border-right: 1px dotted rgba(0, 0, 0, 0.18);
}

.gh-main::after {
  right: 0;
  border-left: 1px dotted rgba(0, 0, 0, 0.18);
}


/* =============================================================================
   POST / PAGE ARTICLES
   ============================================================================= */
.gh-article {
  padding-top: 1rem;
}

.gh-article-title {
  font-family: var(--font-typewriter);
  font-size: 1.8rem;
  line-height: 1.5;
  font-weight: normal;
  background: var(--color-highlight);
  display: inline;
  padding: 2px 8px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: var(--color-text);
}

.gh-article-meta {
  margin-top: 0.6rem;
  margin-bottom: 1.8rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.gh-article-image {
  margin: 1.5rem -2rem;
}

.gh-article-image img {
  width: 100%;
  mix-blend-mode: multiply;
  opacity: 0.88;
  filter: sepia(20%) contrast(1.08);
}

.gh-content {
  font-family: var(--font-typewriter);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}

.gh-content p {
  margin-bottom: 1.2em;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
  background: var(--color-highlight);
  display: inline;
  padding: 0 5px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

.gh-content a {
  color: var(--color-link);
  text-decoration: underline;
}

.gh-content a:hover {
  background: var(--color-highlight);
  text-decoration: none;
}

.gh-content blockquote {
  border-left: 4px solid var(--color-quote-bar);
  padding: 0.2rem 0 0.2rem 1rem;
  margin: 1.4rem 0;
  color: #444;
  background: rgba(255, 255, 255, 0.35);
}

.gh-content pre,
.gh-content code {
  font-family: var(--font-typewriter);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.15em 0.4em;
  border-radius: 2px;
  font-size: 0.9em;
}

.gh-content pre {
  padding: 1rem;
  overflow-x: auto;
}

.gh-content pre code {
  background: none;
  border: none;
  padding: 0;
}

.gh-content ul,
.gh-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2em;
}

.gh-content li {
  margin-bottom: 0.3em;
}

.gh-content hr {
  border: none;
  border-top: 1px dashed #aaa;
  margin: 2rem 0;
}

.gh-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  mix-blend-mode: multiply;
  opacity: 0.88;
  filter: sepia(20%) contrast(1.08);
}

/* Koenig editor — required wide/full image card classes */
.kg-width-wide {
  margin-left: -4rem;
  margin-right: -4rem;
}

.kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}

.gh-article-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #aaa;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.gh-article-tags a {
  color: var(--color-link);
  text-decoration: none;
}


/* =============================================================================
   POST FEED (homepage)
   ============================================================================= */
.gh-feed {
  padding-top: 1rem;
}

.gh-card {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px dashed #aaa;
}

.gh-card:last-of-type {
  border-bottom: none;
}

.gh-card-image-link {
  display: block;
  margin-bottom: 0.75rem;
}

.gh-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.gh-card-title {
  font-size: 1.3rem;
  font-weight: normal;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.gh-card-title a {
  background: var(--color-highlight);
  display: inline;
  padding: 1px 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  text-decoration: none;
  color: var(--color-text);
}

.gh-card-title a:hover {
  background: #ffd700;
}

.gh-card-excerpt {
  font-size: 0.92rem;
  color: #444;
  margin-top: 0.4rem;
  line-height: 1.6;
}

.gh-card-footer {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}


/* =============================================================================
   PAGINATION
   ============================================================================= */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0 0.5rem;
  font-size: 0.82rem;
  font-family: var(--font-typewriter);
  color: var(--color-text-muted);
}

.pagination a {
  color: var(--color-link);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--color-nav-border);
  background: var(--color-nav);
}

.pagination a:hover {
  background: var(--color-highlight);
}


/* =============================================================================
   FOOTER
   ============================================================================= */
.gh-foot {
  background: var(--color-nav);
  border-top: 2px solid var(--color-nav-border);
}

.gh-foot-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  font-size: 0.78rem;
  font-family: var(--font-typewriter);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.gh-foot a {
  color: var(--color-link);
  text-decoration: none;
}

.gh-foot a:hover {
  text-decoration: underline;
}


/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 1300px) {
  .postit-widget {
    display: none;
  }
}

@media (max-width: 860px) {
  /* Sprocket holes won't fit on narrow viewports */
  .gh-main::before,
  .gh-main::after {
    display: none;
  }

  .gh-main {
    padding: 1.5rem 1.25rem 3rem;
  }

  .gh-article-image {
    margin: 1.5rem -1.25rem;
  }
}

@media (max-width: 480px) {
  .gh-head-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
