/* ============================================
   Synesthesia - Clean CSS
   セマンティッククラスベースアーキテクチャ
   ============================================ */

/* ---------- Google Fonts Import ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ---------- LINE Seed JP Import ---------- */
@import url('https://cdn.jsdelivr.net/npm/line-seed-jp@latest/line-seed-jp.css');

/* ---------- Design Tokens ---------- */
:root {
    /* 
     * ===================================
     * Breakpoints (参照用コメント)
     * ===================================
     * --bp-sp:     480px   (小型スマートフォン)
     * --bp-tablet: 768px   (タブレット)
     * --bp-desktop: 900px  (デスクトップ)
     * --bp-wide:   1200px  (ワイドスクリーン)
     * 
     * ※ CSS変数はメディアクエリ条件に使えないため
     *   実際の値はコメントで管理
     */

    /* 
     * Typography Scale
     * ================
     * --text-xs   : 12px - コピーライト、タグライン
     * --text-sm   : 14px - 本文、ナビ、会社情報
     * --text-md   : 16px - リード文
     * --text-lg   : 22px - 中見出し (h4相当)
     * --text-xl   : 28px - 大見出し (h2, About us)
     * --text-hero : 36-64px - ヒーロータイトル
     */
    --text-xs: 0.8rem;
    --text-sm: 1rem;
    --text-md: 1rem;
    --text-lg: 1.375rem;
    --text-xl: 1.75rem;
    --text-hero: clamp(2.5rem, 6vw, 4rem);

    /* Font Families */
    --font-sans: 'Noto Sans JP', 'LINE Seed JP', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Cormorant Garamond', serif;

    /* Colors */
    --color-text: #231815;
    --color-text-light: #333;
    --color-text-muted: #666;
    --color-bg: #fff;
    --color-bg-dark: #1a1a1a;
    --color-accent: #d59998;
    --color-gray: #e6e6e6;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;

    /* Layout */
    --container-max: 1200px;
    --header-height: 65px;

    /* Layout - PC Padding */
    --layout-padding-left: 70px;
    --layout-padding-right: 40px;

    /* Line Heights */
    --leading-tight: 1.2;
    --leading-normal: 1.8;
    --leading-relaxed: 2.0;
    --leading-loose: 2.2;

    /* Background Logo Tokens */
    --bg-logo-fill: #e6e6e6;
    --bg-logo-opacity: 0.15;

    /* Clip-path Values (斜めマスク用) */
    --clip-top-left: 310px;
    --clip-bottom-left: 160px;

    /* Transition */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Hero Overlay removed for p5.js implementation */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background: var(--color-bg);
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---------- Typography Classes ---------- */
.text-hero {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 400;
    font-style: italic;
    line-height: var(--leading-tight);
}

.text-xl {
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: 1.4;
}

.text-h4 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
    color: var(--color-text-light);
    letter-spacing: 0.02em;
}

.text-lg {
    font-size: var(--text-lg);
    font-weight: 700;
    line-height: 1.5;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--color-text-light);
}

.text-md {
    font-size: var(--text-md);
    font-weight: 700;
    line-height: var(--leading-normal);
}

.text-sm {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.text-xs {
    font-size: var(--text-xs);
}

/* ---------- Utility Classes ---------- */
.visually-hidden {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-bg);
    padding: 15px var(--layout-padding-right) 15px var(--layout-padding-left);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-header__logo svg {
    width: 160px;
    height: auto;
}

.site-header__tagline {
    font-size: var(--text-xs);
    font-weight: 400;
    white-space: nowrap;
    color: var(--color-text);
}

.site-nav ul {
    display: flex;
    gap: 32px;
}

.site-nav a {
    font-size: var(--text-sm);
    font-weight: 400;
    transition: opacity var(--transition-fast);
}

.site-nav a:hover {
    opacity: 0.6;
}

/* ---------- Main Container ---------- */
.main-content {
    padding-top: var(--header-height);
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero__media video,
.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__bg-scroll {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/hero_city.webp');
    background-repeat: repeat-x;
    background-size: auto 100%;
    background-position: 0 0;
    animation: hero-scroll 120s linear infinite;
}

@keyframes hero-scroll {
    from {
        background-position: 0 0;
    }

    to {
        background-position: -2000px 0;
    }
}

.hero__fallback {
    display: none;
}

#hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #fff;
    padding: 20px;
}

.hero__subtitle {
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.6em;
    line-height: 1rem;
    margin-bottom: 0.2rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.6);
}

