/* トップページ（index.html）専用 */

:root {
    --bg: #000;
    --ink: #fff;
    --ash: #8a8f97;
    --smoke: #141518;
    --smoke-hover: #1d1f23;
    --line: #2a2c31;

    /* ロゴと同じく、左上と右下を大きく、右上と左下を小さく丸める */
    --shape-md: 26px 8px 26px 8px;

    --display: "Quicksand", "Zen Maru Gothic", sans-serif;
    --text: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;

    color-scheme: dark;
}

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

.home {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--text);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.8;
    -webkit-text-size-adjust: 100%;
}

:where(.home) :is(h1, h2, h3, p, ul) {
    margin: 0;
}

:where(.home) ul {
    padding: 0;
    list-style: none;
}

:where(.home) a {
    color: inherit;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

:where(.home) a:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 4px;
}

.wrap {
    width: min(100% - 32px, 1120px);
    margin-inline: auto;
}

/* 上の帯 */

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 20px;
}

.bar-mark {
    display: block;
    width: 32px;
    height: auto;
}

.bar-links {
    display: flex;
    gap: 8px;
}

.bar-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px 0 14px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    font-family: var(--display);
    font-weight: 600;
    line-height: 1;
}

.bar-link svg {
    width: 18px;
    height: 18px;
}

/* 名前を大きく */

.hero {
    padding-block: clamp(48px, 10vw, 128px) clamp(56px, 9vw, 112px);
}

.hero-logo svg {
    display: block;
    width: 100%;
    height: auto;
}

.hero-lead {
    max-width: 30em;
    margin-top: clamp(24px, 4vw, 44px);
    font-size: clamp(1.0625rem, 2.2vw, 1.5rem);
    line-height: 1.7;
    text-wrap: pretty;
    word-break: auto-phrase;
}

@media (prefers-reduced-motion: no-preference) {
    .hero-logo svg {
        animation: rise 900ms ease-out both;
    }

    .hero-lead {
        animation: rise 900ms ease-out 150ms both;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* セクション */

.block + .block {
    margin-top: clamp(80px, 12vw, 144px);
}

.block-title {
    margin-bottom: clamp(24px, 4vw, 40px);
    font-family: var(--display);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    line-height: 1;
}

/* アプリ一覧（ジャケットを並べるように） */

.works {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 16px;
}

@media (min-width: 900px) {
    .works {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 40px 24px;
    }
}

.work-main {
    display: block;
}

.work-cover {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 22.5%;
    transition: transform 200ms ease-out;
}

.work-name {
    margin-top: 16px;
    font-family: var(--display);
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 700;
    line-height: 1.3;
}

.work-desc {
    margin-top: 4px;
    color: var(--ash);
    font-size: 0.875rem;
    line-height: 1.6;
    /* 言葉の途中で折り返さず、<wbr> の位置で折り返す */
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.work-date {
    margin-top: 4px;
    font-family: var(--display);
    font-weight: 600;
    color: var(--ash);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.work-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 12px;
}

.work-links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

/* Web */

.webs {
    display: grid;
    gap: 12px;
}

@media (min-width: 720px) {
    .webs {
        grid-template-columns: 1fr 1fr;
    }
}

.web {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    padding: 22px 22px 22px 28px;
    border-radius: var(--shape-md);
    background: var(--smoke);
}

.web-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.web-name {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.5;
}

.web-desc {
    color: var(--ash);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.web-arrow {
    flex: none;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--ash);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.web:active {
    background: var(--smoke-hover);
}

@media (hover: hover) {
    .bar-link:hover {
        border-color: var(--ink);
    }

    .work-main:hover .work-cover {
        transform: translateY(-4px);
    }

    .work-links a:hover {
        border-color: var(--ink);
    }

    .web:hover {
        background: var(--smoke-hover);
    }
}

/* フッター */

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: clamp(96px, 14vw, 160px);
    padding-block: 28px 40px;
    border-top: 1px solid var(--line);
    color: var(--ash);
    font-size: 0.8125rem;
}

.footer-mark {
    display: block;
    width: 24px;
    height: auto;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 連絡先：押すとメールアドレスが出る */
.mail-button,
.mail-address {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    touch-action: manipulation;
}

.mail-button:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 4px;
}

@media (hover: hover) {
    .mail-button:hover,
    .mail-address:hover {
        color: var(--ink);
    }
}

@media (prefers-reduced-motion: reduce) {
    .work-cover {
        transition: none;
    }

    .work-main:hover .work-cover {
        transform: none;
    }
}
