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

:root {
  --color-primary: #1e73be;
  --color-primary-dark: #1a5a96;
  --color-accent: #1abc9c;
  --color-text: #444;
  --color-text-light: #767676;
  --color-bg: #fff;
  --color-bg-dark: #1d1d1d;
  --color-bg-dark-light: #1d1d1d;
  --color-border: #eee;
  --color-nav-bg: #1d1d1d;
  --color-footer-bg: #1d1d1d;
  --color-footer-text: #858585;
  --font-body: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-heading: 'Raleway', 'Helvetica Neue', sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  font-size: 18px;
  line-height: 1.8;
  background: var(--color-bg);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary); text-decoration: underline; }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}
h1 { font-size: 2em; }
h2 { font-size: 1.75em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.25em; }
h5 { font-size: 1.1em; }
h6 { font-size: 1em; }

/* Header - Painting/Art Background Area */
.site-header {
  background: var(--color-bg-dark);
  text-align: center;
  border-bottom: none;
}

/* Header cover - clips the parallax painting */
.header-cover {
  height: 356px;
  overflow: hidden;
  position: relative;
}

/* Header Top - Title overlay area (on artwork) */
.header-top {
  background: url('/images/header-art.jpg') center/cover no-repeat;
  background-position: 50% 50%;
  padding: 0;
  position: relative;
  height: 356px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

/* Title box - dark overlay */
.site-title-wrap {
  position: relative;
  z-index: 1;
  background: var(--color-bg-dark);
  padding: 30px;
  text-align: center;
  display: inline-block;
  will-change: opacity;
}
.site-title {
  font-family: var(--font-heading);
  font-size: 31.5px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  display: block;
  line-height: 1;
}
.site-title:hover { text-decoration: none; color: var(--color-accent); }

.title-separator {
  display: block;
  width: 100px;
  height: 2px;
  background: rgba(255,255,255,0.3);
  margin: 20px auto;
}

.site-tagline {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0;
  font-size: 18px;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}

/* Navigation - Dark bar with slash separators */
.site-nav {
  background: var(--color-nav-bg);
  border-top: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-inner {
  max-width: 86%;
  width: 1040px;
  display: flex;
  justify-content: flex-start;
}
.site-nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  gap: 0;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}
.site-nav li {
  position: relative;
  line-height: 1;
  margin: 0;
}
.site-nav li + li::before {
  content: "/";
  color: #444;
  font-size: 16px;
  line-height: 1;
  display: block;
  position: absolute;
  left: -3px;
  top: 50%;
  margin-top: -9px;
  z-index: 1000;
}
.site-nav a {
  display: block;
  padding: 27px 20px;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  text-underline-offset: 0.2em;
}
.site-nav a:hover, .site-nav a.active {
  color: #fff;
  text-decoration: underline;
}

/* Content wrapper - 86% width, no card/shadow */
.content-wrapper {
  max-width: 86%;
  width: 1040px;
  margin: 100px auto 0;
}

/* Hero - Homepage */
.hero {
  background: var(--color-bg);
  max-width: none;
  margin: 0;
  border-radius: 0;
}
.hero-image img {
  width: 100%;
  display: block;
}
.hero-content {
  padding: 0;
  font-size: 19px;
  line-height: 28.5px;
  color: var(--color-text);
}
.hero-content p { margin-bottom: 1em; }
.hero-content a { text-decoration: none; }
.hero-content a:hover { text-decoration: underline; }

/* Float images inline with text (WP-style text wrapping).
   In Hugo markdown, img+text on same line = same <p> tag.
   WP theme floats these images left with text wrapping. */
.hero-content p > img:first-child,
.page-container p > img:first-child {
  float: left;
  margin: 0 20px 10px 0;
  max-width: 240px;
}
/* When two images sit together (no text), let them be side-by-side
   at natural size instead of forcing 240px float */
.page-container p > img:first-child:nth-last-child(2),
.page-container p > img:first-child:nth-last-child(2) ~ img {
  float: left;
  max-width: 48%;
  margin: 0 10px 10px 0;
}
/* Images that are sole children of a <p> (standalone block images)
   should NOT float - display as full-width block */
.page-container p > img:only-child {
  float: none;
  display: block;
  margin: 20px 0;
  max-width: 100%;
}
/* Clearfix for paragraphs containing floated images */
.hero-content p::after,
.page-container p::after {
  content: "";
  display: table;
  clear: both;
}

/* Page Content */
.page-content {
  max-width: none;
  margin: 0;
  background: var(--color-bg);
  border-radius: 0;
}
.page-container {
  padding: 0;
}
.page-container h1 {
  font-family: var(--font-body);
  font-size: 45px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid #ddd;
  color: #2d2d2d;
  text-transform: none;
  letter-spacing: normal;
}
.page-container h2 {
  font-family: var(--font-heading);
  font-size: 1.75em;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.75em;
  color: var(--color-text);
  border-bottom: none;
  padding-bottom: 0;
}
.page-container h3 {
  font-family: var(--font-heading);
  font-size: 1.5em;
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}
.page-container p {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 28.5px;
  color: #444;
  margin-bottom: 20px;
}
.page-container ul, .page-container ol {
  margin-bottom: 30px;
  padding-left: 0;
  list-style-position: inside;
}
.page-container li { margin-bottom: 0; }
.page-container em { font-style: italic; }
.page-container strong { font-weight: 700; }
.page-container blockquote,
.hero-content blockquote {
  background: #eee;
  border: none;
  border-left: none;
  padding: 21px;
  margin: 30px 0;
  font-style: normal;
  color: #666;
  font-size: 19px;
  line-height: 28.5px;
  overflow: visible;
}
.page-container blockquote p,
.hero-content blockquote p {
  color: #666;
  font-size: 19px;
  line-height: 28.5px;
  margin-bottom: 10px;
}
.page-container blockquote p:last-child,
.hero-content blockquote p:last-child {
  margin-bottom: 0;
}
/* Book cover float - WP style: cover floats left, blockquote wraps around */
.page-container .book-cover-float {
  float: left;
  width: 199px;
  margin: 0 19px 23px 0;
  max-width: 199px;
}
.page-container .book-cover-float img {
  width: 100%;
  height: auto;
  display: block;
}
/* Clear float after book section */
.page-container .clear {
  clear: both;
}
.page-container hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2em 0;
  clear: both;
}
.page-container img {
  border-radius: 0;
}
.page-container a { color: var(--color-primary); text-decoration: none; }
.page-container a:hover { text-decoration: underline; }

