@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700&display=swap');
@import './variables.css';

/* リセット */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ユーティリティ */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-lg) 0;
}

.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ... Utilities above ... */

/* ヘッダー */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease, padding 0.3s ease;
    padding: 1.5rem 0;
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.nav-links .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* ヒーローセクション */
.hero {
    padding: 8rem 0 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* 背景ビジュアル装飾 */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--primary);
    filter: blur(180px);
    opacity: 0.15;
    border-radius: 50%;
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

/* ヒーロービジュアル（プレースホルダー） */
.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-circle {
    width: 350px;
    height: 350px;
    background: linear-gradient(45deg, var(--bg-surface), var(--bg-surface-acc));
    border-radius: 50%;
    border: 1px solid var(--border-light);
    position: relative;
}

.visual-card {
    position: absolute;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
}

.user-card {
    top: 10%;
    left: 0%;
    animation: float 6s ease-in-out infinite;
}

.stats-card {
    bottom: 15%;
    right: 5%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* コンポーネント: グリッド & カード */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.feature-card {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-box {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* 制作実績ピックアップ */
.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.work-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.work-image {
    height: 250px;
    background: #2a2a2a;
    position: relative;
}

.placeholder-img {
    background: linear-gradient(45deg, #1f2937 25%, #111827 25%, #111827 50%, #1f2937 50%, #1f2937 75%, #111827 75%, #111827 100%);
    background-size: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-img::after {
    content: 'Image';
    color: #4b5563;
    font-weight: 600;
}

.work-info {
    padding: 1.5rem;
}

.work-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.work-info .category {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

.center-btn {
    text-align: center;
}

.margin-top {
    margin-top: 3rem;
}

/* CTA (Call To Action) */
.cta-container {
    background: var(--gradient-surface);
    padding: 4rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-light);
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* フッター */
.footer {
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    background: var(--bg-body);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.social-links a:hover {
    color: var(--primary);
}

/* レスポンシブ対応 */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .visual-card {
        /* Simplified for mobile */
        display: none;
    }

    .visual-circle {
        margin: 0 auto;
        width: 250px;
        height: 250px;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Todo: mobile menu */
    }

    .mobile-menu-btn {
        display: block;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }
}

/* ページヒーロー */
.page-hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: radial-gradient(circle at 50% 20%, rgba(56, 189, 248, 0.1), transparent 60%);
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-hero p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* プロフィールセクション */
.profile-section .grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.stats-grid {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.stat-item strong {
    display: block;
    font-size: 2rem;
    color: var(--primary);
    line-height: 1;
}

.stat-item span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.profile-visual {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-rect {
    width: 300px;
    height: 400px;
    background: #2a2a2a;
    border-radius: 100px 0 100px 0;
    position: relative;
    overflow: hidden;
    /* Placeholder for potential image */
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid var(--border-light);
}

.bg-surface {
    background: var(--bg-surface);
}

/* スキル */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.tags span:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

/* サービス一覧 */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.service-row.reverse {
    direction: rtl;
    /* Simple way to swap, need to reset text align if needed */
}

.service-row.reverse .service-info,
.service-row.reverse .service-img-placeholder {
    direction: ltr;
    /* Reset text direction */
}

.service-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.check-list {
    margin-top: 1.5rem;
}

.check-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.check-list i {
    color: var(--secondary);
}

.service-img-placeholder {
    height: 300px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {

    .profile-section .grid-2,
    .service-row,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-row.reverse {
        direction: ltr;
    }
}

/* 実績フィルター */
.works-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 実績グリッド */
.works-grid-lg {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.work-item {
    position: relative;
}

.work-link {
    display: block;
}

.work-thumb {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

.thumb-placeholder_lg {
    height: 350px;
    background: #0f172a;
    /* Darker placeholder */
    background-image: radial-gradient(#1e293b 1px, transparent 1px);
    background-size: 20px 20px;
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.work-overlay span {
    border: 1px solid white;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.work-link:hover .work-overlay {
    opacity: 1;
}

.work-link:hover .work-overlay span {
    transform: translateY(0);
}

.work-caption h3 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

.cat-tag {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* 詳細ページ */
.project-hero {
    padding-top: 8rem;
    text-align: center;
    background: var(--bg-body);
}

.project-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 1rem auto;
}

.project-visual-hero {
    margin-top: 3rem;
    height: 500px;
    background: #1e293b;
    width: 100%;
    /* potentially use image here */
}

.project-info-bar {
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface);
    padding: 2rem 0;
}

.meta-grid {
    display: flex;
    justify-content: space-between;
}

.meta-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-item span,
.meta-item a {
    font-size: 1rem;
    font-weight: 600;
}

.ext-link {
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.content-width {
    max-width: 800px;
    /* Narrower for readability */
}

.detail-block {
    margin-bottom: 4rem;
}

.detail-block h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.detail-block p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.project-gallery {
    display: grid;
    gap: 2rem;
    margin: 4rem 0;
}

.gallery-item {
    height: 400px;
    background: #2a2a2a;
    border-radius: var(--radius-md);
}

.next-project {
    padding: 6rem 0;
    text-align: center;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
}

.next-project p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.next-project a {
    font-size: 2.5rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.next-project a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .works-grid-lg {
        grid-template-columns: 1fr;
    }

    .meta-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .project-visual-hero {
        height: 300px;
    }

    .gallery-item {
        height: 250px;
    }
}

/* 制作フロー（タイムライン） */
.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border-light);
}

.step-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 4rem;
    position: relative;
}

.step-num {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-family: var(--font-heading);
    z-index: 2;
    flex-shrink: 0;
}

.step-content {
    padding-top: 0.5rem;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step-duration {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.step-content p {
    color: var(--text-muted);
}

/* よくある質問 */
.faq-grid {
    display: grid;
    gap: 2rem;
}

.faq-item {
    background: var(--bg-body);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.faq-item h4 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* お問い合わせ / プロフィール */
.profile-intro {
    padding: 6rem 0;
}

.profile-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-photo-placeholder {
    width: 300px;
    height: 300px;
    background: #2a2a2a;
    border-radius: 50%;
    border: 4px solid var(--primary);
    /* placeholder gradient */
    background: linear-gradient(to bottom right, #333, #111);
}

.intro-lead {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0;
}

.intro-body {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.intro-body p {
    margin-bottom: 1rem;
}

.social-list {
    display: flex;
    gap: 1rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-surface-acc);
    border-radius: 50px;
    font-size: 0.9rem;
    color: white;
    border: 1px solid var(--border-light);
}

.social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* お問い合わせフォーム */
.contact-section {
    background: var(--bg-surface);
}

.contact-info-block {
    margin-bottom: 3rem;
}

.mail-address {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1rem;
    color: var(--primary);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-body);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
}

@media (max-width: 768px) {
    .process-timeline::before {
        left: 20px;
    }

    .profile-photo-placeholder {
        width: 200px;
        height: 200px;
    }

    .contact-form {
        padding: 1.5rem;
    }

    /* モバイルメニュー修正 */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-body);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        z-index: 999;
        padding-top: 80px;
    }

    .nav-links.active {
        display: flex;
        animation: fadeIn 0.3s ease;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}