/* =====================
   RESET & ROOT
===================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black:        #0a0a0a;
    --white:        #f5f5f0;
    --gray-1:       #1a1a1a;
    --gray-2:       #2e2e2e;
    --gray-3:       #8a8a8a;
    --gray-4:       #c8c8c8;
    --off-white:    #ededea;
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-mono:    'DM Mono', 'Courier New', monospace;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-mono);
    background-color: var(--black);
    color: var(--white);
    overflow-x: hidden;
}

/* =====================
   FOCUS (accessibility)
===================== */
:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 3px;
}

/* =====================
   HEADER
===================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 28px 44px 0 40px;
    pointer-events: none;
    mix-blend-mode: difference;
}

.header__logo {
    pointer-events: all;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo {
    font-family: var(--font-display);
    font-size: 42px;
    line-height: 1;
    color: var(--white);
    letter-spacing: -2px;
}

.brand {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.18em;
    color: var(--gray-4);
}

/* =====================
   NAV
===================== */
.header-nav {
    pointer-events: all;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.header-nav button,
.header-nav__btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--gray-3);
    padding: 2px 0;
    position: relative;
    text-decoration: none;
    transition: color 0.25s ease;
}

.header-nav button::after,
.header-nav__btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width 0.3s ease;
}

.header-nav button:hover,
.header-nav button.active,
.header-nav__btn:hover,
.header-nav__btn.active { color: var(--white); }

.header-nav button:hover::after,
.header-nav button.active::after,
.header-nav__btn:hover::after,
.header-nav__btn.active::after { width: 100%; }

/* =====================
   SECTION
===================== */
.section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.section__label {
    position: absolute;
    bottom: 36px;
    right: 44px;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.22em;
    opacity: 0.4;
}

.section__content {
    position: absolute;
    top: 100px;
    left: 60px;
    right: 60px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(42px, 5vw, 68px);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -3px;
    transition: letter-spacing 0.4s ease;
}

.section__title:hover { letter-spacing: 2px; }

.section__sub {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.16em;
    opacity: 0.65;
}

.section::after {
    content: '';
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40%;
    background: currentColor;
    opacity: 0.12;
}

/* =====================
   SECTION COLORS
===================== */
.section--top {
    background-color: var(--black);
    color: var(--white);
}

.section--top::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gray-2), transparent);
}

/* scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 44px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.35));
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.35; transform: translateX(-50%) translateY(0); }
    50%       { opacity: 0.7;  transform: translateX(-50%) translateY(8px); }
}

/* vision */
.section--vision {
    background-color: var(--white);
    color: var(--black);
}

.vision__body {
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    text-align: center;
    width: min(720px, calc(100% - 120px));
}

.vision__statement {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(42px, 6.5vw, 80px);
    font-weight: 400;
    line-height: 1.22;
    letter-spacing: -2px;
    color: var(--black);
}

.vision__sub {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.22em;
    color: var(--gray-3);
}

.section--news {
    background-color: var(--gray-1);
    color: var(--white);
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
}

.section--services {
    background-color: var(--off-white);
    color: var(--black);
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
}

.section--about {
    background-color: var(--gray-1);
    color: var(--white);
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =====================
   CARDS
===================== */
.cards-wrapper {
    padding: 230px 60px 80px;
    width: 100%;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    background: transparent;
    border: none;
}

.cards--dark {
    background: transparent;
    border: none;
}

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

.card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: border-color 0.3s ease;
}

.card:hover { border-color: rgba(255, 255, 255, 0.32); }

.card--dark { border-color: rgba(0, 0, 0, 0.13); }
.card--dark:hover { border-color: rgba(0, 0, 0, 0.28); }

.card__date,
.card__num {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.2em;
    opacity: 0.45;
    padding: 20px 28px 0;
}

.card__title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.3px;
    line-height: 1.3;
    padding: 16px 28px 0;
}

.card__body {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.05em;
    line-height: 1.9;
    opacity: 0.72;
    padding: 16px 28px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 16px;
}

