:root {
    --color-bg: #f8f6f2;
    --color-bg-deep: #ebe8e2;
    --color-text: #2c2a26;
    --color-text-muted: #6b6560;
    --color-accent: #8b7355;
    --color-light: rgba(255, 252, 248, 0.6);
    --font-serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.9;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.is-loading { overflow: hidden; }

/* Loader */
.loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--color-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease;
}
.loader__bar {
    width: 0;
    height: 1px;
    background: var(--color-accent);
}

/* Header */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    padding: 32px 5%;
}
.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: var(--color-text);
}
.logo__en {
    font-size: 0.75em;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 0.25em;
}
.nav__list {
    display: flex;
    list-style: none;
    gap: 2.5em;
}
.nav__list a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}
.nav__list a:hover,
.nav__list a.is-active { color: var(--color-text); }

/* Hero */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 8% 80px;
}
.hero__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.hero__light {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
}
.hero__light--1 {
    width: 60vmin;
    height: 60vmin;
    background: var(--color-accent);
    top: 10%;
    right: 10%;
}
.hero__light--2 {
    width: 40vmin;
    height: 40vmin;
    background: var(--color-bg-deep);
    bottom: 20%;
    left: 5%;
}
.hero__vertical {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.hero__vertical--l { left: 8%; }
.hero__vertical--r { right: 8%; }
.hero__vertical-text {
    writing-mode: vertical-rl;
    font-size: clamp(0.85rem, 2vw, 1rem);
    font-weight: 300;
    letter-spacing: 0.3em;
    color: var(--color-text-muted);
    opacity: 0.5;
}
.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 720px;
}
/* 初期は非表示。表示は GSAP で制御 */
.hero__content .hero__label,
.hero__content .hero__title,
.hero__content .hero__lead {
    opacity: 0;
}
.hero__label {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    font-weight: 500;
}
.hero__title {
    font-size: clamp(2.25rem, 8vw, 4.5rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
}
.hero__title-sub {
    display: block;
    font-size: 0.45em;
    font-weight: 400;
    letter-spacing: 0.15em;
    margin-top: 0.15em;
}
.hero__lead {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--color-text-muted);
    font-weight: 400;
    line-height: 2.2;
}
.hero__scroll {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.hero__scroll-line {
    display: block;
    width: 1px;
    height: 48px;
    background: var(--color-text-muted);
    opacity: 0.4;
}
.hero__scroll-text {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
}

/* Sections */
.section { padding: 160px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }

/* Philosophy */
.philosophy__grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 80px;
    align-items: start;
}
.philosophy__side--vertical {
    position: sticky;
    top: 160px;
}
.philosophy__vertical-text {
    writing-mode: vertical-rl;
    font-size: 0.9rem;
    letter-spacing: 0.25em;
    color: var(--color-text-muted);
    opacity: 0.6;
}
.philosophy__num {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}
.philosophy__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 40px;
    letter-spacing: 0.02em;
}
.philosophy__text {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 2.2;
    max-width: 42em;
}

/* Works */
.works__full {
    height: 70vh;
    min-height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 120px;
}
.works__bg {
    position: absolute;
    inset: -20%;
    background: linear-gradient(165deg, var(--color-bg-deep) 0%, var(--color-bg) 50%);
    background-size: 200% 200%;
}
.works__content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.works__label {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}
.works__title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
}
.works__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.works__card {
    border: 1px solid rgba(44, 42, 38, 0.08);
    background: var(--color-bg);
    transition: border-color 0.4s, box-shadow 0.4s;
}
.works__card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(44, 42, 38, 0.06);
}
.works__card-inner {
    padding: 48px 32px;
}
.works__card-num {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}
.works__card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}
.works__card-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* Contact section */
.contact__header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 64px;
}
.contact__label {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}
.contact__title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 24px;
}
.contact__lead {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 2;
}

/* Contact form */
.contact-form {
    max-width: 640px;
    margin: 0 auto;
}
.contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.form-group {
    margin-bottom: 28px;
}
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--color-text);
    margin-bottom: 10px;
}
.form-required {
    font-size: 0.7rem;
    color: var(--color-accent);
    margin-left: 4px;
}
.form-input {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid rgba(44, 42, 38, 0.15);
    border-radius: 2px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.12);
}
.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6560' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}
.form-textarea {
    min-height: 160px;
    resize: vertical;
}
.contact-form__note {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 32px;
    opacity: 0.8;
}
.contact-form__submit {
    text-align: center;
}
.form-submit {
    display: inline-block;
    padding: 16px 56px;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-bg);
    background: var(--color-text);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}
.form-submit:hover {
    background: var(--color-accent);
    color: var(--color-bg);
    transform: translateY(-2px);
}
.contact-form-success {
    display: none;
    max-width: 480px;
    margin: 0 auto;
    padding: 48px 32px;
    text-align: center;
    background: var(--color-bg-deep);
    border: 1px solid rgba(44, 42, 38, 0.08);
    border-radius: 2px;
}
.contact-form-success.is-visible {
    display: block;
}
.contact-form-success__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}
.contact-form-success__text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.9;
}
.contact-form.is-hidden {
    display: none;
}

