/*
Theme Name:  Parcl9
Theme URI:   https://parcl9.com
Author:      Parcl9
Author URI:  https://parcl9.com
Description: Custom WordPress theme for Parcl9 — tools for real estate developers. Warm parchment aesthetic with gold accents and editorial typography.
Version:     1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: parcl9
Tags:        full-site-editing, custom-menu, custom-logo, full-width-template, blog
*/

/* ══════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════ */
:root {
  --bg:       #f5f2eb;
  --gold:     #9a6f2e;
  --gold2:    #b8883e;
  --fg:       #1a1814;
  --mu:       #6b6458;
  --mu2:      #a8a090;
  --white:    #ffffff;
  --border:   rgba(154,111,46,.18);
  --border2:  rgba(154,111,46,.35);

  --font-serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:'Bodoni Moda SC', 'Didot', 'Bodoni MT', serif;

  --nav-height:  72px;
  --max-width:   1200px;
  --content-width: 760px;

  --transition: .22s ease;
  --shadow-sm:  0 1px 3px rgba(26,24,20,.06), 0 1px 2px rgba(26,24,20,.04);
  --shadow-md:  0 4px 16px rgba(26,24,20,.08), 0 2px 6px rgba(26,24,20,.05);
  --shadow-lg:  0 12px 40px rgba(26,24,20,.12), 0 4px 12px rgba(26,24,20,.06);
}

/* ══════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
button, input, textarea, select { font-family: inherit; }

/* ══════════════════════════════════════════════
   CITY GRID BACKGROUND
══════════════════════════════════════════════ */
.parcl9-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(80,60,20,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80,60,20,.07) 1px, transparent 1px);
  background-size: 56px 56px;
}
.parcl9-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(80,60,20,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80,60,20,.13) 1px, transparent 1px);
  background-size: 224px 224px;
}
.parcl9-grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 20%, var(--bg) 82%);
}

/* ══════════════════════════════════════════════
   LAYOUT WRAPPERS
══════════════════════════════════════════════ */
/* Classic theme wrapper */
.site { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; width: 100%; overflow-x: hidden; }

/* Block theme wrapper — WordPress replaces .site with this */
.wp-site-blocks { position: relative; z-index: 1; min-height: 100vh; width: 100%; overflow-x: hidden; }

.site-main { flex: 1; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 2rem;
}

.container--narrow {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: 2rem;
}

/* ══════════════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--fg);
}
h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; font-family: var(--font-body); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }

h1 em, h2 em, h3 em { font-style: italic; color: var(--gold); }

p { margin-bottom: 1.4rem; color: var(--mu); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.75;
  color: var(--mu);
  letter-spacing: .01em;
}

blockquote {
  border-left: 2px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--mu);
}

/* ══════════════════════════════════════════════
   DIVIDER
══════════════════════════════════════════════ */
.divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 2.5rem;
}
.divider--left { margin-left: 0; }
.divider--wide { width: 100%; }

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn--primary:hover { background: var(--gold2); border-color: var(--gold2); color: var(--white); }

.btn--outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border2);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }

.btn--ghost {
  background: transparent;
  color: var(--mu);
  border-color: transparent;
  padding-inline: .5rem;
}
.btn--ghost:hover { color: var(--gold); }

/* ══════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════ */
.form-row {
  display: flex;
  gap: .5rem;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .35rem .35rem .35rem .9rem;
  transition: border-color var(--transition);
}
.form-row:focus-within { border-color: var(--border2); }

.form-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 300;
  letter-spacing: .02em;
}
.form-input::placeholder { color: var(--mu2); }

input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  width: 100%;
  background: rgba(255,255,255,.5);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .6rem .9rem;
  color: var(--fg);
  font-size: .9rem;
  font-weight: 300;
  outline: none;
  transition: border-color var(--transition);
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus { border-color: var(--border2); }

/* ══════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════ */
.card {
  background: rgba(255,255,255,.55);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--border2); }

