/* ==========================================================================
   Kerry Spalding — one-pager
   ========================================================================== */

@font-face {
  font-family: "Operetta 32";
  src: url("../fonts/Operetta32-ExtraLight.woff2") format("woff2"),
       url("../fonts/Operetta32-ExtraLight.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette */
  --white:  #ffffff;
  --grey:   #efefee;
  --accent: #a3826c;
  --ink:    #3e3d3d;
  --black:  #000000;

  /* type */
  --font-serif: "Operetta 32", "Operetta", Georgia, "Times New Roman", serif;
  --font-sans:  "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body-size:  16px;
  --body-lh:    2;

  /* layout */
  --copy-width:  380px;   /* width of the centred copy column */
  --eyebrow-gap: 100px;   /* space between eyebrow and copy */
  --quote-pad:   50px;    /* space above/below pull quotes */
  --gutter:      24px;
  --section-pad: clamp(80px, 10vw, 150px);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 200;
  font-size: var(--body-size);
  line-height: var(--body-lh);
  font-synthesis: none;            /* never fake a bold we don't have */
  text-rendering: optimizeLegibility;
}

img, picture { display: block; max-width: 100%; }

h1, h2, h3 { font-weight: 200; color: var(--black); margin: 0; }

a { color: inherit; }

section[id] { scroll-margin-top: 0; }

/* --------------------------------------------------------------------------
   Header (sits inside the hero so it's covered by the scrolling content)
   -------------------------------------------------------------------------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px 40px;
}

.logo { display: block; justify-self: start; }
.logo img { height: 54px; width: auto; }

.nav {
  display: flex;
  gap: 44px;
  justify-self: center;
}

.nav a {
  color: var(--black);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.nav a:hover { opacity: 0.55; }

/* --------------------------------------------------------------------------
   Pinned layers + curtains
   .pinned blocks stick to the top of the viewport; the .curtain that follows
   scrolls over them. Stacking is by z-index, in page order:
   hero (0) < curtain 1 (1) < image break (2) < curtain 2 (3)
   -------------------------------------------------------------------------- */

.pinned {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.curtain {
  position: relative;
  background: var(--white);
}

.hero               { z-index: 0; }
.hero + .curtain    { z-index: 1; }
.break              { z-index: 2; }
.break + .curtain   { z-index: 3; }

/* Hero ---------------------------------------------------------------------- */

.hero {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.hero-bg,
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin-top: 25vh;
  padding: 0 var(--gutter);
  text-align: center;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.1;
}

.hero h1 span {
  display: block;
  margin-top: 0.4em;
  font-size: 0.5em;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Content
   -------------------------------------------------------------------------- */

/* Copy sections: eyebrow left, centred justified column ------------------- */

.copy-section { padding-block: var(--section-pad); }
.copy-section + .copy-section { padding-top: 0; }

.copy-grid {
  display: grid;
  grid-template-columns: 1fr var(--copy-width) 1fr;
  column-gap: var(--eyebrow-gap);
  padding-inline: var(--gutter);
}

.eyebrow {
  grid-column: 1;
  justify-self: end;
  align-self: start;
  margin: 0;
  white-space: nowrap;
  text-align: right;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;
  line-height: calc(var(--body-size) * var(--body-lh)); /* baseline-ish with line 1 of copy */
  color: var(--ink);
}

.copy {
  grid-column: 2;
  text-align: justify;
}

.copy p { margin: 0 0 1.5em; }
.copy p:last-child { margin-bottom: 0; }

.pullquote {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 46rem;
  margin: 0;
  padding: var(--quote-pad) var(--gutter);
  text-align: center;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.35;
  color: var(--black);
}

/* Full-bleed image break (pinned, see above) -------------------------------- */

.break picture,
.break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}

/* Pricing + CTA ------------------------------------------------------------- */

/* paragraph + prices sit side by side and centre together as one unit */
.book-inner {
  max-width: 66rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 96px;
}

.book-copy { flex: 0 1 auto; max-width: calc(30rem + 50px); margin: 0; }

.pricing {
  flex: 0 0 auto;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--black);
  font-size: 22px;
  line-height: 1.9;
  -webkit-text-stroke: 0.7px currentColor; /* only ExtraLight is loaded; this gives the bold look */
}

.cta {
  margin-top: clamp(64px, 8vw, 110px);
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 0.76em 6em;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 17px;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--accent); color: var(--white); }

/* Side-by-side images with overlay ---------------------------------------- */

.duo {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 100%;   /* row = container height, not the image's intrinsic height */
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}

.duo picture { height: 100%; min-height: 0; }
.duo img { width: 100%; height: 100%; object-fit: cover; }
.duo .left  img { object-position: 50% 35%; }
.duo .right img { object-position: 50% 50%; }

.duo-caption {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6vh var(--gutter) 0;
  text-align: center;
  color: var(--white);
}

.duo-caption h2 {
  color: var(--white);
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.2;
}

.duo-caption p {
  margin: 0.6em 0 0;
  font-size: clamp(15px, 1.35vw, 19px);
}

/* Testimonials -------------------------------------------------------------- */

.testimonials {
  background: var(--grey);
  padding-block: var(--section-pad);
}

.testimonials-inner {
  max-width: calc(72rem + 150px);   /* +50px per column */
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 64px;
}

.testimonial {
  margin: 0 0 56px;
  font-size: 15px;
  line-height: 2;
  text-align: justify;
}
.testimonial:last-child { margin-bottom: 0; }
.testimonial p { margin: 0 0 1em; }
.testimonial cite {
  display: block;
  margin-top: 0.4em;
  font-style: normal;
  text-align: left;
}

/* Footer -------------------------------------------------------------------- */

.footer-image img {
  width: 100%;
  height: min(85vh, 56vw);
  min-height: 360px;
  object-fit: cover;
  object-position: 50% 30%;
}

.credits {
  background: var(--black);
  color: var(--white);
  padding: 64px var(--gutter);
  text-align: center;
  font-size: 15px;
}

.credits a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.credits a:hover { color: var(--white); }

.credits .sep { margin: 0 18px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .book-inner {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }
  .book-copy { text-align: center; }
  .btn { padding-inline: 4em; }

  .testimonials-inner { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 18px;
    padding: 24px var(--gutter);
  }
  .logo { justify-self: center; }
  .logo img { height: 44px; }
  .nav { gap: 28px; }
  .nav a { font-size: 12px; }

  .hero h1 { margin-top: 30vh; }

  .copy-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }
  .eyebrow {
    grid-column: 1;
    justify-self: start;
    text-align: left;
    margin-bottom: 20px;
    line-height: 1.5;
  }
  .copy, .pullquote { grid-column: 1; }
  .pullquote { padding-inline: 0; }

  .duo {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    height: auto;
    min-height: 0;
  }
  .duo picture { height: 70vh; min-height: 420px; }

  .testimonials-inner { grid-template-columns: 1fr; }
  .testimonial { margin-bottom: 44px; }

  .credits { padding-block: 48px; line-height: 2; }
  .credits .sep { display: none; }
  .credits .credit { display: block; }
}
