/*
Theme Name: DataEgg Theme (Swell Child)
Theme URI: https://dataegg.co.jp
Template: swell
Author: DataEgg
Author URI: https://dataegg.co.jp
Description: Corporate theme for DataEgg (Child of SWELL)
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1p:wght@400;500;700&family=Montserrat:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    /* --- Colors --- */
    --color-primary: #2F3C43;
    --color-accent-start: #9F407F;
    --color-accent-end: #984D94;
    --color-secondary: #455056;
    --color-positive: #28A980;
    --color-alert: #F5A623;

    /* Mapping for compatibility/semantics */
    --primary-color: var(--color-accent-start);
    /* Keep for legacy, but prefer accent */
    --primary-dark: var(--color-accent-end);

    --text-main: #2F3C43;
    --text-sub: #455056;
    --text-disabled: #9BA7AF;

    --bg-body: #FFFFFF;
    --bg-surface: #FFFFFF;
    --bg-alt: #F5F7F9;
    --bg-secondary: #F5F7F9;

    --border-color: #D9E1E5;

    /* --- Typography --- */
    --font-jp: 'Noto Sans JP', 'M PLUS 1p', sans-serif;
    --font-en: 'Poppins', 'Montserrat', sans-serif;
    --font-main: var(--font-en), var(--font-jp);

    /* --- Spacing --- */
    --container-width: 1200px;
    --header-height: 70px;
    --space-xs: 4px;
    --space-s: 8px;
    --space-m: 16px;
    --space-l: 24px;
    --space-xl: 40px;
    --space-xxl: 64px;
    --space-section-d: 80px;
    --space-section-m: 48px;

    /* Legacy Spacing Mapping */
    --spacing-xs: var(--space-s);
    --spacing-sm: var(--space-m);
    --spacing-md: var(--space-l);
    --spacing-lg: var(--space-xl);
    --spacing-xl: var(--space-section-d);

    /* --- Radius --- */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* --- Effects --- */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);

    --transition-base: all 0.2s ease;
}

/* --- Reset & Base --- */
/* Scoped reset to avoid breaking Swell */
.de-wrapper * {
    box-sizing: border-box;
}

.de-wrapper a {
    text-decoration: none;
    transition: var(--transition-base);
}

.de-wrapper ul,
.de-wrapper ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.de-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout Utilities --- */
.de-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-l);
}

.de-hero-container {
    max-width: var(--container-width);
    margin: 0 auto 0 4rem;
    padding: 0 var(--space-l);
}

.de-section {
    padding: var(--space-section-d) 0;
}

.de-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-xxl);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--text-sub) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-secondary {
    background-color: var(--bg-secondary);
}

.section-cta {
background-color: #484848;
    padding: 1rem;
    color: #fff;
}

/* --- Header --- */
.de-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-l);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.de-header .logo img {
    height: 28px;
    width: auto;
}

.de-header nav ul {
    display: flex;
    gap: var(--space-l);
    align-items: center;
}

.de-header nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-sub);
}

.de-header nav a:hover {
    color: var(--color-accent-start);
}

.de-header .btn-contact {
    background: var(--text-main);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
}

.de-header .btn-contact:hover {
    background: var(--color-accent-start);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* --- Hero Section --- */
.de-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 80% 20%, rgba(166, 51, 147, 0.05) 0%, transparent 50%);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.de-hero-content {
    position: relative;
    z-index: 2;
}

.de-hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: var(--space-l);
    letter-spacing: -0.03em;
}

.de-hero p {
    font-size: 1.25rem;
    color: var(--text-sub);
    margin-bottom: var(--space-l);
}

.de-hero-visual {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 55%;
    height: 85%;
    background: linear-gradient(135deg, #f6f6f6 0%, #ffffff 100%);
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
    z-index: 1;
    overflow: hidden;
}

.de-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

/* --- Bento Grid / Services --- */
.de-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(280px, auto));
    gap: var(--space-l);
}

.de-bento-item {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-l);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.de-bento-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: var(--color-accent-start);
}