.card--dark .card__body {
    border-top-color: rgba(0, 0, 0, 0.08);
}

/* .section--about はダーク背景のため .card のデフォルト（白ボーダー）をそのまま使用 */

/* =====================
   TYPEWRITER
===================== */
.typewriter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--white);
}

.typewriter__cursor {
    display: inline-block;
    animation: blink 0.9s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* =====================
   EFFECTS
===================== */
.cursor-glow {
    position: fixed;
    top: -200px;
    left: -200px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    z-index: 9998;
    animation: scan 6s linear infinite;
}

@keyframes scan {
    0%   { top: -2px; opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { top: 100vh; opacity: 0; }
}

.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* =====================
   FOOTER
===================== */
.footer {
    position: relative;
    background-color: var(--black);
    border-top: 1px solid var(--gray-2);
    color: var(--white);
    z-index: 2;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: start;
    gap: 48px;
    padding: 64px 60px;
}

.footer__brand { display: flex; flex-direction: column; gap: 4px; }

.footer__logo {
    font-family: var(--font-display);
    font-size: 48px;
    line-height: 1;
    letter-spacing: -2px;
}

.footer__name {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.18em;
    color: var(--gray-3);
}

.footer__contact {
    display: flex;
    flex-direction: column;
    gap: 24px;
    font-style: normal;
}

.footer__block { display: flex; flex-direction: column; gap: 6px; }

.footer__label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.22em;
    color: var(--gray-3);
}

.footer__value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--white);
    text-decoration: none;
    transition: color 0.2s ease;
}

a.footer__value:hover { color: var(--gray-4); }

.footer__sns { display: flex; flex-direction: column; gap: 16px; }
.footer__sns-links { display: flex; flex-direction: column; gap: 10px; }

.footer__sns-item {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--white);
    text-decoration: none;
    position: relative;
    width: fit-content;
    transition: color 0.2s ease;
}

.footer__sns-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width 0.3s ease;
}

.footer__sns-item:hover::after { width: 100%; }

.footer__bottom {
    border-top: 1px solid var(--gray-2);
    padding: 20px 60px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.14em;
    color: var(--gray-3);
}

/* =====================
   CONTACT SECTION (index.html CTA)
===================== */
.section--contact {
    background-color: var(--gray-1);
    color: var(--white);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-cta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -44%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    text-align: center;
    width: min(520px, calc(100% - 120px));
}

.contact-cta__lead {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.2vw, 38px);
    font-weight: 400;
    letter-spacing: -0.5px;
    line-height: 1.55;
    color: var(--white);
}

.contact-cta__btn {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--white);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 16px 44px;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: color 0.35s ease, border-color 0.35s ease;
}

.contact-cta__btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--white);
    transform: translateX(-101%);
    transition: transform 0.35s ease;
    z-index: -1;
}

.contact-cta__btn:hover {
    color: var(--black);
    border-color: var(--white);
}

.contact-cta__btn:hover::before { transform: translateX(0); }

/* =====================
   CONTACT PAGE (contact.html)
===================== */
.contact-page {
    overflow: hidden;
    height: 100vh;
}

.contact-split {
    display: grid;
    grid-template-columns: 9fr 11fr;
    height: 100vh;
}

/* ── 左パネル ── */
.contact-split__left {
    background: var(--off-white);
    color: var(--black);
    display: flex;
    flex-direction: column;
    padding: 44px 56px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.cs-top {
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.cs-back {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.16em;
    color: var(--gray-3);
    text-decoration: none;
    transition: color 0.25s ease;
}

.cs-back:hover { color: var(--black); }

.cs-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 48px 0;
}

.cs-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.24em;
    color: var(--gray-3);
}

.cs-statement {
    font-family: var(--font-display);
    /* 左パネル幅 = 40vw - 112px(padding)、最長行12文字が収まるよう数式で導出 */
    font-size: clamp(14px, calc(3vw - 9px), 32px);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.5px;
    color: var(--black);
}

.cs-bottom {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.cs-address {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-style: normal;
}

.cs-address__line {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--gray-3);
}

