/* ------------------------------------------------------------------
   Base & Reset
------------------------------------------------------------------ */
:root {
    --bg-color: #050505;
    --text-main: #ffffff;
    --text-muted: #d1d5db;
    /* gray-300 */
    --text-sub: #9ca3af;
    /* gray-400 */
    --accent: #00f2ff;
    --accent-dim: rgba(0, 242, 255, 0.1);
    --font-jp: 'Noto Sans JP', sans-serif;
    --font-en: 'Syncopate', sans-serif;
    --container-width: 1200px;
    --header-height: 80px;

    --cursor-size: 20px;
    --cursor-hover-size: 60px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-jp);
    overflow-x: hidden;
    cursor: none;
    /* Hide default cursor */
    line-height: 1.6;
}

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

button,
input,
select,
textarea {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
}

ul {
    list-style: none;
}

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

.u-eng-font {
    font-family: var(--font-en);
    text-transform: uppercase;
}

.u-hidden-pc {
    display: block;
}

.u-hidden-sp {
    display: none;
}

@media (min-width: 768px) {
    .u-hidden-pc {
        display: none;
    }

    .u-hidden-sp {
        display: block;
    }
}

/* ------------------------------------------------------------------
   Components: Custom Cursor
------------------------------------------------------------------ */
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 1px solid white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
    mix-blend-mode: difference;
}

#cursor.hovered {
    width: var(--cursor-hover-size);
    height: var(--cursor-hover-size);
    background-color: white;
    border-color: transparent;
}

#cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
}

/* ------------------------------------------------------------------
   Components: Loader
------------------------------------------------------------------ */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loader__title {
    font-size: 2rem;
    letter-spacing: 0.3em;
    font-weight: 300;
}

.loader__bar {
    width: 200px;
    height: 2px;
    background: #333;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.loader__progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* ------------------------------------------------------------------
   Background
------------------------------------------------------------------ */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease;
}

/* ------------------------------------------------------------------
   Block: Header
------------------------------------------------------------------ */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 50;
    padding: 32px 0;
    transition: padding 0.3s ease, background 0.3s ease;
}

.header.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    padding: 16px 0;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 60;
    /* Button z-index */
}

.header__logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Desktop Nav */
.nav__list {
    display: flex;
    gap: 48px;
    align-items: center;
}

.nav__link {
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    font-weight: 300;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav__link:hover {
    color: var(--accent);
}

.nav__btn {
    padding: 8px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s;
}

.nav__btn:hover {
    background: white;
    color: black;
}

/* Mobile Menu Button */
.header__menu-btn {
    color: white;
    cursor: pointer;
    position: relative;
    z-index: 60;
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 40;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu__list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    text-align: center;
}

.mobile-menu__link {
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    font-weight: 300;
    text-transform: uppercase;
    transition: color 0.3s;
}

.mobile-menu__link:hover {
    color: var(--accent);
}

/* ------------------------------------------------------------------
   Block: Hero
------------------------------------------------------------------ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    position: relative;
    z-index: 10;
}

.hero__content {
    text-align: center;
    width: 100%;
}

.hero__subtitle-wrap,
.hero__title-line,
.hero__desc-wrap {
    overflow: hidden;
    /* Debug: overflowが正しく機能するように */
    position: relative;
}

.hero__subtitle {
    color: var(--accent);
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    margin-bottom: 24px;
    display: block;
    /* opacity: 0 で初期状態を完全に見えなくする */
    opacity: 0;
    transform: translateY(105%);
}

@media (min-width: 768px) {
    .hero__subtitle {
        font-size: 0.875rem;
    }
}

.hero__title {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .hero__title {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .hero__title {
        font-size: 4rem;
    }
}

.hero__title span {
    display: block;
    opacity: 0;
    transform: translateY(105%);
}

.hero__desc {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 48px;
    opacity: 0;
    transform: translateY(105%);
}

@media (min-width: 768px) {
    .hero__desc {
        font-size: 1.125rem;
    }
}

.hero__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    opacity: 0;
    transform: translateY(40px);
}

