:root {
    --color-paper: #e1dcd5; /* hero edges only — sampled from artwork */
    --color-bg: #f7f4ef;
    --color-bg-soft: #efe9e0;
    --color-ink: #1a1a1a;
    --color-ink-muted: #5a5a5a;
    --color-border: #d9d2c7;
    --color-gold: #b08d57;
    --color-hanko: #c23b2a;
    --color-dark: #141414;
    --color-dark-text: #f4efe7;
    --font-serif: "Cormorant Garamond", "Times New Roman", serif;
    --font-sans: "DM Sans", "Helvetica Neue", sans-serif;
    --font-jp: "Hina Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
    --max-width: 1200px;
    --header-height: 5.5rem;
    --space: clamp(1rem, 2vw, 2rem);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--color-ink);
    background-color: var(--color-bg);
    min-height: 100vh;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--color-gold);
}

h1, h2, h3, .serif {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.15;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(247, 244, 239, 0.94);
    border-bottom: 1px solid rgba(217, 210, 199, 0.7);
    backdrop-filter: blur(8px);
}

/* Home: chrome shares the hero paper tone */
body.page-home {
    background-color: var(--color-paper);
}

body.page-home .site-header {
    background: var(--color-paper);
    border-bottom-color: transparent;
    backdrop-filter: none;
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem var(--space);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand:hover {
    color: inherit;
}

.brand__logo {
    height: 3.75rem;
    width: auto;
    border-radius: 0.7rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem 1.1rem;
}

.site-nav a {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--color-ink);
}

.lang-switch {
    display: flex;
    gap: 0.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.lang-switch a {
    color: var(--color-ink-muted);
}

.lang-switch a.is-active {
    color: var(--color-ink);
    font-weight: 600;
}

.lang-switch span {
    color: var(--color-border);
}

.site-main {
    min-height: calc(100vh - 12rem);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.4rem;
    border: 1px solid var(--color-ink);
    background: transparent;
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    background: var(--color-ink);
    color: var(--color-bg);
}

.btn--ghost-light {
    border-color: var(--color-dark-text);
    color: var(--color-dark-text);
}

.btn--ghost-light:hover {
    background: var(--color-dark-text);
    color: var(--color-dark);
}

.section {
    padding: clamp(3rem, 8vw, 6rem) 0;
    background-color: var(--color-bg);
}

body.page-home .section {
    background-color: var(--color-paper);
}

.section__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section__eyebrow,
.eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
}

