/*
Theme Name: Promenade at Pheasant Pointe
Theme URI: http://localhost:8881
Author: Promenade at Pheasant Pointe HOA
Author URI: http://localhost:8881
Description: An editorial "neighborhood gazette" block theme for the Promenade at Pheasant Pointe homeowners association — warm newsprint paper, ink, and persimmon, set in Bricolage Grotesque and Newsreader. Includes resident Classifieds and community Polls.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: promenade-hoa
*/

/* ---------- Tokens ---------- */
:root {
  --rule: rgba(34, 29, 21, 0.20);
  --rule-soft: rgba(34, 29, 21, 0.12);
  --muted: #766c58;
  --card: #FBF6E9;
  --paper-2: #EFE7D2;
  --ink: var(--wp--preset--color--secondary);
}

/* ---------- Base + newsprint texture ---------- */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.wp-site-blocks { position: relative; z-index: 1; }
.wp-site-blocks > footer { margin-block-start: 0; }
p { max-width: 68ch; }
a { text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

/* Headings: tight, inky, editorial */
h1, h2, h3, h4 { font-feature-settings: "ss01", "ss02"; }

/* ---------- Eyebrow / section kicker ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--wp--preset--font-family--heading);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  font-size: 0.74rem !important;
  color: var(--wp--preset--color--accent);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--wp--preset--color--accent);
}
.eyebrow.on-dark { color: var(--wp--preset--color--highlight); }
.eyebrow.on-dark::before { background: var(--wp--preset--color--highlight); }
.has-text-align-center .eyebrow::before,
.eyebrow.has-text-align-center::before { display: none; }

/* ---------- Masthead header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--wp--preset--color--base);
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 1px 0 rgba(34,29,21,0.25), 0 3px 0 -1px var(--wp--preset--color--base), 0 4px 0 -1px var(--rule-soft);
}
.site-header-inner { padding-top: 0.7rem; padding-bottom: 0.7rem; }
.brand-mark a {
  color: var(--ink) !important;
  text-decoration: none;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: none;
}
.brand-mark { position: relative; padding-left: 2.7rem; }
.brand-mark::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 30px; height: 30px;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 9px 9px 9px 2px;
  background: var(--wp--preset--color--primary);
  box-shadow: inset 0 0 0 2px var(--card), 0 0 0 1px rgba(34,29,21,0.18);
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 11px; top: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  transform: translateY(-50%);
  background: var(--wp--preset--color--highlight);
}
.main-nav {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  gap: 0.4rem 1.3rem;
}
.main-nav a { color: var(--ink); }
.main-nav a:hover { color: var(--wp--preset--color--accent); }
.main-nav .wp-block-navigation-item__content { padding: 0.2rem 0; border-bottom: 2px solid transparent; transition: border-color .2s ease, color .2s ease; }
.main-nav .current-menu-item .wp-block-navigation-item__content,
.main-nav .wp-block-navigation-item:hover .wp-block-navigation-item__content { border-bottom-color: var(--wp--preset--color--accent); }
.header-actions { gap: 1.2rem; }
.signin-btn .wp-block-button__link {
  font-family: var(--wp--preset--font-family--heading);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 2px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}
.signin-btn .wp-block-button__link:hover { background: var(--ink); color: var(--wp--preset--color--base); transform: none; }

/* ---------- Buttons: squared letterpress ---------- */
.wp-block-button__link {
  border-radius: 2px;
  font-family: var(--wp--preset--font-family--heading);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.wp-block-button__link:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.wp-block-button.is-style-outline .wp-block-button__link { box-shadow: none; }

/* ---------- Hero ---------- */
.hero-cover {
  min-height: clamp(380px, 52vh, 520px) !important;
  border-bottom: 1px solid var(--ink);
}
.hero-cover .wp-block-cover__image-background { object-fit: cover; }
.hero-cover .wp-block-cover__background {
  background: linear-gradient(180deg, rgba(34,29,21,0.30) 0%, rgba(34,29,21,0.62) 100%),
              linear-gradient(95deg, rgba(191,69,42,0.28), rgba(26,77,57,0.18)) !important;
  opacity: 1 !important;
  mix-blend-mode: multiply;
}
.hero-cover .wp-block-cover__inner-container { max-width: 1180px; width: 100%; }
.hero-cover .eyebrow { color: var(--wp--preset--color--highlight); }
.hero-cover .eyebrow::before { background: var(--wp--preset--color--highlight); }
.hero-cover h1 {
  color: var(--wp--preset--color--base);
  letter-spacing: -0.025em;
  text-shadow: 0 2px 26px rgba(20, 16, 10, 0.4);
  max-width: 16ch;
}
.hero-cover p { color: #F3ECDB; max-width: 54ch; }
.hero-cover .wp-block-buttons { margin-top: 1.6rem; }

/* ---------- Sections + gazette dividers ---------- */
.section-pad { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.section-pad-sm { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); }
.section-head { max-width: 720px; }
.section-head h2 { position: relative; }

/* A thin rule that frames stacked sections like newspaper columns */
.has-base-background-color + .has-base-background-color,
.alignfull.section-pad + .alignfull.section-pad { border-top: 1px solid var(--rule-soft); }

/* Cards / tiles — crisp index cards */
.tile {
  background: var(--card);
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 1.6rem !important;
  height: 100%;
  box-shadow: 4px 4px 0 var(--rule-soft);
}
.tile .tile-ico {
  width: 48px; height: 48px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  background: var(--wp--preset--color--primary);
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.4rem; font-weight: 800;
  color: var(--wp--preset--color--base);
  margin-bottom: 0.5rem;
}
.tile .pill-new {
  display: inline-block; font-family: var(--wp--preset--font-family--heading); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--wp--preset--color--base); background: var(--wp--preset--color--accent);
  padding: 0.18rem 0.5rem; border-radius: 2px; vertical-align: middle; margin-left: 0.5rem;
}
.equal-cards > .wp-block-column { display: flex; flex-direction: column; flex-grow: 0; }
.equal-cards > .wp-block-column > .wp-block-group { display: flex; flex-direction: column; flex-grow: 1; }
.equal-cards .cta-bottom { margin-top: auto; }

/* News query cards */
.news-grid .wp-block-post {
  background: var(--card); border: 1px solid var(--ink); border-radius: 3px;
  overflow: hidden; display: flex; flex-direction: column; box-shadow: 4px 4px 0 var(--rule-soft);
}
.news-grid .wp-block-post-featured-image { margin: 0; border-bottom: 1px solid var(--ink); }
.news-grid .wp-block-post-featured-image img { height: 180px; width: 100%; object-fit: cover; filter: saturate(1.02); }
.news-grid .wp-block-post > *:not(.wp-block-post-featured-image) { padding-left: 1.3rem; padding-right: 1.3rem; }
.news-grid .wp-block-post-title { font-size: 1.35rem; margin-top: 1rem; line-height: 1.12; }
.news-grid .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.news-grid .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.news-grid .wp-block-post-date { font-family: var(--wp--preset--font-family--heading); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 0.7rem; }
.news-grid .wp-block-post-excerpt { color: #4f4738; }
.news-grid .wp-block-post-excerpt__more-link { font-family: var(--wp--preset--font-family--heading); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; color: var(--wp--preset--color--accent); text-decoration: none; }
.news-grid .wp-block-post:last-child > *:last-child { padding-bottom: 1.4rem; }

/* Events list */
.event-row {
  display: flex; gap: 1.1rem; align-items: center;
  background: var(--card); border: 1px solid var(--ink); border-radius: 3px;
  padding: 1rem 1.2rem; box-shadow: 4px 4px 0 var(--rule-soft);
}
.event-row .event-date {
  flex: 0 0 auto; width: 64px; text-align: center;
  background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); border-radius: 2px; padding: 0.45rem 0;
}
.event-row .event-date p { margin: 0; }
.event-row .event-date .m { font-family: var(--wp--preset--font-family--heading); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.92; }
.event-row .event-date .d { font-family: var(--wp--preset--font-family--heading); font-size: 1.6rem; font-weight: 800; line-height: 1; }
.event-row .event-meta { flex: 1; }
.event-row .event-meta p { margin: 0; }
.event-row .event-meta .e-title { font-family: var(--wp--preset--font-family--heading); font-size: 1.16rem; font-weight: 700; color: var(--ink); }
.event-row .event-meta .e-sub { color: var(--muted); font-size: 0.94rem; margin-top: 0.15rem; }

/* CTA band */
.cta-band { border-radius: 0; border-block: 1px solid var(--ink); }
.cta-band h2, .cta-band p { color: var(--wp--preset--color--base); }

/* Spotlight cards (poll + classifieds on home) */
.spotlight-card {
  background: var(--card); border: 1px solid var(--ink); border-radius: 3px; padding: 1.9rem !important; height: 100%;
  box-shadow: 6px 6px 0 var(--rule-soft);
}

/* ---------- Footer ---------- */
.site-footer { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--40); border-top: 3px solid var(--wp--preset--color--accent); }
.site-footer h2, .site-footer h3, .site-footer p, .site-footer a, .site-footer li { color: #E8DDC4; }
.site-footer h3 { font-family: var(--wp--preset--font-family--heading); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem !important; color: var(--wp--preset--color--highlight); }
.site-footer .footer-brand { font-family: var(--wp--preset--font-family--heading); font-size: 1.45rem; font-weight: 800; color: var(--wp--preset--color--base); letter-spacing: -0.02em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.footer-bottom { border-top: 1px solid rgba(244,237,218,0.16); margin-top: 2.4rem; padding-top: 1.4rem; }
.footer-bottom p, .footer-bottom a { font-size: 0.84rem; color: #B6A98C; }

/* Generic page title band */
.page-title-band { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); border-bottom: 1px solid var(--ink); }
.page-title-band .wp-block-post-title { margin: 0; }

/* ---------- Animation ---------- */
.fade-up { opacity: 0; transform: translateY(26px); animation: fadeUp 0.6s ease forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.animate-on-scroll { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.stagger-children > * { opacity: 0; transform: translateY(18px); animation: fadeUp 0.5s ease forwards; }
.stagger-children > *:nth-child(1) { animation-delay: 0.08s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.18s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.28s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.38s; }
.hover-lift { transition: transform 0.22s ease, box-shadow 0.22s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 7px 9px 0 var(--rule-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .fade-up, .animate-on-scroll, .stagger-children > * { opacity: 1 !important; transform: none !important; }
}

/* Editor visibility */
.editor-styles-wrapper .fade-up,
.editor-styles-wrapper .animate-on-scroll,
.editor-styles-wrapper .stagger-children > * {
  opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
  .site-header-inner { flex-wrap: wrap; gap: 0.6rem; }
  .event-row { flex-wrap: wrap; }
  .hero-cover .wp-block-cover__inner-container { max-width: 100%; }
  .hero-cover h1 { max-width: 100%; }
}

/* ---------- Plugin integration ---------- */
/* Newsletter signup band */
.newsletter-band { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); border-block: 1px solid var(--ink); }
.newsletter-band .tnp-subscription, .newsletter-band .tnp-form, .newsletter-band form { max-width: 480px; margin: 1.3rem auto 0; }
.newsletter-band input[type="email"], .newsletter-band input[type="text"] {
  width: 100%; padding: 0.8rem 1rem; border: 1.5px solid var(--ink);
  border-radius: 2px; font: inherit; margin-bottom: 0.65rem; background: var(--card); box-sizing: border-box;
}
.newsletter-band input[type="submit"], .newsletter-band .tnp-submit, .newsletter-band .tnp-subscription input[type="submit"] {
  background: var(--wp--preset--color--accent) !important; color: var(--wp--preset--color--base) !important; border: none !important; border-radius: 2px !important;
  padding: 0.8rem 1.7rem !important; font-weight: 700; font-family: var(--wp--preset--font-family--heading); text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer; min-width: 160px;
  box-shadow: 3px 3px 0 var(--ink);
}
.newsletter-band input[type="submit"]:hover { filter: brightness(1.04); }

/* WP-Polls */
.wp-polls, .wp-polls-loading { font-family: var(--wp--preset--font-family--body); }
.wp-polls ul, .wp-polls-ans ul { list-style: none; margin: 0.6rem 0; padding: 0; }
.wp-polls li { margin-bottom: 0.55rem; }
.wp-polls .pollbar { border-radius: 2px !important; height: 12px !important; background-image: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--accent)) !important; border: none !important; }
.wp-polls .Buttons, .wp-polls input[type="button"], .wp-polls input[type="submit"] {
  background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); border: none; border-radius: 2px;
  padding: 0.55rem 1.4rem; font-weight: 700; font-family: var(--wp--preset--font-family--heading); text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; margin-top: 0.4rem;
}
.wp-polls .Buttons:hover { filter: brightness(1.05); }
.wp-polls-ans label { cursor: pointer; }

/* WPAdverts */
.advert-post-title, .advert-post-title .advert-link, .advert-post-title .advert-link-text, .advert-post-title a { color: var(--ink) !important; font-family: var(--wp--preset--font-family--heading); }
.advert-post-title .advert-link:hover, .advert-post-title .advert-link:hover .advert-link-text { color: var(--wp--preset--color--accent) !important; }
.adverts-price, .advert-price { color: var(--wp--preset--color--accent) !important; font-weight: 700; }
.adverts-button, a.adverts-button, .adverts-list .button, .adverts-list input[type="submit"], #adverts-search-bar input[type="submit"], .adverts-search input[type="submit"] {
  background: var(--wp--preset--color--primary) !important; color: var(--wp--preset--color--base) !important; border-radius: 2px !important; border: none !important;
}