.cs-sns {
    display: flex;
    gap: 20px;
}

.cs-sns__item {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.14em;
    color: var(--gray-3);
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.cs-sns__item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--black);
    transition: width 0.3s ease;
}

.cs-sns__item:hover { color: var(--black); }
.cs-sns__item:hover::after { width: 100%; }

.cs-foot-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.cs-copy {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.14em;
    color: var(--gray-4);
}

.cs-number {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.22em;
    opacity: 0.3;
    color: var(--black);
}

/* ── 右パネル ── */
.contact-split__right {
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
    overflow-y: auto;
}

.cs-right__inner {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cs-right__header {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.24em;
    color: var(--gray-4);
}

.cs-right__note {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.14em;
    color: var(--gray-3);
}

.contact-form {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-form__row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-form__row--message { gap: 8px; }

.contact-form__label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--gray-4);
}

.contact-form__input {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--white);
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    padding: 0;
}

.contact-form__input::placeholder {
    color: var(--gray-4);
    opacity: 0.55;
}

.contact-form__textarea {
    resize: none;
    min-height: 90px;
    line-height: 1.8;
}

.contact-form__footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 22px;
}

.contact-form__submit {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.18em;
    color: var(--white);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 28px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.contact-form__submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--white);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 0;
}

.contact-form__submit span,
.contact-form__submit { position: relative; z-index: 1; }

.contact-form__submit:hover { color: var(--black); border-color: var(--white); }
.contact-form__submit:hover::before { transform: translateX(0); }

/* =====================
   REDUCED MOTION
===================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .typewriter__cursor,
    .scanline,
    .scroll-indicator { animation: none; }

    .section__title,
    .header-nav button,
    .header-nav button::after,
    .header-nav__btn,
    .header-nav__btn::after,
    .footer__value,
    .footer__sns-item,
    .footer__sns-item::after,
    .card,
    .card--dark,
    .contact-cta__btn,
    .contact-cta__btn::before,
    .contact-form__input,
    .contact-form__submit,
    .contact-form__submit::before,
    .cs-back,
    .cs-sns__item,
    .cs-sns__item::after { transition: none; }
}

/* =====================
   RESPONSIVE
===================== */


@media (max-width: 768px) {
    .header-nav { display: none; }

    .section__content {
        left: 24px;
        right: 24px;
        top: 80px;
    }

    .section__label {
        right: 24px;
        bottom: 24px;
    }

    .section::after { display: none; }

    .typewriter {
        font-size: clamp(24px, 7vw, 40px);
        width: 80%;
    }

    .vision__body { width: calc(100% - 48px); }

    .vision__statement { letter-spacing: -1px; }

    .scroll-indicator { display: none; }

    .cards-wrapper { padding: 190px 24px 60px; }

    .cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card__date,
    .card__num { padding: 16px 20px 0; }

    .card__title { padding: 12px 20px 0; }

    .card__body { padding: 12px 20px 20px; margin-top: 12px; }

    .footer__inner {
        grid-template-columns: 1fr;
        padding: 48px 24px;
        gap: 32px;
    }

    .footer__bottom { padding: 16px 24px; }

    .contact-cta {
        width: calc(100% - 48px);
        transform: translate(-50%, -54%);
    }

    /* contact.html ── モバイルは上下積み */
    .contact-page {
        overflow: auto;
        height: auto;
    }

    .contact-split {
        grid-template-columns: 1fr;
        height: auto;
    }

    /* 上：ブランド情報パネル */
    .contact-split__left {
        padding: 40px 28px 36px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .cs-top { padding-bottom: 24px; }

    .cs-main {
        flex: none;
        padding: 32px 0 28px;
        justify-content: flex-start;
    }

    .cs-statement { font-size: clamp(22px, 6vw, 30px); }

    .cs-number { display: none; }

    /* 下：フォームパネル */
    .contact-split__right {
        padding: 40px 28px 56px;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .cs-right__inner { max-width: 100%; }
}