@media (min-width: 768px) {
    .hero__actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* Magnetic Button */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    width: 200px;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn__bg {
    position: absolute;
    inset: 0;
    background: white;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease-out;
}

.btn__text {
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}

.btn:hover .btn__bg {
    transform: scaleX(1);
}

.btn:hover .btn__text {
    color: black;
}

/* Modifier: Primary Button (Accent Color) */
.btn--primary {
    background: rgba(0, 242, 255, 0.05);
    border-color: rgba(0, 242, 255, 0.8);
}

.btn--primary .btn__bg {
    background: var(--accent);
}

/* ------------------------------------------------------------------
   Block: Section Common
------------------------------------------------------------------ */
.section {
    padding: 120px 0;
    position: relative;
    z-index: 10;
}

.section__header {
    margin-bottom: 80px;
}

.section__number {
    font-size: 4rem;
    font-weight: 700;
    color: transparent;
    /* 修正: opacityを削除し、stroke色を調整 */
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
    line-height: 1;
}

@media (min-width: 768px) {
    .section__number {
        font-size: 6rem;
    }
}

.section__title {
    font-size: 2rem;
    font-weight: 700;
    margin-top: -1.5rem;
    margin-left: 1rem;
}

.section__header--right {
    text-align: right;
}

.section__header--right .section__title {
    margin-left: 0;
    margin-right: 1rem;
}

/* ------------------------------------------------------------------
   Block: About
------------------------------------------------------------------ */
.about__content {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

@media (min-width: 768px) {
    .about__content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.about__header-col {
    flex: 1;
}

.about__text-col {
    flex: 1.5;
}

.about__lead {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (min-width: 768px) {
    .about__lead {
        font-size: 2rem;
    }
}

.about__desc {
    color: var(--text-muted);
    line-height: 2;
}


/* ------------------------------------------------------------------
           Block: Message (New)
        ------------------------------------------------------------------ */
.message__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

@media (min-width: 768px) {
    .message__content {
        flex-direction: row;
        align-items: flex-start;
        gap: 64px;
    }
}

.message__profile-col {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.message__icon {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0, 242, 255, 0.3);
    margin-bottom: 24px;
    position: relative;
}

.message__icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.1) 0%, transparent 100%);
}

.message__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.message__icon:hover .message__img {
    transform: scale(1.1);
}

.message__name-wrap {
    text-align: center;
}

.message__name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.message__role {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.message__text-col {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    padding: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.message__title {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
    display: inline-block;
}

.message__body {
    color: var(--text-muted);
    line-height: 2;
    white-space: pre-line;
    /* 改行を反映 */
}

.message__brand-origin {
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-sub);
    border-left: 2px solid var(--accent);
    padding-left: 16px;
}

/* ------------------------------------------------------------------
   Block: Services
------------------------------------------------------------------ */
.services {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px;
    /* Transition set by CSS primarily for hover effects */
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    opacity: 0;
    /* JS Animation Start */
    transform: translateY(40px);
}

.service-card:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-5px);
}

.service-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(0, 242, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 24px;
}

.service-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.service-card__sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.service-card__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    opacity: 0.8;
    line-height: 1.6;
}

/* ------------------------------------------------------------------
   Block: Works
------------------------------------------------------------------ */
.works__list {
    display: flex;
    flex-direction: column;
    gap: 128px;
}

.work-item {
    display: flex;
    flex-direction: column;
    gap: 48px;
    opacity: 0;
    /* JS Animation Start */
    transform: translateY(100px);
}

@media (min-width: 768px) {
    .work-item {
        flex-direction: row;
        align-items: center;
    }

    .work-item--reverse {
        flex-direction: row-reverse;
    }
}

.work-item__thumb-wrapper {
    flex: 2;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.work-item__thumb {
    aspect-ratio: 16 / 9;
    background: #111;
    position: relative;
    overflow: hidden;
    transition: transform 0.7s ease;
}

.work-item__thumb-wrapper:hover .work-item__thumb {
    transform: scale(1.02);
}

.work-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.7s ease;
}

.work-item__overlay {
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.5s;
}

.work-item__thumb-wrapper:hover .work-item__overlay {
    opacity: 0.1;
}

