:root {
    --paper: #f4f1ea;
    --paper-light: #faf8f3;
    --ink: #20201e;
    --muted: #77736d;
    --faint: #aaa49a;
    --line: #d8d2c7;
    --accent: #a64032;
    --max-width: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: linear-gradient(rgba(68, 62, 53, .025) 1px, transparent 1px), var(--paper);
    background-size: 100% 8px;
    font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.site-header {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 10;
    display: flex;
    width: min(calc(100% - 48px), var(--max-width));
    height: 92px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    transform: translateX(-50%);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__seal {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    background: var(--accent);
    color: var(--paper-light);
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
    font-size: 16px;
    line-height: 1;
}
.brand__text { font-family: Georgia, "Times New Roman", serif; font-size: 17px; letter-spacing: .04em; }
.site-nav { display: flex; gap: 36px; font-size: 15px; }
.site-nav a { display: flex; align-items: center; gap: 8px; transition: color 180ms ease; }
.site-nav a span { color: var(--accent); font-family: Georgia, serif; font-size: 15px; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--accent); }
.auth-link b { font-weight: 400; }
.auth-link.is-authenticated::after { width: 5px; height: 5px; margin-left: 1px; border-radius: 50%; background: var(--accent); content: ""; }

.hero {
    position: relative;
    display: grid;
    width: min(calc(100% - 48px), var(--max-width));
    min-height: 100svh;
    margin: 0 auto;
    grid-template-columns: minmax(300px, .9fr) minmax(360px, 1.1fr);
    align-items: center;
    gap: clamp(64px, 10vw, 150px);
    padding: 140px 70px 90px;
}
.hero__rule { position: absolute; top: 92px; bottom: 0; left: 0; width: 1px; background: var(--line); }
.kicker, .section-label p, .app-row small {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .22em;
}
.hero h1, .section h2 { font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif; font-weight: 500; }
.hero h1 { margin: 24px 0 0; font-size: clamp(62px, 8vw, 112px); letter-spacing: -.07em; line-height: 1; }
.hero h1 span { color: var(--accent); font-size: .48em; letter-spacing: -.02em; }
.hero__english { margin: 18px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(18px, 2vw, 25px); font-style: italic; letter-spacing: .04em; }
.hero__intro { margin: 38px 0 0; color: var(--muted); font-size: 15px; line-height: 2; }
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    margin-top: 40px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--ink);
    font-size: 15px;
    transition: color 180ms ease, border-color 180ms ease, gap 180ms ease;
}
.text-link:hover, .text-link:focus-visible { gap: 28px; border-color: var(--accent); color: var(--accent); }

.identity-panel {
    position: relative;
    width: min(100%, 500px);
    aspect-ratio: 1.2;
    justify-self: end;
    overflow: hidden;
    border: 1px solid var(--ink);
    background: var(--paper-light);
}
.identity-panel::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 31%;
    width: 1px;
    background: var(--line);
    content: "";
}
.identity-panel::after {
    position: absolute;
    right: -12%;
    bottom: -24%;
    width: 58%;
    aspect-ratio: 1;
    border: 1px solid var(--accent);
    border-radius: 50%;
    content: "";
}
.identity-panel__caption {
    position: absolute;
    top: 26px;
    left: 24px;
    margin: 0;
    color: var(--muted);
    font-family: Georgia, serif;
    font-size: 15px;
    letter-spacing: .16em;
    line-height: 1.8;
}
.identity-panel__characters {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: baseline;
    transform: translate(-42%, -52%);
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
    line-height: 1;
}
.identity-panel__characters span:first-child { font-size: clamp(112px, 14vw, 184px); }
.identity-panel__characters span:last-child { margin-left: -12px; color: transparent; font-size: clamp(72px, 9vw, 118px); -webkit-text-stroke: 1px var(--accent); }
.identity-panel__seal {
    position: absolute;
    top: 24px;
    right: 24px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
    font-size: 15px;
}
.identity-panel__note {
    position: absolute;
    right: 24px;
    bottom: 24px;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
    font-size: 15px;
    letter-spacing: .18em;
    line-height: 2;
    writing-mode: vertical-rl;
}
.hero__vertical { position: absolute; top: 136px; right: 0; margin: 0; color: var(--faint); font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif; font-size: 15px; letter-spacing: .2em; writing-mode: vertical-rl; }
.scroll-mark { position: absolute; bottom: 32px; left: 70px; display: flex; align-items: center; gap: 14px; color: var(--faint); font-family: Georgia, serif; font-size: 15px; letter-spacing: .2em; }
.scroll-mark i { display: block; width: 42px; height: 1px; background: linear-gradient(90deg, var(--accent) 35%, var(--line) 35%); }

