/*
Theme Name: Forgotten Phoenix
Theme URI: https://example.com/forgotten-phoenix
Author: Forgotten Phoenix
Description: A warm field-journal WordPress theme for exploring Phoenix-area history through Museums, Traces of the Past, and Gone But Not Forgotten.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: forgotten-phoenix
*/

:root {
  --fp-sand: #EADBB7;
  --fp-brown: #4B3621;
  --fp-orange: #C75A2B;
  --fp-text: #2F241C;
  --fp-cream: #F7EEDB;
  --fp-cream-2: #F2E4C4;
  --fp-line: rgba(75,54,33,.28);
  --fp-shadow: 0 12px 28px rgba(47,36,28,.12);
  --fp-radius: 10px;
  --fp-content: 1180px;
  --fp-reading: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fp-text);
  background:
    radial-gradient(circle at 16% 10%, rgba(255,255,255,.24), transparent 28%),
    radial-gradient(circle at 80% 72%, rgba(75,54,33,.055), transparent 22%),
    var(--fp-sand);
  font-family: "Inter", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  z-index: 9999;
  background-image:
    repeating-linear-gradient(0deg, rgba(75,54,33,.03) 0, rgba(75,54,33,.03) 1px, transparent 1px, transparent 4px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fp-orange); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover, a:focus { color: var(--fp-brown); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

h1, h2, h3, h4, h5, h6 {
  font-family: "EB Garamond", Georgia, serif;
  color: var(--fp-brown);
  line-height: 1.05;
  margin: 0 0 .55em;
}
h1 { font-size: clamp(2.7rem, 6vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: clamp(1.45rem, 2.5vw, 2.1rem); }
p { margin: 0 0 1.15em; }

.fp-container { width: min(calc(100% - 40px), var(--fp-content)); margin-inline: auto; }
.fp-reading { width: min(calc(100% - 40px), var(--fp-reading)); margin-inline: auto; }
.fp-eyebrow {
  color: var(--fp-orange);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .78rem;
  font-weight: 700;
}
.fp-button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--fp-brown);
  background: var(--fp-brown);
  color: #fff9ed;
  padding: .75rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  transition: transform .15s ease, background .15s ease;
}
.fp-button:hover, .fp-button:focus { color: white; background: var(--fp-orange); transform: translateY(-1px); }
.fp-button--light { background: transparent; color: var(--fp-brown); }

