/* Convention Tent: a camp-meeting canopy, bunting and poles, and every section flies a flag. */
:root {
  --te-radius: 0;
  --tn-cream: color-mix(in srgb, var(--te-surface) 86%, var(--te-accent));
  --tn-ground: color-mix(in srgb, var(--te-surface) 90%, var(--te-accent));
  --tn-pole: color-mix(in srgb, var(--te-primary) 62%, #000);
  --tn-tail: polygon(0 0, 100% 0, calc(100% - 1.5rem) 50%, 100% 100%, 0 100%);
}

/* Chrome */
.te-nav-wrap { padding: 0; position: relative; }
.te-nav { max-width: none; border-radius: 0; box-shadow: none; background: var(--te-surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
.te-nav-brand { font-weight: 600; text-transform: uppercase; letter-spacing: .01em; }
.te-nav-link { border-radius: 0; opacity: 1; font-family: var(--te-heading); font-size: .9375rem; }
.te-nav-link.is-active { background: var(--te-primary); color: var(--te-on-primary); }
.te-btn, .te-btn-outline { border-radius: 0; box-shadow: none; font-family: var(--te-heading); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.te-btn { background: var(--te-primary); color: var(--te-on-primary); }
.te-btn-accent { background: var(--te-accent); color: var(--te-on-accent); box-shadow: none; }
.te-btn-soft { background: var(--te-tint-accent-strong); color: var(--te-ink); }
.te-btn-light { background: #fff; color: #14141c; }
.te-btn.te-btn-outline { background: transparent; color: var(--te-primary-text); border: 2px solid var(--te-primary-text); }
.te-chip { border-radius: 0; background: var(--te-accent); color: var(--te-on-accent); font-family: var(--te-heading); font-weight: 600; }
.te-field, .te-choice { border-radius: 0; }

/* Hero: the canopy, the stage, the banner */
.tn-hero { position: relative; overflow: hidden; background: var(--tn-ground); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.tn-canopy { position: relative; z-index: 2; display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 0 rgba(0,0,0,.14)); }
.tn-canopy--lg, .tn-bunting--lg { display: none; }
.tn-stripe--0 { fill: var(--te-primary); }
.tn-stripe--1 { fill: var(--tn-cream); }
.tn-trim { fill: none; stroke: var(--te-accent); stroke-width: 3; }
.tn-stage { position: relative; z-index: 1; max-width: 72rem; margin: -5rem auto 0; padding: 5.75rem clamp(1.625rem, 4vw, 3rem) 0; }
.tn-stage::before, .tn-stage::after { content: ""; position: absolute; top: 0; bottom: -3rem; width: clamp(.625rem, 1.3vw, 1.125rem); background: repeating-linear-gradient(-32deg, var(--tn-pole) 0 12px, var(--tn-cream) 12px 24px); }
.tn-stage::before { left: clamp(.375rem, 1.6vw, 1.25rem); }
.tn-stage::after { right: clamp(.375rem, 1.6vw, 1.25rem); }
.tn-bunting { display: block; width: 100%; height: auto; margin-bottom: .75rem; transform-origin: 50% 0; animation: tn-sway 7s ease-in-out infinite alternate; }
.tn-string { fill: none; stroke: var(--te-ink); stroke-width: 1.5; }
.tn-flag--0 { fill: var(--te-primary); }
.tn-flag--1 { fill: var(--te-accent); }
.tn-flag--2 { fill: var(--te-ink); }
@keyframes tn-sway { from { transform: skewX(-1.4deg); } to { transform: skewX(1.4deg); } }
@media (prefers-reduced-motion: reduce) { .tn-bunting { animation: none; } }
.tn-photo { aspect-ratio: 4 / 5; overflow: hidden; }
.tn-photo > * { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.tn-banner { position: relative; z-index: 3; margin: -2.25rem .375rem 0; padding: .75rem 2.5rem; background: var(--te-accent); color: var(--te-on-accent); clip-path: polygon(0 0, 100% 0, calc(100% - 1.5rem) 50%, 100% 100%, 0 100%, 1.5rem 50%); }
.tn-title { margin: 0; font-size: calc(var(--fit, 1) * clamp(4.5rem, 16vw, 8rem)); line-height: 1.12; font-weight: 700; text-transform: uppercase; letter-spacing: 0; text-align: center; overflow-wrap: break-word; text-wrap: balance; }
.tn-meta { display: grid; justify-items: center; text-align: center; margin-top: 1.5rem; padding-inline: 1.25rem; }
.tn-when { font-family: var(--te-heading); font-weight: 600; font-size: clamp(1.5rem, 4vw, 2rem); text-transform: uppercase; color: var(--te-primary-text); }
.tn-venue { font-weight: 700; font-size: 1.125rem; color: var(--te-ink); }
.tn-sub { margin-top: .375rem; font-size: 1.125rem; color: var(--te-ink); }
.tn-foot { display: grid; gap: 1.25rem; justify-items: center; margin-top: 1.5rem; padding-inline: 1.25rem; }
.tn-foot .te-count { width: min(100%, 26rem); gap: .375rem; }
.tn-foot .te-btn { min-height: 3.25rem; padding-inline: 2.25rem; font-size: 1.125rem; }
.te-count-cell { background: var(--te-primary) !important; box-shadow: none !important; border-radius: 0; color: var(--te-on-primary); clip-path: polygon(0 0, 100% 0, 100% calc(100% - .625rem), 50% 100%, 0 calc(100% - .625rem)); padding-bottom: 1.25rem; }
.te-count-num { color: inherit; font-weight: 600; }
.te-count-label { color: inherit; }
@media (min-width: 720px) {
  .tn-canopy--sm, .tn-bunting--sm { display: none; }
  .tn-canopy--lg, .tn-bunting--lg { display: block; }
  .tn-stage { margin-top: -7rem; padding-top: 7.75rem; }
  .tn-photo { aspect-ratio: 16 / 10; max-height: min(34rem, 48svh); width: 100%; }
  .tn-banner { margin-top: -1.25rem; }
  .tn-banner { max-width: 76rem; margin-inline: auto; padding-inline: 4rem; }
  .tn-foot { grid-template-columns: minmax(20rem, 26rem) auto; justify-content: center; align-items: center; }
}

/* Section titles are flags flown from the left */
.te-section-head { max-width: 72rem; text-align: left; }
.te-h-section { display: inline-block; padding: .4rem 3rem .4rem 1.25rem; background: var(--te-primary); color: var(--te-on-primary) !important; font-size: clamp(2rem, 7vw, 3.5rem); font-weight: 600; line-height: 1.2; text-transform: uppercase; letter-spacing: 0; clip-path: var(--tn-tail); }
.te-section-head .te-section-sub { margin-top: .75rem; }
.te-h-page { font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.te-h-card { font-weight: 600; text-transform: uppercase; letter-spacing: .01em; }
.te-card, .te-tile { border-radius: 0; box-shadow: none; background: var(--te-surface); border: 2px solid var(--te-primary); }
a.te-card:hover { transform: none; box-shadow: none; }
.te-icon-tile { border-radius: 0; background: var(--te-accent); color: var(--te-on-accent); }
.te-icon-tile-accent { background: var(--te-on-primary); color: var(--te-primary); }
.te-card .te-h-section { padding-inline: 1rem 2.5rem; }

/* Facts: three pennants on one line */
.te-facts { background: var(--tn-ground); }
.te-facts-grid { max-width: 72rem !important; gap: .875rem !important; grid-template-columns: 1fr !important; border-top: 4px solid var(--te-ink); }
.te-facts-grid > * { grid-column: auto !important; align-items: center; text-align: center; padding: 1.75rem 1.5rem 5rem !important; border: 0; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3rem), 50% 100%, 0 calc(100% - 3rem)); }
.te-facts-grid > :nth-child(1) { background: var(--te-primary); color: var(--te-on-primary); }
.te-facts-grid > :nth-child(2) { background: var(--te-accent); color: var(--te-on-accent); }
.te-facts-grid > :nth-child(3) { background: var(--te-ink); color: var(--te-surface); }
.te-facts-grid > * * { color: inherit !important; }
.te-facts-grid .te-icon-tile { display: none; }
.te-facts-grid .te-eyebrow { margin-top: 0 !important; font-weight: 700; font-size: 1rem; }
.te-facts-grid .te-h-card { font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.2; }
.te-facts-grid a:not(.te-card) { min-height: 2.75rem; justify-content: center; text-decoration: underline; font-weight: 700; }
.te-facts-grid .te-i-sm { display: none; }
@media (min-width: 800px) { .te-facts-grid { grid-template-columns: repeat(3, 1fr) !important; } }

/* Explore: a row of flags on poles */
.te-explore > div { max-width: 72rem !important; }
.te-explore .grid { gap: .625rem 1.25rem !important; }
.te-explore a.te-card { padding: 1rem 3rem 1rem 1.25rem; min-height: 6rem; border: 0; border-left: 8px solid var(--tn-pole); clip-path: var(--tn-tail); background: var(--te-primary); color: var(--te-on-primary); }
.te-explore a.te-card:nth-child(even) { background: var(--te-accent); color: var(--te-on-accent); }
.te-explore a.te-card * { color: inherit !important; }
.te-explore a.te-card > svg, .te-explore a.te-card > .te-icon-tile { display: none; }
.te-explore a.te-card .te-h-card { font-size: 1.625rem; line-height: 1.2; }

/* Story */
.te-story > .te-card { max-width: 56rem !important; margin-left: max(0px, calc(50% - 36rem)); background: var(--tn-ground); border: 0; border-top: 6px solid var(--te-accent); }
.te-story .te-prose { color: var(--te-ink); font-size: 1.125rem; }

/* Programme: flags running down one pole */
.te-schedule > div:not(.te-section-head) { max-width: 74rem !important; }
.te-schedule > .te-section-head, #details > .te-section-head { max-width: 74.5rem; }
#details > section:not(#venue) > div { max-width: 72rem !important; }
#venue > .te-card { max-width: 48rem !important; margin-left: max(0px, calc(50% - 36rem)); }
.te-timeline { position: relative; display: grid; gap: .625rem; padding: 0 0 0 .875rem !important; background: none; border: 0; }
.te-timeline::before { content: ""; position: absolute; left: 0; top: -.75rem; bottom: -.75rem; width: .875rem; background: repeating-linear-gradient(-32deg, var(--tn-pole) 0 12px, var(--tn-cream) 12px 24px); }
.te-timeline li { grid-template-columns: 1fr !important; padding: 1rem 3.25rem 1rem 1.25rem !important; background: var(--te-primary); color: var(--te-on-primary); clip-path: var(--tn-tail); }
.te-timeline li:nth-child(3n+2) { background: var(--te-accent); color: var(--te-on-accent); }
.te-timeline li:nth-child(3n) { background: var(--te-ink); color: var(--te-surface); }
.te-timeline li > div:first-child { display: none; }
.te-timeline li .te-h-card, .te-timeline li .te-muted { color: inherit; }
.te-timeline .te-chip { background: none; color: inherit; padding: 0; margin: 0 !important; font-size: 1.125rem; }
.te-timeline .te-h-card { font-size: clamp(1.5rem, 4.4vw, 2.25rem); line-height: 1.2; }
.te-timeline .te-muted { margin-top: .125rem !important; }
@media (min-width: 800px) { .te-timeline li > div:last-child { display: grid; grid-template-columns: 9rem minmax(0, 1fr); column-gap: 1.5rem; align-items: baseline; } .te-timeline .te-chip { grid-row: 1 / span 2; } .te-timeline .te-h-card, .te-timeline .te-muted { grid-column: 2; } }

/* Gallery: pennant-cut photographs */
.te-gallery-grid { max-width: 72rem !important; gap: .625rem !important; }
.te-gallery-item { aspect-ratio: 4 / 5; border-radius: 0 !important; clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%); }
.te-gallery-item img { object-position: 50% 16%; }

/* Inner pages and close: a strip of canopy above */
.te-page-head { margin: 0; border-radius: 0; padding-top: 5rem; position: relative; background: var(--tn-ground); }
.te-page-head::before, .te-closing-panel::before, footer > .te-bg-primary::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3.5rem; background: repeating-linear-gradient(90deg, var(--te-primary) 0 3rem, var(--te-accent) 3rem 6rem); -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 1.5rem) no-repeat, radial-gradient(circle at 50% 0, #000 1.5rem, transparent calc(1.5rem + .5px)) 0 calc(100% - .001rem) / 3rem 1.5rem repeat-x; mask: linear-gradient(#000 0 0) top / 100% calc(100% - 1.5rem) no-repeat, radial-gradient(circle at 50% 0, #000 1.5rem, transparent calc(1.5rem + .5px)) 0 calc(100% - .001rem) / 3rem 1.5rem repeat-x; }
.te-closing { padding: 0 !important; }
.te-closing-panel { position: relative; max-width: none !important; border: 0; padding-top: 6rem !important; background: var(--tn-ground); color: var(--te-ink); }
.te-closing-panel .te-h-section { color: var(--te-on-primary) !important; padding-inline: 2.25rem 3rem; clip-path: polygon(0 0, 100% 0, calc(100% - 1.5rem) 50%, 100% 100%, 0 100%, 1.5rem 50%); }
.te-closing-panel .te-muted { color: var(--te-ink); }

/* Footer: the tent again */
footer.px-3 { padding: 0; }
footer > .te-bg-primary { max-width: none; border-radius: 0; padding-top: 3rem; }
footer > .te-bg-primary > .te-bg-accent { display: none; }
footer > .te-bg-primary::before { background: repeating-linear-gradient(90deg, var(--te-accent) 0 3rem, var(--tn-cream) 3rem 6rem); }
footer .te-h-lg { font-weight: 700; text-transform: uppercase; }
footer nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }
footer .te-dim { opacity: 1; }
.te-nav-sheet .te-nav-link, .te-nav .te-btn-sm { min-height: 2.75rem; }
