/* ============================================================
   Ponderosa — playful cream theme
   (warm minimal + chunky scrapbook, "cat and golden retriever")
   ============================================================ */

:root {
  --bg:        #f5f2eb;          /* matches the 96 Ponderosa cream */
  --bg-soft:   #ebe7de;
  --bg-warm:   #f5e6cd;          /* secondary cream pop */
  --card:      #ffffff;
  --ink:       #2c2a26;          /* warm dark charcoal */
  --ink-soft:  #5d5a53;
  --ink-mute:  #8a8475;
  --forest:    #2e4934;
  --terra:     #c25a3a;
  --ink-hard:  #1a1a1a;          /* chunky-border ink */

  /* Pastel section accents (background tint shifts as you scroll) */
  --tint-area:       #d4e4e6;
  --tint-outside:    #e8d5c4;
  --tint-deck:       #d5e6d4;
  --tint-great-room: #f5e6cd;
  --tint-kitchen:    #f0e2cb;
  --tint-bath:       #d9c5e6;
  --tint-bedrooms:   #e6dccd;
  --tint-lower:      #efe6d3;
  --tint-den:        #dde6d2;
  --tint-details:    #e8d5c4;

  --rule:      rgba(43, 42, 38, 0.12);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.06), 0 10px 30px rgba(0,0,0,0.08);
  --max:       1240px;

  --display:   'Paytone One', 'Fraunces', Georgia, serif;
  --sans:      'Nunito', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --serif:     'Fraunces', Georgia, serif;

  --radius-md: 16px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 800ms ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ============================================================
   Custom circle cursor — green dot on interactive things
   ============================================================ */

a, button, [role="button"], input, select, textarea,
.photo, .gallery-item, .expand-btn, .hero-cta, .scroll-arrow,
.site-nav a, .brand, .view-toggle, .header-pdf,
summary {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><circle cx="14" cy="14" r="11" fill="%233f7a52" stroke="%231a1a1a" stroke-width="2.5"/></svg>') 14 14, pointer;
}

/* ============================================================
   Site header — sticky, with brand in bubbly display
   ============================================================ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 32px);
  background: rgba(245, 242, 235, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.brand {
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 27px);
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: 2px 2px 0 #fff;
  white-space: nowrap;
  flex: 0 0 auto;
}
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 7px 12px;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease;
}
.site-nav a:hover { background: var(--ink); color: var(--bg); }

.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.view-toggle {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--forest);
  border: 2px solid var(--ink-hard);
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: 2px 3px 0 var(--ink-hard);
  transition: transform 140ms ease, box-shadow 140ms ease, background 160ms ease;
}
.view-toggle:hover { transform: translate(-1px, -1px); box-shadow: 3px 4px 0 var(--ink-hard); }
.view-toggle:active { transform: translate(1px, 1px); box-shadow: 1px 2px 0 var(--ink-hard); }
.header-pdf {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 7px 12px;
  border-radius: 999px;
  border: 2px solid var(--ink-hard);
  background: #fff;
  box-shadow: 2px 3px 0 var(--ink-hard);
  transition: transform 140ms ease, box-shadow 140ms ease, background 160ms ease;
}
.header-pdf:hover { transform: translate(-1px, -1px); box-shadow: 3px 4px 0 var(--ink-hard); background: var(--bg-warm); }

@media (max-width: 980px) {
  /* Section nav collapses; the Gallery toggle + PDF stay on the bar. */
  .site-nav { display: none; }
}
@media (max-width: 560px) {
  .site-header { padding: 10px 14px; }
  .brand { font-size: 19px; }
  .view-toggle, .header-pdf { font-size: 11px; padding: 6px 11px; }
  .header-actions { gap: 6px; }
}

/* Gallery-open: hide the tour, show the gallery */
body.gallery-open .hero,
body.gallery-open #sections,
body.gallery-open #details,
body.gallery-open .scroll-arrow { display: none; }

/* ============================================================
   Hero — photo background + huge bubbly headline + bouncing arrow
   ============================================================ */

