/* ============================================
   Reset (ress の代わりに最小限のリセットを内蔵)
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body,
h1,
h2,
h3,
p,
ul,
figure {
    margin: 0;
}

ul {
    padding: 0;
}

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

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Design tokens
   ============================================ */
:root {
    --color-bg: #ffffff;
    --color-bg-soft: #fbf6ee;
    --color-accent-soft: #feebbe;
    --color-accent: #9c5420;
    --color-accent-strong: #7a4019;
    --color-text: #2b2420;
    --color-text-soft: #6b5d52;
    --color-border: #ece3d6;

    --container-max: 1160px;
    --section-py: clamp(64px, 10vw, 120px);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;

    --fs-hero: clamp(2.5rem, 3.4vw + 1.5rem, 4.25rem);
    --fs-h2: clamp(1.625rem, 1vw + 1.375rem, 2.125rem);
    --fs-h3: clamp(1.125rem, 0.5vw + 1rem, 1.25rem);
    --fs-lead: clamp(1.125rem, 0.5vw + 1rem, 1.3125rem);
    --fs-body: 1rem;
    --fs-small: 0.875rem;

    --font-display: "Playfair Display", "Noto Sans JP", serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================
   Base
   ============================================ */
body {
    font-family: "Noto Sans JP", "Roboto", sans-serif;
    font-size: var(--fs-body);
    line-height: 1.9;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 1000;
    padding: 12px 20px;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    transition: top 0.2s var(--ease);
}

.skip-link:focus {
    top: 0;
}

section:nth-of-type(even) {
    background: var(--color-bg-soft);
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--section-py) 24px;
}

.title {
    font-family: var(--font-display);
    text-align: center;
    font-size: var(--fs-h2);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-accent);
    letter-spacing: 0.02em;
}

.section-lead {
    text-align: center;
    color: var(--color-text-soft);
    max-width: 44em;
    margin: 0 auto 56px;
}

/* 上品なスクロールリビール */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================
   Header / Nav
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.header.is-scrolled {
    border-color: var(--color-border);
    box-shadow: 0 4px 20px rgba(43, 36, 32, 0.06);
}

.header-inner {
    position: relative;
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
}

.logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.05em;
    text-decoration: none;
}

.menu {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
}

.menu a {
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--fs-small);
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
    padding: 4px 0;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s var(--ease);
}

.menu a:hover::after,
.menu a:focus-visible::after {
    width: 100%;
}

.menu .nav-cta a {
    background: var(--color-accent);
    color: #fff;
    padding: 10px 22px;
    border-radius: 30px;
    transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.menu .nav-cta a::after {
    display: none;
}

.menu .nav-cta a:hover,
.menu .nav-cta a:focus-visible {
    background: var(--color-accent-strong);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    padding: 14px 34px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    font-size: var(--fs-small);
    letter-spacing: 0.02em;
    transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover,
.btn:focus-visible {
    background: var(--color-accent-strong);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(122, 64, 25, 0.22);
}

.btn-outline {
    display: inline-block;
    padding: 10px 26px;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    border-radius: 30px;
    text-decoration: none;
    font-size: var(--fs-small);
    font-weight: 500;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background: var(--color-accent);
    color: #fff;
}

/* ============================================
   Hero (fv)
   ============================================ */
.fv {
    position: relative;
    overflow: hidden;
    background: var(--color-bg-soft);
    padding: clamp(120px, 14vw, 180px) 24px 96px;
}

.fv::before,
.fv::after {
    content: '';
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.fv::before {
    width: 420px;
    height: 420px;
    top: -140px;
    right: -100px;
    background: var(--color-accent-soft);
    opacity: 0.7;
}

.fv::after {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: 6%;
    background: var(--color-accent);
    opacity: 0.1;
}

.fv-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    max-width: var(--container-max);
    margin: 0 auto;
}

.fv-left {
    width: 50%;
}

.fv-sub {
    display: inline-block;
    color: var(--color-accent);
    font-size: var(--fs-small);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.fv-left h1 {
    font-family: var(--font-display);
    font-size: var(--fs-hero);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--color-text);
}

.fv-catch {
    margin: 28px 0 36px;
    line-height: 1.9;
    color: var(--color-text-soft);
    font-size: var(--fs-lead);
}

.fv-right {
    width: 50%;
}

.fv-right img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(43, 36, 32, 0.12);
    filter: sepia(28%) saturate(1.15) brightness(1.01);
}

/* ヒーロー要素のフェードイン演出 */
.fv-sub,
.fv-left h1,
.fv-catch,
.fv-left .btn,
.fv-right {
    animation: fv-fade-up 0.9s var(--ease) both;
}

.fv-sub {
    animation-delay: 0.05s;
}

.fv-left h1 {
    animation-delay: 0.15s;
}

.fv-catch {
    animation-delay: 0.28s;
}

.fv-left .btn {
    animation-delay: 0.4s;
}

.fv-right {
    animation-delay: 0.25s;
}

@keyframes fv-fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-cue {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--color-text-soft);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    animation: fv-fade-up 0.9s var(--ease) both, scroll-cue-bounce 2.2s ease-in-out 1s infinite;
}

