/* ─── Base ─────────────────────────────────────────────── */

.pn-page {
  color: var(--pn-text);
  background: var(--pn-surface);
  font-family: var(--pn-sans);
  line-height: 1.7;
}

.pn-page *,
.pn-page *::before,
.pn-page *::after {
  box-sizing: border-box;
}

.pn-page img {
  display: block;
  width: 100%;
}

.pn-page h1,
.pn-page h2,
.pn-page h3 {
  margin-top: 0;
  font-family: var(--pn-serif);
  font-weight: 400;
  line-height: 1.15;
}

.pn-page h1 { margin-bottom: 1.1rem; font-size: clamp(2.5rem, 6vw, 5.4rem) !important; }
.pn-page h2 { margin-bottom: 1.1rem; font-size: clamp(2rem, 4vw, 3.7rem) !important; }
.pn-page h3 { margin-bottom: 0.55rem; font-size: 1.4rem !important; }
.pn-page p  { margin-top: 0; }
.pn-page figure { margin: 0; }

.pn-kicker {
  margin-bottom: 0.75rem;
  color: var(--pn-accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.pn-section {
  width: min(var(--pn-max), calc(100% - 2.4rem));
  margin-inline: auto;
  padding-block: clamp(4rem, 8vw, 8rem);
}

/* ─── Hero ──────────────────────────────────────────────── */

.pn-hero {
  position: relative;
  min-height: min(78vh, 830px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--pn-bg);
}

.pn-hero picture,
.pn-hero__image,
.pn-hero__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
}

.pn-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  pointer-events: none;
  transform: translateX(13%);
}

.pn-hero__overlay {
  background: linear-gradient(
    90deg,
    rgba(248,242,234,0.96) 0%,
    rgba(248,242,234,0.88) 22%,
    rgba(248,242,234,0.62) 40%,
    rgba(248,242,234,0.22) 58%,
    rgba(248,242,234,0.04) 72%,
    rgba(248,242,234,0) 100%
  );
}

.pn-hero__content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 2.4rem));
  margin-left: max(2.5rem, calc((100vw - 1320px) / 2));
  padding-block: 4rem;
}

.pn-hero h1 {
  max-width: 850px;
  margin-bottom: 1.4rem;
  font-size: clamp(3.0rem, 5.2vw, 6.0rem) !important;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.pn-hero__lead {
  max-width: 430px;
  margin-bottom: 2rem;
  color: #625951;
  font-size: clamp(1.05rem, 1.8vw, 1.45rem) !important;
  line-height: 1.5;
}

.pn-hero .pn-kicker {
  margin-bottom: 1.2rem;
  color: #9b642e;
  font-size: 0.78rem;
  letter-spacing: 0.17em;
}

.pn-hero .pn-buttons {
  gap: 1rem;
}

.pn-hero .pn-button {
  min-height: 56px;
  padding-inline: 1.7rem;
}

/* ─── Buttons ───────────────────────────────────────────── */

.pn-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.pn-button {
  min-height: 48px;
  padding: 0.8rem 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pn-accent);
  background: transparent;
  color: var(--pn-accent-dark);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.pn-button:hover {
  transform: translateY(-2px);
}

.pn-button--primary {
  background: var(--pn-accent);
  color: #fff;
}

.pn-button--primary:hover {
  background: var(--pn-accent-dark);
}

/* ─── Intro / Process / FAQ grid ────────────────────────── */

.pn-intro,
.pn-process,
.pn-faq-price {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
}

.pn-intro__copy,
.pn-process__copy {
  max-width: 580px;
}

.pn-intro__image img,
.pn-process__image img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--pn-shadow);
}

.pn-intro__image,
.pn-process__image {
  transform: perspective(1200px) rotateY(2deg);
  transition: transform 500ms ease;
}

.pn-process__image {
  transform: perspective(1200px) rotateY(-2deg);
}

.pn-intro__image:hover,
.pn-process__image:hover {
  transform: perspective(1200px) rotateY(0deg) translateY(-4px);
}

.pn-intro__image img,
.pn-process__image img {
  /* keep opacity here: lazy-load fade relies on it and transitions don't merge */
  transition: box-shadow 500ms ease, opacity 350ms ease;
}

.pn-intro__image:hover img,
.pn-process__image:hover img {
  box-shadow: var(--pn-shadow-hover);
}

/* ─── Gallery section ───────────────────────────────────── */

.pn-gallery-section {
  padding: clamp(4rem, 7vw, 7rem) 0;
  background: var(--pn-surface);
}

.pn-heading {
  width: min(var(--pn-max), calc(100% - 2.4rem));
  margin: 0 auto 2.4rem;
  text-align: center;
}