/* Header */
.fp-site-header {
  position: relative;
  z-index: 50;
  background: rgba(247,238,219,.96);
  border-bottom: 1px solid var(--fp-line);
  box-shadow: 0 4px 16px rgba(47,36,28,.07);
}
.fp-header-inner {
  min-height: 102px;
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr auto;
  align-items: center;
  gap: 1.5rem;
}
.fp-brand { display: block; max-width: 390px; }
.fp-brand img { width: 100%; max-height: 86px; object-fit: contain; object-position: left center; }
.fp-nav { justify-self: end; }
.fp-nav ul { list-style: none; display: flex; gap: 1.25rem; align-items: center; margin: 0; padding: 0; }
.fp-nav a { color: var(--fp-text); text-decoration: none; font-size: .92rem; font-weight: 600; position: relative; padding: .5rem 0; }
.fp-nav a::after { content:""; position:absolute; left:0; bottom:.25rem; width:100%; height:2px; background:var(--fp-orange); transform:scaleX(0); transform-origin:left; transition:transform .18s ease; }
.fp-nav a:hover::after, .fp-nav a:focus::after, .fp-nav .current-menu-item > a::after, .fp-nav .is-active::after { transform:scaleX(1); }
.fp-header-tools { display:flex; align-items:center; gap:.5rem; }
.fp-icon-button { border:0; background:transparent; color:var(--fp-brown); cursor:pointer; padding:.65rem; border-radius:999px; }
.fp-icon-button:hover, .fp-icon-button:focus { background:rgba(199,90,43,.12); }
.fp-icon-button svg { width:21px; height:21px; display:block; }
.fp-mobile-toggle { display:none; }
.fp-search-panel { display:none; background:var(--fp-cream); border-top:1px solid var(--fp-line); padding:.85rem 0; }
.fp-search-panel.is-open { display:block; }
.search-form { display:flex; gap:.5rem; max-width:600px; margin-inline:auto; }
.search-field { flex:1; border:1px solid var(--fp-line); background:#fffaf0; padding:.8rem .9rem; border-radius:4px; color:var(--fp-text); }
.search-submit { border:0; background:var(--fp-orange); color:white; padding:.8rem 1rem; border-radius:4px; cursor:pointer; font-weight:700; }

/* Hero */
.fp-hero { position:relative; min-height: clamp(330px, 40vw, 470px); overflow:hidden; background:var(--fp-brown); border-bottom:7px solid var(--fp-orange); }
.fp-hero-slide { position:absolute; inset:0; opacity:0; transition:opacity 1.8s ease-in-out; }
.fp-hero-slide.is-active { opacity:1; }
.fp-hero-slide img { width:100%; height:100%; object-fit:cover; }
.fp-hero::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg, rgba(30,21,13,.66) 0%, rgba(30,21,13,.27) 48%, rgba(30,21,13,.08) 100%); }
.fp-hero-content { position:relative; z-index:3; color:#fff7e8; min-height:inherit; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; padding-block:3rem; }
.fp-hero-content h1 { color:#fffaf0; max-width:850px; text-shadow:0 2px 12px rgba(0,0,0,.28); margin-bottom:.25em; }
.fp-hero-content p { max-width:680px; font-family:"EB Garamond", Georgia, serif; font-size:clamp(1.25rem,2.1vw,1.65rem); }
.fp-hero-dots { position:absolute; z-index:4; left:50%; bottom:20px; transform:translateX(-50%); display:flex; gap:9px; }
.fp-hero-dot { width:9px; height:9px; border-radius:50%; border:1px solid rgba(255,255,255,.9); background:rgba(255,255,255,.3); padding:0; cursor:pointer; }
.fp-hero-dot.is-active { background:#fff; }

/* Intro */
.fp-intro { padding: 3.3rem 0 2.5rem; text-align:center; }
.fp-intro p { font-family:"EB Garamond", Georgia, serif; font-size:clamp(1.25rem,2vw,1.55rem); max-width:800px; margin-inline:auto; }
.fp-rule { width:90px; height:3px; background:var(--fp-orange); margin:1.2rem auto; }

/* Latest */
.fp-section { padding: 2.2rem 0 3.4rem; }
.fp-section--cream { background:rgba(247,238,219,.55); border-block:1px solid var(--fp-line); }
.fp-section-heading { display:flex; align-items:end; justify-content:space-between; gap:1rem; margin-bottom:1.3rem; }
.fp-latest { display:grid; grid-template-columns:1.2fr 1fr; background:var(--fp-cream); border:1px solid var(--fp-line); box-shadow:var(--fp-shadow); overflow:hidden; border-radius:var(--fp-radius); }
.fp-latest-media { min-height:400px; background:var(--fp-brown); }
.fp-latest-media img { width:100%; height:100%; object-fit:cover; }
.fp-latest-body { padding:clamp(1.5rem,4vw,3.2rem); display:flex; flex-direction:column; justify-content:center; }
.fp-post-meta { color:rgba(47,36,28,.72); font-size:.84rem; margin-bottom:.6rem; }
.fp-latest-title a { color:var(--fp-brown); text-decoration:none; }

/* Recent carousel */
.fp-recent-wrap { position:relative; }
.fp-recent-viewport { overflow:hidden; }
.fp-recent-track { display:flex; gap:1.2rem; transition:transform .38s ease; will-change:transform; }
.fp-card { flex:0 0 calc((100% - 1.2rem)/2); background:var(--fp-cream); border:1px solid var(--fp-line); border-radius:var(--fp-radius); overflow:hidden; box-shadow:0 7px 18px rgba(47,36,28,.08); }
.fp-card-media { aspect-ratio:16/9; background:var(--fp-brown); overflow:hidden; }
.fp-card-media img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.fp-card:hover .fp-card-media img { transform:scale(1.025); }
.fp-card-body { padding:1.15rem 1.25rem 1.35rem; }
.fp-card h3 { margin-bottom:.25rem; }
.fp-card h3 a { color:var(--fp-brown); text-decoration:none; }
.fp-card p { font-size:.94rem; }
.fp-carousel-controls { display:flex; gap:.55rem; }
.fp-carousel-button { border:1px solid var(--fp-brown); background:transparent; color:var(--fp-brown); width:42px; height:42px; border-radius:50%; cursor:pointer; font-size:1.1rem; }
.fp-carousel-button:hover, .fp-carousel-button:focus { background:var(--fp-brown); color:white; }

/* Categories */
.fp-category-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1.25rem; }
.fp-category-card { background:var(--fp-cream); border:1px solid var(--fp-line); border-radius:var(--fp-radius); overflow:hidden; box-shadow:var(--fp-shadow); }
.fp-category-card img { width:100%; aspect-ratio:16/10; object-fit:cover; }
.fp-category-card-body { padding:1.3rem 1.35rem 1.45rem; }
.fp-category-card h3 { margin-bottom:.35rem; }
.fp-category-card p { font-size:.93rem; min-height:3.2em; }

/* Category archives */
.fp-category-masthead { padding:2.5rem 0 2.2rem; }
.fp-category-masthead-inner { display:grid; grid-template-columns:1.15fr 1fr; gap:2.2rem; align-items:center; }
.fp-category-art { background:var(--fp-cream); border:1px solid var(--fp-line); padding:.7rem; box-shadow:var(--fp-shadow); transform:rotate(-.25deg); }
.fp-category-art img { width:100%; aspect-ratio:16/9; object-fit:cover; }
.fp-category-copy p { max-width:620px; font-family:"EB Garamond", Georgia, serif; font-size:1.28rem; }
.fp-archive-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1.25rem; padding-bottom:3.5rem; }
.fp-archive-card { background:var(--fp-cream); border:1px solid var(--fp-line); border-radius:var(--fp-radius); overflow:hidden; }
.fp-archive-card .fp-card-media { aspect-ratio:3/2; }
.fp-pagination { padding-bottom:3rem; }
.fp-pagination .nav-links { display:flex; gap:.5rem; justify-content:center; flex-wrap:wrap; }
.fp-pagination a, .fp-pagination span { padding:.55rem .8rem; background:var(--fp-cream); border:1px solid var(--fp-line); text-decoration:none; color:var(--fp-brown); }
.fp-pagination .current { background:var(--fp-brown); color:white; }

/* Single */
.fp-single-header { padding:3.2rem 0 1.4rem; text-align:center; }
.fp-single-header h1 { max-width:980px; margin-inline:auto; }
.fp-single-featured { width:min(calc(100% - 40px), 1080px); margin:0 auto 2.3rem; padding:.65rem; background:var(--fp-cream); border:1px solid var(--fp-line); box-shadow:var(--fp-shadow); }
.fp-single-featured img { width:100%; max-height:650px; object-fit:cover; }
.fp-entry-content { font-size:1.05rem; }
.fp-entry-content > * { max-width:var(--fp-reading); margin-left:auto; margin-right:auto; }
.fp-entry-content > .alignwide { max-width:var(--fp-content); }
.fp-entry-content > .alignfull { max-width:none; }
.fp-entry-content img { border-radius:3px; }
.fp-entry-content blockquote { border-left:4px solid var(--fp-orange); padding-left:1.2rem; font-family:"EB Garamond",Georgia,serif; font-size:1.35rem; font-style:italic; }
.fp-entry-content figcaption { color:rgba(47,36,28,.7); font-size:.86rem; }
.fp-sources { margin-top:2.6rem; padding:1.5rem; background:var(--fp-cream); border-left:4px solid var(--fp-orange); }
.fp-related { border-top:1px solid var(--fp-line); margin-top:3rem; padding-top:2.3rem; }
.fp-related-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; }

