:root {
  --paper: #f2eee4;
  --paper-deep: #e7e1d3;
  --ink: #1b211e;
  --ink-soft: #4d5450;
  --green: #0f4a3d;
  --green-deep: #0b3a30;
  --on-green: #eef0e4;
  --on-green-soft: #bdcfc4;
  --on-photo: #f4efe4;
  --hairline: rgba(27, 33, 30, .22);

  --gutter: clamp(16px, 4vw, 56px);
  --side: clamp(220px, 24vw, 340px);
  --gap: clamp(40px, 6vw, 96px);
  --section: clamp(88px, 11vw, 168px);

  --display: 'Noto Serif Display', 'Noto Serif SC', Georgia, serif;
  --text: 'Spectral', 'Noto Serif SC', Georgia, serif;
  --label: 'Barlow Semi Condensed', 'Noto Serif SC', sans-serif;

  /* transitions-dev: texts reveal */
  --stagger-dur: 900ms;
  --stagger-distance: 18px;
  --stagger-stagger: 140ms;
  --stagger-blur: 3px;
  --stagger-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* transitions-dev: accordion */
  --acc-expand: 350ms;
  --acc-collapse: 250ms;
  --acc-chevron: 250ms;
  --acc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; scrollbar-color: var(--green) var(--paper-deep); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.1875rem/1.6 var(--text); font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--green); color: var(--on-green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.hero :focus-visible, .site-header :focus-visible, .ticket :focus-visible { outline-color: currentColor; }
[lang="zh-Hans"] { font-family: 'Noto Serif SC', var(--text); }

h2 { font: 300 clamp(2.25rem, 4.4vw, 3.75rem)/1.08 var(--display); letter-spacing: -.012em; text-wrap: balance; margin-bottom: .6em; }

.label, .wordmark-line, .ticket-no, .ticket-fare-name, dt, h4, figcaption, .plate, caption {
  font-family: var(--label); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; font-size: .8125rem; line-height: 1.3;
}

.ph { background: rgba(15, 74, 61, .1); color: inherit; padding: 0 .25em; font-style: normal; border-bottom: 1px dashed currentColor; }
.hero .ph, .ticket .ph { background: rgba(255, 255, 255, .16); }

.link { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .28em; transition: text-underline-offset 150ms ease-out; }
.link:hover { text-underline-offset: .42em; }

.btn { display: inline-block; padding: .72em 1.4em; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font: 500 1.0625rem/1.2 var(--text); transition: background-color 150ms ease-out, color 150ms ease-out; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--light { border-color: var(--on-photo); color: var(--on-photo); }
.btn--light:hover { background: var(--on-photo); color: var(--ink); }

/* Header */
.site-header { position: absolute; z-index: 3; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: clamp(18px, 2.4vw, 32px) var(--gutter); color: var(--on-photo); }
.wordmark { color: inherit; text-decoration: none; display: grid; gap: 4px; }
.wordmark-name { font: 300 clamp(1.75rem, 2.4vw, 2.25rem)/1 var(--display); letter-spacing: .005em; }
.wordmark-line { font-size: .6875rem; letter-spacing: .22em; }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); font-size: 1.0625rem; }
.site-nav a:not(.btn) { color: inherit; text-decoration: none; text-underline-offset: .32em; text-decoration-thickness: 1px; }
.site-nav a:not(.btn):hover { text-decoration-line: underline; }

