/* ============================================
   ESTELA WORKS - Main Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #15C176;
    --primary-dark: #088F5A;
    --primary-light: #9BF0C3;
    --dark: #1a1a1a;
    --text: #333333;
    --text-light: #666666;
    --bg-light: #f8faf9;
    --white: #ffffff;
    --hero-from: #0a1628;
    --hero-to: #0d2818;

    --font-en: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-ja: 'UD新ゴ R', 'UDShinGo-Regular', 'Helvetica Neue', Arial, sans-serif;
    --font-ja-medium: 'UD新ゴ M', 'UDShinGo-Medium', 'Helvetica Neue', Arial, sans-serif;

    --header-h: 72px;
    --container: 1200px;
    --section-py: 120px;
    --section-py-sp: 80px;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-ja);
    color: var(--text);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ja-medium);
    line-height: 1.4;
    letter-spacing: 0.015em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* --- Utility --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Focus --- */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
}

.header.is-scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 101;
}

.logo-mark {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--white);
    transition: color 0.3s;
}

.header.is-scrolled .logo-text {
    color: var(--dark);
}

/* Nav PC */
.nav-pc {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    padding: 4px 0;
    transition: color 0.2s;
}

.header.is-scrolled .nav-link {
    color: var(--text);
}

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

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

.nav-link--cta {
    background: var(--primary);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 12px;
}

.nav-link--cta::after {
    display: none;
}

.nav-link--cta:hover {
    background: var(--primary-dark);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    z-index: 101;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s, background 0.3s;
}

.header.is-scrolled .hamburger-line {
    background: var(--dark);
}

.hamburger.is-open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: var(--white);
}

.hamburger.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: var(--white);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.97);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.mobile-menu-link {
    font-family: var(--font-en);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--white);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s, transform 0.3s, color 0.2s;
}

.mobile-menu.is-open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay for mobile menu links */
.mobile-menu.is-open .mobile-menu-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(5) { transition-delay: 0.25s; }

.mobile-menu-link:hover {
    color: var(--primary);
}


/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-brand {
    font-family: var(--font-en);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.hero-sub {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 40px;
}

.hero-cta {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    font-family: var(--font-ja-medium);
    font-size: 15px;
    font-weight: 600;
    padding: 16px 40px;
    border-radius: 100px;
    letter-spacing: 0.05em;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(21, 193, 118, 0.3);
}

.hero-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(21, 193, 118, 0.4);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-indicator-text {
    font-family: var(--font-en);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.4);
}

.scroll-indicator-line {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.scroll-indicator-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}


/* ============================================
   SECTION COMMON
   ============================================ */
.section {
    padding: var(--section-py) 0;
}

.section--alt {
    background: var(--bg-light);
}

.section--dark {
    background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title-en {
    font-family: var(--font-en);
    font-size: 40px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: 0.08em;
    line-height: 1;
}

.section-title-en--light {
    color: var(--white);
}

.section-title-ja {
    font-size: 14px;
    color: var(--primary);
    letter-spacing: 0.15em;
    margin-top: 8px;
}

.section-title-ja--light {
    color: var(--primary-light);
}

.section-header::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary);
    margin: 16px auto 0;
}


/* ============================================
   ABOUT US
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 64px;
}

.ceo-badge {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #15C176 0%, #088F5A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(21, 193, 118, 0.25);
}

.ceo-badge-text {
    font-family: var(--font-en);
    font-size: 40px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.15em;
}

.about-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.about-role {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-light);
    margin-top: 4px;
}

.about-text {
    font-size: 15px;
    color: var(--text);
    line-height: 2;
}

/* Company Info */
.about-company {
    max-width: 800px;
    margin: 0 auto;
}

.company-info {
    border-top: 1px solid #e5e7eb;
}

.company-info-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 0;
}

.company-info-row dt {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

.company-info-row dd {
    font-size: 15px;
}


/* ============================================
   SERVICE
   ============================================ */
.service-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.service-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

@media (hover: hover) {
    .service-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    }
}

