/*
Theme Name: Fogbank
Theme URI: https://weirdpnw.com
Author: Weird PNW
Description: Pacific Northwest gothic for strange stories — fog, cedar, and things that watch from the treeline.
Version: 1.6.3
Requires at least: 6.4
Tested up to: 6.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: weird-pnw
*/

:root {
  --ink: #070806;
  --canopy: #10140f;
  --moss: #2c3a28;
  --lichen: #7a9a6a;
  --bone: #e6dcc8;
  --paper: #cfc3a8;
  --ember: #d4783a;
  --ember-dim: #8a4a22;
  --fog: rgba(198, 210, 190, 0.08);
  --rule: rgba(230, 220, 200, 0.14);
  --shadow: rgba(0, 0, 0, 0.55);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--bone);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.7;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(122, 154, 106, 0.12), transparent 55%),
    radial-gradient(800px 500px at 110% 80%, rgba(212, 120, 58, 0.08), transparent 50%),
    linear-gradient(180deg, var(--canopy) 0%, var(--ink) 40%, #050605 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  box-shadow: inset 0 0 180px 40px rgba(0, 0, 0, 0.55);
}

.site {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--lichen);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ember); }
a:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ember);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: min(1080px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(7, 8, 6, 0.55), transparent);
}

body.home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  border-bottom-color: transparent;
  background: linear-gradient(180deg, rgba(7, 8, 6, 0.62), transparent);
}

body.home .brand-title,
body.home .nav-primary a,
body.home .account-icon {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header-end {
  display: flex;
  align-items: flex-end;
  gap: 1.15rem;
  margin-left: auto;
}

.account-icon {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-bottom: -0.15rem;
  color: var(--paper);
  border: 1px solid rgba(230, 220, 200, 0.22);
  border-radius: 999px;
  text-decoration: none;
}
.account-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}
.account-icon:hover,
.account-icon.is-current {
  color: var(--ember);
  border-color: var(--ember-dim);
}
.account-icon.is-in::after {
  content: "";
  position: absolute;
  right: 0.18rem;
  bottom: 0.18rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 2px var(--ink);
}

.brand {
  text-decoration: none;
  color: var(--bone);
}
.brand:hover { color: var(--bone); }

.brand-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lichen);
  margin-bottom: 0.2rem;
}

.brand-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: 0.12em;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0;
}

.brand-tag {
  margin: 0.35rem 0 0;
  color: var(--paper);
  font-style: italic;
  font-size: 1.05rem;
  opacity: 0.82;
}

.nav-primary ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav-primary a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15rem;
}
.nav-primary a:hover,
.nav-primary .current-menu-item a {
  color: var(--ember);
  border-bottom-color: var(--ember-dim);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding: 8.5rem 0 4.25rem;
  text-align: center;
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(7, 8, 6, 0.28) 0%, rgba(7, 8, 6, 0.18) 38%, rgba(7, 8, 6, 0.78) 100%),
    var(--photo-fog);
  background-size: cover;
  background-position: center 58%;
  color: var(--bone);
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero h1,
.hero p,
.hero-watch {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7);
}

.hero-watch {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  margin: 0 auto;
  max-width: 16ch;
  font-style: italic;
}

.hero p {
  max-width: 38rem;
  margin: 1.25rem auto 0;
  color: var(--paper);
  font-size: 1.2rem;
}

.fog-rule {
  height: 1px;
  border: 0;
  margin: 0 auto;
  max-width: 28rem;
  background: linear-gradient(90deg, transparent, var(--ember-dim), var(--lichen), var(--ember-dim), transparent);
}

.story-list {
  display: grid;
  gap: 1.5rem;
  padding: 0 0 4rem;
}

.story-card {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.story-card:hover .story-card-title { color: var(--ember); }

.story-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lichen);
}

.story-card-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--bone);
}

.story-card p {
  margin: 0;
  color: var(--paper);
}

.content-pane {
  width: min(720px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 3rem 0 4.5rem;
}

.entry-header { margin-bottom: 2rem; }

.entry-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0.4rem 0 0;
  font-style: italic;
}

.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.35rem; }
.entry-content { font-size: 1.14rem; line-height: 1.78; }
.entry-content h2,
.entry-content h3 {
  font-family: var(--serif);
  font-weight: 600;
  margin: 2rem 0 0.7rem;
}
.entry-content blockquote {
  margin: 1.75rem 0;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 2px solid var(--ember-dim);
  color: var(--paper);
  font-style: italic;
  font-size: 1.2rem;
}
.entry-content img {
  max-width: 100%;
  height: auto;
}

.drop-cap .entry-content > p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 4.4rem;
  line-height: 0.75;
  padding: 0.12em 0.12em 0 0;
  color: var(--ember);
  font-style: italic;
}

.comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.comments h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-style: italic;
}
.comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.comment-body {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: rgba(7, 8, 6, 0.65);
  border: 1px solid var(--rule);
  color: var(--bone);
  padding: 0.7rem 0.8rem;
  font-family: var(--body);
  font-size: 1rem;
}
.comment-form .submit,
.wp-block-button__link,
button,
.button {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ember);
  border: 1px solid var(--ember-dim);
  padding: 0.75rem 1.1rem;
  cursor: pointer;
}
.comment-form .submit:hover { background: rgba(212, 120, 58, 0.12); }