.card__eyebrow {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}
.card__title { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: .75rem; }
.card__body { color: var(--mu); font-size: .9rem; line-height: 1.65; }

/* ══════════════════════════════════════════════
   SECTIONS
══════════════════════════════════════════════ */
.section { padding-block: 6rem; }
.section--sm { padding-block: 3.5rem; }
.section--lg { padding-block: 9rem; }

.section__eyebrow {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.section__title { margin-bottom: 1.25rem; }
.section__lead { max-width: 580px; }

/* ══════════════════════════════════════════════
   HERO / FRONT PAGE
══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
}

#city-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;  /* above grid bg, below hero content */
  pointer-events: none;
  opacity: .55;
}

/* Ensure hero content is always above the fixed canvas,
   even when the block theme wraps things in extra divs. */
.hero__inner { position: relative; z-index: 10; }
.hero > .wp-block-group { position: relative; z-index: 10; }
.hero__logo { color: var(--gold); opacity: .85; margin-bottom: 2rem; }
.hero__logo svg { width: clamp(220px, 40vw, 360px); height: auto; display: block; margin: 0 auto; overflow: visible; }

.hero__headline {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -.01em;
  margin-bottom: 1.5rem;
}

.cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.success-msg {
  font-size: .875rem;
  color: var(--gold);
  letter-spacing: .04em;
}
.cta-hint {
  font-size: .75rem;
  color: var(--mu2);
  letter-spacing: .03em;
}

.hero__sub {
  font-size: clamp(.9rem, 1.4vw, 1.05rem);
  font-weight: 300;
  color: var(--mu);
  line-height: 1.75;
  max-width: 480px;
  margin: 0 auto 3rem;
  letter-spacing: .01em;
}
/* Strip block editor chrome inside the hero sub */
.hero__sub p {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  margin-bottom: 0;
}
.hero__sub > *:first-child { margin-top: 0; }
.hero__sub > *:last-child  { margin-bottom: 0; }

/* ══════════════════════════════════════════════
   PHASE INDICATOR (FRONT PAGE)
══════════════════════════════════════════════ */
.phase-strip {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.phase-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mu2);
  transition: background .5s, transform .5s;
}
.phase-dot.active { background: var(--gold); transform: scale(1.5); }

.phase-label {
  position: fixed;
  bottom: 2.5rem;
  right: 3rem;
  z-index: 10;
  font-family: var(--font-serif);
  font-size: .85rem;
  font-weight: 300;
  color: var(--mu);
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: opacity .5s;
}

/* ══════════════════════════════════════════════
   CORNER LABELS
══════════════════════════════════════════════ */
.corner {
  position: fixed;
  font-size: .68rem;
  letter-spacing: .12em;
  font-weight: 300;
  color: var(--mu2);
  z-index: 10;
  opacity: .5;
}
.corner-tl { top: 1.75rem; left: 2rem; }
.corner-tr { top: 1.75rem; right: 2rem; }
.corner-bl { bottom: 1.75rem; left: 2rem; }

