/* ===== CSS Variables ===== */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    --accent: #0ea5e9;
    --accent-light: #38bdf8;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #e0f2fe 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    color: var(--text-primary);
    background: var(--bg-light);
}

/* ===== Header ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-700);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '';
    width: 8px;
    height: 32px;
    background: linear-gradient(180deg, var(--primary-500), var(--accent));
    border-radius: 4px;
}

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

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-cta {
    background: var(--primary-600);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    transition: background 0.2s, transform 0.2s !important;
}

.nav-cta:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 30%, #3b82f6 60%, #0ea5e9 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 40%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    color: white;
    padding: 2rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 3rem;
    letter-spacing: 0.1em;
}

.hero-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.hero-info-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: var(--primary-700);
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}

.hero-cta svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

.hero-cta:hover svg {
    transform: translateX(4px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

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

/* ===== Main Content ===== */
main {
    background: var(--bg-gradient);
}

/* ===== Section Styles ===== */
section {
    padding: 5rem 2rem;
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent));
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-800);
    margin-bottom: 0.75rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===== Card Styles ===== */
.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ===== Info Section (S1) ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-500);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent);
}

.info-card h3 {
    font-size: 0.875rem;
    color: var(--primary-600);
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-card p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-card .address {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    background: var(--primary-50);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.pdf-link:hover {
    background: var(--primary-100);
}

.pdf-link.disabled {
    color: var(--text-muted);
    background: var(--bg-light);
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== Info Table ===== */
.info-table-wrapper {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    overflow-x: auto;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--primary-100);
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

.info-table th {
    font-weight: 600;
    color: var(--primary-700);
    background: var(--primary-50);
    width: 180px;
    white-space: nowrap;
}

.info-table td {
    color: var(--text-primary);
}

.info-table .pdf-link {
    display: inline-flex;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .info-table th,
    .info-table td {
        padding: 1rem;
    }
    
    .info-table th {
        width: 120px;
        font-size: 0.9rem;
    }
}

/* ===== Preparing Section ===== */
.preparing-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.preparing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-400), var(--accent), var(--primary-400));
}

.preparing-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.preparing-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary-500);
}

.preparing-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.preparing-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.preparing-list {
    text-align: left;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.preparing-list h4 {
    font-size: 0.875rem;
    color: var(--primary-600);
    margin-bottom: 1rem;
    font-weight: 600;
}

.preparing-list ul {
    list-style: none;
}

.preparing-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.preparing-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    background: var(--primary-300);
    border-radius: 50%;
}

/* ===== S10 Special Section ===== */
.evaluation-info {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.evaluation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.evaluation-item {
    padding: 1.5rem;
    background: var(--primary-50);
    border-radius: var(--radius-md);
}

.evaluation-item h4 {
    font-size: 0.875rem;
    color: var(--primary-600);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.evaluation-item p {
    color: var(--text-primary);
    font-weight: 500;
}

.evaluation-url {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--primary-100);
}

.evaluation-url h4 {
    font-size: 0.875rem;
    color: var(--primary-600);
    margin-bottom: 0.75rem;
}

.evaluation-url a {
    color: var(--primary-700);
    word-break: break-all;
}

/* ===== Contact Section ===== */
#contact {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 50%, var(--primary-600) 100%);
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 90%, rgba(255,255,255,0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(255,255,255,0.08) 0%, transparent 40%);
}

#contact .section-header {
    color: white;
    position: relative;
    z-index: 1;
}

#contact .section-number {
    background: rgba(255,255,255,0.2);
}

#contact .section-title {
    color: white;
}

#contact .section-desc {
    color: rgba(255,255,255,0.8);
}

.contact-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

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

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

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group label .required {
    color: #ef4444;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 1rem;
    border: 2px solid var(--primary-100);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-light);
    width: 100%;
    max-width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 4px var(--primary-100);
    background: white;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    font-family: inherit;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
}

.submit-btn:active {
    transform: translateY(0);
}

/* ===== Footer ===== */
footer {
    background: var(--primary-900);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

.footer-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-copyright {
    font-size: 0.8rem;
    opacity: 0.6;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== Mobile Navigation ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 6px 0;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    nav a {
        display: block;
        padding: 0.75rem;
    }

    .hero-info {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    header {
        background: rgba(255, 255, 255, 0.98);
    }

    .header-inner {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1rem;
        line-height: 1.3;
    }

    .logo::before {
        height: 24px;
    }

    nav {
        top: 64px;
    }

    .hero {
        min-height: 90vh;
    }

    .hero-content {
        padding: 1.5rem 1rem;
    }

    .hero-badge {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 0.05em;
        margin-bottom: 2rem;
    }

    .hero-info {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .hero-info-icon {
        width: 32px;
        height: 32px;
    }

    .hero-cta {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }

    section {
        padding: 3.5rem 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .section-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .info-table-wrapper {
        padding: 1.25rem;
    }

    .info-table,
    .info-table tbody,
    .info-table tr,
    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
    }

    .info-table tr {
        border: 1px solid var(--primary-100);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        overflow: hidden;
    }

    .info-table th {
        width: 100%;
        background: var(--primary-50);
        padding: 0.9rem 1rem 0.5rem;
        border-bottom: none;
    }

    .info-table td {
        padding: 0.5rem 1rem 1rem;
        border-bottom: none;
    }

    .preparing-card,
    .contact-card {
        padding: 1.75rem 1.25rem;
    }

    .preparing-list {
        padding: 1.25rem;
    }

    .contact-card {
        border-radius: 1.25rem;
    }

    .contact-form {
        gap: 1.1rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.9rem;
        font-size: 0.95rem;
    }

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

    .submit-btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .submit-btn {
        width: 100%;
    }

    .footer-info {
        gap: 1rem;
    }

    .footer-info p {
        font-size: 0.85rem;
    }
}

/* ===== Thanks Page ===== */
.thanks-hero {
    padding-top: 80px;
}

.thanks-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.thanks-message {
    margin: 2rem 0 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.thanks-message p {
    margin-bottom: 1rem;
    line-height: 2;
}

.thanks-message p:last-child {
    margin-bottom: 0;
}

/* ===== Mailform Error Messages ===== */
#mail_form .form-group span.error_blank,
#mail_form .form-group span.error_format,
#mail_form .form-group span.error_match {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ===== Mailform Loading ===== */
div.loading-layer {
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10000;
}

span.loading {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border-top: 5px solid rgba(255, 255, 255, 0.2);
    border-right: 5px solid rgba(255, 255, 255, 0.2);
    border-bottom: 5px solid rgba(255, 255, 255, 0.2);
    border-left: 5px solid #ffffff;
    transform: translateZ(0);
    animation: load-circle 1.0s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -30px;
    margin-left: -30px;
}

@keyframes load-circle {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

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

/* ===== Utility Classes ===== */
.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;
}