/* Language switch: only offered when JS can act on it */
.lang-switch { display: none; align-items: center; gap: 2px; font-family: var(--label); font-weight: 500; font-size: .8125rem; letter-spacing: .16em; }
.js .lang-switch { display: flex; }
.lang-switch button { all: unset; box-sizing: border-box; cursor: pointer; min-width: 36px; min-height: 36px; padding: 0 .55em; display: inline-grid; place-items: center; color: inherit; opacity: .62; border-bottom: 1px solid transparent; transition: opacity 150ms ease-out; }
.lang-switch button:hover { opacity: 1; }
.lang-switch button[aria-pressed="true"] { opacity: 1; border-bottom-color: currentColor; }
.lang-switch button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) var(--side); align-items: end; column-gap: var(--gap); padding: 140px var(--gutter) clamp(32px, 4.4vw, 64px); color: var(--on-photo); background: #0c1216; overflow: hidden; isolation: isolate; }
.hero-photo { position: absolute; inset: 0; z-index: -1; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 80%; animation: hero-settle 3.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-photo::after { content: ''; position: absolute; inset: 0; background:
  linear-gradient(to bottom, rgba(8, 13, 16, .62), rgba(8, 13, 16, 0) 24%),
  linear-gradient(to right, rgba(8, 13, 16, .56), rgba(8, 13, 16, 0) 62%),
  linear-gradient(to top, rgba(8, 13, 16, .88), rgba(8, 13, 16, .52) 36%, rgba(8, 13, 16, 0) 72%); }
@keyframes hero-settle { from { transform: scale(1.04); } to { transform: scale(1); } }

.hero-title { font: 300 clamp(2.25rem, 8vw, 4rem)/1.02 var(--display); letter-spacing: -.018em; }
.hero-title em { font-style: italic; }
.hero-sub > span { display: block; }
.hero-sub { max-width: 42em; margin-top: 1.1em; font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.5; }

.hero-note { border-left: 1px solid currentColor; padding-left: 20px; font-size: 1.0625rem; line-height: 1.45; }
.hero-note .label { margin-bottom: .7em; letter-spacing: .2em; }
.hero-note .link { display: inline-block; margin-top: .6em; }

/* transitions-dev: texts reveal, only when JS can finish it */
/* One line from about 700px; on narrow screens it breaks only between the two parts */
.t-stagger-line { display: inline-block; white-space: nowrap; }
.js .t-stagger-line {
  opacity: 0;
  transform: translateY(var(--stagger-distance));
  filter: blur(var(--stagger-blur));
  transition:
    opacity   var(--stagger-dur) var(--stagger-ease),
    transform var(--stagger-dur) var(--stagger-ease),
    filter    var(--stagger-dur) var(--stagger-ease);
  will-change: transform, opacity, filter;
}
.js .t-stagger-line--2 { transition-delay: var(--stagger-stagger); }
.js .t-stagger.is-shown .t-stagger-line { opacity: 1; transform: translateY(0); filter: blur(0); }

.js .t-stagger-em {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity   1100ms var(--stagger-ease) 620ms,
    transform 1100ms var(--stagger-ease) 620ms;
}
.js .t-stagger.is-shown .t-stagger-em { opacity: 1; transform: translateY(0); }

/* The page rule: the hero note's line, carried down the page */
.page { position: relative; }
.page::before { content: ''; position: absolute; top: 0; bottom: 0; right: calc(var(--gutter) + var(--side) - 1px); width: 1px; background: var(--hairline); }

.ruled { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--side); column-gap: var(--gap); padding: var(--section) var(--gutter) 0; }
.ruled--flush { padding: 0; }
.ruled-main { max-width: 46rem; }
.ruled-main > p { max-width: 32em; }
.ruled-main > p + p { margin-top: 1em; }
.ruled-side { padding-left: 20px; }

.plate { display: inline-block; background: var(--green); color: var(--on-green); padding: .55em .9em; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--green), inset 0 0 0 2px var(--on-green-soft); font-size: .75rem; margin-top: .9em; }
.plate[lang="zh-Hans"] { font-family: 'Noto Serif SC', var(--label); }
.plate [lang="en"], .plate [lang="de"] { font-family: var(--label); margin-left: .5em; }
.gloss { margin-top: 1.4em; font-size: 1rem; line-height: 1.5; color: var(--ink-soft); }
.gloss--fine { font-style: italic; }
.signature { margin-top: 1.4em; font: italic 300 2rem/1 var(--display); }

/* The roll */
.offer { position: relative; padding: var(--section) var(--gutter) 0; }
.roll { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr) auto) minmax(0, 1fr); margin-top: clamp(40px, 5vw, 72px); background: var(--green); color: var(--on-green); }
.ticket { padding: clamp(20px, 2.2vw, 32px); display: flex; flex-direction: column; min-width: 0; }
.ticket-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; font-size: 1rem; }
.ticket-no { font-variant-numeric: tabular-nums; letter-spacing: .14em; white-space: nowrap; }
.ticket-fare-name { white-space: nowrap; }
.ticket-fare-name { font: italic 300 1.5rem/1 var(--display); letter-spacing: 0; text-transform: none; color: var(--on-green); }
.ticket-fare-name [lang] { font: 400 1rem/1 'Noto Serif SC', serif; font-style: normal; letter-spacing: .08em; color: var(--on-green-soft); margin-left: .3em; }
.ticket h3 { font: 300 clamp(1.875rem, 2.4vw, 2.5rem)/1.08 var(--display); hyphens: auto; overflow-wrap: break-word; letter-spacing: -.01em; margin-top: 1.1em; }
.ticket-zh { margin-top: .35em; font-size: 1.125rem; letter-spacing: .08em; color: var(--on-green-soft); }
.ticket-line { margin-top: .7em; min-height: 3.2em; line-height: 1.4; color: var(--on-green); }
.ticket-fields { margin-top: 1.4em; border-top: 1px solid rgba(238, 240, 228, .35); }
.ticket-fields > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: .5em 0; border-bottom: 1px solid rgba(238, 240, 228, .2); }
.ticket-fields dt { color: var(--on-green-soft); letter-spacing: .14em; font-size: .75rem; }
.ticket-fields dd { text-align: right; line-height: 1.3; }
.ticket-fields .num { font-variant-numeric: tabular-nums; }

