/*
Theme Name: His Precious Gift
Theme URI: https://hispreciousgift.com/
Author: OpenCode
Description: A classic WordPress theme for His Precious Gift, redesigned with a refined editorial aesthetic and native templates for pages, posts, archives, and contact.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: his-precious-gift
*/

:root {
  --bg: #f6f0e7;
  --bg-soft: #fbf8f3;
  --surface: rgba(255, 252, 248, 0.84);
  --surface-strong: #fffdfa;
  --surface-deep: #ede3d3;
  --text: #35261f;
  --text-soft: #665046;
  --heading: #2b1b16;
  --line: rgba(100, 69, 53, 0.18);
  --accent: #6f2340;
  --accent-soft: #a05b73;
  --accent-alt: #a57b38;
  --shadow: 0 18px 50px rgba(65, 35, 23, 0.09);
  --shadow-soft: 0 8px 24px rgba(65, 35, 23, 0.07);
  --radius: 24px;
  --radius-sm: 16px;
  --shell: 1180px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --body: 'Source Sans 3', 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(165, 123, 56, 0.09), transparent 30%),
    linear-gradient(180deg, #f8f4ed 0%, #f4ede2 100%);
  line-height: 1.7;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #431225;
}

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

figure {
  margin: 0;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell-inner {
  width: min(calc(100% - 2rem), var(--shell));
  margin: 0 auto;
}

.site-main {
  min-height: 55vh;
}

.utility-bar {
  border-bottom: 1px solid var(--line);
  background: rgba(111, 35, 64, 0.05);
  backdrop-filter: blur(12px);
}

.utility-inner,
.header-inner,
.footer-bottom,
.hero-grid,
.portrait-grid,
.content-grid,
.contact-layout,
.footer-grid,
.cta-card,
.form-row-grid {
  display: grid;
  gap: 1.5rem;
}

.utility-inner {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0.8rem 0;
}

.utility-note {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-soft);
}

.utility-note span {
  color: var(--accent);
  margin-left: 0.5rem;
}

.utility-links {
  display: flex;
  gap: 1rem;
  font-size: 0.94rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 243, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(100, 69, 53, 0.12);
}

.header-inner {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 1rem 0;
}

.site-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--heading);
}

.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(165, 123, 56, 0.36);
  box-shadow: var(--shadow-soft);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark img,
.brand-mark .custom-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.brand-title,
.footer-kicker,
.panel-kicker,
.eyebrow,
.entry-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

.brand-title {
  font-family: var(--serif);
  font-size: 2rem;
  text-transform: none;
  letter-spacing: 0.01em;
}

.brand-tagline {
  color: var(--accent-alt);
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.primary-nav {
  justify-self: end;
}

.primary-menu,
.menu-fallback,
.footer-menu,
.footer-links,
.mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu,
.menu-fallback {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}

.primary-menu a,
.menu-fallback a {
  color: var(--heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a,
.primary-menu .current-menu-ancestor > a {
  color: var(--accent);
}

.nav-toggle,
.mobile-close,
.back-to-top,
.search-submit {
  border: 0;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  justify-self: end;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--heading);
  display: block;
  margin: 4px auto;
}

.mobile-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(340px, 88vw);
  background: var(--surface-strong);
  z-index: 80;
  box-shadow: -10px 0 40px rgba(29, 15, 11, 0.14);
}

.mobile-panel-inner {
  padding: 1.5rem;
}

.mobile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.mobile-panel-head p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--heading);
}

.mobile-close {
  font-size: 2rem;
  background: transparent;
  color: var(--heading);
}

.mobile-menu li,
.mobile-menu .page_item {
  border-top: 1px solid var(--line);
}

.mobile-menu a,
.mobile-menu .page_item a {
  display: block;
  padding: 0.95rem 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(25, 16, 14, 0.38);
  z-index: 70;
}

.hero-section,
.page-hero,
.pathways-section,
.portrait-section,
.journal-section,
.cta-section {
  padding: 4.5rem 0;
}

.hero-section {
  padding-top: 5.5rem;
}

