/* Memory Album: a dark album page. Prints held by paper corners, glassine tissue between the leaves. */
:root { --te-radius: 0; --al-paper: color-mix(in srgb, var(--te-primary) 93%, var(--te-bg)); --al-cs: clamp(1.6rem, 5vw, 2.4rem); }
.al-print::after, .te-gallery-item::after, .te-card::after, .te-tile::after { content: ""; position: absolute; inset: -.2rem; pointer-events: none; background: linear-gradient(135deg, var(--al-corner, var(--al-paper)) 50%, transparent 50%) top left / var(--al-cs) var(--al-cs) no-repeat, linear-gradient(225deg, var(--al-corner, var(--al-paper)) 50%, transparent 50%) top right / var(--al-cs) var(--al-cs) no-repeat, linear-gradient(45deg, var(--al-corner, var(--al-paper)) 50%, transparent 50%) bottom left / var(--al-cs) var(--al-cs) no-repeat, linear-gradient(315deg, var(--al-corner, var(--al-paper)) 50%, transparent 50%) bottom right / var(--al-cs) var(--al-cs) no-repeat; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.5)); }

/* Chrome */
.te-nav-wrap { padding: 0; position: relative; }
.te-nav { max-width: none; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; border-bottom: 1px solid color-mix(in srgb, var(--te-primary) 16%, transparent); }
.te-nav-brand { font-style: italic; font-weight: 400; }
.te-nav-link { border-radius: 0; }
.te-nav-link.is-active { background: none; box-shadow: inset 0 -1px 0 currentColor; }
.te-nav--minimal .te-nav-sheet { border-radius: 0; }
.te-btn, .te-btn-outline, .te-btn-sm { border-radius: 2px; box-shadow: none; font-weight: 500; }
.te-btn:hover { transform: none; opacity: .88; }
.te-field, .te-choice { border-radius: 2px; }
.te-chip { border-radius: 0; background: none; padding: 0; font-style: italic; font-size: .9375rem; color: var(--te-accent-text); }

/* Hero: the opening page of the album */
.al-hero { max-width: 66rem; margin-inline: auto; padding: clamp(2.5rem, 7vw, 5rem) 1.25rem clamp(2.5rem, 6vw, 4.5rem); }
.al-head { text-align: center; }
.al-label { font-size: 1rem; color: var(--te-muted); }
.al-title { margin-top: .5rem; font-size: calc(var(--fit, 1) * clamp(3.25rem, 11.5vw, 8rem)); font-style: italic; font-weight: 400; line-height: 1.02; letter-spacing: -.015em; color: var(--te-primary-text); overflow-wrap: break-word; }
.al-sub { margin-top: .85rem; font-family: var(--te-heading); font-style: italic; font-size: clamp(1.25rem, 3.5vw, 1.625rem); color: var(--te-accent-text); }
.al-prints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.25rem, 6vw, 3.5rem) clamp(1rem, 4vw, 2.75rem); margin-top: clamp(2.5rem, 7vw, 4.5rem); align-items: start; }
.al-fig { min-width: 0; margin: 0; }
.al-print { position: relative; padding: .4rem; background: var(--al-paper); box-shadow: 0 10px 22px -12px rgba(0,0,0,.7); }
.al-print img, .al-print .te-photo-blank { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; }
.al-cap { margin-top: .85rem; padding-inline: .25rem; font-family: var(--te-heading); font-style: italic; font-size: clamp(1.0625rem, 3.2vw, 1.3125rem); line-height: 1.25; color: var(--te-primary-text); opacity: .9; overflow-wrap: break-word; }

/* Slightly uneven placement: mounted by hand, the same way each time. */
.al-fig:nth-child(6n+1) { transform: rotate(-1deg); }
.al-fig:nth-child(6n+2) { transform: rotate(1.1deg) translateY(.9rem); }
.al-fig:nth-child(6n+3) { transform: rotate(-.6deg) translateX(.35rem); }
.al-fig:nth-child(6n+4) { transform: rotate(.8deg) translateY(.6rem); }
.al-fig:nth-child(6n+5) { transform: rotate(-1.2deg); }
.al-fig:nth-child(6n+6) { transform: rotate(.5deg) translateY(1.1rem); }
.al-fig:nth-child(odd) .al-cap { transform: rotate(-1.2deg); margin-left: .5rem; }
.al-fig:nth-child(even) .al-cap { transform: rotate(.9deg); text-align: right; margin-right: .5rem; }
.al-fig:first-child { grid-column: 1 / -1; width: min(100%, 22rem); justify-self: center; }
@media (max-width: 759px) { .al-prints[data-n="2"] .al-fig:last-child { grid-column: 1 / -1; width: min(100%, 17rem); justify-self: center; } }
@media (min-width: 760px) {
  .al-prints { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .al-fig, .al-fig:first-child { grid-column: span 2; width: auto; justify-self: stretch; }
  .al-fig:nth-child(6n+1) { grid-column: span 4; grid-row: span 2; }
  .al-prints[data-n="2"] .al-fig { grid-column: span 3; grid-row: auto; }
  .al-prints[data-n="1"] .al-fig { grid-column: 2 / span 4; }
  .al-prints[data-n="1"] .al-fig:first-child { width: min(100%, 28rem); justify-self: center; }
}
.al-foot { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; margin-top: clamp(3rem, 7vw, 4.5rem); }
.al-foot .te-count { width: min(100%, 26rem); }

/* Tissue interleaf: a band of glassine between every section */
.te-facts, .te-explore, .te-story, .te-schedule, #details, .te-gallery, .te-closing { position: relative; padding-top: clamp(6rem, 12vw, 8rem) !important; }
.te-facts::before, .te-explore::before, .te-story::before, .te-schedule::before, #details::before, .te-gallery::before, .te-closing::before, .te-page-head::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: clamp(3rem, 7vw, 4.25rem); pointer-events: none;
  background: linear-gradient(101deg, transparent 31%, rgba(255,255,255,.07) 31.2%, transparent 31.6%) , linear-gradient(84deg, transparent 68%, rgba(0,0,0,.09) 68.3%, transparent 68.7%), color-mix(in srgb, var(--te-primary) 15%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 97% 100%, 62% 86%, 30% 100%, 0 80%);
}
.te-page-head { position: relative; margin: 0; padding-bottom: clamp(5rem, 11vw, 7rem); border-radius: 0; background: none; }
.te-page-head::after { top: auto; bottom: 0; }

