:root {
    --primary-color: #4a9b82;
    --accent-color: #316857;
    --base-color: #f8faf8;
    --bg-light: #f0f7f2;
    --border-color: #eef2f1;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --text-light: #ffffff;
    --transition-speed: 0.25s;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 20px rgba(74, 155, 130, 0.08);
    --accent-light: #e0f2f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--base-color);
    overflow-x: hidden;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
    z-index: -1;
    filter: blur(40px);
    opacity: 0.5;
    pointer-events: none;
}

body::before {
    top: -100px;
    right: -100px;
}

body::after {
    bottom: -100px;
    left: -100px;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

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

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.8rem 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo img {
    height: 32px;
}

nav ul {
    display: flex;
    gap: 2.5rem;
}

nav ul li a {
    font-size: 0.95rem;
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
#hero {
    height: 90vh;
    background: linear-gradient(135deg, rgba(248, 250, 248, 0.7) 0%, rgba(248, 250, 248, 0.9) 100%),
        url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=1500') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-dark);
    padding: 0 5%;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 100px;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="2" fill="%232e7d32" /></svg>');
    opacity: 0.2;
    animation: float 8s infinite alternate;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    animation: fadeInUp 0.8s ease-out;
}

#hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out both;
}

/* General Section Styles */
section {
    padding: 120px 15%;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    margin: 15px auto 0;
}

/* Philosophy Section */
.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.philosophy-item {
    text-align: left;
    padding: 1.5rem;
    background: var(--base-color);
    border-radius: 8px;
}

.philosophy-item .label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.philosophy-item h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.4rem;
}

.philosophy-item .detail-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Top Message (Formerly CEO Profile) */
.top-message-container {
    display: flex;
    align-items: center;
    gap: 5rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.top-message-image {
    flex: 1;
    min-width: 300px;
}

.top-message-image img {
    border-radius: 60px 0 60px 0;
    /* Sanrio-like soft mask shape */
    box-shadow: var(--shadow-md);
    width: 100%;
}

.top-message-info {
    flex: 1.5;
    min-width: 300px;
}

.top-message-info h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.top-message-info .title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: block;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.top-message-info .history {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

/* Learn More Button (Sanrio Style) */
.learn-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.learn-more-btn .btn-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.learn-more-btn:hover .btn-icon {
    transform: translateX(5px);
    background: var(--accent-color);
}

.learn-more-btn span {
    font-size: 1.1rem;
}

/* Instagram Section */
.instagram-header {
    text-align: center;
    margin-bottom: 3rem;
}

.instagram-header .section-title {
    margin-bottom: 1rem;
}

.insta-id {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1.1rem;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.insta-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
    position: relative;
    cursor: pointer;
}

.insta-item:hover {
    transform: translateY(-5px);
}

.insta-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.insta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 155, 130, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.insta-item.placeholder {
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-align: center;
    border: 2px dashed var(--primary-color);
}

.placeholder-content p {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.placeholder-content span {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Services Section - 2x2 Grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.service-card {
    background: var(--base-color);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

/* Contact Form */
.contact-container {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

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

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    transition: border-color var(--transition-speed);
}

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

.submit-btn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition-speed);
}

.submit-btn:hover {
    background: var(--accent-color);
}

/* Company Info */
.company-info-footer {
    background: #fcfcfc;
    padding: 80px 15%;
    border-top: 1px solid var(--border-color);
}

.info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.info-grid h4 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.info-grid p {
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.sns-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Edit Mode Toggle Link (Floating) */
.edit-trigger {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    font-size: 0.8rem;
    opacity: 0.5;
    transition: opacity var(--transition-speed);
}

.edit-trigger:hover {
    opacity: 1;
}

/* Login Modal */
#login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Edit Mode Visuals */
.edit-active [contenteditable="true"] {
    outline: 1px dashed var(--primary-color);
    background: rgba(74, 155, 130, 0.05);
}

.edit-active .editable-img {
    cursor: pointer;
    position: relative;
}

.edit-active .editable-img::after {
    content: 'Click to change';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 155, 130, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s;
}

.edit-active .editable-img:hover::after {
    opacity: 1;
}

@media (max-width: 900px) {
    section {
        padding: 80px 10%;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .top-message-container {
        flex-direction: column;
        text-align: center;
    }

    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Animation utility */
    [data-aos] {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    [data-aos].aos-animate {
        opacity: 1;
        transform: translateY(0);
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #hero h1 {
        font-size: 2.5rem;
    }
}