.perf { width: 14px; background-image: radial-gradient(circle at 50% 50%, var(--paper) 4px, transparent 4.5px); background-size: 14px 18px; background-repeat: round; }

.t-acc-head { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; cursor: pointer; }
.ticket .t-acc-panel { flex: 1; }
.ticket .t-acc-head { padding-top: 1.1em; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .28em; text-decoration-color: transparent; transition: text-decoration-color 150ms ease-out; }
.ticket .t-acc-head:hover { text-decoration-color: currentColor; }
.t-acc-head:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.t-acc-chevron path { fill: none; stroke: currentColor; stroke-width: 1.4; }

.t-acc-panel-inner { min-height: 0; }
.ticket h4 { margin-top: 1.5em; color: var(--on-green-soft); letter-spacing: .14em; font-size: .75rem; }
.ticket h4:first-child { margin-top: 1.2em; }
.ticket li { margin-top: .4em; line-height: 1.35; font-size: 1.0625rem; }
.ticket-action { align-self: flex-start; margin-top: 1.5em; padding: .7em 1.2em; border: 1px solid var(--on-green); color: var(--on-green); text-decoration: none; font-weight: 500; transition: background-color 150ms ease-out, color 150ms ease-out; }
.ticket-action:hover { background: var(--on-green); color: var(--green-deep); }

/* Roll entrance: once, when the roll scrolls into view */
.js .roll .ticket {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}
.js .roll .ticket:nth-of-type(2) { transition-delay: 90ms; }
.js .roll .ticket:nth-of-type(3) { transition-delay: 180ms; }
.js .roll .ticket:nth-of-type(4) { transition-delay: 270ms; }
.js .roll.is-in .ticket { opacity: 1; transform: none; }

/* transitions-dev: accordion */
.t-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--acc-collapse) var(--acc-ease);
}
.t-acc[data-open="true"] .t-acc-panel {
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--acc-expand) var(--acc-ease);
}
.t-acc-panel-inner {
  overflow: hidden;
  opacity: 0;
  filter: blur(2px);
  transition:
    opacity var(--acc-collapse) var(--acc-ease),
    filter var(--acc-collapse) var(--acc-ease);
}
.t-acc[data-open="true"] .t-acc-panel-inner {
  opacity: 1;
  filter: blur(0);
  transition:
    opacity var(--acc-expand) var(--acc-ease),
    filter var(--acc-expand) var(--acc-ease);
}
.t-acc-chevron {
  display: inline-flex;
  transform: scaleY(1);
  transform-origin: center;
  transition: transform var(--acc-chevron) var(--acc-ease);
}
.t-acc-chevron path { vector-effect: non-scaling-stroke; }
.t-acc[data-open="true"] .t-acc-chevron {
  transform: scaleY(-1);
}

/* FAQ */
.faq { max-width: 40em; border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--hairline); }
.faq h3 { font: 400 1.25rem/1.3 var(--text); }
.faq .t-acc-head { padding: .85em 0; transition: color 150ms ease-out; }
.faq .t-acc-head:hover { color: var(--green); }
.faq .t-acc-panel-inner p { padding-bottom: 1.2em; max-width: 34em; }

/* Close */
.close { padding-bottom: var(--section); }
.close h2 { font-size: clamp(2.75rem, 6vw, 5.25rem); }
.close .ruled-main > .close-b2b { margin-top: .9em; font-size: 1rem; line-height: 1.5; color: var(--ink-soft); }
.close-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 1.8em; }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding: 28px var(--gutter); background: var(--ink); color: var(--paper); font-size: .9375rem; }
.site-footer a { display: inline-block; padding: .3em 0; color: inherit; margin-right: .6em; }
.site-footer .ph { background: rgba(255, 255, 255, .14); }