.hero__title {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 300;
    font-variation-settings: 'wght' 100, 'opsz' 144, 'SOFT' 0, 'WONK' 2;
    font-style: normal;
    line-height: 1.1;
    letter-spacing: 0.05em;
    opacity: 1;
    color: #fff;
    text-transform: none;
    text-shadow: 0 0 10px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.6);
}

.hero__tagline {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-style: normal;
    letter-spacing: 0.05em;
    display: block;
    margin-top: 0.8rem;
    color: #fff;
    opacity: 1;
    text-shadow: 0 0 10px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.6);
}

/* ---------- Content Section ---------- */
.content-section {
    display: grid;
    grid-template-columns: 60% 40%;
    max-width: var(--container-max);
    margin: 0 auto;
}

.content-section__text {
    position: relative;
    padding: var(--space-xl) 50px 122px var(--layout-padding-left);
    margin-top: 0px;
    margin-bottom: 0px;
    background: var(--color-bg);
}

.content-section__bg-logo {
    position: absolute;
    left: -85px;
    top: -170px;
    width: 300px;
    opacity: 0.7;
    z-index: 0;
    pointer-events: none;
}

.content-section__bg-logo svg path {
    fill: var(--color-gray);
}

.content-section__inner {
    position: relative;
    z-index: 1;
}