/* Wrapper with stacking context so z-index is self-contained */
.pn-gallery-preview {
  position: relative;
  isolation: isolate;
  width: 100%;
}

/* Clip: collapses to max-height by default */
.pn-gallery-clip {
  position: relative;
  z-index: 1;
  max-height: 680px;
  overflow: hidden;
  transition: max-height 700ms ease;
}

/* Expanded state: remove clip */
.pn-gallery-preview.is-expanded .pn-gallery-clip {
  max-height: none;
  overflow: hidden;
}

/* ─── Gallery items ─────────────────────────────────────── */

#portfolio_gallery .grid-item {
  overflow: hidden;
}

#portfolio_gallery .grid-item a {
  display: block;
}

#portfolio_gallery .grid-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 400ms ease, opacity 350ms ease;
}

#portfolio_gallery .grid-item:hover img {
  transform: scale(1.025);
}

/* ─── Fade overlay (only when NOT expanded) ─────────────── */

.pn-gallery-fade {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  height: 280px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255,253,250,0)    0%,
    rgba(255,253,250,0.18) 18%,
    rgba(255,253,250,0.55) 42%,
    rgba(255,253,250,0.86) 68%,
    rgba(255,253,250,0.98) 88%,
    rgb(255,253,250)       100%
  );
  transition: opacity 260ms ease, visibility 260ms ease;
}

.pn-gallery-fade::before {
  content: "";
  position: absolute;
  inset: 34px 0 0;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,0.55), #000);
  mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,0.55), #000);
}

/* Hide fade when expanded */
.pn-gallery-preview.is-expanded .pn-gallery-fade {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ─── Expand button ─────────────────────────────────────── */

.pn-gallery-expand {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 100;
  transform: translateX(-50%);
  width: max-content;
}

.pn-gallery-expand .pn-button {
  background: var(--pn-accent) !important;
  color: #fff !important;
  border-color: var(--pn-accent) !important;
  box-shadow: 0 8px 28px rgba(67,48,30,0.28);
}

/* Expanded: button flows below gallery */
.pn-gallery-preview.is-expanded .pn-gallery-expand {
  position: static;
  transform: none;
  width: 100%;
  padding-top: 28px;
  text-align: center;
}

/* ─── Features ──────────────────────────────────────────── */

.pn-features {
  padding: clamp(3.5rem, 7vw, 6rem)
           max(1.2rem, calc((100vw - var(--pn-max)) / 2));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--pn-soft);
}

.pn-features article {
  padding: 1.7rem clamp(1.2rem, 3vw, 3rem);
  text-align: center;
  border-right: 1px solid var(--pn-border);
}

.pn-features article:last-child {
  border-right: 0;
}

.pn-features span {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--pn-accent);
  font-family: var(--pn-serif);
  font-size: 1.8rem;
}

.pn-features p {
  color: var(--pn-muted);
}

/* ─── Process list ──────────────────────────────────────── */

.pn-process-list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.pn-process-list li {
  padding: 1.05rem 0;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 1rem;
  border-bottom: 1px solid var(--pn-border);
}

.pn-process-list li > span {
  color: var(--pn-accent);
  font-family: var(--pn-serif);
  font-size: 1.55rem;
}

.pn-process-list h3 {
  margin-bottom: 0.2rem;
  font-family: var(--pn-sans);
  font-size: 1rem !important;
  font-weight: 700;
}

.pn-process-list p {
  margin-bottom: 0;
  color: var(--pn-muted);
}

/* ─── Quote ─────────────────────────────────────────────── */

.pn-quote {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.pn-quote img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.pn-quote::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,249,242,0.72);
}

.pn-quote blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 2rem;
  text-align: center;
  font-family: var(--pn-serif);
  font-size: clamp(1.55rem, 3.2vw, 2.75rem);
  font-style: italic;
}

/* ─── FAQ / Price ───────────────────────────────────────── */

.pn-faq-price {
  align-items: start;
}

.pn-accordion__item {
  border-bottom: 1px solid var(--pn-border);
}

.pn-accordion__item h3 {
  margin: 0;
}

.pn-accordion__item button {
  width: 100%;
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 0;
  background: transparent;
  color: var(--pn-text);
  font: inherit;
  font-family: Georgia, 'Times New Roman', serif;
  text-align: left;
  cursor: pointer;
}

.pn-accordion__item button span {
  color: var(--pn-accent);
  font-size: 1.35rem;
  transition: transform 180ms ease;
}

.pn-accordion__item button[aria-expanded="true"] span {
  transform: rotate(45deg);
}

.pn-accordion__panel {
  display: none;
  padding-bottom: 1rem;
  color: var(--pn-muted);
}

.pn-accordion__panel.is-open {
  display: block;
}

