/* Age hub pages (60th, 70th, 80th). Builds on styles.css.
   Colors come from --age-ink, set per age on <body> (see "Age colors" in styles.css). */

/* ---------- Masthead: big age over a photo ---------- */

.masthead { position: relative; min-height: 640px; display: flex; align-items: flex-end; background: var(--ink-bark); color: var(--text-on-dark); }
.masthead__photo {
  position: absolute;
  inset: 0;
  /* Temporary: the home page photo until the 60th photo is made */
  background: url("../images/hero-garden-lunch.jpg") center 40% / cover no-repeat var(--age-ink);
}
/* Soft layer in the age color on the left, so the text stays readable on any photo */
.masthead__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(var(--age-ink-rgb), 0.88) 0%, rgba(var(--age-ink-rgb), 0.55) 55%, rgba(var(--age-ink-rgb), 0.12) 100%);
}
.masthead__inner {
  position: relative;
  z-index: 1;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 56px;
  align-items: end;
}
.masthead__num {
  font: 400 300px/0.78 var(--font-serif);
  font-variant-numeric: lining-nums;
  color: var(--paper-cream);
  letter-spacing: -0.02em;
}
.masthead__text { display: flex; flex-direction: column; gap: 16px; padding-bottom: 6px; }
.masthead__text .eyebrow { color: var(--paper-cream); }
.masthead__title { font-size: 56px; line-height: 1.08; max-width: 15ch; color: var(--paper-cream); }
.masthead__title em { font-weight: 400; }
.masthead__intro { font-size: var(--text-md); max-width: 40ch; }

/* ---------- On this page ---------- */

.contents { border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.contents__inner { display: flex; align-items: center; justify-content: center; gap: 12px 40px; min-height: 76px; padding-top: 12px; padding-bottom: 12px; }
.contents__label { flex: none; }
.contents__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 32px; }
.contents__list a { min-height: var(--tap-min); display: inline-flex; align-items: center; }

/* ---------- Born in <year>: the age color block ---------- */

.year { background: var(--age-ink); color: var(--text-on-dark); }
.year__inner {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  display: grid;
  grid-template-columns: 5fr 6fr;
  column-gap: 80px;
  align-items: center;
}
.year__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.year__num { font: 400 150px/0.85 var(--font-serif); color: var(--paper-cream); margin-bottom: 8px; }
.year__num + .year__title { margin-top: 16px; }
.year .link-on-dark:hover, .year .link-on-dark:focus-visible { text-decoration-color: var(--paper-cream); }
.year__title { font-size: var(--text-2xl); color: var(--text-on-dark); }
.year__intro p { max-width: 36ch; }
.year__facts { margin: 0; border-top: 1px solid rgba(245, 240, 232, 0.5); }
.year__facts div { display: grid; grid-template-columns: 180px 1fr; column-gap: 24px; padding: 22px 0; border-bottom: 1px solid rgba(245, 240, 232, 0.25); }
.year__facts dt { font: var(--weight-semibold) var(--text-xs)/1.6 var(--font-sans); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--paper-linen); padding-top: 4px; }
.year__facts dd { margin: 0; font: 400 var(--text-md)/1.4 var(--font-serif); }

/* ---------- Party ideas ---------- */

.ideas { padding-top: var(--section-y); padding-bottom: var(--section-y); display: flex; flex-direction: column; align-items: center; gap: 48px; }
.ideas__head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ideas__title { font-size: 48px; line-height: 1.12; max-width: 22ch; }
.ideas__title em { font-weight: 400; }

/* Two equal columns, every photo 3:2 */
.ideas__grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px var(--col-gap); }

.ideas__all { align-self: center; }

/* ---------- Invitations ---------- */

.invites { background: var(--surface-raised); }
.invites__inner {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: center;
}
.invites__text { grid-column: 1 / span 6; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.invites__list { width: 100%; margin-top: 8px; border-top: 1px solid var(--rule-soft); }
.invites__list li { border-bottom: 1px solid var(--rule-soft); }
.invites__list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 14px 0;
  font: 500 var(--text-md)/1.4 var(--font-serif);
  color: var(--ink-bark);
}
.invites__list a:hover { color: var(--action-primary-hover); }
.invites__printed { margin-top: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 46ch; }
.tag {
  font: var(--weight-semibold) var(--text-xs)/1.4 var(--font-sans);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-bark);
  border: 1px solid var(--rule-soft);
  padding: 2px 8px;
}
.invites__cards { grid-column: 8 / span 5; display: flex; justify-content: center; }
.invites__cards .card-paper + .card-paper { margin-left: -120px; margin-top: 48px; }
.invites__cards .card-paper { box-shadow: 0 10px 24px rgba(41, 36, 32, 0.14); }

