/*
Theme Name: Easelly Blog
Author: Easelly
Description: Minimal single-column blog theme for easel.ly/blog. Title, a couple of images, plain text.
Version: 1.3.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later (fonts and logo excluded)
Text Domain: easelly-blog
*/

@font-face {
  font-family: "Roc Grotesk";
  src: url("assets/fonts/roc-grotesk-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Roc Grotesk";
  src: url("assets/fonts/roc-grotesk-medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Roc Grotesk";
  src: url("assets/fonts/roc-grotesk-bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Easelly brand kit */
  --bg: #ffffff;
  --fg: #333333;          /* body text */
  --heading: #081e40;     /* navy */
  --muted: #4a4a4a;       /* secondary text */
  --rule: #e1e6f0;
  --panel: #f4f7fd;
  --brand: #4974e5;       /* primary blue */
  --brand-ink: #ffffff;
  --sky: #49b1e5;         /* logo blue */
  --font: "Roc Grotesk", "Helvetica Neue", Arial, sans-serif;
  --col: 38rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 1rem; font-weight: 400; line-height: 1.5; letter-spacing: -0.1px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; word-wrap: normal !important;
}

.screen-reader-text:focus {
  clip: auto; clip-path: none; width: auto; height: auto; margin: 0; padding: .75rem 1rem;
  top: 8px; left: 8px; z-index: 10; background: var(--bg); color: var(--brand);
}

.gutter { padding-left: 16px; padding-right: 16px; }

/* Site bar */
.site { border-bottom: 1px solid var(--rule); }
.site .inner {
  min-height: 74px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
/* Same live-text logo as the easel.ly header */
.wordmark { display: inline-flex; align-items: baseline; gap: .55rem; text-decoration: none; line-height: 1.2; }
.wordmark b { font-weight: 700; font-size: 24px; letter-spacing: normal; color: #2b2b2b; }
.wordmark b span { color: #49b0e4; }
.wordmark small {
  font-weight: 500; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.site nav { display: flex; gap: 1.25rem; font-size: .9rem; font-weight: 500; }
.site nav a { text-decoration: none; color: var(--muted); }
.site nav a:hover { color: var(--brand); }
@media (max-width: 520px) { .site nav .hide-sm { display: none; } }

/* Reading column */
main { padding-block: 3.5rem 4rem; }
.col { max-width: var(--col); margin: 0 auto; }

.byline { display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.avatar {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: none;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center;
  font-weight: 700; font-size: 1rem; letter-spacing: -.03em; text-transform: lowercase;
}
.byline b { display: block; font-weight: 700; }
.byline span { display: block; color: var(--muted); }

.post-title {
  color: var(--heading); font-weight: 700; font-size: clamp(2rem, 1.3rem + 3vw, 2.9rem); line-height: 1.08; letter-spacing: -.025em;
  text-wrap: balance; margin: 2.25rem 0 .75rem;
}
.meta { color: var(--muted); font-size: .875rem; display: flex; gap: .5rem; flex-wrap: wrap; }

.hero { margin: 2.25rem 0 0; }
.hero img { display: block; width: 100%; border-radius: 10px; }

/* Post content (block editor output) */
.prose { font-size: 1.1875rem; line-height: 1.7; margin-top: 2rem; }
.prose > * { margin-top: 0; margin-bottom: 1.35em; }
.prose h2, .prose h3, .prose h4 {
  color: var(--heading);
  font-weight: 700; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; margin: 2.2em 0 .6em;
}
.prose h2 { font-size: 1.35rem; }
.prose h3 { font-size: 1.15rem; }
.prose strong, .prose b { font-weight: 700; }
.prose a { color: var(--brand); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote {
  margin-left: 0; margin-right: 0; padding-left: 1.1rem; border-left: 3px solid var(--sky); font-style: italic;
}
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.prose code { font-size: .9em; background: var(--panel); padding: .1em .35em; border-radius: 4px; }
.prose pre { background: var(--panel); padding: 1rem; border-radius: 8px; overflow-x: auto; font-size: .9rem; }
.prose pre code { background: none; padding: 0; }

.prose figure, .prose .wp-block-image { margin: 2.25rem 0; }
.prose figure img, .prose .wp-block-image img { display: block; width: 100%; border-radius: 10px; }
.prose figcaption, .prose .wp-element-caption {
  font-size: .875rem; color: var(--muted); margin-top: .65rem; line-height: 1.45; text-align: left;
}
.prose .wp-block-button__link {
  background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 700;
  border-radius: 8px; padding: .7rem 1.2rem; display: inline-block;
}
.prose .wp-block-embed { margin: 2.25rem 0; }
.prose iframe { max-width: 100%; }

.endmark { display: flex; justify-content: center; gap: .4rem; margin: 3rem 0; }
.endmark i { width: 6px; height: 6px; border-radius: 50%; background: var(--rule); display: block; }
.endmark i:nth-child(2) { background: var(--sky); }

.back { border-top: 1px solid var(--rule); padding-top: 1.5rem; font-weight: 700; }
.back a { text-decoration: none; color: var(--muted); }
.back a:hover { color: var(--brand); }

/* Index */
.index-head h1 {
  color: var(--heading); font-weight: 700; font-size: clamp(2rem, 1.4rem + 2.6vw, 2.6rem); letter-spacing: -.025em; line-height: 1.1;
  margin: 0 0 .5rem; text-wrap: balance;
}
.index-head p { color: var(--muted); font-size: 1.0625rem; margin: 0; max-width: 32rem; }
.posts { list-style: none; padding: 0; margin: 2.5rem 0 3rem; display: grid; }
.posts li { border-top: 1px solid var(--rule); }
.posts li:last-child { border-bottom: 1px solid var(--rule); }
.posts a { display: grid; gap: .3rem; padding-block: 1.35rem; text-decoration: none; }
.posts time { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.posts h2 { color: var(--heading); font-weight: 700; font-size: 1.3rem; line-height: 1.25; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.posts a:hover h2 { color: var(--brand); }
.posts p { margin: 0; color: var(--muted); }
.empty { color: var(--muted); margin-top: 2.5rem; }

.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; font-weight: 700; font-size: .9rem; }
.pagination .page-numbers {
  text-decoration: none; padding: .35rem .75rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--muted);
}
.pagination .page-numbers.current { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); color: var(--muted); font-size: .85rem; }
.site-foot .inner {
  padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem;
}

/* Header and footer run full width, with the same edges as easel.ly */
@media (min-width: 768px) { .site, .site-foot { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1280px) { .site, .site-foot { padding-left: 100px; padding-right: 70px; } }

@media (prefers-reduced-motion: no-preference) {
  .posts a h2, .site nav a { transition: color .15s ease; }
}