.scroll-cue svg {
    width: 16px;
    height: 16px;
}

@keyframes scroll-cue-bounce {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, 8px);
    }
}

/* ============================================
   About
   ============================================ */
.about-inner {
    display: flex;
    gap: clamp(32px, 6vw, 72px);
    align-items: center;
}

.about-left {
    width: 40%;
}

.about-left img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px rgba(43, 36, 32, 0.1);
}

.about-right {
    width: 60%;
}

.about-lead {
    max-width: 18em;
    font-size: var(--fs-lead);
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-accent);
    line-height: 1.7;
}

.about-text {
    max-width: 34em;
    line-height: 2;
    color: var(--color-text-soft);
}

/* ============================================
   Skills
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.skill-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px 26px;
    transition: opacity 0.7s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(43, 36, 32, 0.1);
    border-color: transparent;
}

.skill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: var(--color-accent-soft);
    color: var(--color-accent-strong);
}

.skill-icon svg {
    width: 24px;
    height: 24px;
}

.skill-card h3 {
    font-size: var(--fs-h3);
    margin-bottom: 8px;
    color: var(--color-text);
}

.skill-card p {
    font-size: var(--fs-small);
    line-height: 1.75;
    color: var(--color-text-soft);
}

/* ============================================
   Works
   ============================================ */
.works-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.work-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(43, 36, 32, 0.08);
    transition: opacity 0.7s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(43, 36, 32, 0.14);
}

.work-card .work-thumb {
    overflow: hidden;
}

.work-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.work-card:hover img {
    transform: scale(1.06);
}

.work-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.work-body h3 {
    font-size: var(--fs-h3);
    margin-bottom: 12px;
    color: var(--color-text);
}

.work-text {
    flex-grow: 1;
    margin-bottom: 24px;
}

.work-description {
    font-size: var(--fs-small);
    color: var(--color-text-soft);
    margin-bottom: 14px;
    line-height: 1.8;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tags li {
    list-style: none;
    background: var(--color-accent-soft);
    color: var(--color-accent-strong);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
}

.works-cta {
    text-align: center;
    margin-top: 56px;
    color: var(--color-text-soft);
}

.works-cta a {
    color: var(--color-accent);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================
   Contact
   ============================================ */
.contact-card {
    position: relative;
    overflow: hidden;
    max-width: 680px;
    margin: 0 auto;
    padding: clamp(48px, 7vw, 72px);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-strong) 100%);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 30px 60px rgba(122, 64, 25, 0.25);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.contact-card>* {
    position: relative;
    z-index: 1;
}

.contact-text {
    font-size: var(--fs-lead);
    margin-bottom: 32px;
    line-height: 1.8;
    color: #fff;
}

.contact-card .btn {
    background: #fff;
    color: var(--color-accent-strong);
    box-shadow: 0 12px 28px rgba(43, 36, 32, 0.18);
}

.contact-card .btn:hover,
.contact-card .btn:focus-visible {
    background: var(--color-bg-soft);
    color: var(--color-accent-strong);
    box-shadow: 0 16px 32px rgba(43, 36, 32, 0.24);
}

.contact-note {
    margin-top: 18px;
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.85);
}

.contact-email {
    margin-top: 8px;
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.85);
}

.contact-email a {
    color: #fff;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 40px 24px;
    text-align: center;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    list-style: none;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--color-text-soft);
    text-decoration: none;
    font-size: var(--fs-small);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
    color: var(--color-accent);
}

.footer small {
    color: var(--color-text-soft);
    font-size: 0.8125rem;
}

/* ============================================
   Work detail pages
   ============================================ */
.work-detail-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border);
}

.work-detail-header .header-inner {
    padding: 0;
    position: static;
}

.work-wrap {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: clamp(100px, 12vw, 140px) 24px 100px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-soft);
    text-decoration: none;
    font-size: var(--fs-small);
    margin-bottom: 32px;
}

.back-link:hover,
.back-link:focus-visible {
    color: var(--color-accent);
}

.work-container {
    display: flex;
    gap: clamp(24px, 4vw, 48px);
    align-items: flex-start;
}

.work-fv {
    width: 50%;
    position: sticky;
    top: 100px;
}

.work-fv::before {
    content: "";
    position: absolute;
    inset: -16px;
    z-index: -1;
    background:
        radial-gradient(circle at 30% 20%, rgba(160, 224, 220, 0.35), transparent 60%),
        radial-gradient(circle at 75% 70%, rgba(120, 190, 220, 0.3), transparent 55%);
    filter: blur(30px);
    animation: hero-glow-pulse 6s ease-in-out infinite;
}