.hero {
  position: relative;
  min-height: calc(100svh - 56px);
  display: flex; align-items: center; justify-content: center;
  padding: 80px 24px 120px;
  text-align: center;
  color: #fff;
  background: #2e3330;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    radial-gradient(800px 500px at 50% 80%, rgba(46,73,52,0.22), transparent 70%),
    linear-gradient(180deg, rgba(20,20,15,0.25) 0%, rgba(20,20,15,0.55) 100%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 820px; }
.hero .eyebrow {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  margin: 0 0 18px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.45);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 9vw, 96px);
  line-height: 0.98;
  margin: 0 0 22px;
  letter-spacing: 0.02em;
  text-wrap: balance;
  text-shadow: 3px 3px 0 rgba(26,26,26,0.55), 0 4px 18px rgba(0,0,0,0.35);
}
.hero-sub {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(16px, 1.6vw, 19px);
  color: rgba(255,255,255,0.95);
  margin: 0 auto 32px;
  max-width: 620px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}

/* Chunky scrapbook button — fun-border treatment */
.hero-cta,
.expand-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink-hard);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 4px 5px 0 var(--ink-hard);
  font-family: var(--sans);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 140ms ease, box-shadow 140ms ease, background 160ms ease;
}
.hero-cta:hover,
.expand-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 7px 0 var(--ink-hard);
  background: var(--bg-warm);
}
.hero-cta:active,
.expand-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 3px 0 var(--ink-hard);
}

/* Bouncing scroll arrow — chunky white circle, dark stroke */
.scroll-arrow {
  position: absolute;
  z-index: 2;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  width: 56px; height: 56px;
  display: grid; place-items: center;
  color: var(--ink-hard);
  background: #fff;
  border: 3px solid var(--ink-hard);
  border-radius: 50% 60% 55% 50% / 55% 50% 60% 50%;
  box-shadow: 4px 5px 0 var(--ink-hard);
  animation: bounce 1.8s ease-in-out infinite;
  transition: background 160ms ease, transform 160ms ease;
}
.scroll-arrow:hover { background: var(--bg-warm); }
.scroll-arrow svg { width: 28px; height: 28px; stroke-width: 3; }
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
  40%                     { transform: translate(-50%, -14px); }
  60%                     { transform: translate(-50%, -6px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-arrow { animation: none; }
}

/* ============================================================
   Section — full-bleed (no white card), scattered rotation
   ============================================================ */

.section {
  max-width: var(--max);
  margin: 80px auto;
  padding: 24px clamp(16px, 4vw, 28px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.section.in-view { opacity: 1; transform: none; }
.section--narrow { max-width: 900px; }

/* renderer wraps body in .section-card — keep it visually open */
.section-card { background: transparent; padding: 0; border: 0; box-shadow: none; }

/* Section heading — bubbly display, with chunky white text-shadow */
.section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-eyebrow {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--terra);
  margin: 0 0 14px;
}
.section h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 5.5vw, 64px);
  line-height: 1.02;
  margin: 0 0 18px;
  letter-spacing: 0.02em;
  text-wrap: balance;
  color: var(--ink);
  text-shadow: 2px 2px 0 #fff;
}
.section-desc {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink);
  margin: 0 auto;
  max-width: 620px;
  text-wrap: pretty;
  font-weight: 600;
}
.section-note {
  margin: 16px auto 0;
  font-size: 13px;
  color: var(--terra);
  font-style: italic;
  font-weight: 700;
}

/* Per-section background tint — applied to body via JS scroll listener */
body[data-active-section="area"]       { background: var(--tint-area); }
body[data-active-section="outside"]    { background: var(--tint-outside); }
body[data-active-section="deck"]       { background: var(--tint-deck); }
body[data-active-section="great-room"] { background: var(--tint-great-room); }
body[data-active-section="kitchen"]    { background: var(--tint-kitchen); }
body[data-active-section="bath"]       { background: var(--tint-bath); }
body[data-active-section="bedrooms"]   { background: var(--tint-bedrooms); }
body[data-active-section="lower-level"] { background: var(--tint-lower); }
body[data-active-section="den"]        { background: var(--tint-den); }
body[data-active-section="details"]    { background: var(--tint-details); }