.de-bento-item.large {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a2226 100%);
    color: white;
}

.de-bento-item.large h3,
.de-bento-item.large p {
    color: white;
}

.de-bento-item h3 {
    font-size: 1.25rem;
    /* H3 size */
    margin-bottom: var(--space-s);
    font-weight: 600;
}

.de-bento-item p {
    color: var(--text-sub);
    font-size: 0.95rem;
    margin-bottom: var(--space-m);
}

/* Service Gradients - Simplified */
.bento-ai {
    background: #ffffff;
    border-color: var(--border-color);
}

.bento-ux {
    background: #ffffff;
    border-color: var(--border-color);
}

.bento-web {
    background: #ffffff;
    border-color: var(--border-color);
}

.bento-startup {
    background: #ffffff;
    border-color: var(--border-color);
}

.bento-biz {
    background: #ffffff;
    border-color: var(--border-color);
}

/* Override text color for light backgrounds */
.de-bento-item h3,
.de-bento-item p {
    color: var(--text-main);
}

.de-bento-item.large {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a2226 100%);
}

.de-bento-item.large h3,
.de-bento-item.large p {
    color: white;
}

.bento-link {
    margin-top: auto;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-accent-start);
}

.bento-link::after {
    content: "→";
    transition: transform 0.2s;
}

.de-bento-item:hover .bento-link::after {
    transform: translateX(4px);
}

/* --- Products Section --- */
.de-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-l);
}

.de-product-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-l);
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    transition: var(--transition-base);
}

.de-product-card:hover {
    box-shadow: var(--shadow-card);
    border-color: var(--color-accent-start);
}

.de-product-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.de-product-card p {
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-bottom: var(--space-m);
}

/* --- Buttons / CTAs --- */
.de-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
}

.de-btn--primary {
    background: linear-gradient(90deg, var(--color-accent-start) 0%, var(--color-accent-end) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.de-btn--primary:hover {
    box-shadow: var(--shadow-lg);
    opacity: 0.95;
    transform: translateY(-1px);
}

.de-btn--outline {
    background: transparent;
    border-color: var(--color-accent-start);
    color: var(--color-accent-start);
}

.de-btn--outline:hover {
    background: rgba(159, 64, 127, 0.06);
    /* Thin magenta bg */
    color: var(--color-accent-start);
}

/* Legacy support (can be refactored later) */
.btn-outline {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background: var(--text-main);
    color: white;
}

/* --- Company Profile --- */
.de-company-profile {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.de-company__list {
    display: grid;
    gap: var(--space-l);
}

.de-company__row {
    display: grid;
    grid-template-columns: 160px 1fr;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-m);
}

.de-company__row:last-child {
    border-bottom: none;
}

.de-company__row dt {
    font-weight: 600;
    color: var(--text-sub);
}

/* --- Footer --- */
.de-footer {
    background: #050505;
    color: white;
    padding: var(--space-section-d) 0;
}

.de-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.de-footer-logo img {
    height: 24px;
    width: auto;
    margin-bottom: var(--space-m);
}

.de-footer-links h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-m);
    color: white;
}

.de-footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.de-footer-links a {
    color: #a0aec0;
    font-size: 0.9rem;
}

.de-footer-links a:hover {
    color: white;
}

.de-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-l);
    text-align: center;
    font-size: 0.85rem;
    color: #718096;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --space-section-d: 60px;
        --header-height: 60px;
    }

    .de-hero h1 {
        font-size: 2.5rem;
    }

    .de-hero-visual {
        display: none;
    }

    .de-hero-content {
        max-width: 100%;
        text-align: center;
    }

    .de-hero-container {
        margin: 0 auto;
        padding: 0 var(--space-l);
    }

    .de-bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .de-bento-item.large {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 300px;
    }

    .de-footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-l);
    }

    .de-company__row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Mobile Header Height */
    .de-page-header {
        min-height: 250px;
    }

    .de-page-header h1 {
        font-size: 6rem;
    }

    /* Mobile Product Grid */
    .de-product-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Menu */
    .de-mobile-menu-btn {
        display: block;
        z-index: 1001;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }

    .de-mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--text-main);
        margin: 5px 0;
        transition: var(--transition-base);
    }

    .de-header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        padding: 80px 20px;
        transition: var(--transition-base);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .de-header nav.active {
        right: 0;
    }

    .de-header nav ul {
        flex-direction: column;
        gap: 2rem;
    }

    .de-header nav a {
        font-size: 1.2rem;
    }
}

