:root {
    --color-bg: #f4f6f3;
    --color-surface: #ffffff;
    --color-text: #171a1f;
    --color-muted: #66717d;
    --color-line: #dce2de;
    --color-accent: #1d6f64;
    --color-accent-strong: #174c8f;
    --color-warm: #f4b860;
    --shadow-soft: 0 14px 36px rgba(24, 31, 38, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.site-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid var(--color-line);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
}

.site-brand {
    color: var(--color-text);
    font-weight: 700;
    font-size: 20px;
}

.site-nav ul {
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    color: var(--color-muted);
    font-size: 14px;
}

.home-hero {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    background: #10151a;
    color: #fff;
}

.home-hero__media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 17, 21, 0.9) 0%, rgba(12, 17, 21, 0.58) 48%, rgba(12, 17, 21, 0.2) 100%),
        url("/marmot/マーモット3.png") right 35% center / min(760px, 68vw) auto no-repeat,
        #111820;
}

.home-hero__inner {
    position: relative;
    padding: 86px 0 74px;
}

.home-hero h1,
.page-heading h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
}

.home-hero__lead,
.page-heading p {
    max-width: 720px;
    color: var(--color-muted);
    font-size: 18px;
}

.home-hero__lead {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.78);
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 8px;
    font-weight: 700;
}

.button-primary {
    background: var(--color-warm);
    color: #171a1f;
}

.button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.34);
    color: #fff;
}

.button-primary:hover,
.button-secondary:hover {
    text-decoration: none;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.home-hero .eyebrow {
    color: var(--color-warm);
}

.home-stage {
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    padding: 56px 0;
    position: relative;
    overflow: hidden;
    background: #111820;
}

.home-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../images/hero-rain-city.png") center center / cover no-repeat;
    transform: scaleX(-1);
}

.home-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(244, 246, 243, 0.48) 0%, rgba(244, 246, 243, 0.9) 58%, rgba(244, 246, 243, 0.98) 100%);
}

.home-stage__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1fr);
    gap: 44px;
    align-items: center;
}

.home-stage__copy {
    grid-column: 1;
    grid-row: 1;
}

.home-stage__copy h1 {
    max-width: 620px;
    margin: 0;
    color: var(--color-text);
    font-size: clamp(46px, 6vw, 76px);
    line-height: 1.06;
}

.home-stage__copy p:not(.eyebrow) {
    max-width: 560px;
    margin: 22px 0 0;
    color: #171a1f;
    font-size: 18px;
}

.home-tool-list {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    gap: 16px;
}

.home-tool {
    display: grid;
    grid-template-columns: 170px 1fr;
    min-height: 210px;
    overflow: hidden;
    border: 1px solid rgba(23, 26, 31, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    box-shadow: none;
}

.home-tool__media {
    display: block;
    background: rgba(233, 240, 236, 0.32);
}

.home-tool__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-tool--marmot .home-tool__media img {
    object-position: 8% center;
}

.home-tool__body {
    display: flex;
    flex-direction: column;
    padding: 22px;
}

.home-tool__body p {
    margin: 0 0 8px;
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 700;
}

.home-tool__body h2 {
    margin: 0 0 8px;
    font-size: 25px;
    line-height: 1.25;
}

.home-tool__body span {
    color: var(--color-muted);
}

.home-tool__body a {
    margin-top: auto;
    padding-top: 18px;
    color: var(--color-accent-strong);
    font-weight: 700;
}

.section {
    padding: 56px 0;
}

.section--featured {
    background: var(--color-surface);
}

.section--catalog {
    background: #eef3f1;
}

.section--articles {
    background: var(--color-surface);
}

.section__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section__header h2 {
    margin: 0;
    font-size: 28px;
}

.section__header--stacked {
    display: block;
    max-width: 680px;
}

.section__header--stacked h2 {
    margin-bottom: 8px;
}

.section__header--stacked p:last-child,
.article-layout__intro p {
    color: var(--color-muted);
    margin: 0;
}

.featured-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.featured-tool {
    display: grid;
    grid-template-columns: 180px 1fr;
    min-height: 250px;
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.featured-tool__image {
    display: block;
    min-height: 100%;
    background: #eef3f1;
}

.featured-tool__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-tool__body {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.featured-tool__meta {
    margin: 0 0 10px;
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.featured-tool h3 {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.25;
}

.featured-tool__body p:not(.featured-tool__meta) {
    margin: 0;
    color: var(--color-muted);
}

.featured-tool__link {
    margin-top: auto;
    padding-top: 22px;
    color: var(--color-accent-strong);
    font-weight: 700;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 6px 18px rgba(24, 31, 38, 0.05);
}

.tool-card h2 {
    margin: 0 0 10px;
    font-size: 21px;
}

.tool-card p {
    margin: 0;
    color: var(--color-muted);
}

.tool-card__link {
    margin-top: auto;
    padding-top: 18px;
    font-weight: 700;
}

.post-list {
    display: grid;
    gap: 10px;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(240px, 340px) 1fr;
    gap: 56px;
    align-items: start;
}

.article-layout__intro h2 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.25;
}

.post-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-line);
}

.empty-note {
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #f8faf9;
    color: var(--color-muted);
}

.empty-note p {
    margin: 0;
}

.post-row time {
    color: var(--color-muted);
    font-size: 14px;
}

.page-heading {
    padding: 56px 0 36px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
}

.is-tool-page .page-heading {
    display: none;
}

.is-tool-page .site-header {
    display: none;
}

.is-tool-page .tool-detail__body {
    padding-top: 0;
}

.content {
    max-width: 760px;
}

.entry {
    margin-bottom: 32px;
}

.tool-detail__body {
    padding: 40px 0 64px;
}

.tool-frame {
    margin-bottom: 32px;
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-surface);
}