/* While the hairline shows, the roll stays in the main column */
@media (min-width: 1001px) {
  .roll { margin-right: calc(var(--side) + var(--gap)); }
  .hero-title { font-size: clamp(3.25rem, 5.6vw, 6rem); }
}

/* Four across only where each ticket has room */
@media (min-width: 1600px) {
  .ticket-line { min-height: 5.6em; }
  .ticket h3 { font-size: clamp(1.75rem, 1.9vw, 2.5rem); }
}

/* Medium: the rule steps aside and the margin joins the text */
@media (max-width: 1000px) {
  .page::before { display: none; }
  .ruled { grid-template-columns: minmax(0, 1fr); }
  .ruled-side { padding-left: 0; margin-top: 24px; }
  .ruled-side .gloss { max-width: 32em; }
  .plate { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); row-gap: 28px; align-content: end; }
}

/* Below a wide row, the tickets stack */
/* Medium widths: the roll folds into two rows of two */
@media (max-width: 1599px) {
  .roll { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .roll > .perf:nth-of-type(2) { grid-column: 1 / -1; width: auto; height: 14px; background-size: 18px 14px; background-position: left center; }
  .ticket-line { min-height: 0; }
}

/* Narrow: the tickets stack */
@media (max-width: 780px) {
  .roll { grid-template-columns: minmax(0, 1fr); }
  .perf { width: auto; height: 14px; background-size: 18px 14px; background-position: left center; }
}

/* Side by side, the tickets share their row lines through subgrid, so the
   heading, the line, the fields, the accordion and the button sit level
   across a row. Each ticket spans eight rows, one per direct child.
   Without subgrid support the layout above stays as it is. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 781px) {
    .roll > .ticket { display: grid; grid-template-rows: subgrid; grid-row: span 8; }
    .roll > .perf { grid-row: span 8; }
    .roll .ticket-line { min-height: 0; }
    .roll .ticket-action { justify-self: start; align-self: start; }
  }
  /* 2×2: the middle perforation is its own row between the two ticket rows */
  @media (min-width: 781px) and (max-width: 1599px) {
    .roll > .perf:nth-of-type(2) { grid-row: span 1; }
  }
}

@media (max-width: 780px) {
  .site-nav a:not(.btn) { display: none; }
  body { font-size: 1.125rem; }
}

.site-nav .btn { white-space: nowrap; }

@media (max-width: 480px) {
  .site-header { gap: 12px; }
  .site-nav { gap: 6px; }
  .site-nav .btn { padding: .6em .85em; font-size: .9375rem; }
  .lang-switch button { min-width: 32px; padding: 0 .35em; }
}

@media (max-width: 360px) {
  .wordmark-name { font-size: 1.5rem; }
  .site-nav .btn { padding: .55em .65em; font-size: .875rem; }
  .lang-switch button { min-width: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-photo img { animation: none; }
  .js .t-stagger-line, .js .t-stagger-em { transition: none !important; opacity: 1; transform: none; filter: none; }
  .t-acc-panel, .t-acc-panel-inner, .t-acc-chevron { transition: none !important; }
  .js .roll .ticket { opacity: 1; transform: none; transition: none; }
  .btn, .link, .ticket-action, .t-acc-head { transition: none; }
}

/* Legal pages */
.site-header--plain { position: static; color: var(--ink); border-bottom: 1px solid var(--hairline); }
.site-header--plain .site-nav a:not(.btn) { display: inline; }
.legal { padding: clamp(56px, 8vw, 120px) var(--gutter) var(--section); }
.legal .ruled-main { max-width: 40rem; }
.legal h1 { font: 300 clamp(2.5rem, 5.5vw, 4.5rem)/1.05 var(--display); letter-spacing: -.015em; margin-bottom: .6em; }
.legal h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 1.8em 0 .5em; }
.legal p, .legal li { max-width: 34em; }
.legal p + p { margin-top: .9em; }
.legal ul { list-style: disc; padding-left: 1.2em; margin-top: .6em; }
.legal li + li { margin-top: .3em; }
.legal address { font-style: normal; }
.legal a { color: inherit; text-underline-offset: .2em; }
.legal .ph { overflow-wrap: anywhere; }