.content-section__heading {
    font-size: 33px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.content-section__lead {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: var(--leading-normal);
    margin-bottom: 50px;
    color: var(--color-text-light);
}

.content-section__subheading {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.5;
    color: var(--color-text-light);
}

.content-section__body p {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

/* Content Image Column */
.content-section__image {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    /* 斜めの切り欠き - CSS変数使用 */
    clip-path: polygon(var(--clip-top-left) 0, 100% 0, 100% 100%, var(--clip-bottom-left) 100%);
    margin-left: -150px;
    margin-right: calc(-50vw + 50%);
    width: calc(100% + 150px + 50vw - 50%);
    background: #fff;
}

.parallax-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.parallax-img {
    position: absolute;
    top: -15%;
    right: 0;
    left: auto;
    width: 130%;
    height: 130%;
    object-fit: cover;
    object-position: right;
    filter: grayscale(100%);
    opacity: 0.3;
    will-change: transform;
}

/* ---------- About Page Styles ---------- */
.about-info {
    background: var(--color-bg-dark);
    color: var(--color-bg);
    padding: 60px var(--layout-padding-left) 80px;
}

.about-info__container {
    max-width: var(--container-max);
    margin: 0 auto;
    position: relative;
    z-index: 0;
}

.about-info__bg-logo {
    position: absolute;
    left: -100px;
    top: 0;
    width: 300px;
    opacity: 1;
    z-index: -1;
    pointer-events: none;
}

.about-info__bg-logo svg {
    width: 100%;
    height: auto;
}

.about-info__bg-logo svg path {
    fill: #000;
}

.about-info__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 300;
    font-variation-settings: 'wght' 300, 'opsz' 144, 'SOFT' 0, 'WONK' 2;
    font-style: normal;
    display: inline-block;
    border-bottom: 1px solid currentColor;
    padding-bottom: 0.5rem;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.about-info__lead {
    font-weight: 500;
    line-height: 35px;
    margin-bottom: var(--space-xl);
    color: #fff;
}

.about-info__company-logo {
    display: inline-block;
    margin-bottom: var(--space-xs);
}

.about-info__company-logo svg {
    width: 180px;
    height: auto;
}

.about-info__logos {
    display: flex;
    align-items: flex-end;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.about-info__company-jp {
    display: block;
    width: 140px;
    position: relative;
    top: -16px;
}

.about-info__company-jp svg {
    width: 120px;
    height: auto;
}

.about-info__company-jp path {
    fill: var(--color-bg);
}

.about-info__details {
    margin-top: 0;
}

.about-info__details p {
    margin-bottom: var(--space-xs);
    line-height: var(--leading-relaxed);
}

.about-info__details a {
    color: #fff;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.about-info__details a:visited {
    color: #fff;
}

.about-info__details a:hover {
    color: #999;
}

/* Video Section */
.video-section {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.video-section video {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 300%;
    object-fit: cover;
    will-change: transform;
}

/* Profile Section */
.profile {
    background: var(--color-bg);
    padding: var(--space-2xl) var(--layout-padding-left) 120px;
}

.profile__container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.profile__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.profile__content {
    display: contents;
}

.profile__title {
    grid-column: 1;
    grid-row: 1;
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 300;
    font-variation-settings: 'wght' 300, 'opsz' 144, 'SOFT' 0, 'WONK' 2;
    font-style: normal;
    display: inline-block;
    border-bottom: 1px solid currentColor;
    padding-bottom: 0.5rem;
    margin-bottom: var(--space-lg);
}

.profile__text {
    grid-column: 1;
    grid-row: 2;
}

.profile__text p {
    font-size: var(--text-sm);
    line-height: var(--leading-loose);
    margin-bottom: var(--space-sm);
}

.profile__image {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    width: 100%;
}

.profile__image img {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, transform;
}

.profile__image img.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Footer ---------- */
.site-footer {
    background: #111;
    color: #fff;
    padding: 20px var(--layout-padding-right) 20px var(--layout-padding-left);
    min-height: 120px;
    position: relative;
    z-index: 10;
}

.site-footer__inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
}

.site-footer__brand {
    position: relative;
    padding-top: 40px;
}

.site-footer__bg-logo {
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 112px;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    clip-path: inset(-200% 0 0 0);
}

.site-footer__bg-logo path {
    fill: #222;
}

.site-footer__content {
    position: relative;
    z-index: 1;
}

.site-footer__contact {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-top: -40px;
    margin-bottom: 60px;
    text-decoration: none;
}

.site-footer__copyright {
    font-size: 0.8rem;
    color: #888;
}

.site-footer__nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}

.site-footer__nav li {
    margin-bottom: 10px;
}

/* ============================================
   Responsive Styles
   ============================================
   
   ブレイクポイント設計:
   - 900px以下: タブレット・小型PC
   - 768px以下: タブレット縦向き
   - 480px以下: スマートフォン
   
   ※ SP対応時はこのセクションを拡張
   ============================================ */

/* ---------- Tablet & Small Desktop (max-width: 900px) ---------- */
@media (max-width: 900px) {
    :root {
        --header-height: 50px;
        --layout-padding-left: 30px;
        --layout-padding-right: 30px;
    }

    .site-header {
        padding: 12px 20px;
    }

    .site-header__logo svg {
        width: 130px;
    }

    .site-header__tagline {
        display: none;
    }

    .content-section {
        grid-template-columns: 1fr;
    }

    .content-section__text {
        padding: 50px 20px;
    }

    .hero__subtitle {
        letter-spacing: 0.2em;
    }

    .hero__title {
        font-size: 3rem;
    }

    .hero__tagline {
        display: none;
    }

    .content-section__heading {
        font-size: 1.6rem;
    }

    .content-section__bg-logo {
        left: -60px;
        width: 200px;
    }

    .content-section__image {
        min-height: 50vh;
        /* SP時のclip-path調整が必要な場合はここ */
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
    }

    .about-info {
        padding: var(--space-lg) 30px 60px;
    }

    .about-info__bg-logo {
        left: -60px;
        width: 200px;
    }

    .profile__grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: var(--space-lg);
    }

    .profile__content {
        display: block;
    }

    .profile__title,
    .profile__text,
    .profile__image {
        grid-column: auto;
        grid-row: auto;
    }

    .profile {
        padding: var(--space-xl) 30px;
    }

    .video-section {
        height: 250px;
    }
}

/* ---------- Tablet Portrait (max-width: 768px) ---------- */
@media (max-width: 768px) {
    /* 
     * TODO: SP対応時に追加
     * - ナビゲーションのハンバーガーメニュー化
     * - ヒーローセクションのサイズ調整
     * - フォントサイズの調整
     */
}

/* ---------- Smartphone (max-width: 480px) ---------- */
@media (max-width: 480px) {
    .hero {
        min-height: 166px;
        max-height: 200px;
    }
}