.hero-grid,
.portrait-grid,
.content-grid,
.contact-layout,
.footer-grid,
.cta-card {
  grid-template-columns: repeat(12, 1fr);
}

.hero-copy,
.portrait-copy,
.content-area-stack,
.entry-shell,
.contact-shell {
  grid-column: span 7;
}

.hero-panel,
.portrait-media,
.content-sidebar {
  grid-column: span 5;
}

.hero-copy h1,
.page-hero h1,
.section-heading h2,
.portrait-copy h2,
.cta-card h2,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.comments-title,
.comment-reply-title,
.footer-intro h2 {
  font-family: var(--serif);
  color: var(--heading);
  line-height: 1.02;
  margin: 0;
}

.hero-copy h1 {
  font-size: clamp(3.3rem, 8vw, 6.2rem);
  max-width: 11ch;
}

.hero-lead,
.hero-summary {
  font-size: 1.18rem;
  max-width: 60ch;
  color: var(--text-soft);
  margin: 1.25rem 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button,
.wp-block-button__link,
button[type='submit'],
input[type='submit'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.button:hover,
.wp-block-button__link:hover,
button[type='submit']:hover,
input[type='submit']:hover {
  transform: translateY(-1px);
}

.button-primary,
button[type='submit'],
input[type='submit'] {
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  background: transparent;
  color: var(--heading);
  border-color: rgba(53, 38, 31, 0.18);
}

.hero-panel-card,
.pathway-card,
.journal-card,
.archive-card,
.widget,
.cta-card,
.entry-shell,
.content-sidebar,
.form-notice,
.contact-form,
.footer-column,
.footer-intro {
  background: var(--surface);
  border: 1px solid rgba(100, 69, 53, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel-card {
  padding: 2rem;
  position: relative;
}

.hero-panel-card::before,
.entry-shell::before,
.content-sidebar::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: calc(var(--radius) - 10px);
  border: 1px solid rgba(165, 123, 56, 0.18);
  pointer-events: none;
}

.hero-panel-card,
.entry-shell,
.content-sidebar {
  position: relative;
}

.hero-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.4rem;
}

.hero-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(100, 69, 53, 0.1);
}

.hero-panel-card blockquote {
  margin: 1.4rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--accent);
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2,
.portrait-copy h2,
.cta-card h2,
.footer-intro h2 {
  font-size: clamp(2.3rem, 4vw, 3.5rem);
}

.pathways-grid,
.journal-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pathway-card,
.journal-card,
.archive-card,
.widget,
.footer-column,
.footer-intro,
.form-notice,
.contact-form,
.entry-shell {
  padding: 1.6rem;
}

.pathway-card h3,
.journal-card h3,
.archive-card-title,
.entry-content h1,
.entry-content h2,
.entry-content h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}

.portrait-media img,
.journal-thumb img,
.archive-card-media img,
.entry-featured-image img {
  border-radius: calc(var(--radius) - 6px);
}

.portrait-media {
  align-self: start;
}

.portrait-media img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.journal-thumb,
.archive-card-media {
  display: block;
  margin-bottom: 1.2rem;
}

.journal-thumb-placeholder {
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius) - 8px);
  background: linear-gradient(135deg, rgba(111, 35, 64, 0.18), rgba(165, 123, 56, 0.22));
  display: flex;
  align-items: center;
  justify-content: center;
}

.journal-thumb-placeholder span {
  font-family: var(--serif);
  font-size: 4rem;
  color: var(--accent);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-soft);
  margin: 0.9rem 0 1.1rem;
}

.content-grid,
.contact-layout {
  align-items: start;
  margin-bottom: 4.5rem;
}

.entry-shell,
.contact-shell,
.content-sidebar {
  padding: 2rem;
}