/* ============================================================
   Photo grid + the signature "fun-border" frame
   ============================================================ */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.photo {
  margin: 0;
  position: relative;
  grid-column: span 6;
  overflow: visible;        /* let shadow & caption escape */
  background: transparent;
  transition: transform 200ms ease;
}

/* The bubble frame — every photo gets a slightly different rotation */
.photo > img,
.photo > .photo-frame {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-soft);
  border: 4px solid var(--ink-hard);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 5px 6px 0 var(--ink-hard);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.photo:nth-child(3n+1) { transform: rotate(-1.2deg); }
.photo:nth-child(3n+2) { transform: rotate(0.8deg); }
.photo:nth-child(3n+3) { transform: rotate(-0.4deg); }
.photo:hover           { transform: rotate(0deg) translate(-1px, -1px); z-index: 2; }
.photo:hover > img     { box-shadow: 7px 8px 0 var(--ink-hard); }

.photo { cursor: zoom-in; }

/* Inverted blob for every other one — keeps it visually varied */
.photo:nth-child(2n) > img,
.photo:nth-child(2n) > .photo-frame {
  border-radius: 15px 255px 15px 225px / 225px 15px 255px 15px;
}

/* Caption sits below the frame — handwritten-feel italic serif */
.photo figcaption {
  position: static;
  margin: 14px 6px 0;
  padding: 0;
  background: transparent;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
  text-align: center;
  opacity: 1;
  transform: none;
  font-weight: 500;
}

/* Visual rhythm — every 5th wider, like the original */
.photo:nth-child(5n+1) { grid-column: span 8; }
.photo:nth-child(5n+2) { grid-column: span 4; }

/* Hidden-when-collapsed photos */
.section[data-expanded="false"] .photo.is-extra { display: none; }

.expand-row {
  margin-top: 36px;
  display: flex; justify-content: center;
}
.expand-btn svg {
  width: 16px; height: 16px;
  transition: transform 280ms ease;
}
.section[data-expanded="true"] .expand-btn svg { transform: rotate(180deg); }

.photo-empty {
  grid-column: span 12;
  padding: 60px 24px;
  text-align: center;
  color: var(--ink-soft);
  font-weight: 700;
  background: #fff;
  border: 3px dashed var(--ink-hard);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

/* ============================================================
   Mobile — single column, tighter rotation
   ============================================================ */
@media (max-width: 820px) {
  .photo,
  .photo:nth-child(5n+1),
  .photo:nth-child(5n+2) { grid-column: span 12; }
  .photo:nth-child(3n+1) { transform: rotate(-0.6deg); }
  .photo:nth-child(3n+2) { transform: rotate(0.4deg); }
  .photo:nth-child(3n+3) { transform: rotate(-0.2deg); }
  .photo > img,
  .photo > .photo-frame { aspect-ratio: 3 / 2; box-shadow: 4px 5px 0 var(--ink-hard); }
  .section { margin: 40px auto; padding: 12px 16px; }
  .photo-grid { gap: 28px; }
}

/* ============================================================
   Cost & Timeline
   ============================================================ */

#cost {
  background: #fff;
  border: 4px solid var(--ink-hard);
  border-radius: 60px 20px 80px 20px / 20px 80px 20px 60px;
  box-shadow: 6px 8px 0 var(--ink-hard);
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
  margin: 96px clamp(16px, 4vw, 28px);
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 0 0 44px;
}
@media (max-width: 820px) { .cost-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cost-grid { grid-template-columns: 1fr; } }

.cost-card {
  background: var(--bg-warm);
  border: 3px solid var(--ink-hard);
  border-radius: 30px 8px 30px 8px / 8px 30px 8px 30px;
  box-shadow: 3px 4px 0 var(--ink-hard);
  padding: 22px 20px;
}
.cost-label {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.cost-value {
  font-family: var(--display);
  font-weight: 400;
  font-size: 34px;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}
.cost-note { font-size: 13px; color: var(--ink-soft); margin: 0; font-weight: 600; }

.timeline { list-style: none; padding: 0; margin: 0; border-top: 2px dashed var(--ink-hard); }
.timeline li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 18px 4px;
  border-bottom: 2px dashed var(--ink-hard);
  color: var(--ink);
  font-weight: 600;
}
.timeline li span {
  font-family: var(--display);
  color: var(--terra);
  font-size: 18px;
  letter-spacing: 0.02em;
}
@media (max-width: 620px) {
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
}