/* Everything mounted on the page is a slip of paper; the slip re-inks whatever sits on it. */
.te-card, .te-tile, .te-tile-accent {
  position: relative; border: 0; border-radius: 0; background: var(--al-paper); box-shadow: 0 10px 22px -14px rgba(0,0,0,.7);
  --te-primary: var(--te-bg); --te-on-primary: var(--al-paper); --te-primary-text: var(--te-bg); --te-ink: var(--te-bg); --te-surface: var(--al-paper);
  --te-muted: color-mix(in srgb, var(--te-bg) 78%, var(--al-paper)); --te-accent-text: color-mix(in srgb, var(--te-bg) 80%, var(--te-accent));
  --te-tint: color-mix(in srgb, var(--te-bg) 9%, var(--al-paper)); --te-tint-strong: color-mix(in srgb, var(--te-bg) 16%, var(--al-paper));
  --te-line: color-mix(in srgb, var(--te-bg) 18%, transparent); --al-corner: var(--te-bg); color: var(--te-ink);
}
.te-card::after, .te-tile::after { filter: drop-shadow(0 0 .5px color-mix(in srgb, var(--te-primary) 50%, transparent)); --al-cs: 1.35rem; }
a.te-card:hover, a.te-tile:hover { transform: none; box-shadow: 0 10px 22px -14px rgba(0,0,0,.7); }
.te-icon-tile, .te-icon-tile-accent { display: none; }
.te-eyebrow { font-family: var(--te-heading); font-style: italic; font-size: 1rem; }
.te-eyebrow.mt-4 { margin-top: 0; }
.te-h-section, .te-h-page { font-style: italic; font-weight: 400; font-size: clamp(2.25rem, 7vw, 3.5rem); }
.te-h-card { font-weight: 600; }
.te-section-sub { font-style: italic; font-family: var(--te-heading); }

.te-facts-grid > :nth-child(1) { transform: rotate(-.5deg); }
.te-facts-grid > :nth-child(2) { transform: rotate(.4deg) translateY(.5rem); }
.te-facts-grid > :nth-child(3) { transform: rotate(-.3deg); }
.te-explore .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)) !important; }
.te-explore a.te-card > svg { display: none; }
.te-story .te-card { transform: rotate(-.25deg); }

/* Programme: a printed order of service tucked into the album */
.te-timeline { max-width: 34rem; margin-inline: auto; padding: clamp(2rem, 6vw, 3.25rem) clamp(1.5rem, 6vw, 3.25rem) !important; transform: rotate(.35deg); }
.te-timeline li { grid-template-columns: 1fr !important; padding: 1rem 0 !important; border-bottom: 1px solid var(--te-line); }
.te-timeline li:last-child { border-bottom: 0; }
.te-timeline li > div:first-child { display: none; }
.te-timeline li > div:last-child { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); column-gap: 1rem; align-items: baseline; }
.te-timeline .te-chip { grid-row: 1 / span 2; margin: 0 !important; font-family: var(--te-heading); font-size: 1.0625rem; color: var(--te-ink); }
.te-timeline .te-chip-accent { background: none; }
.te-timeline .te-h-card { font-size: 1.1875rem; font-weight: 400; }
.te-timeline p { grid-column: 2; }

/* Gallery: smaller prints, same corners */
.te-gallery-item { position: relative; overflow: visible !important; border-radius: 0 !important; padding: .3rem; background: var(--al-paper); --al-cs: 1.25rem; aspect-ratio: 4 / 5 !important; }
.te-gallery-item img { object-position: 50% 18%; }
.te-gallery-item:nth-child(odd) { transform: rotate(-.7deg); }
.te-gallery-item:nth-child(even) { transform: rotate(.6deg) translateY(.35rem); }
.te-gallery-grid { row-gap: 1.75rem !important; column-gap: 1.25rem !important; }

.te-closing-panel { transform: rotate(-.2deg); }
.te-count { gap: 1.5rem; }
.te-count-cell { background: none !important; box-shadow: none !important; padding: 0; border-radius: 0; }
.te-count-num { font-weight: 400; font-style: italic; }
.te-count-label { font-style: italic; font-family: var(--te-heading); font-size: .875rem; }
