/* The homepage's own additions, loaded after its inline style
   (partials/home-style.html, which stays as it was) and using its variables:
   the personal line and portrait in the opening, the Google rating line under
   the button, and the optional How it works section. Words sit beside photos,
   never on them. */

/* The personal line: a small round portrait beside one italic line, centred
   under the headline like the rest of the opening. */
.intro-personal { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 520px; margin: 26px auto 0; }
.intro-personal picture { display: block; flex-shrink: 0; }
.intro-portrait { display: block; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.intro-personal p { font-family: var(--serif); font-style: italic; font-size: 1.12rem; line-height: 1.45; color: var(--warm-black); text-align: left; }

/* The rating line under the button: small, the stars in gold. */
.intro-rating { margin-top: 16px; font-size: 13px; color: var(--mid); letter-spacing: 0.02em; }
.intro-rating span { color: var(--gold); letter-spacing: 2px; margin-right: 2px; }

/* How it works: the pages' steps (blocks.css), written for the homepage. One
   row on wide screens, however many steps (3 to 5); stacked on phones. */
#how-it-works { border-top: 1px solid var(--border); padding: 80px 48px; }
#how-it-works .steps { max-width: 1160px; margin: 0 auto; text-align: center; }
#how-it-works .steps h2 { font-family: var(--serif); font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 400; }
#how-it-works .steps h2 em { font-style: italic; color: var(--gold); }
#how-it-works .steps-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 28px; text-align: left; }
/* The page's old .step-n rule (a retired process section) is small and italic; these match blocks.css. */
#how-it-works .step-n { display: block; font-family: var(--serif); font-size: 2rem; font-style: normal; line-height: 1; color: var(--gold); margin-bottom: 8px; }
#how-it-works .steps-list h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 400; line-height: 1.3; margin-bottom: 6px; }
#how-it-works .steps-list p { font-size: 0.9rem; line-height: 1.6; color: var(--mid); }

@media (max-width: 860px) {
  #how-it-works { padding: 60px 24px; }
  #how-it-works .steps-list { grid-auto-flow: row; grid-template-columns: 1fr; gap: 22px; max-width: 440px; margin-left: auto; margin-right: auto; }
}

/* Session cards in Services: one per package on sale. Four across on wide
   screens, two on tablets, stacked on phones. The Best value card has a gold
   border and the same pill as the package pages (blocks.css .pkg-flag). */
.session-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1060px; margin: 32px auto 8px; text-align: left; }
/* Scoped under .sessions-header so the inline style's `.sessions-header a`
   (small grey underlined links, padding-bottom 1px) can't reach the cards. */
.sessions-header .session-card { position: relative; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 26px 22px 22px; text-decoration: none; color: var(--warm-black); transition: border-color 0.2s, transform 0.2s; }
.sessions-header .session-card:hover { color: var(--warm-black); border-color: var(--gold); transform: translateY(-2px); }
.sessions-header .session-card.featured { border-color: var(--gold); border-width: 2px; padding: 25px 21px 21px; }
.sc-flag { position: absolute; top: -11px; left: 22px; background: var(--gold); color: var(--warm-black); font-family: 'DM Sans', sans-serif; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; padding: 4px 10px; border-radius: 999px; line-height: 1.4; }
.sc-name { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.sc-price { font-family: var(--serif); font-size: 1.9rem; line-height: 1.2; color: var(--gold); }
.sc-line { font-family: var(--serif); font-style: italic; font-size: 1.02rem; color: var(--warm-black); margin-top: 6px; }
.sc-inc { font-size: 0.85rem; line-height: 1.5; color: var(--mid); }
.sc-extra { font-size: 0.85rem; line-height: 1.5; color: var(--warm-black); margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); }

@media (max-width: 860px) {
  .session-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .session-cards { grid-template-columns: 1fr; max-width: 420px; }
}

/* Stories (build/stories.js homeStoriesHtml): one story's words on the left,
   its photos beside them on the right (stacked on phones), never on them. */
#stories { border-top: 1px solid var(--border); padding: 80px max(48px, calc((100% - 1160px) / 2)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; align-items: center; }
#stories .eyebrow { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
#stories h2 { font-family: var(--serif); font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 400; line-height: 1.12; margin-bottom: 12px; }
#stories .hs-words > p:not(.eyebrow) { color: var(--mid); font-size: 0.95rem; line-height: 1.65; max-width: 46ch; }
#stories .tbtn { display: inline-block; margin-top: 22px; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--off-white); background: var(--warm-black); padding: 15px 22px; text-decoration: none; transition: background 0.25s; }
#stories .tbtn:hover { background: var(--gold); }
#stories .hs-more { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
#stories .hs-more a { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--warm-black); text-decoration: none; border-bottom: 1px solid var(--border); padding-bottom: 1px; transition: border-color 0.2s; }
#stories .hs-more a:hover { border-color: var(--gold); }
/* The photo: the story's opening photo alone, whole (never cropped). */
#stories .hs-photos picture { display: block; }
#stories .hs-photos img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; object-position: left center; }