.work-item__info {
    flex: 1;
}

.work-item--reverse .work-item__info {
    text-align: right;
}

.work-item__title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    transition: color 0.3s;
}

.work-item:hover .work-item__title {
    color: var(--accent);
}

.work-item__meta {
    font-size: 0.875rem;
    color: var(--text-sub);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.work-item__desc {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 32px;
}

.work-item__btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: color 0.3s;
}

.work-item--reverse .work-item__btn {
    justify-content: flex-end;
}

.work-item__btn:hover {
    color: var(--accent);
}

.work-item__btn svg {
    margin-left: 8px;
    width: 16px;
    height: 16px;
}

/* ------------------------------------------------------------------
   Block: Contact
------------------------------------------------------------------ */
.contact__wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.contact__intro {
    text-align: center;
    margin-bottom: 80px;
}

.contact__intro h3 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    margin-top: -2rem;
}

.contact__intro p {
    color: var(--text-muted);
}

.form {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

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

.form__group {
    display: flex;
    flex-direction: column;
}

.form__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-sub);
    margin-bottom: 8px;
    transition: color 0.3s;
}

.form__group:focus-within .form__label {
    color: var(--accent);
}

.form__input,
.form__textarea {
    width: 100%;
    background: transparent;
    border-bottom: 1px solid #374151;
    /* gray-700 */
    color: white;
    padding: 8px 0;
    transition: border-color 0.3s;
}

.form__input:focus,
.form__textarea:focus {
    border-color: var(--accent);
}

.form__select {
    background: #000;
}

.form__submit {
    text-align: center;
    padding-top: 32px;
}

.form__btn {
    width: auto;
    min-width: 200px;
}

.form__btn .btn__bg {
    background: var(--accent);
}

.form__btn:hover {
    color: black;
    background: var(--accent);
}

.form__privacy {
    font-size: 0.875rem;
}

.form__panel {
    background-color: #1f2937;
    padding: 1rem;
    border-radius: 8px;
    height: 200px;
    overflow-y: auto;
}

.form__panel h3 {
    margin-bottom: 1rem;
}

.form__panel p {
    margin-bottom: 1rem;
}

.form__panel h4 {
    margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------------
   Block: Footer
------------------------------------------------------------------ */
.footer {
    padding: 48px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    position: relative;
    z-index: 10;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 768px) {
    .footer__inner {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer__brand {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
}

.footer__copy {
    font-size: 0.75rem;
    color: #4b5563;
    /* gray-600 */
    margin-top: 8px;
}

.footer__socials {
    display: flex;
    gap: 24px;
}

.footer__icon {
    color: var(--text-sub);
    transition: color 0.3s;
}

.footer__icon:hover {
    color: white;
}

.footer__icon svg {
    width: 20px;
    height: 20px;
}

/* ------------------------------------------------------------------
   Block: Modal
------------------------------------------------------------------ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
}

.modal__window {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1152px;
    /* 6xl */
    max-height: 90vh;
    overflow-y: auto;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(50px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal__window {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .modal__window {
        flex-direction: row;
    }
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: color 0.3s;
}

.modal__close:hover {
    color: var(--accent);
}

.modal__close svg {
    width: 24px;
    height: 24px;
}

.modal__image-col {
    width: 100%;
    min-height: 300px;
    background: #1f2937;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .modal__image-col {
        width: 50%;
        min-height: 600px;
    }
}

#modal-image-container {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.modal__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal__info-col {
    width: 100%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .modal__info-col {
        width: 50%;
        padding: 48px;
    }
}

.modal__category {
    color: var(--accent);
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: block;
}

.modal__title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .modal__title {
        font-size: 3rem;
    }
}

.modal__desc {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.875rem;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .modal__desc {
        font-size: 1rem;
    }
}

.modal__table {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
    margin-bottom: 24px;
}

.modal__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal__url {
    margin-bottom: 24px;
}

.modal__label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-sub);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.modal__value {
    display: block;
    color: white;
}

.modal__tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal__tech-tag {
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
}


.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
    border-color: #cf2e2e;
}