.section__link {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Home hero: pre-composited full-bleed backgrounds (opaque color extension in the JPEGs).
   Artwork sits on a ::before layer so its opacity can be lowered without fading copy.
   Text readability stays CSS-only via .hero__veil.
   aspect-ratio matches each generated JPEG so the artwork is never cropped:
   hero height grows with viewport width. */
.hero--home {
    --hero-bg-image: url("/image/design/hero/hero-bg-1920.jpg");
    position: relative;
    display: grid;
    background-color: #e1dcd5;
    padding: 0;
    min-height: 0;
    aspect-ratio: 1920 / 882;
}

.hero--home::before {
    content: "";
    grid-area: 1 / 1;
    z-index: 0;
    pointer-events: none;
    opacity: 0.95;
    background-image: var(--hero-bg-image);
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% 100%;
}

@media (max-width: 640px) {
    .hero--home {
        --hero-bg-image: url("/image/design/hero/hero-bg-640.jpg");
        aspect-ratio: 640 / 430;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hero--home {
        --hero-bg-image: url("/image/design/hero/hero-bg-768.jpg");
        aspect-ratio: 768 / 518;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero--home {
        --hero-bg-image: url("/image/design/hero/hero-bg-1024.jpg");
        aspect-ratio: 1024 / 599;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .hero--home {
        --hero-bg-image: url("/image/design/hero/hero-bg-1280.jpg");
        aspect-ratio: 1280 / 738;
    }
}

@media (min-width: 1281px) and (max-width: 1536px) {
    .hero--home {
        --hero-bg-image: url("/image/design/hero/hero-bg-1536.jpg");
        aspect-ratio: 1536 / 796;
    }
}

@media (min-width: 1537px) and (max-width: 1920px) {
    .hero--home {
        --hero-bg-image: url("/image/design/hero/hero-bg-1920.jpg");
        aspect-ratio: 1920 / 882;
    }
}

@media (min-width: 1921px) {
    .hero--home {
        --hero-bg-image: url("/image/design/hero/hero-bg-2560.jpg");
        aspect-ratio: 2560 / 1026;
    }
}

/* CSS-only opacity veil for hero copy (does not alter the generated JPEGs) */
.hero__veil {
    grid-area: 1 / 1;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            0deg,
            rgba(225, 220, 213, 0.45) 0%,
            rgba(225, 220, 213, 0.25) 40%,
            transparent 70%
        ),
        linear-gradient(
            90deg,
            rgba(225, 220, 213, 1) 0%,
            rgba(225, 220, 213, 0.87) 22%,
            rgba(225, 220, 213, 0.55) 40%,
            rgba(225, 220, 213, 0.27) 58%,
            transparent 78%
        );
}

.hero__inner {
    grid-area: 1 / 1;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
    padding-top: clamp(2rem, 5vw, 3.5rem);
    padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.hero__content {
    max-width: 34rem;
}

.hero__content .eyebrow,
.hero__content .hero__intro {
    color: #4a453e;
}

.hero__content .hero__title {
    color: var(--color-ink);
    text-shadow: 0 1px 0 rgba(225, 220, 213, 0.55);
}

.hero__title {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    margin: 0 0 1.25rem;
}

.hero__intro {
    max-width: 34rem;
    margin-bottom: 2rem;
}

/* Japanese: keyed off body[data-locale] because Turbo Drive does not update <html lang>. */
body[data-locale="ja"] {
    --font-serif: var(--font-jp);
    --font-sans: var(--font-jp);
    font-size: 1.1875rem;
    line-height: 1.85;
}

/* Japanese only: enlarge small UI labels (mincho reads smaller than Latin uppercase). */
body[data-locale="ja"] .site-nav a,
body[data-locale="ja"] .section__eyebrow,
body[data-locale="ja"] .eyebrow,
body[data-locale="ja"] .btn,
body[data-locale="ja"] .section__link,
body[data-locale="ja"] .highlight__label,
body[data-locale="ja"] .highlight a,
body[data-locale="ja"] .filters a,
body[data-locale="ja"] .works-search__submit,
body[data-locale="ja"] .nav-toggle {
    font-size: 1rem;
}

body[data-locale="ja"] h1,
body[data-locale="ja"] h2,
body[data-locale="ja"] h3,
body[data-locale="ja"] .serif {
    font-weight: 400;
}

body[data-locale="ja"] .hero--home .hero__title,
body[data-locale="ja"] .hero--home .hero__intro,
body[data-locale="ja"] .hero--home .eyebrow {
    font-family: var(--font-jp);
    letter-spacing: 0.06em;
}

body[data-locale="ja"] .hero--home .hero__title {
    font-weight: 400;
    line-height: 1.35;
    font-size: clamp(2rem, 4.2vw, 3.4rem);
}

body[data-locale="ja"] .hero--home .hero__intro {
    font-weight: 400;
    line-height: 1.85;
}

body[data-locale="ja"] .hero--home .eyebrow {
    font-weight: 400;
    letter-spacing: 0.14em;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero__actions .btn {
    background: rgba(225, 220, 213, 0.55);
    backdrop-filter: blur(2px);
}

.hero__actions .btn:hover {
    background: var(--color-ink);
    color: #e1dcd5;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
}

/* Homepage: keep selected works on a single row */
.works-grid--home {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.work-card__image {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--color-bg-soft);
    margin-bottom: 0.85rem;
}

.work-card__image img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.work-card__title {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 0.35rem;
    font-family: var(--font-sans);
    font-weight: 600;
}

.work-card__meta {
    font-size: 0.8rem;
    color: var(--color-ink-muted);
}

.artist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.artist__image {
    overflow: hidden;
    background: var(--color-bg-soft);
}

.artist__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 28rem;
}

.artist__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin: 0.4rem 0 1.25rem;
}

.artist__bio {
    color: var(--color-ink-muted);
    margin-bottom: 2rem;
}

.credibility {
    text-align: center;
    font-size: clamp(0.85rem, 1.5vw, 1.05rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
    padding: 1rem 0 3rem;
}

.highlights {
    background: var(--color-dark);
    color: var(--color-dark-text);
    padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.highlights__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.highlight__icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(176, 141, 87, 0.5);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--color-gold);
    font-size: 0.85rem;
}

.highlight__label {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(244, 239, 231, 0.65);
    margin-bottom: 0.35rem;
}

.highlight__value {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.highlight__text {
    color: rgba(244, 239, 231, 0.72);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.highlight a {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-gold);
}

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    background: var(--color-bg);
}

body.page-home .site-footer {
    background: var(--color-paper);
}

.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    font-size: 0.8rem;
    color: var(--color-ink-muted);
}

.site-footer__links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.page-header {
    padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem;
}

.page-header h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    margin: 0.4rem 0 0;
}

.prose {
    max-width: 42rem;
}

.prose p {
    color: var(--color-ink-muted);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filters a {
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--color-border);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.filters a.is-active {
    border-color: var(--color-ink);
    background: var(--color-ink);
    color: var(--color-bg);
}

.works-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    max-width: 28rem;
}

.works-search__input {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.works-search__input::placeholder {
    color: var(--color-ink-muted);
}

.works-search__input:focus {
    outline: 1px solid var(--color-ink);
    outline-offset: 2px;
}

.works-search__submit {
    padding: 0.65rem 1rem;
    border: 1px solid var(--color-ink);
    background: var(--color-ink);
    color: var(--color-bg);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
}

.works-search__submit:hover {
    background: transparent;
    color: var(--color-ink);
}

.works-grid__sentinel {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0 0.5rem;
    min-height: 1px;
}

.works-grid__loader {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
}

.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;
}

.detail {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 4rem);
    padding-bottom: 4rem;
}

