:root {
    --paper: #f4efe3;
    --paper-deep: #e7dcc8;
    --ink: #2d2922;
    --muted: #6f685c;
    --line: rgba(45, 41, 34, 0.14);
    --terracotta: #b76b35;
    --moss: #6f7f3d;
    --water: #8ebfc1;
    --white: #fffaf0;
    --font-sans: 'Inter', 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(45, 41, 34, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(45, 41, 34, 0.028) 1px, transparent 1px),
        var(--paper);
    background-size: 44px 44px;
    font-family: var(--font-sans);
    line-height: 1.8;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

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

button {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 239, 227, 0.88);
    backdrop-filter: blur(18px);
}

.site-nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0 clamp(20px, 4vw, 64px);
}

.brand {
    width: 124px;
    flex: 0 0 auto;
}

.brand img {
    width: 100%;
    height: auto;
}

.quiet-link,
.text-link {
    position: relative;
}

.quiet-link::after,
.text-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.quiet-link:hover::after,
.text-link:hover::after {
    transform: scaleX(1);
}

.quiet-link {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    margin-left: auto;
}

.hero {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    align-items: stretch;
    border-bottom: 1px solid var(--line);
}

.hero-media {
    min-height: 520px;
    overflow: hidden;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 32% center;
}

.hero-copy {
    min-height: 520px;
    padding: clamp(40px, 7vw, 96px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--line);
    background:
        radial-gradient(circle at 75% 20%, rgba(142, 191, 193, 0.22), transparent 30%),
        linear-gradient(180deg, rgba(255, 250, 240, 0.7), rgba(231, 220, 200, 0.38));
}

.eyebrow,
.section-kicker,
.meta {
    margin: 0 0 14px;
    color: var(--moss);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(4.4rem, 8.7vw, 8.4rem);
    line-height: 0.96;
    font-weight: 600;
}

.lead {
    max-width: 380px;
    margin: 34px 0 0;
    color: var(--muted);
    font-size: clamp(1.1rem, 1.8vw, 1.45rem);
    font-weight: 500;
}

.hero-links {
    width: min(1120px, calc(100% - 40px));
    margin: clamp(30px, 4vw, 46px) auto 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hero-links a {
    position: relative;
    min-height: 176px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    border: 1px solid var(--line);
    background: var(--paper-deep);
}

.hero-links img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 34% center;
    transition: transform 220ms ease;
}

.hero-links a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(45, 41, 34, 0.06), rgba(244, 239, 227, 0.82) 58%, rgba(244, 239, 227, 0.95));
}

.hero-links a:hover img {
    transform: scale(1.025);
}

.hero-links span {
    position: relative;
    z-index: 1;
    margin-left: auto;
    padding: 22px;
    display: grid;
    gap: 4px;
    color: var(--ink);
    font-size: clamp(1.15rem, 2.1vw, 1.8rem);
    line-height: 1.1;
    font-weight: 700;
    text-align: right;
}

.hero-links small {
    color: var(--moss);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.about-niwapa {
    width: min(820px, calc(100% - 40px));
    margin: clamp(46px, 7vw, 76px) auto 0;
    text-align: center;
}

.about-niwapa h2 {
    margin: 0 0 18px;
    font-size: clamp(1.65rem, 3vw, 2.5rem);
    line-height: 1.25;
    font-weight: 500;
}

.about-niwapa p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.6vw, 1.16rem);
}

.about-niwapa-link {
    display: inline-block;
    margin-top: 18px;
}

.gallery-section {
    width: min(1120px, calc(100% - 40px));
    margin: clamp(58px, 8vw, 96px) auto 0;
}

.gallery-head {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.gallery-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    line-height: 1;
    font-weight: 500;
}

.gallery-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.gallery-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 31%);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.gallery-strip figure {
    margin: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--paper-deep);
    scroll-snap-align: start;
}

.gallery-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.gallery-strip figure:hover img {
    transform: scale(1.025);
}

.note-page {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.note-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4.6vw, 4.5rem);
    line-height: 1.15;
    font-weight: 500;
}

.note-body p {
    color: var(--muted);
}

.text-link {
    color: var(--terracotta);
    font-weight: 700;
    white-space: nowrap;
}

.site-footer {
    margin-top: 56px;
    padding: 26px 40px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.76rem;
}

.site-footer p {
    margin: 0;
}

.note-page {
    padding: 52px 0 120px;
}

.note-hero {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    min-height: clamp(220px, 30vw, 350px);
    padding: clamp(36px, 7vw, 84px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background:
        linear-gradient(rgba(244, 239, 227, 0.2), rgba(244, 239, 227, 0.2)),
        url("../images/about-paper-texture.png") center / cover no-repeat;
}

.note-body {
    margin-top: 70px;
    display: grid;
    gap: 42px;
    max-width: 800px;
    margin-inline: auto;
}

.note-body article {
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.note-body .origin-story {
    display: grid;
    grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
    align-items: center;
    gap: clamp(28px, 5vw, 56px);
}

.origin-story-media {
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--white);
}

.origin-story-media img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: clamp(18px, 3vw, 30px);
}

.note-body h2 {
    margin: 0 0 14px;
    font-size: clamp(1.4rem, 2.6vw, 2.2rem);
    font-weight: 500;
}

.note-body p {
    margin: 0 0 16px;
}

.back-home {
    margin: clamp(58px, 8vw, 92px) auto 0;
    display: flex;
    justify-content: center;
}

.back-home-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 12px 24px 12px 12px;
    border: 1px solid var(--line);
    background: rgba(255, 250, 240, 0.72);
    color: var(--ink);
    font-weight: 700;
    transition: transform 180ms ease, background 180ms ease;
}

.back-home-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 250, 240, 0.95);
}

.back-home-button img {
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.back-home-button span {
    font-size: clamp(1rem, 1.5vw, 1.16rem);
}

@media (max-width: 900px) {
    .site-nav {
        min-height: 66px;
        gap: 16px;
    }

    .brand {
        width: 108px;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-media,
    .hero-copy {
        min-height: auto;
    }

    .hero-media {
        height: 58vh;
        min-height: 390px;
    }

    .hero-media img {
        object-position: 24% center;
    }

    .hero-copy {
        padding: 42px 24px 56px;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .note-body .origin-story {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .origin-story-media {
        max-width: 360px;
    }

}

@media (max-width: 560px) {
    .site-nav {
        padding-inline: 14px;
    }

    .quiet-link {
        display: none;
    }

    .hero h1 {
        font-size: clamp(3.5rem, 18vw, 4.8rem);
    }

    .hero-links,
    .about-niwapa,
    .gallery-section,
    .note-page {
        width: min(100% - 28px, 1120px);
    }

    .hero-links {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hero-links a {
        min-height: 150px;
    }

    .hero-links span {
        padding: 18px;
    }

    .hero-media {
        height: 56vh;
        min-height: 360px;
    }

    .hero-media img {
        object-position: 18% center;
    }

    .hero-links a::after {
        background: linear-gradient(90deg, rgba(45, 41, 34, 0.04), rgba(244, 239, 227, 0.78) 52%, rgba(244, 239, 227, 0.96));
    }

    .gallery-head {
        align-items: start;
        flex-direction: column;
        gap: 8px;
    }

    .gallery-strip {
        grid-auto-columns: minmax(236px, 78%);
    }

    .back-home-button {
        width: 100%;
        justify-content: center;
    }
}