/* Contact Form - matches WP Flavor theme */
.contact-form { margin-top: 1.5rem; }
.form-group { margin-bottom: 0; }
.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0;
  font-size: 16px;
  color: #2d2d2d;
}
.form-group label span {
  font-weight: 400;
  color: #999;
  font-size: 14px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 16px;
  background: transparent;
  color: var(--color-text);
  margin-bottom: 10px;
}
.form-group textarea {
  border: 1px solid #ddd;
  padding: 10px;
  min-height: 150px;
  margin-top: 5px;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #999;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 15px;
  border-radius: 0;
  font-weight: 400;
  font-size: 16px;
  font-family: var(--font-body);
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  text-align: center;
  margin-top: 10px;
}
.btn-primary {
  background: #1d1d1d;
  color: #fff;
}
.btn-primary:hover { background: #333; color: #fff; text-decoration: none; }

/* Footer - Dark background */
.site-footer {
  text-align: center;
  padding: 25px 0 4%;
  font-size: 0.8rem;
  color: var(--color-footer-text);
  background: var(--color-footer-bg);
  margin-top: 0;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-top: none;
}
.footer-widgets {
  max-width: 86%;
  width: 1040px;
  margin: 0 auto;
  padding: 60px 0 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  text-align: left;
}
.footer-widgets .widget {
  flex: 1;
}
.footer-widgets .widget h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}
.social-links {
  margin-bottom: 0;
  display: flex;
  gap: 12px;
}
.social-links a {
  display: inline-block;
  font-size: 24px;
  color: #4a8fc7;
  text-decoration: none;
}
.social-links a:hover {
  color: #fff;
  text-decoration: none;
}
.footer-search {
  text-align: right;
}
.footer-search form {
  display: flex;
  gap: 0;
}
.footer-search input[type="search"] {
  padding: 8px 12px;
  border: 1px solid #444;
  background: #333;
  color: #fff;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  width: 200px;
}
.footer-search input[type="search"]::placeholder {
  color: #888;
}
.footer-search button {
  padding: 8px 16px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: var(--font-body);
}
.footer-search button:hover {
  background: var(--color-primary-dark);
}
.footer-bottom {
  max-width: 86%;
  width: 1040px;
  margin: 0 auto;
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  margin: 0;
  font-size: 11px;
  color: var(--color-footer-text);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.footer-bottom a {
  color: var(--color-footer-text);
  text-decoration: none;
}
.footer-bottom a:hover {
  color: #fff;
}

/* Mobile Nav Toggle (hidden on desktop) */
.nav-toggle-container {
  display: none;
}
.nav-toggle {
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: inline-block;
  height: 57px;
  padding: 20px 0;
  position: relative;
  width: 32px;
  cursor: pointer;
}
.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 3px;
  margin-top: 4px;
  background: #666;
  transition: background-color 0.2s;
}
.nav-toggle .bar:first-child {
  margin-top: 0;
}
.nav-toggle.active .bar {
  background-color: #fff;
}