.section {
    display: grid;
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    grid-template-columns: 120px 1fr;
    gap: 50px;
    padding: 132px 70px;
    border-top: 1px solid var(--line);
}
.section-label { display: flex; align-items: flex-start; gap: 14px; }
.section-label > span { color: var(--accent); font-family: Georgia, serif; font-size: 15px; }
.section-label p { padding-top: 2px; writing-mode: vertical-rl; }
.jp-note { margin: 0 0 12px; color: var(--accent); font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif; font-size: 15px; letter-spacing: .25em; }
.section h2 { margin: 0; font-size: clamp(40px, 5.4vw, 72px); letter-spacing: -.04em; line-height: 1.25; }
.about__detail { display: grid; margin-top: 54px; grid-template-columns: minmax(0, 1fr) 220px; gap: 80px; }
.about__detail > p { max-width: 560px; margin: 0; color: var(--muted); font-size: 16px; line-height: 2.1; }
.about__detail ul { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.about__detail li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; }

.apps { background: var(--paper-light); border-bottom: 1px solid var(--line); }
.apps__heading > p:last-child { margin: 20px 0 0; color: var(--muted); font-size: 15px; }
.app-list { margin-top: 64px; border-top: 1px solid var(--ink); }
.app-row {
    display: grid;
    min-height: 128px;
    grid-template-columns: 56px minmax(190px, 1fr) minmax(180px, 1fr) 36px;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    transition: background-color 220ms ease, padding 220ms ease;
}
.app-row:hover, .app-row:focus-visible { padding: 0 16px; background: var(--paper); outline: none; }
.app-row__index { color: var(--accent); font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif; font-size: 15px; }
.app-row__title { display: flex; flex-direction: column; font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif; font-size: 25px; }
.app-row small { margin-top: 2px; font-family: Georgia, serif; font-size: 15px; }
.app-row__desc { color: var(--muted); font-size: 15px; }
.app-row__arrow { color: var(--faint); font-size: 19px; transition: color 180ms ease, transform 180ms ease; }
.app-row:hover .app-row__arrow, .app-row:focus-visible .app-row__arrow { color: var(--accent); transform: translate(3px, -3px); }

.site-footer {
    display: grid;
    width: min(calc(100% - 48px), var(--max-width));
    min-height: 180px;
    margin: 0 auto;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 30px;
    color: var(--muted);
    font-size: 15px;
}
.site-footer > div { display: flex; align-items: center; gap: 14px; }
.site-footer p { margin: 0; }
.site-footer small { color: var(--faint); font-family: Georgia, serif; }
.site-footer > a { justify-self: end; transition: color 180ms ease; }
.site-footer > a:hover, .site-footer > a:focus-visible { color: var(--accent); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.22, .68, .2, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
.app-row:nth-child(2) { transition-delay: 70ms; }
.app-row:nth-child(3) { transition-delay: 140ms; }
.app-row:nth-child(4) { transition-delay: 210ms; }

@media (max-width: 880px) {
    .hero { min-height: auto; grid-template-columns: 1fr; gap: 70px; padding: 160px 54px 110px; }
    .hero__copy { max-width: 620px; }
    .identity-panel { width: min(100%, 560px); justify-self: center; }
    .hero__vertical, .scroll-mark { display: none; }
    .section { grid-template-columns: 70px 1fr; padding: 110px 54px; }
    .about__detail { grid-template-columns: 1fr; gap: 40px; }
    .app-row { grid-template-columns: 42px 1fr 36px; }
    .app-row__desc { display: none; }
}

@media (max-width: 560px) {
    .site-header, .hero, .section, .site-footer { width: min(calc(100% - 32px), var(--max-width)); }
    .site-header { height: 76px; }
    .site-nav { gap: 18px; }
    .site-nav a span { display: none; }
    .hero { padding: 128px 26px 88px; }
    .hero__rule { top: 76px; }
    .hero h1 { font-size: clamp(56px, 18vw, 82px); }
    .section { display: block; padding: 88px 26px; }
    .section-label { margin-bottom: 40px; }
    .section-label p { writing-mode: initial; }
    .app-list { margin-top: 46px; }
    .app-row { min-height: 112px; grid-template-columns: 34px 1fr 24px; gap: 10px; }
    .app-row__title { font-size: 22px; }
    .site-footer { min-height: 240px; grid-template-columns: 1fr; align-content: center; gap: 22px; }
    .site-footer > a { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