.search-form {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.search-form input[type="search"] {
  flex: 1;
  background: rgba(7, 8, 6, 0.65);
  border: 1px solid var(--rule);
  color: var(--bone);
  padding: 0.7rem 0.8rem;
  font-family: var(--body);
}

.site-footer {
  margin-top: auto;
  position: relative;
  isolation: isolate;
  min-height: 22rem;
  display: flex;
  align-items: flex-end;
  padding: 6rem 0 2rem;
  border-top: 0;
  color: var(--paper);
  font-size: 0.95rem;
  background-color: #020204;
  background-image:
    linear-gradient(180deg, var(--ink) 0%, rgba(2, 2, 4, 0.2) 28%, rgba(2, 2, 4, 0.55) 100%),
    var(--photo-moon);
  background-size: cover;
  background-position: center 28%;
}
.newsletter-banner {
  margin-top: auto;
  padding: 2.4rem 0 2.2rem;
  border-top: 1px solid var(--rule);
  background:
    linear-gradient(180deg, rgba(44, 58, 40, 0.28), rgba(7, 8, 6, 0.72)),
    radial-gradient(900px 240px at 12% 0%, rgba(122, 154, 106, 0.14), transparent 70%);
}
.newsletter-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 22rem);
  gap: 2rem 2.5rem;
  align-items: end;
}
.newsletter-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lichen);
}
.newsletter-copy h2 {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.1;
  color: var(--bone);
}
.newsletter-copy p {
  margin: 0;
  color: var(--paper);
  max-width: 36rem;
}
.newsletter-form-wrap .form-notice {
  margin: 0 0 0.75rem;
}
.newsletter-label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lichen);
}
.newsletter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: stretch;
}
.newsletter-form input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  background: rgba(7, 8, 6, 0.72);
  border: 1px solid var(--rule);
  color: var(--bone);
  padding: 0.7rem 0.85rem;
  font-family: var(--body);
  font-size: 1rem;
}
.newsletter-banner + .site-footer {
  margin-top: 0;
}
.footer-inner {
  display: grid;
  gap: 1.1rem;
  align-items: start;
}
.account-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}
.account-split h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  margin: 0 0 0.5rem;
}
.comment-notes,
.logged-in-as {
  color: var(--paper);
  font-size: 0.95rem;
}
.footer-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--bone);
  margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}
.footer-copy {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.hero-short {
  min-height: 42vh;
  padding: 7rem 0 2.5rem;
  align-items: flex-end;
}

.hero-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0.8rem; }
.pill {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  color: var(--paper);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
}
.pill:hover { color: var(--ember); border-color: var(--ember-dim); }

.kind-row {
  padding: 0 0 4rem;
}
.kind-row h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.8rem;
  margin: 0 0 0.8rem;
}
.kind-row .pills {
  flex-wrap: wrap;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  padding: 0 0 4rem;
}
.region-card {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}
.region-card h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.8rem;
  margin: 0 0 0.3rem;
}
.region-card h2 a { color: var(--bone); text-decoration: none; }
.region-card h2 a:hover { color: var(--ember); }
.region-kids { list-style: none; padding: 0; margin: 1rem 0 0; }
.region-kids li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  padding: 0 0 4rem;
}
.photo-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.photo-card a.photo-open {
  display: block;
  cursor: zoom-in;
  text-decoration: none;
}
.photo-card a.photo-open:hover img { opacity: 0.88; }
.photo-card h2 a { color: var(--bone); text-decoration: none; }
.photo-card h2 a:hover { color: var(--ember); }

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(5, 6, 5, 0.88);
  cursor: zoom-out;
}
.photo-lightbox.is-open { display: flex; }
.photo-lightbox img {
  max-width: min(1100px, 100%);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.55);
}
.photo-lightbox-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--bone);
}
.photo-card h2 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0.6rem 0 0.2rem;
}

.fog-form { display: grid; gap: 1rem; margin: 2rem 0 4rem; }
.fog-form label { display: grid; gap: 0.35rem; color: var(--paper); }
.fog-form input[type="text"],
.fog-form input[type="email"],
.fog-form input[type="password"],
.fog-form input[type="file"],
.fog-form select,
.fog-form textarea {
  width: 100%;
  background: rgba(7, 8, 6, 0.65);
  border: 1px solid var(--rule);
  color: var(--bone);
  padding: 0.7rem 0.8rem;
  font-family: var(--body);
  font-size: 1rem;
}
.fog-form .check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.95rem;
}
.fog-form .check input { margin-top: 0.35rem; }
.hp { position: absolute; left: -8000px; height: 0; overflow: hidden; }
.form-notice { padding: 0.8rem 1rem; border: 1px solid var(--rule); }
.form-notice.ok { border-color: var(--lichen); color: var(--lichen); }
.form-notice.err { border-color: var(--ember); color: var(--ember); }

@media (max-width: 720px) {
  .story-card { grid-template-columns: 1fr; gap: 0.4rem; }
  .hero {
    min-height: 78vh;
    padding: 7rem 0 3rem;
    background-position: center 62%;
  }
  .hero-short { min-height: 36vh; }
  .site-footer { min-height: 16rem; }
  .header-end {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
  .newsletter-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}