.entry-content {
  font-size: 1.11rem;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content figure,
.entry-content table {
  margin: 0 0 1.3rem;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.3rem;
}

.entry-content li + li {
  margin-top: 0.45rem;
}

.entry-content blockquote {
  padding: 1.4rem 1.5rem;
  border-left: 4px solid var(--accent-alt);
  background: rgba(165, 123, 56, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--serif);
  font-size: 1.42rem;
  color: var(--heading);
}

.entry-content .wp-block-image img,
.entry-featured-image img {
  width: 100%;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td {
  padding: 0.8rem;
  border: 1px solid var(--line);
}

.entry-content input,
.entry-content textarea,
.search-field,
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(100, 69, 53, 0.18);
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  color: var(--text);
}

.search-form {
  display: flex;
  gap: 0.75rem;
}

.search-submit {
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.widget ul,
.footer-column ul,
.footer-intro ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.widget li,
.footer-column li,
.footer-intro li {
  padding: 0.55rem 0;
  border-top: 1px solid rgba(100, 69, 53, 0.09);
}

.widget-title,
.footer-heading {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  color: var(--heading);
}

.form-row-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.contact-form {
  margin-top: 1.25rem;
}

.form-notice {
  margin-top: 1rem;
}

.form-notice-success {
  border-color: rgba(84, 131, 94, 0.35);
  background: rgba(219, 239, 224, 0.7);
}

.form-notice-error {
  border-color: rgba(160, 72, 72, 0.35);
  background: rgba(247, 226, 226, 0.86);
}

.post-nav-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(100, 69, 53, 0.12);
}

.comments-area {
  margin-top: 2rem;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(100, 69, 53, 0.12);
  background: rgba(255, 253, 250, 0.72);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
}

.comment-list .comment {
  padding: 1rem 0;
  border-top: 1px solid rgba(100, 69, 53, 0.1);
}

.comment-author,
.comment-metadata {
  font-size: 0.95rem;
}

.site-footer {
  padding: 4rem 0 2rem;
  background: #2b1a17;
  color: rgba(255, 248, 240, 0.82);
}

.footer-grid {
  align-items: start;
}

.footer-intro {
  grid-column: span 5;
  background: rgba(255, 255, 255, 0.04);
}

.footer-column {
  grid-column: span 2;
  background: rgba(255, 255, 255, 0.03);
}

.footer-intro h2,
.footer-heading,
.footer-kicker {
  color: #fff7ef;
}

.footer-column a,
.footer-intro a,
.footer-bottom a,
.footer-widget a {
  color: rgba(255, 244, 233, 0.9);
}

.footer-bottom {
  grid-template-columns: 1fr auto;
  padding-top: 1.6rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wp-block-button__link {
  border-radius: 999px;
}

.wp-block-quote {
  border-left: 4px solid var(--accent-alt);
}

.wp-block-separator {
  border-color: rgba(100, 69, 53, 0.18);
}

.wp-block-image figcaption {
  color: var(--text-soft);
  font-size: 0.94rem;
}

.alignwide,
.alignfull {
  width: 100%;
}

@media (max-width: 1080px) {
  .pathways-grid,
  .journal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy,
  .hero-panel,
  .portrait-copy,
  .portrait-media,
  .content-area-stack,
  .entry-shell,
  .contact-shell,
  .content-sidebar,
  .footer-intro,
  .footer-column {
    grid-column: span 12;
  }

  .footer-grid {
    gap: 1rem;
  }
}

@media (max-width: 860px) {
  .utility-inner,
  .footer-bottom,
  .form-row-grid {
    grid-template-columns: 1fr;
  }

  .utility-links {
    flex-wrap: wrap;
  }

  .primary-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-section,
  .page-hero,
  .pathways-section,
  .portrait-section,
  .journal-section,
  .cta-section {
    padding: 3.2rem 0;
  }
}

@media (max-width: 640px) {
  .shell-inner {
    width: min(calc(100% - 1.25rem), var(--shell));
  }

  .brand-mark {
    width: 58px;
    height: 58px;
  }

  .brand-title {
    font-size: 1.55rem;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.8rem);
  }

  .pathways-grid,
  .journal-grid {
    grid-template-columns: 1fr;
  }

  .pathway-card,
  .journal-card,
  .archive-card,
  .widget,
  .footer-column,
  .footer-intro,
  .form-notice,
  .contact-form,
  .entry-shell,
  .content-sidebar,
  .comments-area {
    padding: 1.2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .post-nav-row {
    flex-direction: column;
  }
}
