/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本設定 */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #1e40af;
    --accent-color: #dc2626;
    --text-dark: #111827;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    --gradient-secondary: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    --gradient-accent: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    backdrop-filter: none;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-direction: row;
}

.logo-img {
    height: auto;
    width: auto;
    max-height: 60px;
    transition: transform 0.3s ease;
    border-radius: 0;
    border: none;
    outline: none;
    box-shadow: none;
    display: block;
    background: none;
    flex-shrink: 0;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* ヒーローセクション */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.animated-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(30, 58, 138, 0.8), rgba(30, 64, 175, 0.8)), url('webback.png');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    animation: gradientShift 15s ease infinite;
    position: relative;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes circularMotion1 {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateX(140px) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(140px) rotate(-360deg); }
}

@keyframes circularMotion2 {
    0% { transform: translate(-50%, -50%) rotate(120deg) translateX(140px) rotate(-120deg); }
    100% { transform: translate(-50%, -50%) rotate(480deg) translateX(140px) rotate(-480deg); }
}

@keyframes circularMotion3 {
    0% { transform: translate(-50%, -50%) rotate(240deg) translateX(140px) rotate(-240deg); }
    100% { transform: translate(-50%, -50%) rotate(600deg) translateX(140px) rotate(-600deg); }
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 2;
    animation: heroEntrance 2s ease-out;
}

.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    margin-bottom: 2rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-family: 'Inter', sans-serif;
    color: transparent;
    background: url('webback.png');
    background-size: 120% auto;
    background-position: 50% 30%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textStroke 3s ease-in-out forwards;
    position: relative;
}

.title-line {
    display: block;
    animation: titleSlideIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards, textDraw 2s ease-in-out forwards;
    opacity: 0;
    transform: translateX(-100px) rotateX(90deg);
    color: transparent;
    background: url('webback.png');
    background-size: 120% auto;
    background-position: 50% 30%;
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
}

.title-line:nth-child(1) { 
    animation-delay: 0.3s, 0.5s; 
}
.title-line:nth-child(2) { 
    animation-delay: 0.6s, 0.8s; 
}
.title-line:nth-child(3) { 
    animation-delay: 0.9s, 1.1s; 
}

@keyframes heroEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes titleSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-100px) rotateX(90deg);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-20px) rotateX(45deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotateX(0deg);
    }
}

@keyframes subtitleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes buttonsSlideUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes buttonScaleIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes textStroke {
    0% {
        background-position: 0% 0%;
        -webkit-text-fill-color: transparent;
    }
    50% {
        background-position: 100% 0%;
        -webkit-text-fill-color: transparent;
    }
    100% {
        background-position: 100% 0%;
        -webkit-text-fill-color: transparent;
    }
}

@keyframes textDraw {
    0% {
        background-position: 100% 0;
        -webkit-text-fill-color: transparent;
    }
    50% {
        background-position: 50% 0;
        -webkit-text-fill-color: transparent;
    }
    100% {
        background-position: 0% 0;
        -webkit-text-fill-color: transparent;
    }
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: subtitleFadeIn 1.5s ease-out 1.2s forwards;
    font-weight: 400;
    letter-spacing: 0.02em;
    font-family: 'Inter', sans-serif;
    transform: translateY(30px) scale(0.9);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: buttonsSlideUp 1.2s ease-out 1.5s forwards;
    transform: translateY(50px);
}

.btn {
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.05em;
    transform: scale(0.9);
    animation: buttonScaleIn 0.8s ease-out forwards;
}

.btn:nth-child(1) { animation-delay: 1.7s; }
.btn:nth-child(2) { animation-delay: 1.9s; }

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px) scale(1.05);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite, fadeInUp 1s ease-out 2.5s forwards;
    opacity: 0;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: var(--white);
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* セクション共通 */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    letter-spacing: 0.02em;
    font-family: 'Inter', sans-serif;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.7;
    font-weight: 300;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    margin-top: 1rem;
}

/* アバウトセクション */
.about {
    padding: 6rem 0;
    background: linear-gradient(rgba(248, 250, 252, 0.95), rgba(248, 250, 252, 0.95)), url('fd9616b68a7c073633da7591a96a8b3a.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-dark);
    font-weight: 400;
    letter-spacing: 0.01em;
    font-family: 'Inter', sans-serif;
}

.floating-cards {
    position: relative;
    height: 400px;
}

.card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: var(--shadow-heavy);
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 200px;
    min-height: 200px;
    transform-origin: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-heavy);
}

.card-1 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 1s ease-out;
}

.card-2 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 1s ease-out 0.2s;
}

.card-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 1s ease-out 0.4s;
}

.card-1.visible {
    opacity: 1;
    transform: translate(-50%, -50%) translate(140px, 0px);
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('whatwedo2.PNG');
    background-size: cover;
    background-position: center;
}

.card-2.visible {
    opacity: 1;
    transform: translate(-50%, -50%) translate(-70px, 121px);
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('whatwedo3.PNG');
    background-size: cover;
    background-position: center;
}

.card-3.visible {
    opacity: 1;
    transform: translate(-50%, -50%) translate(-70px, -121px);
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('whatwedo4.PNG');
    background-size: cover;
    background-position: center;
}

.card i {
    display: none;
}

.card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    letter-spacing: 0.02em;
    font-family: 'Inter', sans-serif;
}

/* サービスセクション */
.services {
    padding: 6rem 0;
    background: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), url('pretty-iphone-xs-max-wallpaper-8_b7d5be4466e1c4424d8cec5b571da691_raw.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.service-icon i {
    font-size: 2rem;
    color: var(--white);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.service-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    letter-spacing: -0.01em;
    font-family: 'Inter', sans-serif;
}

.service-description {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    font-family: 'Inter', sans-serif;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: 0.7rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    font-family: 'Inter', sans-serif;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ポートフォリオセクション */
.portfolio {
    padding: 6rem 0;
    background: var(--bg-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.portfolio-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    font-family: 'Inter', sans-serif;
}

.portfolio-overlay p {
    font-size: 1.1rem;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.01em;
    font-family: 'Inter', sans-serif;
}

/* コンタクトセクション */
.contact {
    padding: 6rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.contact-item h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
    letter-spacing: -0.01em;
    font-family: 'Inter', sans-serif;
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    font-family: 'Inter', sans-serif;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 400;
    transition: border-color 0.3s ease;
    letter-spacing: 0.01em;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* フッター */
.footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo .logo-text {
    color: var(--white);
    background: linear-gradient(135deg, #ffffff 0%, #e5e7eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .floating-cards {
        height: 300px;
    }
    
    .card {
        position: relative;
        margin-bottom: 1rem;
        animation: none;
    }
    
    .card-1, .card-2, .card-3 {
        position: relative;
        transform: none;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 1rem 15px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* スクロールアニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* カスタムスクロールバー */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: white;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e5e7eb;
}

/* Firefox用 */
html {
    scrollbar-width: thin;
    scrollbar-color: white #f1f1f1;
}