/*
 * Dedicated landing pages (first: /recipe-organizer/).
 * Loaded after site.css and home.css: the page uses body.hp-body for the homepage tokens and
 * shared pieces (.hp-wrap, .hp-shot, .hp-get, engravings, reviews, questions, footer) and adds
 * the layouts below. Every rule is scoped to body.lp-body, so the homepage is unaffected.
 */

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

.lp-body .lp-skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 1100;
  padding: 10px 16px;
  background-color: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-weight: 700;
  border-radius: 8px;
}
.lp-body .lp-skip:focus { top: 12px; }

.lp-body .lp-nowrap { white-space: nowrap; }

/* Avoid one-word last lines where the browser supports it */
.lp-body .lp h2,
.lp-body .lp h3 { text-wrap: balance; }
.lp-body .lp p,
.lp-body .lp-card-lines span { text-wrap: pretty; }

.lp-body .lp-copy > p,
.lp-body .lp-intro > p {
  margin-top: 16px;
  max-width: 30em;
}
.lp-body .lp-copy > h2 + p { margin-top: 20px; }

/* Copy beside art. Copy comes first in the markup, so phones read heading, text, then picture. */
.lp-body .lp-split {
  display: grid;
  gap: 32px;
}
@media (min-width: 960px) {
  .lp-body .lp-split {
    column-gap: 72px;
    align-items: center;
  }
  .lp-body .lp-split--art-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .lp-body .lp-split--art-left > .lp-art { grid-column: 1; grid-row: 1; }
  .lp-body .lp-split--art-left > .lp-copy { grid-column: 2; grid-row: 1; }
  .lp-body .lp-split--art-right { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* Stacked layouts on tablets: keep the square panels from growing taller than a screen */
@media (min-width: 600px) and (max-width: 959.98px) {
  .lp-body .lp-art--cats,
  .lp-body .lp-art--devices { max-width: 580px; }
}

/* Coloured art well; screens inside run off its bottom edge */
.lp-body .lp-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 12px;
}
.lp-body .lp-panel .hp-shot {
  position: absolute;
  bottom: 0;
  aspect-ratio: auto;
}

/* ---------- 1. Hero ---------- */

.lp-body .lp-hero { padding-top: 32px; }
.lp-body .lp-hero-grid {
  display: grid;
  gap: 40px;
}
.lp-body .lp-hero-copy { container-type: inline-size; }

/* Sized to the copy column so "organizer app" and "favorite recipes" always hold one line */
.lp-body .lp-hero h1 {
  font-size: 40px;
  font-size: clamp(36px, 11cqi, 66px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.lp-body .lp-hero h1 .hp-serif {
  display: block;
  margin-top: 0.06em;
  font-size: 1.06em;
  line-height: 1.02;
}
.lp-body .lp-hero-text {
  margin-top: 24px;
  font-size: 18px;
  max-width: 27em;
}
.lp-body .lp-hero .hp-get { margin-top: 32px; }

/* My Recipes in front, the illustrated Categories screen behind it */
.lp-body .lp-hero-art {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 1 / 1;
  background-color: var(--yellow);
  border-radius: 12px;
}
.lp-body .lp-hero-art .hp-shot {
  --iw: 800; --cy: 88; --cw: 800;
  position: absolute;
  bottom: 0;
  aspect-ratio: auto;
}
.lp-body .lp-shot--hero-cats {
  top: 9%;
  right: 5%;
  width: 47%;
  border-radius: 18px 18px 0 0;
}
.lp-body .lp-shot--hero-recipes {
  z-index: 1;
  top: 17%;
  left: 7%;
  width: 49%;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 1px 2px rgba(37, 39, 53, 0.14), 0 16px 36px -12px rgba(37, 39, 53, 0.4);
}
.lp-body .lp-engraving--hero {
  top: 3.5%;
  left: 8%;
  width: 11%;
}

@media (min-width: 600px) {
  .lp-body .lp-hero-art { max-width: 560px; }
}
@media (min-width: 960px) {
  .lp-body .lp-hero { padding-top: 56px; }
  .lp-body .lp-hero-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    column-gap: 48px;
    align-items: center;
  }
  .lp-body .lp-hero-art { justify-self: end; width: 100%; }
  .lp-body .lp-hero-text { font-size: 20px; margin-top: 32px; }
  .lp-body .lp-hero .hp-get { margin-top: 40px; }
}

/* ---------- 2. Where recipes live today: a ruled recipe card ---------- */

.lp-body .lp-sources-grid {
  display: grid;
  gap: 28px;
}
.lp-body .lp-sources-body { max-width: 640px; }

.lp-body .lp-card {
  --lh: 42px;
  position: relative;
  padding: 26px 22px 18px;
  background-color: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(216, 210, 198, 0.55);
}
/* Index-card lines: a coral rule on top, blue rules under each line of text,
   and two empty lines at the bottom for the drawing */
.lp-body .lp-card-lines {
  padding-bottom: calc(var(--lh) * 2);
  border-top: 2px solid var(--coral);
  font-family: var(--serif);
  font-style: italic;
  font-size: 23px;
  line-height: var(--lh);
  color: var(--ink);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--lh) - 1px),
    var(--blue) calc(var(--lh) - 1px),
    var(--blue) var(--lh)
  );
  background-position: 0 -6px;
}
.lp-body .lp-card-lines span { display: block; }
.lp-body .lp-card-art {
  right: 22px;
  bottom: 14px;
  width: 64px;
}
.lp-body .lp-sources-close {
  margin-top: 24px;
  font-size: 18px;
  max-width: 28em;
}