/* Scroll Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--reveal-delay, 0) * 0.1s);
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive */
@media (max-width: 1040px) {
  body { font-size: 16px; }
  .content-wrapper { width: auto; }
  .nav-inner { width: auto; }
  .footer-widgets { width: auto; }
  .footer-bottom { width: auto; }
}

@media (max-width: 800px) {
  body { font-size: 18px; }

  .site-title { font-size: 24px; letter-spacing: 2px; }
  .site-title-wrap { padding: 20px; }
  .header-cover { height: auto; }
  .header-top { height: auto; min-height: 250px; padding: 60px 0; }

  .content-wrapper {
    max-width: 92%;
    width: auto;
    margin: 40px auto 0;
  }

  /* Hamburger toggle visible */
  .nav-toggle-container {
    display: flex;
    justify-content: flex-start;
    background: var(--color-nav-bg);
    padding: 0 20px;
  }

  .nav-inner {
    max-width: 100%;
    width: auto;
    flex-direction: column;
  }

  /* Hide nav menu by default on mobile */
  .site-nav .nav-menu {
    display: none;
    flex-direction: column;
    background-color: #282828;
  }
  .site-nav .nav-menu.show {
    display: flex;
  }

  .site-nav a {
    font-size: 13px;
    padding: 24px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background-color: #282828;
  }
  .site-nav a:hover, .site-nav a.active {
    color: #fff;
  }
  .site-nav li + li::before { display: none; }

  .hero-content img,
  .page-container img.float-left,
  .page-container img.float-right {
    float: none !important;
    display: block;
    margin: 0 auto 20px !important;
    max-width: 100% !important;
    width: auto !important;
  }

  /* Unfloat inline-styled images at mobile (e.g. style="float:right") */
  .hero-content p > img,
  .page-container p > img:first-child {
    float: none !important;
    display: block;
    margin: 0 auto 20px !important;
    max-width: 100% !important;
    width: auto !important;
  }

  /* Unfloat book cover containers at mobile */
  .page-container .book-cover-float {
    float: none;
    width: auto;
    max-width: 199px;
    margin: 0 auto 20px;
  }

  .footer-widgets {
    flex-direction: column;
    gap: 30px;
    width: auto;
  }
  .footer-search { text-align: left; }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    width: auto;
  }
}

@media (max-width: 500px) {
  .site-title { font-size: 20px; letter-spacing: 1px; }
  .header-cover { height: auto; }
  .header-top { min-height: 200px; padding: 40px 0; }
  .site-title-wrap { padding: 15px; }
}
