/* ============================================================
   The Log Book — Watchstander Tech Ghost theme
   Coastal navy & brass, dark reading experience.
   ============================================================ */

:root{
  --ink:#12202E; --paper:#ECE4D3; --paper-line:#D8CDB4;
  --navy:#0E1B2A; --navy-2:#16283B; --navy-line:rgba(244,239,227,0.14);
  --brass:#B8863B; --brass-light:#D9A85C; --seafoam:#3E6B62; --cream:#F4EFE3;
  --font-display:'Fraunces', Georgia, serif;
  --font-body:'Archivo', system-ui, sans-serif;
  --maxw:1120px;
  --read:720px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;background:var(--navy);color:var(--cream);
  font-family:var(--font-body);font-size:18px;line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:var(--font-display);font-weight:600;line-height:1.15;margin:0 0 0.5em;color:var(--cream);}
p{margin:0 0 1.2em;}
a{color:var(--brass-light);text-decoration:none;}
a:hover{color:var(--brass);}
img{max-width:100%;height:auto;display:block;}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 28px;}

:focus-visible{outline:3px solid var(--brass-light);outline-offset:2px;border-radius:2px;}
.skip-link{position:absolute;left:-999px;top:0;z-index:200;background:var(--brass);color:var(--navy);padding:12px 20px;font-weight:700;border-radius:0 0 4px 0;}
.skip-link:focus{left:0;}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

/* ---------- Header / nav ---------- */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(14,27,42,0.92);backdrop-filter:saturate(140%) blur(6px);
  border-bottom:1px solid var(--navy-line);
}
.nav{display:flex;align-items:center;justify-content:space-between;padding:16px 28px;max-width:var(--maxw);margin:0 auto;}
.wordmark{display:flex;align-items:center;gap:12px;text-decoration:none;}
.logo-mark{width:34px;height:34px;flex-shrink:0;}
.wm-text{display:flex;flex-direction:column;line-height:1;}
.wm-main{font-family:var(--font-display);font-weight:600;font-size:1.28rem;color:var(--cream);}
.wm-sub{font-family:var(--font-body);font-weight:600;font-size:0.66rem;letter-spacing:0.16em;text-transform:uppercase;color:var(--brass);margin-top:3px;}
.nav-links{display:flex;gap:28px;align-items:center;}
.nav-links a{color:var(--cream);font-size:0.98rem;font-weight:500;border-bottom:1px solid transparent;padding:4px 0;}
.nav-links a:hover{border-bottom-color:var(--brass);color:var(--cream);}
.nav-cta{
  display:inline-block;background:var(--brass);color:var(--navy)!important;font-weight:600;
  padding:10px 20px;border-radius:3px;border-bottom:none!important;
}
.nav-cta:hover{background:var(--brass-light);}
.menu-toggle{display:none;background:none;border:none;cursor:pointer;padding:6px;}
.menu-toggle span{display:block;width:24px;height:2px;background:var(--cream);margin:5px 0;}
@media (max-width:820px){
  .nav-links{position:fixed;inset:62px 0 0 0;background:var(--navy);flex-direction:column;align-items:flex-start;padding:28px;gap:22px;transform:translateX(100%);transition:transform .3s ease;}
  .nav-links.open{transform:translateX(0);}
  .nav-links a{font-size:1.2rem;}
  .menu-toggle{display:block;}
}

/* ---------- Log Book hero (index) ---------- */
.log-hero{
  background:var(--navy);padding:88px 0 56px;border-bottom:1px solid var(--navy-line);
  background-image:
    repeating-linear-gradient(var(--navy-line) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, var(--navy-line) 0 1px, transparent 1px 96px);
}
.log-eyebrow{font-family:var(--font-display);font-style:italic;color:var(--brass);font-size:1.15rem;display:block;margin-bottom:8px;}
.log-hero h1{font-size:clamp(2.2rem,4vw,3rem);}
.log-hero p{color:rgba(244,239,227,0.82);font-size:1.15rem;max-width:60ch;}
.log-note{
  display:inline-flex;align-items:center;gap:10px;margin-top:20px;
  padding:9px 16px;border:1px solid var(--brass);border-radius:100px;background:rgba(184,134,59,0.1);
}
.log-note span{font-size:0.92rem;font-weight:600;color:var(--brass-light);}
.log-note .dot{width:9px;height:9px;border-radius:50%;background:var(--brass-light);flex-shrink:0;animation:pulse 2.4s ease-out infinite;}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(217,168,92,0.55);}70%{box-shadow:0 0 0 8px rgba(217,168,92,0);}100%{box-shadow:0 0 0 0 rgba(217,168,92,0);}}
@media (prefers-reduced-motion:reduce){.log-note .dot{animation:none;}}