.detail__meta {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.detail__meta li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.form {
    max-width: 36rem;
    display: grid;
    gap: 1rem;
}

.form--commission {
    max-width: none;
    gap: 1.5rem;
}

.form label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.55);
    font: inherit;
    color: var(--color-ink);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: 1px solid var(--color-gold);
    border-color: var(--color-gold);
}

.form ul {
    margin: 0;
    padding-left: 1rem;
    color: var(--color-hanko);
    font-size: 0.85rem;
}

.form-section {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 1rem;
}

.form-section legend {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    padding: 0;
    margin-bottom: 0.25rem;
    color: var(--color-ink);
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid--2 {
    grid-template-columns: 1fr 1fr;
}

.commission-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.commission-intro__title {
    font-size: 1.8rem;
    margin: 0 0 1.25rem;
}

.commission-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.15rem;
    counter-reset: commission-step;
}

.commission-steps li {
    display: grid;
    gap: 0.25rem;
    padding-left: 2.5rem;
    position: relative;
    counter-increment: commission-step;
}

.commission-steps li::before {
    content: counter(commission-step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.1rem;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--color-gold);
}

.commission-steps__label {
    font-size: 1.05rem;
    font-weight: 500;
}

.commission-steps__text {
    color: var(--color-ink-muted);
    font-size: 0.95rem;
}

.commission-note {
    margin: 1.75rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-ink-muted);
    font-size: 0.92rem;
}

.commission-form-lead {
    margin: 0 0 1.25rem;
    color: var(--color-ink-muted);
    font-size: 0.95rem;
}

.alert {
    padding: 1rem 1.1rem;
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.alert--success {
    border-color: #6f8f6a;
    background: rgba(111, 143, 106, 0.1);
}

.list-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.list-card {
    display: grid;
    gap: 0.75rem;
}

.list-card__image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-bg-soft);
}

.list-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Collections: keep the frame, center the artwork without cropping.
   Height is one third taller than the default 4/3 list-card frame (→ 1/1). */
.list-cards--collections .list-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
}

.list-cards--collections .list-card__image img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.list-card__title {
    font-size: 1.25rem;
    margin: 0;
}

.list-card__meta {
    font-size: 0.85rem;
    color: var(--color-ink-muted);
}

.about-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(2rem, 5vw, 4rem);
    margin-bottom: 3rem;
}

.about-sections {
    display: grid;
    gap: 2.5rem;
}

.about-sections h2 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.about-sections h3 {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    margin: 1.5rem 0 0.6rem;
    color: var(--color-ink);
}

.about-sections h3:first-child {
    margin-top: 0;
}

.reveal-toggle {
    margin-top: 1.25rem;
    padding: 0.65rem 1.1rem;
}

.reveal-panel[hidden],
.reveal-summary[hidden] {
    display: none;
}

.reveal-panel:not([hidden]) {
    animation: reveal-in 0.4s ease both;
}

@keyframes reveal-in {
    from {
        opacity: 0;
        transform: translateY(0.4rem);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.nav-toggle {
    display: none;
    border: 1px solid var(--color-ink);
    background: transparent;
    padding: 0.45rem 0.7rem;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@media (max-width: 960px) {
    .site-header__inner {
        grid-template-columns: 1fr auto;
    }

    .brand__logo {
        height: 3.15rem;
        border-radius: 0.55rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 0.5rem;
    }

    .site-nav.is-open {
        display: flex;
    }

    .hero__veil {
        background:
            linear-gradient(
                180deg,
                rgba(225, 220, 213, 0.45) 0%,
                rgba(225, 220, 213, 0.85) 55%,
                rgba(225, 220, 213, 1) 100%
            );
    }

    .artist,
    .detail,
    .about-layout,
    .highlights__grid,
    .commission-layout {
        grid-template-columns: 1fr;
    }

    .form-grid--2 {
        grid-template-columns: 1fr;
    }

    .works-grid:not(.works-grid--home) {
        grid-template-columns: repeat(2, 1fr);
    }

    .works-grid--home {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }

    .works-grid--home .work-card {
        flex: 0 0 min(42vw, 11.5rem);
        scroll-snap-align: start;
    }

    .lang-switch {
        justify-self: end;
    }
}

@media (max-width: 640px) {
    .works-grid:not(.works-grid--home) {
        grid-template-columns: 1fr;
    }

    .works-grid--home .work-card {
        flex-basis: min(58vw, 12.5rem);
    }

    .artist__image img {
        min-height: 18rem;
    }
}
