:root {
    --bg: #f7f4ef;
    --bg-soft: #efe7dc;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #697586;
    --border: rgba(31, 41, 51, 0.12);
    --red: #c94732;
    --blue: #1e2a3a;
    --green: #6b8f71;
    --pink: #c8798a;
    --shadow: 0 20px 60px rgba(31, 41, 51, 0.10);
    --radius: 28px;
    --container: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

p {
    margin: 0 0 1rem;
}

h1, h2, h3 {
    line-height: 1.12;
    margin: 0 0 1rem;
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.1rem);
}

h3 {
    font-size: 1.55rem;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.narrow {
    width: min(100% - 32px, 820px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: var(--text);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text small {
    color: var(--muted);
    margin-top: 3px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 650;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--card);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(31, 41, 51, 0.08);
}

.menu-toggle {
    display: none;
    border: 0;
    background: var(--card);
    border-radius: 14px;
    width: 44px;
    height: 44px;
    padding: 11px;
    box-shadow: 0 8px 24px rgba(31, 41, 51, 0.08);
}

.menu-toggle span:not(.sr-only) {
    display: block;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
}

.hero {
    padding: 92px 0 56px;
}

.hero-grid,
.project-detail-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 32px;
    align-items: center;
}

.hero-content,
.page-hero .container {
    max-width: 860px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 850;
}

.hero-text,
.page-hero p,
.section-heading p,
.split p {
    font-size: 1.16rem;
    color: var(--muted);
    max-width: 720px;
}

.hero-actions,
.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.btn.primary {
    background: var(--text);
    color: white;
}

.btn.secondary {
    background: var(--card);
    color: var(--text);
    border-color: var(--border);
}

.btn.small {
    min-height: 42px;
    padding: 0 16px;
    font-size: 0.92rem;
}

.btn:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-card {
    background: var(--text);
    color: white;
    border-radius: var(--radius);
    padding: 34px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: -35% -25% auto auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(201, 71, 50, 0.5);
}

.hero-card-label {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.hero-card strong {
    font-size: 5rem;
    line-height: 1;
    letter-spacing: -0.06em;
}

.hero-card p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.78);
}

.section {
    padding: 72px 0;
}

.section.soft {
    background: var(--bg-soft);
}

.section-heading {
    margin-bottom: 32px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.project-card,
.project-row,
.content-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.project-card {
    overflow: hidden;
    transition: 0.2s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card.featured {
    grid-column: span 1;
}

.project-image {
    aspect-ratio: 16 / 10;
    background: var(--bg-soft);
    overflow: hidden;
}

.project-image img,
.project-row-image img,
.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-body {
    padding: 24px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-meta span,
.chips span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.text-link {
    color: var(--text);
    font-weight: 850;
    transition: 0.2s ease;
}

.text-link.external::after {
    content: ' ↗';
}

.color-red {
    --accent: var(--red);
}

.color-blue {
    --accent: var(--blue);
}

.color-pink {
    --accent: var(--pink);
}

.color-green {
    --accent: var(--green);
}

.color-red .project-meta span:first-child,
.color-blue .project-meta span:first-child,
.color-pink .project-meta span:first-child,
.color-green .project-meta span:first-child {
    background: color-mix(in srgb, var(--accent) 13%, white);
    color: var(--accent);
}

.split {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 42px;
    align-items: start;
}

.page-hero {
    padding: 82px 0 34px;
}

.projects-list {
    display: grid;
    gap: 24px;
}

.project-row {
    display: grid;
    grid-template-columns: 360px 1fr;
    overflow: hidden;
}

.project-row-image {
    min-height: 280px;
    background: var(--bg-soft);
}

.project-row-content {
    padding: 34px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.project-detail-hero {
    padding: 74px 0 54px;
}

.detail-image {
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card);
}

.detail-content {
    display: grid;
    gap: 22px;
    width: min(100% - 32px, 900px);
}

.content-card {
    padding: 32px;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.check-list li {
    position: relative;
    padding-left: 30px;
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--text);
    color: white;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 900;
}

.info-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.info-list dt {
    font-weight: 850;
}

.info-list dd {
    margin: 0;
    color: var(--muted);
}

.info-list a,
.mail-link {
    color: var(--red);
    font-weight: 800;
}

.text-page p {
    font-size: 1.05rem;
    color: var(--muted);
}

.contact-grid {
    align-items: start;
}

.contact-aside {
    background: var(--text);
    color: white;
}

.contact-aside p {
    color: rgba(255, 255, 255, 0.78);
}

.contact-aside .mail-link {
    color: white;
}

.contact-form {
    display: grid;
    gap: 18px;
}

.form-field {
    display: grid;
    gap: 8px;
}

label {
    font-weight: 800;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 16px;
    font: inherit;
    background: #fff;
    color: var(--text);
}

input:focus,
textarea:focus {
    outline: 3px solid rgba(201, 71, 50, 0.18);
    border-color: var(--red);
}

.hidden-field {
    position: absolute;
    left: -9999px;
}

.alert {
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 18px;
    font-weight: 700;
}

.alert p {
    margin: 0;
}

.alert.success {
    background: rgba(107, 143, 113, 0.16);
    color: #315d39;
}

.alert.error {
    background: rgba(201, 71, 50, 0.13);
    color: #8a2e20;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-inner p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 10px;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 86px;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 22px;
        padding: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        box-shadow: var(--shadow);
    }

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

    .main-nav a {
        padding: 13px 14px;
    }

    .hero-grid,
    .project-detail-grid,
    .contact-grid,
    .split,
    .project-row {
        grid-template-columns: 1fr;
    }

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

    .project-row-image {
        min-height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 560px) {
    .brand-text small {
        display: none;
    }

    .hero,
    .page-hero,
    .project-detail-hero {
        padding-top: 52px;
    }

    .section {
        padding: 52px 0;
    }

    .content-card,
    .project-row-content,
    .project-body {
        padding: 22px;
    }

    .info-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}

.language-switcher a {
    padding: 8px 10px;
    font-size: 0.82rem;
    line-height: 1;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 800;
}

.language-switcher a:hover,
.language-switcher a.active {
    background: var(--text);
    color: white;
    box-shadow: none;
}

html[lang="ja"] body {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, Inter, ui-sans-serif, system-ui, sans-serif;
}

html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3 {
    letter-spacing: -0.015em;
    line-height: 1.22;
}

html[lang="ja"] .eyebrow {
    letter-spacing: 0.08em;
}

@media (max-width: 820px) {
    .language-switcher {
        width: 100%;
        margin: 8px 0 0;
        padding: 10px 0 0;
        border-left: 0;
        border-top: 1px solid var(--border);
        justify-content: flex-start;
    }
}