@media (min-width: 768px) {
  .lp-body .lp-card {
    --lh: 52px;
    padding: 34px 36px 24px;
    transform: rotate(-1deg);
  }
  .lp-body .lp-card-lines { font-size: 31px; background-position: 0 -8px; }
  .lp-body .lp-card-art { right: 36px; bottom: 18px; width: 84px; }
  .lp-body .lp-sources-close { margin-top: 32px; font-size: 20px; }
}
@media (min-width: 960px) {
  .lp-body .lp-sources-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 72px;
    align-items: center;
  }
  .lp-body .lp-sources-body { justify-self: end; width: 100%; }
}

/* ---------- 3. Categories ---------- */

.lp-body .lp-art--cats {
  aspect-ratio: 1 / 1;
  background-color: var(--lavender);
}
.lp-body .lp-shot--cats {
  --iw: 800; --cy: 88; --cw: 800;
  top: 9%;
  left: 21%;
  width: 58%;
  border-radius: 20px 20px 0 0;
}

/* ---------- 4. Search and pinned recipes ---------- */

.lp-body .lp-art--search {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: 100%;
  max-width: 480px;
  padding: 24px 0 32px;
}
.lp-body .lp-search-sheet {
  position: absolute;
  z-index: -1;
  top: 7%;
  bottom: 3%;
  left: 22%;
  right: 4%;
  background-color: var(--coral);
  border-radius: 12px;
  transform: rotate(4deg);
}
/* The search screen with results and keyboard, from just below the status bar */
.lp-body .lp-shot--search {
  --iw: 1179; --cx: 0; --cy: 140; --cw: 1179; --ch: 2416;
  width: 74%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 24px;
}

/* ---------- 5. Three ways to save ---------- */