.embedded-tool {
    display: block;
    width: 100%;
    border: 0;
    background: var(--color-surface);
}

.embedded-tool--marmot {
    min-height: 920px;
}

.embedded-tool--rainmixer {
    min-height: 980px;
}

.is-tool-page .tool-frame {
    padding: 0;
    overflow: hidden;
}

.site-footer {
    border-top: 1px solid var(--color-line);
    background: var(--color-surface);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0;
    color: var(--color-muted);
    font-size: 14px;
}

.site-footer__inner p {
    margin: 0;
}

.footer-nav {
    display: flex;
    gap: 16px;
}

.footer-nav a {
    color: var(--color-muted);
}

.static-page {
    padding: 56px 0 72px;
}

.static-page__content {
    max-width: 760px;
    padding: 32px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-surface);
}

.static-page__content h1 {
    margin: 0 0 22px;
    font-size: 34px;
    line-height: 1.25;
}

.static-page__content h2 {
    margin: 30px 0 10px;
    font-size: 20px;
}

.static-page__content p,
.static-page__content li {
    color: var(--color-muted);
}

.static-page__content p {
    margin: 0 0 14px;
}

@media (max-width: 720px) {
    .site-header__inner,
    .section__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav ul {
        flex-wrap: wrap;
    }

    .home-hero {
        min-height: 390px;
    }

    .home-hero__media {
        background:
            linear-gradient(180deg, rgba(12, 17, 21, 0.94) 0%, rgba(12, 17, 21, 0.74) 100%),
            url("/marmot/マーモット3.png") right -80px bottom -20px / 330px auto no-repeat,
            #111820;
    }

    .home-hero__inner {
        padding: 52px 0;
    }

    .home-stage {
        min-height: auto;
        padding: 42px 0;
    }

    .home-stage::after {
        background: linear-gradient(180deg, rgba(244, 246, 243, 0.98), rgba(244, 246, 243, 0.78));
    }

    .home-stage__inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .home-stage__copy,
    .home-tool-list {
        grid-column: auto;
        grid-row: auto;
    }

    .home-stage__copy {
        padding: 0;
        background: transparent;
        backdrop-filter: none;
    }

    .home-stage__copy p:not(.eyebrow) {
        font-size: 16px;
    }

    .home-tool {
        grid-template-columns: 120px 1fr;
        min-height: 170px;
    }

    .home-tool__body {
        padding: 16px;
    }

    .home-tool__body h2 {
        font-size: 21px;
    }

    .featured-tools,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .featured-tool {
        grid-template-columns: 1fr;
    }

    .featured-tool__image {
        height: 220px;
    }

    .post-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