/* Desktop Menu Hide */
@media (min-width: 769px) {
    .de-mobile-menu-btn {
        display: none;
    }
}

.de-feature__list li::before {
    counter-increment: feature;
    content: "0" counter(feature);
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.1;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.de-feature__list strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.de-usecase {
    background: white;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.de-usecase__img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}

.de-usecase__content {
    flex: 1;
}

.de-usecase__ttl {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.de-faq {
    max-width: 800px;
    margin: 0 auto;
}

.de-faq dt {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 3.5rem;
}

.de-faq dt::before {
    content: 'Q';
    position: absolute;
    left: 1.5rem;
    color: var(--primary-color);
}

.de-faq dd {
    padding: 0 1.5rem 1.5rem 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-sub);
}

.de-flow {
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
    border-left: 4px solid var(--bg-secondary);
    padding-left: 2rem;
}

.de-flow li {
    margin-bottom: 2rem;
    position: relative;
}

.de-flow li::before {
    content: '';
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    left: -2.6rem;
    top: 0.4rem;
    border: 4px solid white;
    box-shadow: 0 0 0 2px var(--bg-secondary);
}

.de-btn--primary {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    margin: 2rem auto;
    display: block;
    width: fit-content;
    transition: transform 0.2s;
}

.de-btn--primary:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.de-problem__list {
    background: #fff0f5;
    /* Light pinkish bg matching brand */
    padding: 2rem 3rem;
    border-radius: var(--border-radius);
    list-style: none;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.de-problem__list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.de-problem__list li::before {
    content: '✔';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.de-message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3rem;
}


.de-works {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.de-works li {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

/* --- Page Header Height Increase --- */
.page-header {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: var(--space-m);
}

.page-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    background: var(--bg-alt);
    padding: var(--space-m) 0;
    font-size: 0.9rem;
}

.breadcrumbs ul {
    display: flex;
    gap: var(--space-s);
    color: var(--text-sub);
}

.breadcrumbs li::after {
    content: '>';
    margin-left: var(--space-s);
    color: var(--text-disabled);
}

.breadcrumbs li:last-child::after {
    content: '';
}

.breadcrumbs a:hover {
    color: var(--color-accent-start);
    text-decoration: underline;
}

/* --- Page Top Button --- */
#page-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 999;
    box-shadow: var(--shadow-md);
    font-weight: bold;
}

#page-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

#page-top-btn:hover {
    background: var(--color-accent-start);
    transform: translateY(-4px);
}


/* --- Contact Form --- */
.de-form__lead {
    text-align: center;
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.de-form__label {
    display: block;
    margin-bottom: var(--space-l);
    font-weight: 600;
}

.de-required {
    color: #e53e3e;
    margin-left: 4px;
    font-size: 0.9em;
}

.wpcf7-form-control-wrap {
    display: block;
    margin-top: 8px;
}

.wpcf7-text,
.wpcf7-textarea,
.wpcf7-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    font-size: 1rem;
    transition: var(--transition-base);
}

.wpcf7-text:focus,
.wpcf7-textarea:focus,
.wpcf7-select:focus {
    border-color: var(--color-accent-start);
    outline: none;
    box-shadow: 0 0 0 3px rgba(159, 64, 127, 0.1);
}

.de-form__submit {
    text-align: center;
    margin-top: var(--space-xl);
}

.wpcf7-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 48px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    border: none;
    background: linear-gradient(90deg, var(--color-accent-start) 0%, var(--color-accent-end) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.wpcf7-submit:hover {
    box-shadow: var(--shadow-lg);
    opacity: 0.95;
    transform: translateY(-1px);
}