/* Pages/search */
.fp-page-main { padding:3rem 0; }
.fp-page-main .entry-content { max-width:var(--fp-reading); margin-inline:auto; }
.fp-search-results { display:grid; gap:1rem; padding-bottom:3rem; }
.fp-search-result { background:var(--fp-cream); border:1px solid var(--fp-line); padding:1.3rem 1.4rem; border-radius:var(--fp-radius); }

/* Footer */
.fp-footer { background:var(--fp-brown); color:#f3e8cf; padding:2.6rem 0 1rem; margin-top:0; }
.fp-footer a { color:#f5d7b0; }
.fp-footer-grid { display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:2rem; align-items:start; }
.fp-footer-logo { max-width:330px; filter:brightness(0) invert(1) sepia(.2); opacity:.94; }
.fp-footer-nav { list-style:none; margin:0; padding:0; }
.fp-footer-nav li { margin:.25rem 0; }
.fp-footer-bottom { border-top:1px solid rgba(255,255,255,.18); margin-top:2rem; padding-top:1rem; font-size:.82rem; display:flex; justify-content:space-between; gap:1rem; }

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

@media (max-width: 980px) {
  .fp-header-inner { grid-template-columns:1fr auto; min-height:84px; }
  .fp-brand { max-width:310px; }
  .fp-nav { display:none; grid-column:1/-1; justify-self:stretch; padding-bottom:1rem; }
  .fp-nav.is-open { display:block; }
  .fp-nav ul { flex-direction:column; align-items:flex-start; gap:.25rem; }
  .fp-mobile-toggle { display:block; }
  .fp-latest, .fp-category-masthead-inner { grid-template-columns:1fr; }
  .fp-latest-media { min-height:320px; }
  .fp-category-grid, .fp-archive-grid, .fp-related-grid { grid-template-columns:repeat(2,1fr); }
  .fp-footer-grid { grid-template-columns:1fr 1fr; }
}

@media (max-width: 700px) {
  body { font-size:16px; }
  .fp-container, .fp-reading { width:min(calc(100% - 24px), var(--fp-content)); }
  .fp-header-inner { gap:.6rem; }
  .fp-brand { max-width:245px; }
  .fp-header-tools { gap:0; }
  .fp-hero { min-height:330px; }
  .fp-hero-content { padding-block:2rem 3rem; }
  .fp-card { flex-basis:100%; }
  .fp-category-grid, .fp-archive-grid, .fp-related-grid { grid-template-columns:1fr; }
  .fp-section-heading { align-items:flex-start; }
  .fp-category-art { transform:none; }
  .fp-footer-grid { grid-template-columns:1fr; }
  .fp-footer-bottom { flex-direction:column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  .fp-hero-slide, .fp-recent-track, .fp-card-media img { transition:none; }
}