.lp-body .lp-ways {
  display: grid;
  gap: 40px;
  margin-top: 40px;
}
.lp-body .lp-way h3 { margin-top: 20px; }
.lp-body .lp-way p {
  margin-top: 8px;
  max-width: 26em;
}
/* Phones: each screen on its own cream mat */
.lp-body .lp-way-art {
  padding: 14px;
  background-color: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
/* Whole screens; on phones they sit centred on the mat so each stays a reasonable height */
.lp-body .lp-shot--way {
  width: 74%;
  max-width: 300px;
  margin: 0 auto;
  border-radius: 16px;
}
.lp-body .lp-shot--web   { --iw: 1125; --cw: 1125; --ch: 2252; }
.lp-body .lp-shot--photo { --iw: 1125; --cw: 1125; --ch: 2250; }
.lp-body .lp-shot--form  { --iw: 1125; --cw: 1125; --ch: 2250; }

@media (min-width: 600px) and (max-width: 767.98px) {
  .lp-body .lp-way-art { max-width: 420px; }
}

/* Three columns: the screens share one cream mat, the text sits under each */
@media (min-width: 768px) {
  .lp-body .lp-ways {
    position: relative;
    isolation: isolate;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
    column-gap: 28px;
    row-gap: 0;
    margin-top: 56px;
    padding-top: 20px;
  }
  .lp-body .lp-ways::before {
    content: "";
    grid-column: 1 / -1;
    grid-row: 1;
    z-index: -1;
    margin: -20px -20px -20px;
    background-color: var(--cream);
    border: 1px solid var(--rule);
    border-radius: 12px;
  }
  /* explicit columns, so the mat and the items can share row 1 */
  .lp-body .lp-way {
    display: grid;
    grid-row: 1 / span 3;
    grid-template-rows: subgrid;
  }
  .lp-body .lp-way:nth-child(1) { grid-column: 1; }
  .lp-body .lp-way:nth-child(2) { grid-column: 2; }
  .lp-body .lp-way:nth-child(3) { grid-column: 3; }
  .lp-body .lp-way-art {
    padding: 0;
    background: none;
    border: 0;
  }
  .lp-body .lp-shot--way { width: 100%; max-width: none; }
  .lp-body .lp-way h3 { margin-top: 48px; }
}
@media (min-width: 960px) {
  .lp-body .lp-ways {
    column-gap: 40px;
    padding-top: 28px;
  }
  .lp-body .lp-ways::before { margin: -28px -28px -28px; }
  .lp-body .lp-way h3 { margin-top: 60px; }
}

.lp-body #save .hp-more { margin-top: 28px; }

/* ---------- 6. Planning, shopping and cooking ---------- */

.lp-body .lp-everyday { grid-template-areas: "head" "art" "list"; }
.lp-body .lp-everyday-head { grid-area: head; }
.lp-body .lp-art--trio { grid-area: art; }
.lp-body .lp-everyday-list { grid-area: list; }

.lp-body .lp-art--trio {
  aspect-ratio: 1 / 1;
  background-color: var(--navy);
}
.lp-body .lp-shot--trio {
  width: 44%;
  border-radius: 14px 14px 0 0;
}
.lp-body .lp-shot--plan { --iw: 800; --cy: 88; --cw: 800; top: 9%;  left: 4%; }
.lp-body .lp-shot--list { --iw: 800; --cy: 88; --cw: 800; top: 18%; left: 28%; z-index: 1; }
.lp-body .lp-shot--cook { --iw: 800; --cy: 40; --cw: 800; top: 27%; left: 52%; z-index: 2; }

.lp-body .lp-steps { display: grid; }
.lp-body .lp-step {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.lp-body .lp-step:last-child { border-bottom: 1px solid var(--rule); }
.lp-body .lp-step h3 { font-size: 20px; }
.lp-body .lp-step p {
  margin-top: 6px;
  max-width: 28em;
  color: var(--ink-2);
}
.lp-body .lp-get-mid { margin-top: 32px; }

@media (min-width: 600px) {
  .lp-body .lp-art--trio { aspect-ratio: 6 / 5; }
  .lp-body .lp-shot--trio { width: 36%; }
  .lp-body .lp-shot--plan { left: 6%; }
  .lp-body .lp-shot--list { left: 32%; }
  .lp-body .lp-shot--cook { left: 58%; }
}
/* Desktop: the panel runs the full height of the copy beside it */
@media (min-width: 960px) {
  .lp-body .lp-everyday {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas: "art head" "art list";
    grid-template-rows: auto 1fr;
    row-gap: 28px;
    align-items: start;
  }
  .lp-body .lp-art--trio { align-self: stretch; aspect-ratio: auto; min-height: 560px; }
  .lp-body .lp-shot--trio { width: 44%; }
  .lp-body .lp-shot--plan { top: 12%; left: 3%; }
  .lp-body .lp-shot--list { top: 20%; left: 28%; }
  .lp-body .lp-shot--cook { top: 28%; left: 53%; }
}

/* ---------- 7. iPhone and iPad ---------- */

.lp-body .lp-facts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  max-width: 22em;
}
.lp-body .lp-facts li {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  font-weight: 700;
}
.lp-body .lp-facts li:last-child { border-bottom: 1px solid var(--rule); }

.lp-body .lp-art--devices {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 6 / 7;
  padding: 7% 8%;
  background-color: var(--blue);
}
@media (min-width: 960px) {
  .lp-body .lp-art--devices { aspect-ratio: 1 / 1; }
}
.lp-body .lp-art--devices img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  height: auto;
}

/* ---------- 10. Closing download ---------- */

.lp-body .lp-closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 24px 48px;
  background-color: var(--apricot);
  border-radius: 12px;
  text-align: center;
}
.lp-body .lp-closing h2 .hp-serif { font-size: 1.12em; }
.lp-body .lp-closing-body p:not(.hp-get-note) {
  margin: 16px auto 0;
  max-width: 30em;
}
.lp-body .lp-closing .hp-get {
  align-items: center;
  margin-top: 32px;
}
.lp-body .lp-closing-art {
  position: static;
  flex: none;
}
.lp-body .lp-closing-art--start { width: 72px; }
.lp-body .lp-closing-art--end { display: none; }