/* ---------- Gifts: text left, four picks right ---------- */

.gifts__inner {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: start;
}
.gifts__text { grid-column: 1 / span 4; position: sticky; top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.gifts__grid { grid-column: 6 / span 7; display: grid; grid-template-columns: 1fr 1fr; gap: 48px var(--col-gap); }
.gift-pick a { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--ink-bark); font-weight: var(--weight-regular); text-decoration: none; }
.gift-pick .photo-slot { width: 100%; height: auto; aspect-ratio: 1 / 1; margin-bottom: 6px; }
.gift-pick h3 { font-size: var(--text-md); line-height: 1.25; transition: color 120ms ease; }
.gift-pick a:hover h3 { color: var(--action-primary-hover); }
.gift-pick a:focus-visible { outline: 2px solid var(--ink-moss); outline-offset: 6px; }
.gift-pick__price { color: var(--ink-bark); }

/* ---------- Speeches and toasts: photo and text, inside the page margins ---------- */

.toast {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  background: var(--surface-raised);
  max-width: none;
  padding-left: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  padding-right: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0;
}
.toast__image { min-height: 520px; background: url("../images/woman-garden-lunch.jpg") 38% 22% / cover no-repeat var(--paper-linen); }
.toast__text { padding: 48px 0 48px 64px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; }
.toast__text p { max-width: 42ch; }

/* ---------- Tablet ---------- */

@media (max-width: 1200px) {
  .masthead__num { font-size: 240px; }
  .masthead__title { font-size: 48px; }
  .year__inner { column-gap: 48px; }
}

/* ---------- Phone ---------- */

@media (max-width: 900px) {
  .masthead { min-height: 560px; }
  .masthead__inner { grid-template-columns: 1fr; row-gap: 20px; }
  .masthead__photo::after { background: linear-gradient(0deg, rgba(var(--age-ink-rgb), 0.9) 0%, rgba(var(--age-ink-rgb), 0.55) 60%, rgba(var(--age-ink-rgb), 0.15) 100%); }
  .masthead__photo { background-position: 65% center; }
  .masthead__num { font-size: 160px; }
  .masthead__title { font-size: 34px; line-height: 1.12; }
  .masthead__intro { font-size: var(--text-base); }

  /* Section links move into the phone menu */
  .contents { display: none; }

  .year__inner { grid-template-columns: 1fr; row-gap: 40px; }
  .year__num { font-size: 96px; }
  .year__title { font-size: 28px; }
  .year__facts div { grid-template-columns: 1fr; row-gap: 4px; padding: 18px 0; }
  .year__facts dt { padding-top: 0; }
  .year__facts dd { font-size: 20px; }

  .ideas { align-items: stretch; gap: 32px; }
  .ideas__head { align-items: flex-start; text-align: left; }
  .ideas__title { font-size: 28px; line-height: 1.2; }
  /* One column on phone: every idea gets the full width */
  .ideas__grid { grid-template-columns: 1fr; gap: 40px; }
  .ideas__all { align-self: flex-start; }

  .invites__inner { display: flex; flex-direction: column; align-items: stretch; gap: 40px; }
  .invites__list a { min-height: 60px; padding: 16px 0; font-size: 20px; line-height: 1.4; }
  .invites__cards { zoom: 0.7; justify-content: flex-start; padding-left: 12px; }
  .invites__cards .card-paper + .card-paper { margin-left: -140px; }

  .gifts__inner { display: flex; flex-direction: column; gap: 32px; }
  .gifts__text { position: static; }
  /* Gifts as a list: small square left, name and price right */
  .gifts__grid { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--rule-soft); }
  .gift-pick { border-bottom: 1px solid var(--rule-soft); }
  .gift-pick a { display: grid; grid-template-columns: 112px 1fr; grid-template-rows: auto 1fr; column-gap: 16px; row-gap: 6px; padding: 20px 0; }
  .gift-pick .photo-slot { grid-row: 1 / span 2; margin: 0; }
  .gift-pick h3 { font-size: 20px; }
  .gift-pick .photo-slot span { display: none; }

  .toast { display: flex; flex-direction: column; }
  .toast__image { min-height: 0; aspect-ratio: 4 / 5; }
  .toast__text { padding: 28px 0 0; }
}