/* ══════════════════════════════════════════════
   POSTS / ARCHIVE
══════════════════════════════════════════════ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.post-card { display: flex; flex-direction: column; }
.post-card__thumbnail { aspect-ratio: 16/9; overflow: hidden; border-radius: 3px; margin-bottom: 1.25rem; }
.post-card__thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__thumbnail img { transform: scale(1.03); }
.post-card__category { font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: .5rem; }
.post-card__title { font-family: var(--font-serif); font-size: 1.35rem; margin-bottom: .6rem; line-height: 1.25; }
.post-card__title a:hover { color: var(--gold); }
.post-card__excerpt { color: var(--mu); font-size: .9rem; line-height: 1.65; }
.post-card__meta { margin-top: auto; padding-top: 1rem; font-size: .78rem; color: var(--mu2); letter-spacing: .04em; }

/* ══════════════════════════════════════════════
   SINGLE POST
══════════════════════════════════════════════ */
.entry-header { padding-block: 4rem 2rem; text-align: center; }
.entry-header__category { font-size: .72rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.entry-header__title { max-width: 820px; margin-inline: auto; }
.entry-header__meta { font-size: .8rem; color: var(--mu2); letter-spacing: .05em; margin-top: 1.25rem; }

.entry-content { padding-block: 3rem; }
.entry-content > * + * { margin-top: 1.4rem; }
.entry-content h2 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); margin-top: 3rem; margin-bottom: .75rem; }
.entry-content h3 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: .5rem; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; color: var(--mu); }
.entry-content li { margin-bottom: .4rem; }
.entry-content a { color: var(--gold); border-bottom: 1px solid var(--border2); transition: border-color var(--transition); }
.entry-content a:hover { border-color: var(--gold2); }
.entry-content img { border-radius: 3px; }
.entry-content hr { border: none; border-top: 1px solid var(--border); margin-block: 3rem; }
.entry-content pre { background: rgba(26,24,20,.04); border: 1px solid var(--border); border-radius: 3px; padding: 1.25rem; overflow-x: auto; font-size: .875rem; }
.entry-content code { font-size: .875em; background: rgba(154,111,46,.08); padding: .1em .35em; border-radius: 2px; }
.entry-content pre code { background: none; padding: 0; }

/* ══════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════ */
.pagination { display: flex; align-items: center; justify-content: center; gap: .5rem; padding-block: 3rem; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: .85rem;
  font-weight: 400;
  transition: border-color var(--transition), color var(--transition);
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .current { background: var(--gold); color: var(--white); border-color: var(--gold); }

/* ══════════════════════════════════════════════
   404 / EMPTY STATES
══════════════════════════════════════════════ */
.error-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4rem 2rem; }
.error-page__code { font-size: 8rem; font-family: var(--font-display); color: var(--gold); opacity: .2; line-height: 1; }
.error-page__title { font-size: 2rem; margin-bottom: 1rem; }
.error-page__body { color: var(--mu); max-width: 420px; }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 2;
  background: rgba(26,24,20,.96);
  color: rgba(245,242,235,.55);
  padding-block: 4rem 2.5rem;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(245,242,235,.08);
  margin-bottom: 2rem;
}
.footer__brand { grid-column: 1; }
.footer__logo { color: var(--gold); opacity: .7; margin-bottom: 1.25rem; }
.footer__logo svg { width: 160px; height: auto; }
.footer__tagline { font-size: .82rem; color: rgba(245,242,235,.4); line-height: 1.7; max-width: 240px; }
.footer__nav-title { font-size: .68rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: rgba(245,242,235,.3); margin-bottom: 1rem; }
.footer__nav ul { list-style: none; }
.footer__nav li + li { margin-top: .5rem; }
.footer__nav a { font-size: .85rem; color: rgba(245,242,235,.5); transition: color var(--transition); }
.footer__nav a:hover { color: var(--gold); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .75rem; letter-spacing: .05em; }
.footer__copyright { color: rgba(245,242,235,.25); }
.footer__legal { display: flex; gap: 1.5rem; }
.footer__legal a { color: rgba(245,242,235,.25); transition: color var(--transition); }
.footer__legal a:hover { color: var(--gold); }

/* ══════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════ */
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--mu); }
.text-center  { text-align: center; }
.text-upper   { text-transform: uppercase; letter-spacing: .1em; font-size: .8em; }
.sr-only      { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }
}
@media (max-width: 600px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__brand { grid-column: 1; }
  .phase-label { display: none; }
  .corner-tr   { display: none; }
  .container, .container--narrow { padding-inline: 1.25rem; }
  .section { padding-block: 4rem; }
}

/* ══════════════════════════════════════════════
   WORDPRESS CORE CLASSES
══════════════════════════════════════════════ */
.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide  { max-width: calc(var(--max-width) + 4rem); margin-inline: auto; }
.alignfull  { max-width: 100%; }
.wp-caption { font-size: .8rem; color: var(--mu2); margin-top: .4rem; text-align: center; }
.screen-reader-text { @extend .sr-only; }