@keyframes hero-glow-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.trigger {
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(43, 36, 32, 0.12);
    transition: transform 0.35s var(--ease);
}

.trigger:hover {
    transform: scale(1.02);
}

.trigger img {
    width: 100%;
}

.hero-breathe {
    animation: hero-breathe 7s ease-in-out infinite;
}

@keyframes hero-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.wave-divider {
    display: block;
    width: 100%;
    height: 32px;
    margin-top: 8px;
    color: var(--color-accent-soft);
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s var(--ease), height 0.6s var(--ease), opacity 0.6s var(--ease);
    opacity: 0;
    pointer-events: none;
}

.btn-ripple:hover::after,
.btn-ripple:focus-visible::after {
    width: 220px;
    height: 220px;
    opacity: 1;
}

.work-inner {
    width: 50%;
}

.work-title {
    font-size: var(--fs-hero);
    margin-bottom: 44px;
    color: var(--color-text);
    line-height: 1.3;
}

.work-section {
    margin-bottom: 44px;
}

.work-section h2 {
    font-size: var(--fs-h3);
    margin-bottom: 12px;
    color: var(--color-accent);
}

.work-section p {
    line-height: 1.9;
    color: var(--color-text-soft);
}

.work-section ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.work-section li {
    list-style: none;
    background: var(--color-accent-soft);
    color: var(--color-accent-strong);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: var(--fs-small);
}

.work-cta {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.improve-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    list-style: none;
}

.improve-item {
    padding: 20px 24px;
    background: var(--color-bg-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.improve-item h3 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: var(--fs-body);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.improve-num {
    font-size: var(--fs-small);
    font-weight: 700;
    color: var(--color-accent);
}

.improve-before,
.improve-after {
    line-height: 1.9;
    color: var(--color-text-soft);
    font-size: var(--fs-small);
}

.improve-before {
    margin-bottom: 8px;
}

.improve-tag {
    display: inline-block;
    min-width: 3.5em;
    margin-right: 8px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--color-accent-soft);
    color: var(--color-accent-strong);
}

.improve-note {
    margin-top: 16px;
    font-size: var(--fs-small);
    color: var(--color-text-soft);
    font-style: italic;
}

.serif {
    font-family: "Noto Sans JP", sans-serif;
}

/* Modal (lightbox) */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(20, 15, 12, 0.85);
}

.modal.is-open {
    display: block;
}

.modal-scroll {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 64px 20px 40px;
}

.modal img {
    max-width: min(90vw, 640px);
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.modal .close {
    position: absolute;
    top: 24px;
    right: 28px;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    padding: 8px;
}

/* ============================================
   Responsive
   ============================================ */
@media screen and (max-width: 900px) {
    .work-container {
        flex-direction: column;
    }

    .work-fv,
    .work-inner {
        width: 100%;
        position: static;
    }
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: relative;
        width: 28px;
        height: 20px;
        z-index: 110;
    }

    .menu-toggle span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        border-radius: 10px;
        background: var(--color-accent);
        transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), top 0.3s var(--ease);
    }

    .menu-toggle span:nth-child(1) {
        top: 0;
    }

    .menu-toggle span:nth-child(2) {
        top: 9px;
    }

    .menu-toggle span:nth-child(3) {
        top: 18px;
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(1) {
        top: 9px;
        transform: rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(3) {
        top: 9px;
        transform: rotate(-45deg);
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(80vw, 320px);
        height: 100vh;
        background: #fff;
        padding: 100px 32px;
        box-shadow: -8px 0 32px rgba(43, 36, 32, 0.12);
        transform: translateX(100%);
        transition: transform 0.35s var(--ease);
    }

    .nav.is-open {
        transform: translateX(0);
    }

    .menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
    }

    .fv {
        padding-bottom: 64px;
    }

    .fv-inner {
        flex-direction: column;
        text-align: center;
    }

    .fv-left,
    .fv-right {
        width: 100%;
    }

    .fv-right {
        max-width: 320px;
        margin: 0 auto;
    }

    .scroll-cue {
        display: none;
    }

    .about-inner {
        flex-direction: column;
    }

    .about-left,
    .about-right {
        width: 100%;
    }

    .about-left img {
        max-width: 280px;
        margin: 0 auto;
    }

    .about-right {
        text-align: center;
    }

    .about-lead,
    .about-text {
        margin-left: auto;
        margin-right: auto;
    }

    .works-list {
        grid-template-columns: 1fr;
    }

    .work-detail-header .logo {
        font-size: 1rem;
    }

    .work-detail-header .menu {
        gap: 16px;
        flex-wrap: wrap;
    }
}