/* ---------- Post list ---------- */
.post-feed{padding:56px 0 80px;}
.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:26px;}
@media (max-width:900px){.post-grid{grid-template-columns:1fr 1fr;}}
@media (max-width:620px){.post-grid{grid-template-columns:1fr;}}
.post-card{
  display:flex;flex-direction:column;background:var(--navy-2);border:1px solid var(--navy-line);
  border-radius:8px;overflow:hidden;transition:transform .15s ease, box-shadow .2s ease;
}
.post-card:hover{transform:translateY(-3px);box-shadow:0 16px 34px rgba(0,0,0,0.3);}
.post-card-img{aspect-ratio:16/9;overflow:hidden;background:var(--navy);}
.post-card-img img{width:100%;height:100%;object-fit:cover;}
.post-card-body{padding:22px 24px 26px;display:flex;flex-direction:column;flex:1;}
.post-card-tag{align-self:flex-start;font-size:0.68rem;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--brass);border:1px solid var(--brass);border-radius:100px;padding:3px 11px;margin-bottom:14px;}
.post-card h2{font-size:1.25rem;margin:0 0 8px;line-height:1.25;}
.post-card h2 a{color:var(--cream);}
.post-card h2 a:hover{color:var(--brass-light);}
.post-card-date{font-size:0.82rem;color:rgba(244,239,227,0.55);margin-bottom:12px;}
.post-card-excerpt{font-size:0.96rem;color:rgba(244,239,227,0.78);margin:0 0 16px;flex:1;}
.post-card-more{font-weight:600;font-size:0.92rem;color:var(--brass-light);}

/* ---------- Single post ---------- */
.post-hero{
  background:var(--navy);padding:80px 0 40px;border-bottom:1px solid var(--navy-line);
  background-image:
    repeating-linear-gradient(var(--navy-line) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, var(--navy-line) 0 1px, transparent 1px 96px);
}
.post-hero .wrap{max-width:var(--read);}
.back-link{display:inline-block;margin-bottom:22px;color:var(--brass-light);font-weight:600;font-size:0.92rem;}
.post-meta{font-size:0.85rem;color:var(--brass);font-weight:600;letter-spacing:0.04em;text-transform:uppercase;margin-bottom:10px;}
.post-hero h1{font-size:clamp(2rem,4vw,2.9rem);}
.post-excerpt-lead{font-size:1.2rem;color:rgba(244,239,227,0.82);margin-top:14px;}
.post-feature-img{max-width:var(--maxw);margin:40px auto 0;padding:0 28px;}
.post-feature-img img{width:100%;border-radius:10px;border:1px solid var(--navy-line);}

.post-content{max-width:var(--read);margin:0 auto;padding:48px 28px 72px;}
.post-content p, .post-content ul, .post-content ol, .post-content blockquote{
  font-size:1.12rem;line-height:1.75;color:rgba(244,239,227,0.9);
}
.post-content h2{font-size:1.7rem;margin:1.6em 0 0.5em;color:var(--cream);}
.post-content h3{font-size:1.35rem;margin:1.4em 0 0.5em;color:var(--cream);}
.post-content a{color:var(--brass-light);text-decoration:underline;text-underline-offset:2px;}
.post-content a:hover{color:var(--brass);}
.post-content img{border-radius:8px;margin:1.5em 0;}
.post-content blockquote{
  border-left:3px solid var(--brass);padding:4px 0 4px 24px;margin:1.5em 0;
  font-family:var(--font-display);font-style:italic;font-size:1.3rem;color:var(--cream);
}
.post-content ul, .post-content ol{padding-left:1.4em;}
.post-content li{margin-bottom:0.5em;}
.post-content code{background:var(--navy-2);padding:2px 7px;border-radius:4px;font-size:0.9em;color:var(--brass-light);}
.post-content pre{background:var(--navy-2);border:1px solid var(--navy-line);border-radius:8px;padding:18px 20px;overflow-x:auto;}
.post-content hr{border:none;border-top:1px solid var(--navy-line);margin:2.5em 0;}

/* ---------- Subscribe ---------- */
.subscribe-block{
  max-width:var(--read);margin:0 auto;padding:36px;border-radius:10px;
  background:linear-gradient(120deg, var(--navy-2) 0%, var(--navy) 100%);
  border:1px solid rgba(217,168,92,0.4);text-align:center;
}
.subscribe-block h2{font-size:1.5rem;margin-bottom:8px;}
.subscribe-block p{color:rgba(244,239,227,0.82);margin:0 auto 20px;max-width:46ch;}
.subscribe-form{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;}
.subscribe-form input{
  padding:13px 16px;border-radius:4px;border:1px solid var(--navy-line);
  background:var(--navy-2);color:var(--cream);font-family:var(--font-body);font-size:1rem;min-width:260px;
}
.subscribe-form input::placeholder{color:rgba(244,239,227,0.45);}
.btn{display:inline-block;font-family:var(--font-body);font-weight:600;font-size:0.98rem;cursor:pointer;padding:13px 24px;border-radius:3px;border:1px solid transparent;text-decoration:none;}
.btn-brass{background:var(--brass);color:var(--navy);}
.btn-brass:hover{background:var(--brass-light);color:var(--navy);}
@media (max-width:520px){.subscribe-form,.subscribe-form input{width:100%;}}

