/* Premium design system layer (shared, restrained).
   Goal: unify hero, rhythm, surfaces, nav underlines, buttons, reveals, and modal scaffolding across pages. */

:root {
  /* Brand palette */
  --p-grove: #3b5e45;
  --p-linen: #f5efe0;
  --p-sand: #d4bf9e;
  --p-charcoal: #2c2420;
  --p-harvest: #c8871a;
  --p-moss: #253d2c;

  /* Text */
  --p-text: rgba(44, 36, 32, 0.92);
  --p-muted: rgba(44, 36, 32, 0.74);
  --p-invert: rgba(245, 239, 224, 0.92);
  --p-invert-muted: rgba(245, 239, 224, 0.76);

  /* Surfaces */
  --p-surface: rgba(255, 255, 255, 0.62);
  --p-surface-2: rgba(255, 255, 255, 0.74);
  --p-border: rgba(212, 191, 158, 0.85);
  --p-border-soft: rgba(212, 191, 158, 0.55);

  /* Radius */
  --p-r-lg: 18px;
  --p-r-md: 16px;
  --p-r-pill: 999px;

  /* Motion */
  --p-ease: cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Section rhythm helper */
.p-wrap {
  padding: clamp(48px, 6vw, 88px) 0;
}

.p-inner {
  width: min(var(--container), calc(100% - 56px));
  margin: 0 auto;
}

@media (max-width: 860px) {
  .p-inner {
    width: min(var(--container), calc(100% - 32px));
  }
}

/* Hero scaffold (supports image/video/texture layers) */
.p-heroBase {
  position: relative;
  min-height: clamp(480px, 66vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid rgba(60, 46, 34, 0.06);
}

.p-heroBase[data-theme="charcoal"] {
  background: var(--p-charcoal);
}

.p-heroBase[data-theme="grove"] {
  background: var(--p-grove);
}

.p-heroLayer {
  position: absolute;
  inset: 0;
}

.p-heroPhoto {
  background-size: cover;
  background-position: center;
  filter: saturate(0.92) contrast(1.05);
}

.p-heroOverlay--dark {
  background:
    radial-gradient(1200px 560px at 18% 14%, rgba(59, 94, 69, 0.35), transparent 62%),
    radial-gradient(900px 520px at 82% 80%, rgba(200, 135, 26, 0.14), transparent 64%),
    rgba(44, 36, 32, 0.70);
}

.p-heroOverlay--grove {
  background: rgba(59, 94, 69, 0.78);
}

.p-heroInner {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100% - 56px));
  margin: 0 auto;
  padding: clamp(56px, 7vw, 92px) 0 clamp(28px, 4vw, 50px);
}

@media (max-width: 860px) {
  .p-heroInner {
    width: min(var(--container), calc(100% - 32px));
  }
}

.p-h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.2vw, 3.45rem);
  line-height: 1.02;
  letter-spacing: 0.02em;
}

.p-h1--invert {
  color: rgba(245, 239, 224, 0.98);
}

.p-lead {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  max-width: 86ch;
}

.p-lead--invert {
  color: rgba(245, 239, 224, 0.84);
}

.p-rule {
  width: 56px;
  height: 2px;
  border: 0;
  margin: 16px 0 18px;
  background: rgba(200, 135, 26, 0.92);
  transform-origin: left;
  transform: scaleX(0.35);
  transition: transform 560ms ease;
}

.p-heroBase[data-loaded="true"] .p-rule {
  transform: scaleX(1);
}

/* Premium text navigation underline */
.p-navline {
  margin-top: 18px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.p-navline::-webkit-scrollbar {
  height: 6px;
}
.p-navline::-webkit-scrollbar-thumb {
  background: rgba(212, 191, 158, 0.25);
  border-radius: 999px;
}

.p-navline a,
.p-navline button {
  position: relative;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(245, 239, 224, 0.78);
  padding: 8px 0;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 160ms ease;
}

.p-navline a:hover,
.p-navline button:hover {
  color: rgba(245, 239, 224, 0.96);
}

.p-navline a::after,
.p-navline button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 999px;
  background: rgba(245, 239, 224, 0.22);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 420ms var(--p-ease), background 240ms ease;
}

.p-navline a:hover::after,
.p-navline button:hover::after {
  transform: scaleX(0.8);
}

.p-navline a[aria-current="true"]::after,
.p-navline button[aria-selected="true"]::after {
  transform: scaleX(1);
  background: rgba(200, 135, 26, 0.92);
}

/* Buttons */
.p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(245, 239, 224, 0.22);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  background: rgba(245, 239, 224, 0.06);
  color: rgba(245, 239, 224, 0.92);
  cursor: pointer;
  transition: transform 120ms ease, border-color 160ms ease, background 160ms ease;
}

.p-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 135, 26, 0.55);
  background: rgba(200, 135, 26, 0.12);
}

.p-btn.primary {
  border-color: rgba(200, 135, 26, 0.55);
  background: rgba(200, 135, 26, 0.16);
}

/* Surfaces */
.p-surface {
  border-radius: var(--p-r-lg);
  border: 1px solid var(--p-border);
  background: var(--p-surface);
}

/* Reveal (attribute-driven; used across pages with their own data-*-reveal too) */
[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 560ms ease, transform 560ms ease;
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modal scaffold (optional shared baseline) */
.p-modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.58);
  backdrop-filter: blur(4px);
  z-index: 60;
}
.p-modal {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0 auto;
  width: min(1040px, calc(100% - 28px));
  bottom: 18px;
  z-index: 61;
  border-radius: 18px;
  border: 1px solid rgba(212, 191, 158, 0.55);
  background: rgba(245, 239, 224, 0.96);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .p-rule,
  [data-reveal] {
    transition: none;
  }
}

