/* --------------------------------------------------------------------------
 * Variables & Reset
 * -------------------------------------------------------------------------- */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #0f172a;
    --bg-surface: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.05);

    --font-heading: 'Inter', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --------------------------------------------------------------------------
 * Background Elements (Glassmorphism & Glow)
 * -------------------------------------------------------------------------- */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, rgba(15, 23, 42, 0) 70%);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    bottom: 20%;
    left: -150px;
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, -50px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

/* --------------------------------------------------------------------------
 * Header
 * -------------------------------------------------------------------------- */
.header {
    padding: 60px 0 40px;
    text-align: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-title {
    text-align: left;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .header-title {
        text-align: center;
    }
}

.logo {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.logo .dot {
    color: var(--primary-color);
    -webkit-text-fill-color: var(--primary-color);
}

.subtitle {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
 * Buttons
 * -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    text-decoration: none;
    cursor: pointer;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
 * Main Content & Section Header
 * -------------------------------------------------------------------------- */
.main-content {
    padding: 0 0 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.title-line {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto 24px;
    border-radius: 2px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
 * Portfolio Grid
 * -------------------------------------------------------------------------- */
.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
}

/* --------------------------------------------------------------------------
 * Premium Cards
 * -------------------------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-fast);
    flex: 0 1 340px;
    width: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 65%;
    /* aspect ratio */
    overflow: hidden;
    background-color: var(--bg-surface);
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0) 50%);
    opacity: 0.6;
    transition: opacity var(--transition-normal);
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform var(--transition-slow);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card:hover .card-img-wrapper::after {
    opacity: 0.8;
}

/* Overlay Elements on Image */
.card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 2;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card:hover .card-overlay {
    opacity: 1;
}

.view-text {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.125rem;
    color: #fff;
    transform: translateY(15px);
    transition: transform var(--transition-normal) 0.1s;
}

.arrow-icon {
    transform: translateY(15px) translateX(-10px);
    opacity: 0;
    transition: transform var(--transition-normal) 0.15s, opacity var(--transition-normal) 0.15s;
    color: var(--primary-color);
}

.card:hover .view-text {
    transform: translateY(0);
}

.card:hover .arrow-icon {
    transform: translateY(0) translateX(0);
    opacity: 1;
}

/* Card Content Area */
.card-content {
    padding: 28px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.card:hover .card-title {
    color: var(--primary-color);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-top: auto;
}

/* --------------------------------------------------------------------------
 * Call To Action Section
 * -------------------------------------------------------------------------- */
.cta-section {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

.cta-content {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 900px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.cta-desc {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.cta-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.cta-buttons-primary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.cta-buttons-secondary {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
    /* 少し間隔を空ける */
}

.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all var(--transition-normal);
    text-decoration: none;
    color: #fff;
    border: 1px solid transparent;
    flex: 1 1 280px;
    /* ボタンが均等な幅になるように設定。最小幅280px */
    max-width: 320px;
    /* 最大幅を制限して大きくなりすぎないようにする */
}

.cta-btn .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-portfolio {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-portfolio:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-coconala {
    background-color: #00A67E;
    /* Coconala Green */
}

.btn-coconala:hover {
    background-color: #008f6c;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 166, 126, 0.3);
}

.btn-lancers {
    background-color: #1976D2;
    /* Lancers Blue */
}

.btn-lancers:hover {
    background-color: #1565C0;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(25, 118, 210, 0.3);
}

/* --------------------------------------------------------------------------
 * Footer
 * -------------------------------------------------------------------------- */
.footer {
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
 * Responsive
 * -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .header {
        padding: 40px 0 30px;
    }

    .logo {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .portfolio-grid {
        display: block;
    }

    .card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto 24px auto;
    }

    .card:last-child {
        margin-bottom: 0;
    }

    .cta-content {
        padding: 40px 24px;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-buttons-primary {
        flex-direction: column;
        gap: 16px;
    }

    .cta-buttons-secondary {
        margin-top: 0;
    }

    .cta-btn {
        flex: none;
        width: 100%;
        max-width: none;
    }
}