/* ==========================================================================
   DESIGN 1 only (body.d1) — loaded after styles.css.
   styles.css is shared with the other designs, so everything that belongs to
   Design 1 alone lives here.
   ========================================================================== */

/* ---------- Header ---------- */
/* Same type as the main site (cwchu.cuhk.edu.hk, checked 30 Nov 2026):
   menu = Times New Roman, bold, 16px; language switcher = Times New Roman, 18px, current language in bold. */
.d1 .topbar, .d1 .lang__btn, .d1 .mainnav a { font-family: "Times New Roman", Times, serif; }
.d1 .lang__btn { font-weight: 400; opacity: 1; }
.d1 .lang__btn.is-active { font-weight: 700; }
.d1 .mainnav a:not(.btn) { font-weight: 700; }
.d1 .mainnav__cta { font-size: .95rem; font-weight: 700; letter-spacing: 0; }
/* The menu carries the four full section names. Beside the logos each name is set on two lines (a <br> in the
   markup); in the slide-in menu on tablets and phones each runs on one line where it fits. */
@media (min-width: 1101px) {
  .d1 .topbar__link { font-size: 1rem; }
  .d1 .lang__btn { font-size: 1.125rem; line-height: 1.2; }
  .d1 .mainnav a:not(.btn) { display: block; font-size: 1rem; line-height: 1.15; }
  .d1 .mainnav ul { align-items: center; gap: 28px; }
}
@media (max-width: 1100px) {
  .d1 .mainnav a br { display: none; }
  .d1 .mainnav a:not(.btn) { white-space: normal; font-size: 1.6rem; line-height: 1.15; }
}

/* Logos: the files have no white space around them, so one height and centre alignment put both on one line */
.d1 .masthead__brand { gap: 16px; align-items: center; }
.d1 .masthead__crest { display: block; height: 42px; width: auto; }
.d1 .masthead__divider { height: 36px; }
.d1 .masthead .logo20 { display: block; width: 46px; height: 46px; }
@media (max-width: 1100px) { .d1 .masthead__crest { height: 40px; } }
@media (max-width: 640px) {
  .d1 .masthead__brand { gap: 10px; }
  .d1 .masthead__crest { height: 30px; }
  .d1 .masthead__divider { height: 26px; }
  .d1 .masthead .logo20 { width: 36px; height: 36px; }
}
/* Phones: the two logos share the width left beside the menu button (the small "20" mark is dropped here) */
@media (max-width: 520px) {
  .d1 .masthead__divider--mark, .d1 .masthead__mark { display: none; }
  .d1 .masthead__crest { height: min(28px, calc((100vw - 132px) / 8.95)); }
}

/* ---------- Top banner ---------- */
.d1 .hero__lede { margin-bottom: 0; }
.d1 .hero__title { margin-top: 2px; }

/* ---------- 20th Anniversary (introduction) and the section after it ----------
   The band of figures that used to sit between them is gone, so the next section starts on a clearly
   deeper tone, under a gold rule with a small diamond at its centre. */
.d1 .chapter--together { position: relative; background: #EFEADB; border-top: 1px solid var(--gold-deep); }
.d1 .chapter--together::before { content: ""; position: absolute; left: 50%; top: 0; width: 13px; height: 13px; margin: -7px 0 0 -6.5px; transform: rotate(45deg); background: var(--gold-deep); box-shadow: 0 0 0 6px var(--paper); }
.d1 .chapter--together::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 120px; pointer-events: none; background: linear-gradient(180deg, rgba(119, 91, 62, .09), rgba(119, 91, 62, 0)); }
.d1 .chapter--together > .wrap { position: relative; z-index: 1; }

/* ---------- Section headings that must stay on one line ---------- */
.d1 .chapter__head--line { max-width: none; }
@media (min-width: 1101px) {
  .d1 .chapter__head--line .h-display, .d1 .chapter__head--line .lead { white-space: nowrap; }
}

/* ---------- Featured Video Interviews, then Voices of Our Community: two separate blocks ---------- */
.d1 .voices__head { align-items: center; margin-bottom: 28px; }

