/* THIEP: the gallery dressed like the invitation at /thiep-cuoi.
   Same arrangement as "classic"; only colours, type, paper and a few corners change.
   Invitation, measured on the live card: dark green #062520 / #093f35 on cream #fffbf0, grey-green #69706a,
   Boton (uppercase labels) and SVN-Signatie (script, has Vietnamese accents; the card's Hayollan has none).
   Rules are scoped to .g-thiep (set on <body> by this layout's templates). The search panel and the viewer are
   not targeted: they follow the tokens below, so only their colours and fonts change. */

@font-face {
  font-family: "Boton";
  src: url("fonts/boton.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "SVN-Signatie";
  src: url("fonts/svn-signatie.woff2") format("woff2");
  font-display: block; /* wait for it (briefly) rather than flash the system's cursive (Comic Sans on Windows) */
}

/* ---------- tokens ---------- */
html:has(.g-thiep) {
  background: #fffbf0;
}
.g-page.g-thiep {
  --bg: #fffbf0;
  --paper: #fffdf6;
  --ink: #062520;
  --ink-2: #69706a;
  --green: #062520;
  --gold: #093f35;
  --gold-2: #cdd6c9;
  --line: #e3e1d3;
  --foil: linear-gradient(105deg, #9fb3a6 0%, #fffbf0 48%, #9fb3a6 100%);
  --print-shadow: 0 22px 40px -22px rgba(6, 37, 32, 0.5), 0 2px 6px rgba(6, 37, 32, 0.12);
  --serif: "Boton", "Be Vietnam Pro", system-ui, sans-serif;
  --sans: "Boton", "Be Vietnam Pro", system-ui, sans-serif;
  --caps: "Boton", "Be Vietnam Pro", system-ui, sans-serif;
  --script: "SVN-Signatie", "Great Vibes", cursive;
  /* cream card stock: fine grain over a faint cloud, no image file */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='m' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='2' seed='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .42 0 0 0 0 .26 0 0 0 .07 -.01'/></filter><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .32 0 0 0 0 .27 0 0 0 0 .16 0 0 0 .06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23m)'/><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  --linen: var(--grain);
  --linen-light: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 .98 0 0 0 0 .9 0 0 0 .07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  /* Boton has no italic: show it upright instead of a slanted fake */
  font-synthesis: weight;
}
/* every event on the card's green and cream (site.json keeps each event's own colours for "classic") */
.g-page.g-thiep,
.g-thiep .g-event {
  --band: #f8f3e5 !important;
  --tint: #093f35 !important;
}

/* ---------- labels: Boton capitals, airy, like "11:00, THỨ SÁU" on the card ---------- */
.g-thiep .eyebrow,
.g-thiep .small-caps,
.g-thiep .btn,
.g-thiep .g-back,
.g-thiep .g-ev-n,
.g-thiep #lb-dl {
  font-family: var(--caps);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.g-thiep .btn {
  letter-spacing: 0.16em;
}
.g-page.g-thiep .btn:hover,
.g-page.g-thiep .btn.dark {
  color: #fffbf0;
}

/* ---------- cover ---------- */
.g-thiep .g-cover {
  background: #062520;
  color: #fffbf0;
}
.g-thiep .g-cover::before {
  background:
    linear-gradient(to bottom, rgba(6, 37, 32, 0.3) 0, rgba(6, 37, 32, 0) 22%),
    linear-gradient(to top, rgba(4, 28, 24, 0.86) 0, rgba(4, 28, 24, 0.46) 28%, rgba(4, 28, 24, 0) 56%);
}
/* the card's hero photo has one big rounded corner (bottom right); the cover's frame line follows it */
.g-thiep .g-cover::after {
  border-color: rgba(255, 251, 240, 0.6);
  outline-color: rgba(255, 251, 240, 0.26);
  border-radius: 0 0 clamp(70px, 16vw, 150px) 0;
}
/* the names in the card's script, as in the footer, always on ONE line: "Minh Đức & Minh Ngọc".
   The line is 11.8 × the font size wide (measured), so the size follows the width it has (÷ 12.4 leaves room
   for the script's swashes). padding-bottom keeps the g of Ngọc clear of the date at any size. */
.g-thiep .g-names {
  margin-bottom: 0;
  padding-bottom: 0.2em;
  font-family: var(--script);
  font-style: normal;
  font-weight: 400;
  font-size: min(84px, calc((100vw - 2 * var(--gutter)) / 12.4));
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
  white-space: nowrap;
  color: #fffbf0;
  text-shadow: 0 2px 18px rgba(4, 28, 24, 0.55);
}
.g-thiep .g-names em {
  margin: 0 0.14em 0 0;
  font-family: var(--script);
  font-style: normal;
  font-weight: 400;
  font-size: 0.78em;
  color: #cdd6c9;
  text-shadow: none;
}

/* PC: the same full-screen photo as on a phone. The cover photo is a tall portrait, so a wide screen only shows a
   band of it. In the photo the heads run from 19 % (hair) to 33 % (chins) of its height. At 24 % the band puts the
   hair just under the monogram and the chins above the names on 16:9 to 21:9 screens (42 %, the core default,
   cut the heads; 18 % left the faces low, behind the names). A phone or an upright tablet keeps its own framing. */
@media (min-aspect-ratio: 1/1) {
  .g-thiep .g-cover-photo img {
    object-position: 50% 24%;
  }
}
@media (min-aspect-ratio: 11/5) {
  .g-thiep .g-cover-photo img {
    object-position: 50% 22%; /* ultra-wide: keep the hair under the monogram */
  }
}
.g-page.g-thiep .g-cover-text .small-caps,
.g-thiep .g-cover .g-live {
  color: #f1ecdc;
}
.g-page.g-thiep .g-cover-text .small-caps {
  margin-top: 4px;
  font-size: 13px;
}
.g-page.g-thiep .g-cover .btn {
  border-color: rgba(255, 251, 240, 0.85);
  color: #fffbf0;
  background: rgba(6, 37, 32, 0.34);
}
.g-page.g-thiep .g-cover .btn:hover {
  background: #fffbf0;
  border-color: #fffbf0;
  color: var(--green);
}

/* ---------- album bar: the card's green block, cream capitals ---------- */
.g-thiep .g-tabs {
  box-shadow: 0 8px 24px -14px rgba(6, 37, 32, 0.5);
}
.g-thiep .g-tab {
  font-family: var(--caps);
  font-style: normal;
  font-size: clamp(12px, 3.5vw, 15px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 251, 240, 0.6);
}
.g-thiep .g-tab:hover,
.g-thiep .g-tab[aria-selected="true"] {
  color: #fffbf0;
}
.g-thiep .g-tab small {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 0.75;
}
.g-thiep .g-tab::after {
  height: 2px;
}

/* ---------- events under the bar ---------- */
.g-thiep .g-subnav {
  box-shadow: 0 6px 16px -14px rgba(6, 37, 32, 0.5);
}
.g-thiep .g-subnav a {
  padding: 13px 10px 12px;
  font-family: var(--caps);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- photos ---------- */
.g-thiep .g-grid > .g-item {
  outline-color: rgba(6, 37, 32, 0.1);
}

/* ---------- phóng sự chapters and an event's own page: script titles ---------- */
.g-thiep .g-event:nth-child(even of .g-event) {
  --band: #fffbf0 !important;
}
.g-thiep .g-ev-head h2,
.g-thiep .g-ev-title {
  padding-top: 0.12em;
  font-family: var(--script);
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  color: var(--green);
}
.g-thiep main .g-ev-head h2 {
  font-size: clamp(46px, 7vw, 86px);
}
/* the same titles over face-search results: smaller, beside "Lưu tất cả" (font size only) */
.g-thiep .g-find .g-ev-head h2 {
  font-size: clamp(34px, 6vw, 44px);
}
.g-thiep .g-ev-title {
  font-size: clamp(52px, 9vw, 104px);
}
.g-thiep .g-ev-title:has(br) {
  font-size: clamp(30px, 5vw, 58px);
}
.g-thiep .g-ev-head small {
  font-family: var(--caps);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.g-thiep .g-note {
  font-style: normal;
  font-size: 13px;
}

/* ---------- way back to the card ---------- */
.g-thiep .g-card-link {
  text-decoration: none;
  transition: color 0.25s, border-color 0.25s;
}
.g-thiep .g-foot .g-card-link {
  display: block;
  width: fit-content;
  margin: 22px auto 0;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--gold-2);
  color: var(--ink-2);
}
.g-thiep .g-foot .g-card-link:hover {
  color: var(--green);
  border-color: var(--green);
}

/* ---------- the last page: the card's green block with its rounded corner ---------- */
.g-thiep .g-colophon {
  border-top-left-radius: clamp(56px, 12vw, 140px);
  color: #fffbf0;
}
.g-thiep .g-colophon .g-crest,
.g-page.g-thiep .g-colophon .small-caps {
  color: #cdd6c9;
}
.g-page.g-thiep .g-colophon .small-caps {
  margin-top: 20px; /* clear of the script's descenders (the g of Ngọc) */
}
.g-thiep .g-colophon p {
  font-family: var(--script);
  font-style: normal;
  font-weight: 400;
  /* one line, sized to the width it has (as the cover's names) */
  font-size: min(84px, calc((100vw - 2 * var(--gutter)) / 12.6));
  line-height: 1.3;
  white-space: nowrap;
}
.g-thiep .g-colophon p em {
  margin: 0 0.12em;
  font-style: normal;
  font-size: 0.8em;
  color: #cdd6c9;
}
.g-page.g-thiep .g-colophon .g-card-link {
  display: inline-block;
  margin-top: 26px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 251, 240, 0.5);
  color: #fffbf0;
}
.g-page.g-thiep .g-colophon .g-card-link:hover {
  background: #fffbf0;
  color: var(--green);
}

/* the album ribbon has as many columns as there are albums (same as classic) */
.g-thiep .g-tabs { grid-template-columns: repeat(var(--tabs, 3), minmax(0, 1fr)); }
@media (min-width: 900px) {
  .g-thiep .g-tabs { grid-template-columns: repeat(var(--tabs, 3), minmax(0, 280px)); }
}