@media (min-width: 768px) {
  .lp-body .lp-closing {
    flex-direction: row;
    justify-content: center;
    gap: 48px;
    padding: 72px 48px;
  }
  .lp-body .lp-closing-art--start { width: 120px; }
  .lp-body .lp-closing-art--end { display: block; width: 132px; }
}
@media (min-width: 960px) {
  .lp-body .lp-closing { gap: 80px; padding: 88px 48px; }
  .lp-body .lp-closing-art--start { width: 150px; }
  .lp-body .lp-closing-art--end { width: 164px; }
}

/* ====================================================================
 * /recipe-book-app/
 * New layouts for the recipe book page. The page also reuses the hero grid,
 * .lp-intro, .lp-split, .lp-copy, .lp-art--devices and .lp-closing above.
 * ==================================================================== */

/* ---------- Hero: the iPad recipe leads, the My Recipes iPhone in front ---------- */

/* "A recipe book app" is longer than "organizer app", so the type steps down a little */
.lp-body .lp-book-hero-copy h1 { font-size: clamp(36px, 10cqi, 64px); }

.lp-body .lp-book-hero-art {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  aspect-ratio: 1 / 1;
  background-color: var(--yellow);
  border-radius: 12px;
}
/* The existing iPad + iPhone image, shown whole */
.lp-body .lp-book-hero-devices {
  position: absolute;
  top: 4%;
  right: 2%;
  width: 74%;
  max-width: none;
  height: auto;
}
/* A plain white bezel so the screenshot matches the devices beside it */
.lp-body .lp-book-hero-phone {
  position: absolute;
  z-index: 1;
  left: 6%;
  bottom: 5%;
  width: 28%;
  padding: 0.8cqi;
  background-color: #fff;
  border-radius: 4.2cqi;
  box-shadow: 0 1px 2px rgba(37, 39, 53, 0.14), 0 18px 40px -14px rgba(37, 39, 53, 0.45);
}
.lp-body .lp-shot--book-collection {
  --iw: 800; --cy: 88; --cw: 800; --ch: 1644;
  border-radius: 3.4cqi;
  box-shadow: none;
}
.lp-body .lp-engraving--book-hero {
  top: 6%;
  left: 7%;
  width: 15%;
}

@media (min-width: 600px) {
  .lp-body .lp-book-hero-art { max-width: 560px; }
}
@media (min-width: 960px) {
  .lp-body .lp-book-hero-art { justify-self: end; width: 100%; }
}

/* ---------- 2. Every recipe has a story: centred editorial lines ---------- */

.lp-body .lp-story-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.lp-body .lp-story-lines { margin-top: 28px; }
.lp-body .lp-story-lines p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 27px;
  line-height: 1.2;
  text-wrap: balance;
}
.lp-body .lp-story-lines p + p { margin-top: 12px; }
.lp-body .lp-story-close {
  margin: 32px auto 0;
  max-width: 25em;
  font-size: 18px;
}
/* Phones: one drawing above the heading; wider screens: one at each side */
.lp-body .lp-story-art {
  position: static;
  margin: 0 auto 24px;
  width: 64px;
}
.lp-body .lp-story-art--end { display: none; }

@media (min-width: 768px) {
  .lp-body .lp-story-lines { margin-top: 36px; }
  .lp-body .lp-story-lines p { font-size: 36px; }
  .lp-body .lp-story-close { margin-top: 40px; font-size: 20px; }
}
@media (min-width: 960px) {
  .lp-body .lp-story-inner {
    max-width: none;
    padding: 0 130px;
  }
  .lp-body .lp-story-art {
    position: absolute;
    top: 50%;
    margin: 0;
    transform: translateY(-50%);
  }
  .lp-body .lp-story-art--start { left: 0; width: 104px; }
  .lp-body .lp-story-art--end { display: block; right: 0; width: 112px; }
}
@media (min-width: 1200px) {
  .lp-body .lp-story-inner { padding: 0 180px; }
  .lp-body .lp-story-lines p { font-size: 42px; }
  .lp-body .lp-story-art--start { left: 8px; width: 132px; }
  .lp-body .lp-story-art--end { width: 140px; }
}

/* ---------- 3. Create your cookbook: three columns, each screen on its own well ---------- */