.pn-price-card {
  padding: clamp(2rem, 5vw, 4rem);
  background: var(--pn-bg);
  border: 1px solid var(--pn-border);
  text-align: center;
  box-shadow:
      0 1px 2px rgba(68, 48, 34, .05),
      0 8px 24px rgba(68, 48, 34, .07);
  transition: transform 400ms ease, box-shadow 400ms ease;
}

.pn-price-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--pn-shadow-hover);
}

.pn-price {
  margin-bottom: 1rem;
  font-family: var(--pn-serif);
  font-size: clamp(2.1rem, 4vw, 3.7rem);
}

.pn-price-card .pn-button {
  margin-top: 1.3rem;
}

/* ─── Final CTA ─────────────────────────────────────────── */

.pn-final-cta {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  background: var(--pn-soft);
}

.pn-final-cta figure {
  min-height: 520px;
}

.pn-final-cta figure img {
  height: 100%;
  object-fit: cover;
}

.pn-final-cta > div {
  padding: clamp(3rem, 8vw, 7rem);
  align-self: center;
}

/* ─── Lazy images ───────────────────────────────────────── */

.pn-lazy-image {
  opacity: 0;
  transition: opacity 350ms ease;
}

.pn-lazy-image.is-loaded {
  opacity: 1;
}

/* ─── Responsive: ≤ 900px ───────────────────────────────── */

@media (max-width: 900px) {
  .pn-hero {
    display: block;
    min-height: 0;
    overflow: hidden;
    background: var(--pn-bg);
  }

  .pn-hero picture {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: clamp(280px, 48vw, 430px);
  }

  .pn-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    transform: none !important;
  }

  .pn-hero__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: clamp(280px, 48vw, 430px);
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      rgba(248,242,234,0) 62%,
      rgba(248,242,234,0.35) 80%,
      rgba(248,242,234,0.90) 96%,
      rgba(248,242,234,1) 100%
    );
  }

  .pn-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0;
    padding: 1.4rem 1.25rem 3rem;
    background: var(--pn-bg);
  }

  .pn-hero .pn-kicker {
    margin-bottom: 1rem;
    font-size: 0.7rem;
    line-height: 1.4;
    letter-spacing: 0.14em;
  }

  .pn-hero h1 {
    max-width: none;
    margin-bottom: 1.4rem;
    font-size: clamp(1.85rem, 6.5vw, 2.65rem) !important;
    line-height: 1.08;
    letter-spacing: -0.02em;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }

  .pn-hero__lead {
    max-width: 100%;
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.55;
  }

  .pn-hero .pn-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .pn-hero .pn-button {
    width: 100%;
    min-height: 54px;
    padding: 0.85rem 1rem;
  }

  .pn-intro,
  .pn-process,
  .pn-faq-price {
    grid-template-columns: 1fr;
  }

  /* no hover on touch: tilt only eats width on narrow screens */
  .pn-intro__image,
  .pn-process__image,
  .pn-intro__image:hover,
  .pn-process__image:hover {
    transform: none;
  }

  .pn-features {
    grid-template-columns: 1fr;
  }

  .pn-features article {
    border-right: 0;
    border-bottom: 1px solid var(--pn-border);
  }

  .pn-features article:last-child {
    border-bottom: 0;
  }

  .pn-final-cta {
    grid-template-columns: 1fr;
  }

  .pn-final-cta figure {
    min-height: 380px;
  }
}

/* ─── Responsive: ≤ 700px ───────────────────────────────── */

@media (max-width: 700px) {
  .pn-gallery-clip {
    max-height: 560px;
  }

  .pn-gallery-fade {
    height: 180px;
  }

  .pn-gallery-expand {
    bottom: 24px;
  }
}

/* ─── Responsive: ≤ 560px ───────────────────────────────── */

@media (max-width: 560px) {
  .pn-buttons {
    display: grid;
  }

  .pn-button {
    width: 100%;
  }

  .pn-final-cta > div {
    padding-inline: 1.2rem;
  }
}

/* ─── Responsive: ≤ 390px ───────────────────────────────── */

@media (max-width: 390px) {
  .pn-hero h1 {
    font-size: 1.72rem !important;
  }

  .pn-hero__content {
    padding-inline: 1rem;
  }
}

/* ─── Fix: .contact-btn used as inline CTA inside .pn-page ─ */
/* footer.css turns .contact-btn into a fixed circular widget;
   override here so pn-button styling wins inside the landing page */
.pn-page .contact-btn {
  position: static !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  background-color: var(--pn-accent) !important;
  bottom: auto !important;
  right: auto !important;
  box-shadow: none !important;
  z-index: auto !important;
}

.pn-page .contact-btn::after,
.pn-page .contact-btn::before {
  display: none !important;
}