/* ---------- Pagination ---------- */
.pagination{display:flex;justify-content:center;gap:18px;align-items:center;padding:24px 0 8px;}
.pagination a, .pagination .page-number{color:var(--cream);font-weight:600;}
.pagination a{padding:10px 20px;border:1px solid var(--navy-line);border-radius:4px;}
.pagination a:hover{border-color:var(--brass);color:var(--brass-light);}
.page-number{color:rgba(244,239,227,0.6);font-size:0.92rem;}

/* ---------- Footer ---------- */
.site-footer{background:var(--navy);border-top:1px solid var(--navy-line);padding:48px 0 32px;color:rgba(244,239,227,0.6);font-size:0.9rem;}
.footer-inner{display:flex;justify-content:space-between;align-items:flex-start;gap:32px;flex-wrap:wrap;padding-bottom:28px;border-bottom:1px solid var(--navy-line);}
.footer-nav{display:flex;gap:24px;flex-wrap:wrap;}
.footer-nav a{color:rgba(244,239,227,0.78);}
.footer-nav a:hover{color:var(--cream);}
.footer-legal{display:flex;justify-content:space-between;align-items:center;gap:20px;padding-top:24px;font-size:0.82rem;color:rgba(244,239,227,0.5);flex-wrap:wrap;}
.footer-ichthys{width:38px;height:38px;object-fit:contain;opacity:0.9;}

/* ---------- Error page ---------- */
.error-wrap{text-align:center;padding:120px 28px;}
.error-code{font-family:var(--font-display);font-size:5rem;color:var(--brass);margin:0;}

/* ---------- Koenig editor: wide & full-width content ---------- */
.gh-content{position:relative;}
/* Default content sits at reading width (set by .post-content max-width).
   Wide and full break out beyond it. */
.gh-content .kg-width-wide{
  position:relative;width:100%;
  margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);
  max-width:none;
}
.gh-content .kg-width-wide img{
  display:block;margin:0 auto;max-width:1120px;width:100%;border-radius:8px;
}
.gh-content .kg-width-full{
  position:relative;width:100vw;
  margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);
  max-width:100vw;
}
.gh-content .kg-width-full img{width:100%;border-radius:0;}

/* Koenig image cards & captions */
.gh-content figure{margin:1.6em 0;}
.gh-content figure img{border-radius:8px;}
.gh-content .kg-width-full figure,
.gh-content figure.kg-width-full{margin:1.6em 0;}
.gh-content figcaption{
  text-align:center;font-size:0.88rem;color:rgba(244,239,227,0.6);margin-top:10px;
}

/* Koenig embed / gallery / bookmark basics */
.gh-content .kg-embed-card{display:flex;flex-direction:column;align-items:center;margin:1.6em 0;}
.gh-content .kg-gallery-container{display:flex;flex-direction:column;gap:10px;margin:1.6em 0;}
.gh-content .kg-gallery-row{display:flex;gap:10px;}
.gh-content .kg-gallery-image img{width:100%;height:100%;object-fit:cover;border-radius:6px;}
.gh-content .kg-bookmark-card{margin:1.6em 0;}
.gh-content .kg-bookmark-container{
  display:flex;background:var(--navy-2);border:1px solid var(--navy-line);border-radius:8px;
  overflow:hidden;text-decoration:none;color:var(--cream);
}
.gh-content .kg-bookmark-content{padding:20px;flex:1;}
.gh-content .kg-bookmark-title{font-weight:600;color:var(--cream);}
.gh-content .kg-bookmark-description{color:rgba(244,239,227,0.7);font-size:0.92rem;margin-top:6px;}
.gh-content .kg-bookmark-thumbnail img{width:180px;height:100%;object-fit:cover;}
.gh-content .kg-callout-card{
  padding:18px 22px;border-radius:8px;background:var(--navy-2);
  border-left:3px solid var(--brass);margin:1.6em 0;
}
.gh-content .kg-button-card{text-align:center;margin:1.6em 0;}
.gh-content .kg-btn{
  display:inline-block;background:var(--brass);color:var(--navy);
  padding:12px 24px;border-radius:3px;font-weight:600;text-decoration:none;
}