/* Works card as link */
.works__card--link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.works__card--link:hover .works__card-title {
    color: var(--color-accent);
}
.works__card-more {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--color-accent);
}
.works__all {
    text-align: center;
    margin-top: 48px;
}
.works__all a {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--color-text);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--color-text-muted);
    transition: color 0.3s, border-color 0.3s;
}
.works__all a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* Page: Works（事例一覧） */
.page-works {
    padding: 140px 0 120px;
}
.page-works__header {
    text-align: center;
    margin-bottom: 80px;
}
.page-works__label {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}
.page-works__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}
.page-works__lead {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 2;
}
.work-detail {
    padding: 64px 0;
    border-top: 1px solid rgba(44, 42, 38, 0.08);
}
.work-detail:first-of-type { border-top: none; }
.work-detail__inner {
    max-width: 640px;
}
.work-detail__num {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}
.work-detail__title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}
.work-detail__category {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}
.work-detail__desc {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 2;
}
.work-detail__image {
    margin-bottom: 32px;
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--color-bg-deep);
}
.work-detail__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.page-works__footer-link {
    text-align: center;
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid rgba(44, 42, 38, 0.08);
}
.page-works__footer-link a {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--color-text);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--color-text-muted);
    transition: color 0.3s, border-color 0.3s;
}
.page-works__footer-link a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

@media (max-width: 768px) {
    .page-works { padding: 100px 0 80px; }
    .page-works__header { margin-bottom: 48px; }
    .work-detail { padding: 48px 0; }
    .work-detail__image { margin-bottom: 24px; }
}

body.is-embed .page-works { padding: 120px 0 80px; }
body.is-embed .page-works__header { margin-bottom: 48px; }
body.is-embed .work-detail { padding: 40px 0; }
body.is-embed .work-detail__image { margin-bottom: 24px; }

/* Footer */
.footer {
    padding: 80px 0 48px;
    border-top: 1px solid rgba(44, 42, 38, 0.08);
}
.footer__inner {
    text-align: center;
}
.footer__logo {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}
.footer__logo span { opacity: 0.7; }
.footer__copy {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 1024px) {
    .philosophy__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .philosophy__side--vertical { position: static; }
    .philosophy__vertical-text { writing-mode: horizontal-tb; }
    .works__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .contact-form__row { grid-template-columns: 1fr; }
    .header { padding: 20px 5%; }
    .header__inner {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    .logo { font-size: 1.25rem; }
    .nav__list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1em 2em;
    }
    .nav__list a { font-size: 0.85rem; }
    .hero {
        min-height: 100vh;
        padding: 100px 5% 60px;
        min-height: 100svh;
    }
    .hero__vertical { display: none; }
    .hero__title { margin-bottom: 16px; }
    .hero__lead { font-size: 0.95rem; }
    .hero__scroll { bottom: 32px; }
    .section { padding: 80px 0; }
    .philosophy__title { margin-bottom: 28px; }
    .philosophy__text { font-size: 0.95rem; }
    .works__full {
        height: 50vh;
        min-height: 280px;
        margin-bottom: 80px;
    }
    .works__card-inner { padding: 32px 24px; }
    .works__card-title { font-size: 1.05rem; }
    .footer { padding: 60px 0 40px; }
}

/* Embed (iframe) */
body.is-embed { min-width: 0; }
body.is-embed .loader { display: none; }
body.is-embed .header { padding: 16px 5%; }
body.is-embed .header__inner { flex-wrap: wrap; gap: 12px; justify-content: center; }
body.is-embed .nav__list { flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
body.is-embed .hero {
    min-height: 0;
    padding: 140px 5% 48px;
    height: auto;
}
body.is-embed .hero__vertical { display: none; }
body.is-embed .hero__title { font-size: clamp(1.75rem, 7vw, 3rem); margin-bottom: 16px; }
body.is-embed .hero__lead { font-size: 0.9rem; }
body.is-embed .hero__scroll { display: none; }
body.is-embed .section { padding: 64px 0; }
body.is-embed .container { padding: 0 4%; max-width: 100%; }
body.is-embed .philosophy__grid { grid-template-columns: 1fr; gap: 32px; }
body.is-embed .philosophy__side--vertical { display: none; }
body.is-embed .philosophy__title { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 24px; }
body.is-embed .philosophy__text { font-size: 0.9rem; }
body.is-embed .works__full {
    height: 40vh;
    min-height: 220px;
    margin-bottom: 64px;
}
body.is-embed .works__grid { grid-template-columns: 1fr; gap: 20px; }
body.is-embed .works__card-inner { padding: 28px 20px; }
body.is-embed .works__card-title { font-size: 1rem; }
body.is-embed .contact__header { margin-bottom: 40px; }
body.is-embed .contact__title { font-size: clamp(1.35rem, 4vw, 1.75rem); }
body.is-embed .contact-form__row { grid-template-columns: 1fr; }
body.is-embed .form-group { margin-bottom: 20px; }
body.is-embed .form-submit { padding: 14px 48px; font-size: 0.9rem; }
body.is-embed .footer { padding: 48px 0 32px; }