.cards-note {
  margin: 16px 0 0;
  text-align: center;
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
  color: var(--terra);
}
.details-subhead {
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: 0.02em;
  margin: 44px 0 8px;
  text-shadow: 2px 2px 0 #fff;
}
.essentials {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 12px;
}
.essentials li {
  background: var(--bg-warm);
  border: 3px solid var(--ink-hard);
  border-radius: 24px 8px 24px 8px / 8px 24px 8px 24px;
  box-shadow: 3px 4px 0 var(--ink-hard);
  padding: 16px 20px;
  font-weight: 600;
  color: var(--ink);
}
.essentials strong { font-weight: 800; }
.details-closing {
  margin: 36px auto 0;
  max-width: 620px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--ink);
  font-weight: 500;
}

/* ============================================================
   Contact card (in Details)
   ============================================================ */

.contact-card {
  margin: 40px auto 0;
  max-width: 560px;
  text-align: center;
  background: var(--forest);
  color: #fff;
  border: 3px solid var(--ink-hard);
  border-radius: 40px 12px 40px 12px / 12px 40px 12px 40px;
  box-shadow: 5px 6px 0 var(--ink-hard);
  padding: 26px 24px;
}
.contact-label {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bg-warm);
  margin: 0 0 8px;
}
.contact-lines {
  font-family: var(--display);
  font-size: clamp(18px, 2.6vw, 24px);
  margin: 0 0 16px;
}
.contact-lines a { color: #fff; }
.contact-lines a:hover { color: var(--bg-warm); }
.contact-dot { margin: 0 8px; color: var(--terra-soft); }
.contact-pdf {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink-hard);
  border-radius: 999px;
  padding: 11px 22px;
  box-shadow: 3px 4px 0 var(--ink-hard);
  transition: transform 140ms ease, box-shadow 140ms ease, background 160ms ease;
}
.contact-pdf:hover { transform: translate(-1px, -1px); box-shadow: 4px 5px 0 var(--ink-hard); background: var(--bg-warm); }

/* ============================================================
   Gallery view
   ============================================================ */

#gallery {
  max-width: var(--max);
  margin: 32px auto 64px;
  padding: 24px clamp(16px, 4vw, 28px);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px 22px;
}
.gallery-item { margin: 0; }
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-soft);
  border: 4px solid var(--ink-hard);
  border-radius: 18px 6px 18px 6px / 6px 18px 6px 18px;
  box-shadow: 4px 5px 0 var(--ink-hard);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.gallery-item:hover img { transform: translate(-1px, -1px); box-shadow: 6px 7px 0 var(--ink-hard); }
.gallery-item figcaption { margin: 12px 4px 0; }
.gallery-item .g-label {
  display: block;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
}
.gallery-item .g-section {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terra);
  margin: 3px 0 5px;
}
.gallery-item .g-desc {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ============================================================
   Footer
   ============================================================ */

.site-foot {
  margin: 64px 16px 32px;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
  border-top: 2px dashed var(--ink-hard);
}
.site-foot p { margin: 2px 0; }
.site-foot a { color: var(--forest); font-weight: 800; }
.site-foot a:hover { color: var(--terra); }

/* ============================================================
   Lightbox
   ============================================================ */

.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 18, 14, 0.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 32px;
  z-index: 100;
  flex-direction: column;
  gap: 16px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(1400px, 96vw);
  max-height: 78vh;
  object-fit: contain;
  border: 4px solid var(--ink-hard);
  border-radius: 80px 16px 60px 16px / 16px 60px 16px 80px;
  background: #fff;
}
.lightbox-caption {
  color: #fff;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  max-width: 800px;
  text-align: center;
  margin: 0;
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  font-size: 38px; line-height: 1;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink-hard);
  border-radius: 50%;
  width: 48px; height: 48px;
  box-shadow: 3px 4px 0 var(--ink-hard);
  cursor: pointer;
}