.lp-body .lp-create {
  display: grid;
  gap: 40px;
  margin-top: 40px;
}
.lp-body .lp-create-art {
  display: flex;
  justify-content: center;
  padding: 28px 0;
  border-radius: 12px;
}
.lp-body .lp-create-art--write  { background-color: var(--blue); }
.lp-body .lp-create-art--family { background-color: var(--sheet-tan); }
.lp-body .lp-create-art--web    { background-color: var(--sheet-teal); }
/* Whole screens */
.lp-body .lp-shot--create {
  --iw: 800; --cw: 800; --ch: 1600;
  width: 64%;
  max-width: 260px;
  border-radius: 16px;
}
.lp-body .lp-shot--create-web { --ch: 1601; }
.lp-body .lp-create-item h3 { margin-top: 20px; }
.lp-body .lp-create-item p {
  margin-top: 8px;
  max-width: 26em;
}
.lp-body .lp-create-more { margin-top: 28px; }

@media (min-width: 600px) and (max-width: 767.98px) {
  .lp-body .lp-create-art { max-width: 420px; }
}
@media (min-width: 768px) {
  .lp-body .lp-create {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    margin-top: 56px;
  }
  .lp-body .lp-shot--create { width: 76%; max-width: none; }
}
@media (min-width: 960px) {
  .lp-body .lp-create { column-gap: 32px; }
  .lp-body .lp-create-art { padding: 36px 0; }
  .lp-body .lp-create-item h3 { margin-top: 28px; }
}

/* ---------- 4. Categories and illustrated icons: two whole screens ---------- */

.lp-body .lp-art--personal,
.lp-body .lp-art--cooking {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}
.lp-body .lp-art--personal { background-color: var(--lavender); }
.lp-body .lp-shot--personal,
.lp-body .lp-shot--cooking {
  position: absolute;
  border-radius: 16px;
}
.lp-body .lp-shot--personal { width: 40%; }
.lp-body .lp-shot--personal-cats  { --iw: 800; --cy: 88; --cw: 800; --ch: 1644; top: 6%;  left: 7%; }
.lp-body .lp-shot--personal-icons { --iw: 800; --cw: 800; --ch: 1638; top: 13%; right: 7%; }

/* ---------- 6. Cooking: the highlighted step in front of the checked ingredients ---------- */

.lp-body .lp-art--cooking { background-color: var(--navy); }
.lp-body .lp-shot--cooking-ingredients {
  --iw: 800; --cw: 800; --ch: 1470;
  top: 16%;
  left: 7%;
  width: 40%;
}
.lp-body .lp-shot--cooking-directions {
  --iw: 800; --cw: 800; --ch: 1635;
  z-index: 1;
  top: 5%;
  right: 8%;
  width: 44%;
  box-shadow: 0 1px 2px rgba(37, 39, 53, 0.2), 0 18px 40px -14px rgba(0, 0, 0, 0.55);
}

@media (min-width: 600px) and (max-width: 959.98px) {
  .lp-body .lp-art--personal,
  .lp-body .lp-art--cooking { max-width: 580px; }
}

/* ---------- 7. Meal planning and groceries: one compact cream mat ---------- */

.lp-body .lp-meals {
  display: grid;
  gap: 24px;
  padding: 28px 20px;
  background-color: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.lp-body .lp-meals-head p {
  margin-top: 16px;
  max-width: 30em;
}
.lp-body .lp-meals-item {
  display: grid;
  grid-template-columns: minmax(0, 36%) minmax(0, 1fr);
  column-gap: 20px;
  align-items: center;
}
.lp-body .lp-shot--meals {
  --iw: 800; --cy: 88; --cw: 800; --ch: 1644;
  border-radius: 12px;
}
.lp-body .lp-meals-text h3 { font-size: 20px; }
.lp-body .lp-meals-text p {
  margin-top: 6px;
  color: var(--ink-2);
}

@media (min-width: 768px) {
  .lp-body .lp-meals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    padding: 40px;
  }
  .lp-body .lp-meals-head { grid-column: 1 / -1; }
}
/* Heading beside the two screens only once the heading has room for it */
@media (min-width: 1200px) {
  .lp-body .lp-meals {
    grid-template-columns: minmax(0, 5fr) minmax(0, 3.5fr) minmax(0, 3.5fr);
    column-gap: 40px;
    align-items: center;
    padding: 48px;
  }
  .lp-body .lp-meals-head { grid-column: auto; }
  .lp-body .lp-meals-item {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 20px;
    align-items: start;
  }
  .lp-body .lp-shot--meals { width: 100%; max-width: 200px; }
}