/* Fade used by the filter buttons (Voices of Our Community and the memory wall): see fadeSwap() in main.js */
.d1 .voice-grid, .d1 .wall { transition: opacity .28s ease, transform .28s ease; }
.d1 .voice-grid.is-swapping, .d1 .wall.is-swapping { opacity: 0; transform: translateY(12px); }

/* Video interviews: their own dark panel, 16:9 frames and a large play button, so they read as video at a glance */
.vids { position: relative; margin-bottom: clamp(60px, 8vw, 110px); padding: clamp(22px, 3vw, 40px); color: #fff; border-top: 3px solid var(--gold);
  background: radial-gradient(ellipse at 15% 0%, rgba(143, 29, 48, .6), transparent 60%), var(--burgundy-ink); box-shadow: var(--shadow-md); }
.vids__head { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: clamp(18px, 2vw, 26px); }
.vids__title { display: flex; align-items: center; gap: 16px; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; color: #fff; }
.vids__icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; background: var(--gold); color: var(--burgundy-ink); }
.vids__icon .ico { margin-left: 2px; }
.vids__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.vid.is-hidden { display: none; }
.vid__card { display: block; color: #fff; }
.vid__frame { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(217, 197, 138, .4), 0 14px 30px rgba(0, 0, 0, .35); }
.vid__frame img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: transform .9s var(--ease), opacity .4s; }
.vid__frame::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(35, 24, 21, .1) 0%, rgba(35, 24, 21, .5) 100%); }
.vid__play { position: absolute; left: 50%; top: 50%; z-index: 2; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem;
  background: var(--gold); color: var(--burgundy-ink); box-shadow: 0 0 0 9px rgba(217, 197, 138, .25), 0 10px 26px rgba(0, 0, 0, .5); transition: transform .3s var(--ease), background .3s; }
