/* リセットCSS */
:root { --header-height: 56px; }
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    overflow-x: hidden;
    padding-top: var(--header-height);
}

/* 固定ヘッダーで隠れないようアンカー位置を補正 */
section[id],
main[id],
header[id],
footer[id] {
  scroll-margin-top: calc(var(--header-height) + 8px);
}

/* ヘッダー */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.logo:hover,
.logo:focus,
.logo:visited { text-decoration: none; }

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

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #667eea;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    transition: all 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

.cta-button {
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* モバイルメニュー */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ヒーローセクション */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><circle cx="200" cy="200" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="800" cy="300" r="3" fill="rgba(255,255,255,0.1)"/><circle cx="400" cy="600" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="600" cy="800" r="4" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

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

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text .highlight {
    background: linear-gradient(90deg, #ffd89b 0%, #19547b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: white;
    color: #667eea;
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

.hero-card h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.hero-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* サービスセクション */
.services {
    padding: 6rem 0;
    background: #f8fafc;
}

/* servicesだけ横幅を広めにする */
.services .container {
    max-width: 1400px;
}

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

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title p {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

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

.service-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.service-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

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

.service-features li {
    color: #64748b;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4facfe;
    font-weight: bold;
}

/* 実績セクション */
.portfolio {
    padding: 6rem 2rem;
    background: white;
}

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

.portfolio-item {
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.portfolio-content p {
    color: #64748b;
    margin-bottom: 1rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* 会社情報セクション */
.about {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

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

.about-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    color: #64748b;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #4facfe;
    display: block;
}

.stat-label {
    color: #64748b;
    font-weight: 500;
}

.about-visual {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* お客様の声セクション */
.testimonials {
    padding: 6rem 2rem;
    background: white;
}

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

.testimonial-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 2rem;
    position: relative;
}

.testimonial-quote {
    color: #4facfe;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
}

.author-title {
    color: #64748b;
    font-size: 0.875rem;
}

/* お問い合わせセクション */
.contact {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    color: white;
}

.contact-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.contact p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form button {
    grid-column: 1 / -1;
    padding: 1rem 2rem;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.contact-item {
    text-align: center;
}

.contact-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.contact-detail {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* フッター */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.875rem;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* 技術スタック */
.tech-stack-container {
    text-align: center;
    padding: 2rem;
}

.tech-stack-title {
    margin-bottom: 1.5rem;
    color: #4facfe;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.tech-item {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
    text-align: center;
}
.tech-grid > *,
.tech-item { min-width: 0; }

.tech-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tech-label {
    font-size: 0.875rem;
    color: #64748b;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tech-description {
    color: #64748b;
    font-size: 0.875rem;
}

/* フォーム要素 */
.select-service {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

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

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* 初期表示時のアニメーション無効化 */
.fade-in:not(.visible),
.slide-in-left:not(.visible),
.slide-in-right:not(.visible) {
    opacity: 0;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }

    /* スマホ時は services の左右余白をさらに狭く */
    .services .container {
        padding-inline: 8px;
    }
}

/* =============================
   Utility classes (Tailwind風の最小実装)
   ヘッダー/モバイルナビで使用しているクラスの動作を補完
   ============================= */
/* layout */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.inline-block { display: inline-block; }
.font-semibold { font-weight: 600; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-6 { gap: 1.5rem; }
.gap-2 { gap: 0.5rem; }
/* hover utilities */
.hover\:opacity-80:hover { opacity: 0.8; }

/* sizing */
.h-14 { height: 3.5rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-fit { width: fit-content; }

/* spacing */
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.mt-2 { margin-top: 0.5rem; }

/* borders & radius */
.rounded { border-radius: 0.25rem; }
.border { border: 1px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-t { border-top: 1px solid #e5e7eb; }

/* accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* responsive (md: 768px〜) */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:inline-block { display: inline-block; }
  .md\:hidden { display: none; }
}

/* 追加のはみ出し対策（グリッド/カード） */
.services-grid,
.portfolio-grid,
.testimonials-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.hero-content > *,
.about-content > *,
.services-grid > *,
.portfolio-grid > *,
.testimonials-grid > * { min-width: 0; }