@media (max-width: 860px) {
  #stories { grid-template-columns: minmax(0, 1fr); padding: 60px 24px; gap: 28px; }
}

/* Phones (Deep, 24 Nov 2026, "B in the layout of A"): the headline, then the
   six photos two across with the right column a little lower, then the rest
   of the opening, then the grid caption, then every later section as before.
   CSS only: the body becomes one column, #intro and #grid give their children
   to it (display: contents), and `order` moves the photos up. The markup, and
   so the lightbox's "x / 6" over #portfolio, is unchanged. 700 to 999px
   keep the inline style's layout; 1000px and wider are below. */
@media (max-width: 699px) {
  body { display: flex; flex-direction: column; }
  #intro, #grid { display: contents; }

  /* #intro's padding (room for the fixed nav, 24px sides) and centring move
     onto its children. The headline keeps order 0; the photos come next. */
  .intro-headline { margin-top: 120px; padding: 0 24px; }
  #grid .mosaic { order: 1; }
  .intro-sub, .intro-where, .intro-personal, .intro-actions, .intro-rating, .grid-caption { order: 2; }
  #grid ~ * { order: 3; }
  .intro-where, .intro-rating { padding: 0 24px; }
  .intro-sub { max-width: min(480px, calc(100% - 48px)); }
  .intro-personal { max-width: min(520px, calc(100% - 48px)); }
  /* Under the opening, centred like it; the 8px below is #grid's old bottom
     padding, so the sections after start where they did. */
  .grid-caption { margin: 36px 0 8px; text-align: center; }

  /* The photos: two equal columns, 6px apart, on rows 1vw tall, so a photo
     spanning 62 rows is 62vw tall and the crops keep their shape at any phone
     width. Left: photos 1, 2 and 5; right: 3, 4 and 6, starting 34px lower.
     The 6px between photos in a column is each later photo's top margin.
     Both columns end on line 159. Crops follow each photo's focus. */
  #grid .mosaic { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6px; row-gap: 0; grid-auto-rows: 1vw; margin-top: 28px; padding: 0 10px; }
  #grid .mosaic .m-item:nth-child(1) { grid-column: 1; grid-row: 1 / span 62; }
  #grid .mosaic .m-item:nth-child(2) { grid-column: 1; grid-row: 63 / span 36; margin-top: 6px; }
  #grid .mosaic .m-item:nth-child(3) { grid-column: 2; grid-row: 1 / span 64; margin-top: 34px; }
  #grid .mosaic .m-item:nth-child(4) { grid-column: 2; grid-row: 65 / span 54; margin-top: 6px; }
  #grid .mosaic .m-item:nth-child(5) { grid-column: 1; grid-row: 99 / span 60; margin-top: 6px; }
  #grid .mosaic .m-item:nth-child(6) { grid-column: 2; grid-row: 119 / span 40; margin-top: 6px; }
}

/* Wide screens (Deep, 24 Nov 2026, the approved Light mockup): the opening's
   words on the left, the six photos on the right, three across and two down
   in equal tiles, side by side in the first row. CSS only, so the markup and
   the lightbox's "x / 6" over #portfolio are unchanged: the body becomes a
   grid whose outer columns keep 48px of page edge and cap the content at
   1264px, the words take about 45% and the photos 55%. #intro and #grid are
   placed in row 1 wherever the Photos section sits in the page; every other
   section spans the page in its own row, in page order (the fixed nav and
   campaign strip are out of the flow). The personal line, if added back,
   sits on the left with the words. */
@media (min-width: 1000px) {
  body { display: grid; grid-template-columns: max(48px, calc((100% - 1264px) / 2)) minmax(0, 45fr) 64px minmax(0, 55fr) max(48px, calc((100% - 1264px) / 2)); align-items: start; }
  /* A grid item with auto side margins shrinks to its content; the stretch
     width gives the sections the full width they had in the page flow, so
     max-width with margin: 0 auto still centres them at the same size. */
  body > * { grid-column: 1 / -1; min-width: 0; width: -webkit-fill-available; width: -moz-available; width: stretch; }

  /* Both keep the inline style's room for the fixed nav, so with the row
     centring them the words sit level with the middle of the photos. */
  #intro { grid-column: 2; grid-row: 1; align-self: center; max-width: none; margin: 0; padding: 150px 0 64px; text-align: left; }
  #grid { grid-column: 4; grid-row: 1; align-self: center; padding: 150px 0 64px; }

  .intro-headline { font-size: clamp(2.6rem, 3.6vw, 3.6rem); }
  .intro-sub { margin-left: 0; margin-right: 0; }
  .intro-actions { justify-content: flex-start; }
  .intro-personal { justify-content: flex-start; margin-left: 0; margin-right: 0; }

  /* Six equal tiles, 8px apart; the lead photo no longer spans two. Each
     photo keeps its own focus (the object-position on its img). */
  #grid .mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; gap: 8px; }
  #grid .mosaic .m-item { grid-column: auto; grid-row: auto; aspect-ratio: 1; }
  .grid-caption { padding: 16px 0 0; }
}
