/*
 * methodology.css — Build H-4: Methodology / Dark Section
 * bestyearyet.com Homepage
 *
 * Background:  #134659 (deep navy) via .section-dark from global.css
 * Layout:      Two-column — text left, founder portrait + book right
 * Color moment: Teal pull-quote text + teal portrait ghost-frame
 *
 * Portrait mask: chamfered hexagon (diagonal cuts at top-left +
 * bottom-right). Book cover floats over portrait bottom-right,
 * rotated ~7°, deep shadow — editorial "laid on the table" feel.
 *
 * .section-dark from global.css provides:
 *   background: var(--color-navy), color: off-white, padding: 120px 0
 *
 * Depends on: styles/tokens.css, styles/global.css
 */


/* ================================================================
 * SECTION WRAPPER
 * ================================================================ */

.section-methodology {
  /* Base dark treatment inherited from .section-dark */
}


/* ================================================================
 * INNER — 2-column grid: text | portrait+book
 * ================================================================ */

.methodology-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 80px;
  align-items: start;
  max-width: 1160px;
}


/* ================================================================
 * TEXT COLUMN
 * ================================================================ */

.methodology-text {
  min-width: 0; /* prevent grid blowout */
}


/* ================================================================
 * HEADLINE — override color for dark context
 * ================================================================ */

.section-methodology .section-headline-lg {
  color: var(--color-off-white);
  margin-bottom: 32px;
}


/* ================================================================
 * BODY COPY
 * ================================================================ */

.section-methodology .body-text {
  color: rgba(250, 249, 246, 0.8);
}

.section-methodology .body-text + .body-text {
  margin-top: 20px;
}


/* ================================================================
 * FOUNDER QUOTE
 * The teal text on navy is the color moment for this section.
 * ================================================================ */

.founder-quote {
  border-left: 3px solid var(--color-teal);
  padding-left: 32px;
  margin: 52px 0;
}

.founder-quote blockquote {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 400;
  font-style: italic;
  color: var(--color-teal);
  line-height: 1.3;
  margin: 0 0 16px;
}

.founder-quote cite {
  font-size: 13px;
  color: rgba(250, 249, 246, 0.55);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
}


/* ================================================================
 * CTA
 * ================================================================ */

.section-methodology .btn-primary {
  margin-top: 8px;
}


/* ================================================================
 * PORTRAIT COLUMN
 *
 * Flex column layout so the book's overlap is set precisely with
 * negative margin — no guesswork from absolute positioning.
 *
 * Layers (back to front):
 *   1. .portrait-frame::before — teal ghost-frame, same polygon, ↙
 *   2. .portrait-frame > .founder-img — photo, chamfered clip-path
 *   3. .book-cover-wrap — negative margin-top clips only the corner,
 *                         rotated 7°, deep drop-shadow
 * ================================================================ */

.methodology-portrait {
  position: relative;
  padding-left: 24px; /* space for teal ghost-frame left bleed only */
  display: flex;
  flex-direction: column;
}

/* Teal ghost-frame — bounded to portrait height via portrait-frame */
.portrait-frame {
  position: relative;
  z-index: 1;
}

.portrait-frame::before {
  content: '';
  position: absolute;
  top: 20px;
  left: -20px; /* bleeds into the padding zone */
  right: 0;
  bottom: 0;
  background: var(--color-teal);
  opacity: 0.22;
  clip-path: polygon(
    0% 12%, 12% 0%, 100% 0%,
    100% 88%, 88% 100%, 0% 100%
  );
  z-index: -1;
}

.founder-img {
  width: 100%;
  display: block;
  clip-path: polygon(
    0% 12%, 12% 0%, 100% 0%,
    100% 88%, 88% 100%, 0% 100%
  );
  filter: contrast(1.04) brightness(0.97);
}


/* ================================================================
 * BOOK COVER — corner-clips the portrait bottom-right
 *
 * margin-top: -60px pulls the book up exactly 60px into the portrait,
 * so only the bottom corner of Jinny's photo is covered.
 * ================================================================ */

.book-cover-wrap {
  position: relative;
  margin-top: -60px;       /* precise corner overlap — only 60px */
  align-self: flex-end;    /* hugs the right edge */
  width: 46%;
  z-index: 3;
  transform: rotate(7deg);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}

.book-cover-wrap:hover {
  transform: rotate(3deg) scale(1.04);
}

.book-cover-img {
  width: 100%;
  display: block;
  clip-path: polygon(
    0% 0%, 100% 0%,
    100% 100%, 8% 100%, 0% 92%
  );
  filter: drop-shadow(-5px 10px 26px rgba(0, 0, 0, 0.65));
}


/* ================================================================
 * TABLET (1100px) — tighten portrait column
 * ================================================================ */

@media (max-width: 1100px) {
  .methodology-inner {
    grid-template-columns: 1fr 320px;
    gap: 56px;
  }
}


/* ================================================================
 * MOBILE — stack vertically; portrait above text
 * ================================================================ */

@media (max-width: 768px) {
  .methodology-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Portrait goes first on mobile */
  .methodology-portrait {
    order: -1;
    max-width: 300px;
  }

  .founder-quote {
    margin: 40px 0;
    padding-left: 20px;
  }
}