.service-card--main {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 56px 40px;
}

.service-card--main .service-icon {
    color: var(--white);
}

.service-card--main .service-desc {
    color: rgba(255, 255, 255, 0.85);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    color: var(--primary);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card--main .service-icon {
    width: 56px;
    height: 56px;
}

.service-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card--main .service-title {
    font-size: 28px;
}

.service-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}


/* ============================================
   FEATURE
   ============================================ */
.feature-grid {
    display: flex;
    gap: 32px;
}

.feature-card {
    flex: 1;
    background: var(--white);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.feature-text {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.9;
}


/* ============================================
   NEWS
   ============================================ */
.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
    transition: opacity 0.2s;
}

.news-item:first-child {
    border-top: 1px solid #e5e7eb;
}

@media (hover: hover) {
    .news-item:hover {
        opacity: 0.7;
    }
}

.news-date {
    font-family: var(--font-en);
    font-size: 14px;
    color: var(--text-light);
    flex-shrink: 0;
}

.news-category {
    font-size: 11px;
    font-weight: 600;
    background: var(--primary);
    color: var(--white);
    padding: 3px 12px;
    border-radius: 100px;
    flex-shrink: 0;
}

.news-title {
    font-size: 15px;
    color: var(--text);
}


/* ============================================
   CONTACT
   ============================================ */
.contact-lead {
    text-align: center;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 48px;
}

.contact-form {
    max-width: 560px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-required {
    color: #e53e3e;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 193, 118, 0.1);
}

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

.form-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.form-message--success {
    background: #e8f5e9;
    color: #2e7d32;
}

.form-message--error {
    background: #ffebee;
    color: #c62828;
}

.form-submit {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: var(--white);
    font-family: var(--font-ja-medium);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.form-submit:hover {
    background: var(--primary-dark);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

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

.footer-logo {
    width: 28px;
    height: 28px;
}

.footer-name {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 16px;
    color: var(--white);
    letter-spacing: 0.08em;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    font-family: var(--font-en);
    font-size: 13px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--primary);
}

.footer-info {
    font-size: 13px;
    line-height: 2;
}

.footer-info a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-info a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}


/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1023px) {
    :root {
        --header-h: 64px;
        --section-py: 100px;
    }

    .hero-title {
        font-size: 40px;
    }

    .service-card--main .service-title {
        font-size: 24px;
    }
}

/* SP */
@media (max-width: 767px) {
    :root {
        --header-h: 56px;
        --section-py: var(--section-py-sp);
    }

    /* Header */
    .nav-pc {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Hero */
    .hero {
        min-height: 100svh;
    }

    .hero-brand {
        font-size: 12px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-sub {
        font-size: 15px;
    }

    .hero-cta {
        padding: 14px 32px;
        font-size: 14px;
    }

    /* Section */
    .section-header {
        margin-bottom: 48px;
    }

    .section-title-en {
        font-size: 28px;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .about-ceo {
        display: flex;
        justify-content: center;
    }

    .ceo-badge {
        width: 120px;
        height: 120px;
    }

    .ceo-badge-text {
        font-size: 28px;
    }

    .about-name {
        font-size: 20px;
    }

    .company-info-row {
        grid-template-columns: 100px 1fr;
        font-size: 14px;
    }

    /* Service */
    .service-layout {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 32px 24px;
    }

    .service-card--main {
        padding: 40px 24px;
    }

    .service-card--main .service-title {
        font-size: 22px;
    }

    /* Feature */
    .feature-grid {
        flex-direction: column;
    }

    .feature-card {
        padding: 36px 24px;
    }

    /* News */
    .news-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .news-title {
        width: 100%;
        font-size: 14px;
    }

    /* Contact */
    .contact-form {
        padding: 32px 20px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
    }

    .footer-nav {
        align-items: center;
    }

    .footer-info {
        text-align: center;
    }
}
