:root {
  color-scheme: dark;
  --bg: #0a1120;
  --text: #eef2f5;
  --accent: #5ce1ff;
  --line: #d2dce633;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 system-ui, sans-serif;
}

a { color: var(--accent); text-underline-offset: .25em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

header, main, footer { max-width: 1100px; margin: auto; padding: 28px 32px; }
header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
footer { border-top: 1px solid var(--line); }
.wordmark { color: var(--text); font: 24px ui-monospace, monospace; letter-spacing: .14em; text-decoration: none; }
.legal { max-width: 850px; padding: 36px 32px 70px; }
.legal h1 { font-size: 2.5rem; line-height: 1.12; letter-spacing: -.025em; }
.legal h2 { margin-top: 38px; font-size: 1.3rem; line-height: 1.4; }
.legal p, .legal li { overflow-wrap: anywhere; }

.homepage {
  color-scheme: light dark;
  --bg: light-dark(#f1f2f3, #151719);
  --surface: light-dark(#fcfbf9, #22262a);
  --silver: light-dark(#e2e6e9, #1a1d20);
  --text: light-dark(#1b1e21, #f2efeb);
  --muted: light-dark(#4d555c, #a5adb3);
  --accent: light-dark(#435563, #adbbc7);
  --on-accent: light-dark(#ffffff, #151719);
  --line: light-dark(#cdd2d7, #3b4146);
  --hero-text: #fafafa;
}

:root[data-theme="light"] .homepage { color-scheme: light; }
:root[data-theme="dark"] .homepage { color-scheme: dark; }

.homepage h1, .homepage h2, .homepage p, .homepage figure { margin: 0; }
.homepage main { max-width: none; padding: 0; }
.homepage .frame { width: min(calc(100% - 112px), 1240px); max-width: none; margin-inline: auto; }

.homepage .masthead {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  min-height: 77px;
  gap: 18px;
  padding: 0;
  color: var(--hero-text);
  border-bottom-color: #ffffff42;
}

.brand-filter { position: absolute; }

.homepage .masthead .yuzora-wordmark img {
  width: 195px;
  filter: url(#wordmark-on-image);
  mask-image: none;
}

/* The homepage stacks the Japanese name with the original wordmark artwork. */
.homepage .masthead .homepage-wordmark {
  --wordmark-width: 195px;
  gap: calc(.032 * var(--wordmark-width));
}
.homepage-wordmark :is(.wordmark-bird, .wordmark-latin) {
  display: block;
  position: relative;
  overflow: hidden;
  flex: none;
}
.homepage-wordmark .wordmark-bird {
  width: calc(.436 * var(--wordmark-width));
  height: calc(.3311 * var(--wordmark-width));
}
.homepage-wordmark .wordmark-latin {
  width: calc(.354 * var(--wordmark-width));
  height: calc(.064 * var(--wordmark-width));
}
.homepage .masthead .yuzora-wordmark.homepage-wordmark img {
  position: absolute;
  width: var(--wordmark-width);
  max-width: none;
}
.homepage-wordmark .wordmark-bird img { inset: 0 auto auto 0; }
.homepage-wordmark .wordmark-latin img {
  top: calc(-.137 * var(--wordmark-width));
  left: calc(-.467 * var(--wordmark-width));
}
.homepage-wordmark .wordmark-name { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.homepage-wordmark .wordmark-kanji {
  color: #ece8e2;
  font: 400 12px/1.15 "Hiragino Sans", "Noto Sans JP", sans-serif;
  letter-spacing: .09em;
}
@media (max-width: 740px) {
  .homepage .masthead .homepage-wordmark { --wordmark-width: 140px; }
  .homepage-wordmark .wordmark-kanji { font-size: 11px; }
}
@media (max-width: 520px) {
  .homepage .masthead .homepage-wordmark { --wordmark-width: clamp(108px, 34vw, 140px); }
}

.homepage nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-size: 14px; }
.homepage nav a { color: inherit; text-decoration: none; }
.homepage nav a:hover { text-decoration: underline; }
.homepage nav [aria-hidden] { margin-left: 4px; }

.masthead-actions, .preferences { display: flex; align-items: center; }
.masthead-actions { gap: 14px; }
.preferences { gap: 2px; }
.preferences[hidden], .theme-icon[hidden] { display: none; }

.icon-control {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  list-style: none;
}

.icon-control::-webkit-details-marker { display: none; }
.icon-control svg { width: 20px; height: 20px; }
.icon-control:hover, .language-picker[open] > summary { border-color: #ffffff50; background: #14191c40; }
.icon-control:focus-visible { outline: 2px solid var(--hero-text); outline-offset: 2px; }
.language-picker { position: relative; }
.language-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: max-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 22px #0003;
}

.language-options button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: start;
  cursor: pointer;
}

.language-options button[aria-current="true"] { font-weight: 650; }
.language-options button:hover, .language-options button:focus-visible { background: var(--silver); }

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(590px, 80vh, 780px);
  display: grid;
  align-items: end;
  background: #202525;
  color: var(--hero-text);
}

.hero-scene {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, #1014189e 0%, transparent 23%, transparent 38%, #101418b2 100%),
    linear-gradient(90deg, #15181bb5, #15181b44 47%, transparent 72%);
}

.hero-inner { position: relative; padding: 128px 0 70px; }

.homepage h1 {
  font-size: clamp(46px, 5.35vw, 78px);
  font-weight: 550;
  line-height: 1;
  letter-spacing: -.038em;
}

.homepage:lang(zh-TW) { font-family: "PingFang TC", "Noto Sans TC", system-ui, sans-serif; }
.homepage:lang(ja) { font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; }
.homepage:is(:lang(zh-TW), :lang(ja)) :is(h1, h2) {
  letter-spacing: 0;
  line-height: 1.24;
}
.homepage:is(:lang(zh-TW), :lang(ja)) h2 { text-wrap: balance; }
.homepage:lang(zh-TW) h1 { font-size: clamp(38px, 5vw, 72px); font-weight: 500; }
.homepage:lang(ja) h1 { font-size: clamp(33px, 4.5vw, 65px); font-weight: 500; }

.hero-copy p { margin: 19px 0 23px; max-width: 45ch; color: #f0f1ee; font-size: 17px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }

.homepage .button {
  display: inline-flex;
  align-items: center;
  gap: 17px;
  padding: 12px 15px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.5;
  text-decoration: none;
}

.homepage .button:hover { text-decoration: underline; }
.hero .button { background: #f5f5f2; color: #15181b; }
.hero-secondary { font-size: 14px; color: var(--hero-text); }
.hero a:focus-visible, .masthead a:focus-visible { outline-color: var(--hero-text); }

.replay-band { background: linear-gradient(155deg, var(--bg) 40%, var(--silver)); }
.recording { padding: 44px 0 54px; }
.recording h2 { margin-bottom: 18px; }

.homepage h2 {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.recording-media > a { display: block; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.recording-media img { display: block; width: 100%; height: auto; border-radius: 3px; }
.recording-media figcaption { margin-top: 10px; text-align: right; font-size: 13px; }

.workflow, .contact { border-top: 1px solid var(--line); }
.workflow { display: grid; grid-template-columns: 1fr 2fr; gap: 28px; padding: 32px 0 64px; }
.workflow dl { margin: 0; }
.workflow dl div { display: grid; grid-template-columns: .8fr 1.2fr; gap: 14px; padding: 12px 0; }
.workflow dl div + div { border-top: 1px solid var(--line); }
.workflow dt { font-weight: 550; }
.workflow dd { margin: 0; color: var(--muted); }
.contact { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 34px 0 51px; }
.contact p { margin-top: 8px; color: var(--muted); }
.homepage footer.frame { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 21px 0 36px; color: var(--muted); font-size: 13px; }
.homepage footer p + p { margin-top: 4px; }
.homepage footer nav { font-size: inherit; }

@media (max-width: 1040px) {
  .homepage .frame { width: calc(100% - 64px); }
}

@media (max-width: 740px) {
  .homepage .frame { width: calc(100% - 36px); }
  .homepage .masthead { min-height: 65px; }
  .homepage .masthead .yuzora-wordmark img { width: 140px; }
  .homepage nav { gap: 10px 12px; font-size: 12px; }
  .masthead-actions { gap: 4px; }
  .hero { min-height: 660px; }
  .hero-scene {
    height: 72%;
    object-position: right center;
    mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  }
  .hero::after { background: linear-gradient(180deg, #141820a0, transparent 24%, transparent 32%, #101416ee 79%); }
  .hero-inner { padding: 118px 0 60px; }
  .homepage h1 { font-size: clamp(35px, 8.5vw, 58px); }
  .homepage:lang(zh-TW) h1 { font-size: clamp(31px, 8vw, 54px); }
  .homepage:lang(ja) h1 { font-size: clamp(22px, 6.6vw, 46px); }
  .hero-copy p { margin: 15px 0 17px; font-size: 16px; }
  .hero-actions { gap: 10px 12px; }
  .recording { padding: 27px 0 37px; }
  .homepage footer.frame { flex-direction: column; align-items: flex-start; gap: 8px; }
  .workflow { grid-template-columns: 1fr; gap: 16px; padding-bottom: 42px; }
  .workflow dl div { grid-template-columns: 1fr; gap: 2px; }
  .contact { align-items: flex-start; flex-direction: column; padding-bottom: 34px; }
}

@media (max-width: 520px) {
  .homepage .masthead .yuzora-wordmark img { width: clamp(108px, 34vw, 140px); }
  .masthead-replay { display: none; }
}

@media (max-width: 650px) {
  header, footer { padding-inline: 22px; }
  .legal { padding-inline: 22px; }
}