.vid__play .ico { margin-left: 4px; }
.vid__card:hover .vid__frame img, .vid__card:focus-visible .vid__frame img { transform: scale(1.05); opacity: 1; }
.vid__card:hover .vid__play, .vid__card:focus-visible .vid__play { transform: scale(1.1); background: #fff; }
.vid__body { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; }
.vid__role { font-size: .62rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.vid__name { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.15; }
.vid__quote { font-size: .88rem; line-height: 1.5; color: rgba(255, 255, 255, .8); }

/* ---------- Anniversary Highlights: next event box ---------- */
/* A short, wide box whose top edge lines up with the top of the section heading: label, event name and date on the
   left; the countdown (small) in the top right corner; "Add to calendar" and a round arrow (= event details) bottom right. */
.d1 .chapter__head--split { align-items: flex-start; }
.d1 .chapter__head--split > div:first-child { flex: 1 1 0; max-width: 780px; } /* room for the introduction on one line */
.d1 .countdown { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "k nums nums" "title nums nums" "date cal go"; align-items: center; column-gap: 16px; min-width: 0; padding: 14px 20px 14px 24px; }
.d1 .countdown__k { grid-area: k; margin: 0; line-height: 1.3; }
.d1 .countdown__nums { grid-area: nums; align-self: start; justify-self: end; gap: 18px; margin: 0 0 0 28px; }
.d1 .countdown__nums div { align-items: center; }
.d1 .countdown__nums strong { font-size: 1.5rem; }
.countdown__title { grid-area: title; margin-top: 2px; font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; line-height: 1.1; color: #fff; white-space: nowrap; }
.countdown__date { grid-area: date; margin-top: 10px; font-weight: 600; color: var(--gold); white-space: nowrap; }
.countdown__cal { grid-area: cal; justify-self: end; margin-top: 10px; }
.countdown__go { grid-area: go; justify-self: end; margin-top: 10px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; background: var(--gold); color: var(--burgundy-ink); transition: background .25s, transform .25s; }
.countdown__go:hover { background: #fff; transform: translateX(3px); }
.countdown__go:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* The box sits beside the heading whenever the heading fits on one line next to it; otherwise it drops below the introduction */
@media (min-width: 641px) { .d1 .chapter__head--split .h-display { white-space: nowrap; } }
.d1 .events { margin-bottom: 0; } /* the events grid is now the last thing in the section */

/* ---------- The First 20 Years of CWC: moved with the arrows, not by scrolling the page ---------- */
.d1 .table-pin { min-height: 0; padding: clamp(64px, 7vw, 104px) 0 clamp(40px, 4.5vw, 60px); }
.d1 .table-head { padding: 0 0 clamp(18px, 2vw, 28px); }
.d1 .table-head .h-display { margin-bottom: 0; }

/* Era buttons: white on a tinted ground with a clear gold outline, and larger type */
.d1 .eras { gap: 8px; }
.d1 .era { gap: 5px; padding: 11px 18px 12px; border-color: rgba(217, 197, 138, .75); background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.32rem; font-weight: 700; line-height: 1.05; }
.d1 .era small { font-size: .74rem; font-weight: 600; letter-spacing: .14em; opacity: 1; color: var(--gold); }
.d1 .era:hover { background: rgba(217, 197, 138, .2); border-color: var(--gold); }
.d1 .era.is-active { background: var(--gold); border-color: var(--gold); color: var(--burgundy-ink); }
.d1 .era.is-active small { color: var(--burgundy-deep); }

.table-stage { position: relative; z-index: 2; }
.d1 .table-viewport { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.d1 .table-viewport::-webkit-scrollbar { display: none; }
.d1 .table-viewport:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.d1 .table-track { flex: none; height: 600px; will-change: auto; }
.d1 .seat__photo img, .d1 .seat__photo img.is-portrait, .d1 .compare { height: 200px; }
@media (min-width: 1101px) {
  /* Both edges fade out behind the arrows; the first moment starts clear of the left arrow */
  .d1 .table-viewport { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 104px, #000 calc(100% - 104px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 104px, #000 calc(100% - 104px), transparent); }
  .d1 .table-track { padding-left: max(112px, calc((100vw - var(--wrap)) / 2)); }
}

.table-arrow { position: absolute; top: 50%; z-index: 4; width: 58px; height: 58px; margin-top: -29px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem;
  background: var(--gold); color: var(--burgundy-ink); box-shadow: 0 0 0 7px rgba(217, 197, 138, .22), 0 10px 26px rgba(0, 0, 0, .5); transition: transform .25s var(--ease), background .25s, opacity .25s, box-shadow .25s; }
.table-arrow--prev { left: clamp(8px, 2vw, 30px); }
.table-arrow--next { right: clamp(8px, 2vw, 30px); }
.table-arrow:hover:not(:disabled) { background: #fff; transform: scale(1.08); }
.table-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.table-arrow:disabled { opacity: .3; cursor: default; box-shadow: none; }
/* Tablets: the first moment starts clear of the left arrow. Phones: each moment sits in the middle, between the arrows. */
@media (max-width: 1100px) {
  .d1 .table-track { padding-left: max(84px, var(--gutter)); }
}
@media (max-width: 640px) {
  .d1 .table-track { padding-left: calc(50vw - 140px); padding-right: calc(50vw - 150px); }
  .table-arrow { width: 44px; height: 44px; margin-top: -22px; font-size: 1.35rem; box-shadow: 0 0 0 4px rgba(217, 197, 138, .22), 0 8px 20px rgba(0, 0, 0, .5); }
  .table-arrow--prev { left: 6px; }
  .table-arrow--next { right: 6px; }
  .d1 .era { font-size: 1.2rem; padding: 10px 14px 11px; }
}

/* Timeline: plates only, no fork and knife beside them (the cutlery stays in Design 2) */
.d1 .seat__plate::before, .d1 .seat__plate::after { content: none; }

/* ---------- Memories & Stories: the "All" button is text only (no dot), kept as tall as the buttons with icons ---------- */
.d1 .fourI__btn--text { min-height: 50px; padding: 10px 24px; }

/* ---------- Share your memories: drop-down fields ----------
   The browser's own arrow sits hard against the right border, so it is replaced by a drawn one set in from the edge. */
.d1 .field select { -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%235C1020' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") right 16px center / 12px 8px no-repeat; }

/* ---------- Support CWC: a short band above the footer ---------- */
.d1 .epilogue { min-height: 0; }
.d1 .epilogue__content { max-width: none; display: flex; align-items: center; justify-content: space-between; gap: clamp(24px, 5vw, 80px); padding: clamp(52px, 5.5vw, 80px) 0; }
.d1 .epilogue__text { max-width: 760px; }
.d1 .epilogue .h-display { margin-bottom: 14px; font-size: clamp(2rem, 3.6vw, 3.2rem); }
.d1 .epilogue__content .btn { flex: none; }
@media (max-width: 760px) {
  .d1 .epilogue__content { flex-direction: column; align-items: flex-start; }
}

/* ---------- Footer: contact (as on the main site) and social links only ---------- */
.d1 .footer__grid { grid-template-columns: minmax(0, 1fr) auto; gap: 32px clamp(40px, 8vw, 120px); padding: 52px 0 40px; }
.d1 .footer__contact-cols { display: flex; flex-wrap: wrap; gap: 14px clamp(32px, 6vw, 88px); }
.d1 .footer address, .d1 .footer__lines { line-height: 1.8; }
.d1 .footer address strong { font-weight: 600; color: #fff; }
.d1 .footer__lines li + li { margin-top: 0; }
.d1 .footer__lines span { color: rgba(255, 255, 255, .55); }
@media (max-width: 640px) {
  .d1 .footer__grid { grid-template-columns: 1fr; padding: 40px 0 32px; }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 680px) {
  .vids__list { grid-template-columns: 1fr; gap: 26px; }
  .vid__play { width: 60px; height: 60px; margin: -30px 0 0 -30px; font-size: 1.7rem; }
}
@media (max-width: 520px) {
  .d1 .countdown { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "k nums nums" "title title title" "date date go" "cal cal cal"; column-gap: 12px; padding: 16px 18px; }
  .d1 .countdown__k { white-space: nowrap; }
  .d1 .countdown__nums { gap: 12px; margin-left: 0; }
  .countdown__title { margin-top: 12px; white-space: normal; }
  .countdown__cal { justify-self: start; margin-top: 10px; }
}
@media (max-width: 400px) { .d1 .countdown__nums { gap: 8px; } }

@media (prefers-reduced-motion: reduce) {
  .d1 .voice-grid, .d1 .wall, .vid__frame img, .vid__play, .table-arrow, .countdown__go { transition: none; }
}

/* ==========================================================================
   READABILITY — larger small text throughout Design 1 (1 Dec 2026)
   Labels, captions, buttons and running text were mostly 10–14px. Here running
   text is at least 16px, buttons and links 15–16px, and the small capital
   labels about 12.5–14px. Kept in one block so the scale is easy to adjust.
   ========================================================================== */
/* Labels above headings */
.d1 .eyebrow { font-size: .86rem; letter-spacing: .2em; }

/* Buttons and text links */
.d1 .btn { font-size: 1rem; }
.d1 .btn--sm { font-size: .92rem; }
.d1 .mainnav__cta { font-size: 1rem; }
.d1 .link-arrow { font-size: 1rem; }
.d1 .chip, .d1 .radio-chips span { font-size: .94rem; }
.d1 .fourI__btn { font-size: .98rem; }

/* Running text */
.d1 .hero__lede { font-size: clamp(1.06rem, 1.3vw, 1.2rem); }
.d1 .letter-card__body p, .d1 .share__intro p { font-size: 1.06rem; }
.d1 .letter-card__sign { font-size: .96rem; }
.d1 .epilogue p { font-size: 1.1rem; }

/* Video interviews and stories */
.d1 .vid__role, .d1 .voice__role { font-size: .8rem; letter-spacing: .16em; }
.d1 .vid__quote, .d1 .voice__quote { font-size: 1rem; }
.d1 .voice--wide .voice__quote, .d1 .voice--tall .voice__quote { font-size: 1.28rem; line-height: 1.3; }

/* Next event box and event cards */
.d1 .countdown__k { font-size: .82rem; }
.d1 .countdown__date { font-size: 1.06rem; }
.d1 .countdown__nums span { font-size: .78rem; margin-top: 3px; }
.d1 .event__status { font-size: .8rem; }
.d1 .event__meta { font-size: .94rem; }
.d1 .event__desc { font-size: 1.04rem; }

/* Timeline */
.d1 .era small { font-size: .8rem; }
.d1 .seat__photo figcaption { font-size: .8rem; color: #fff; }
.d1 .seat__text p { font-size: 1rem; }
.d1 .compare__tag { font-size: .8rem; }

/* Memory wall and story cards */
.d1 .polaroid figcaption > span { font-size: 1.22rem; }
.d1 .polaroid figcaption small { font-size: .8rem; }
.d1 .story__cat { font-size: .8rem; letter-spacing: .16em; }
.d1 .story p { font-size: 1.02rem; }

/* Share form */
.d1 .field label, .d1 .field legend { font-size: .96rem; }
.d1 .field small { font-size: .88em; }
.d1 .field input, .d1 .field select, .d1 .field textarea { font-size: 1.02rem; }
.d1 .field input[type=file] { font-size: .96rem; }
.d1 .consent { font-size: .96rem; }
.d1 .share__done { font-size: 1.02rem; }
.d1 .polaroid--preview figcaption > span { font-size: 1.5rem; line-height: 1.25; }
.d1 .polaroid--preview figcaption small { font-size: .8rem; }

/* Photo pop-up, footer */
.d1 .lb-caption span { font-size: .86rem; }
.d1 .footer { font-size: .98rem; }
.d1 .footer h4 { font-size: .84rem; }
.d1 .footer__bottom { font-size: .88rem; }

/* Gold top bar on tablets and phones */
@media (max-width: 1100px) {
  .d1 .topbar { font-size: .92rem; }
  .d1 .lang__btn { font-size: 1rem; }
}

/* Cards with text over a photo: the shade is strongest behind the text and clears quickly above it, so both the
   photo and the text can be seen; a soft shadow on the text itself keeps it clear without darkening the photo more. */
.d1 .voice__card::after { background: linear-gradient(0deg, rgba(28,18,16,.92) 0%, rgba(28,18,16,.72) 28%, rgba(28,18,16,.32) 50%, rgba(28,18,16,0) 72%); }
.d1 .voice--wide .voice__card::after, .d1 .voice--tall .voice__card::after { background: linear-gradient(0deg, rgba(28,18,16,.92) 0%, rgba(28,18,16,.76) 34%, rgba(28,18,16,.46) 56%, rgba(28,18,16,.1) 78%, rgba(28,18,16,0) 92%); }
.d1 .event::after { background: linear-gradient(0deg, rgba(28,18,16,.92) 0%, rgba(28,18,16,.74) 28%, rgba(28,18,16,.38) 50%, rgba(28,18,16,.06) 74%, rgba(28,18,16,0) 100%); }
@media (min-width: 901px) { /* the large card is three rows tall here, so its text sits in the lower third */
  .d1 .event--lg::after { background: linear-gradient(0deg, rgba(28,18,16,.92) 0%, rgba(28,18,16,.76) 18%, rgba(28,18,16,.46) 32%, rgba(28,18,16,.12) 50%, rgba(28,18,16,0) 68%); }
}
@media (max-width: 900px) { /* here the large card is shorter and its text fills more than half of it */
  .d1 .event--lg::after { background: linear-gradient(0deg, rgba(28,18,16,.92) 0%, rgba(28,18,16,.76) 34%, rgba(28,18,16,.48) 56%, rgba(28,18,16,.12) 78%, rgba(28,18,16,0) 94%); }
}
.d1 .voice__body, .d1 .event h3, .d1 .event__meta, .d1 .event__desc { text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 14px rgba(0, 0, 0, .35); }

/* Event cards: a round arrow in the bottom right corner replaces the "Event details" line, so the text takes less of the photo */
.event__go { position: absolute; right: 20px; bottom: 20px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; background: var(--gold); color: var(--burgundy-ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .35); transition: background .25s, transform .25s; }
.event--lg .event__go { right: 40px; bottom: 40px; width: 44px; height: 44px; font-size: 1.35rem; }
.event:hover .event__go, .event:focus-visible .event__go { background: #fff; transform: translateX(3px); }
.d1 .event:not(.event--lg) .event__body { padding-right: 68px; }
@media (max-width: 640px) {
  .event--lg .event__go { right: 22px; bottom: 22px; width: 36px; height: 36px; font-size: 1.15rem; }
  .d1 .event--lg .event__desc { padding-right: 52px; } /* keeps the last lines clear of the arrow */
}
@media (prefers-reduced-motion: reduce) { .event__go { transition: none; } }
