/* ========================================
   Base Styles
======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html.loading {
    overflow: hidden;
    height: 100dvh;
    height: 100vh;
    position: fixed;
    width: 100%;
    touch-action: none;
    overscroll-behavior: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html.loading::-webkit-scrollbar {
    display: none;
}

html.loading body {
    overflow: hidden;
    height: 100%;
    position: fixed;
    width: 100%;
    touch-action: none;
    overscroll-behavior: none;
}

html.loading header,
html.loading main,
html.loading footer,
html.loading .background-image {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
    line-height: 1.8;
    color: #333;
    background: #fff;
    position: relative;
}

.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;
}

/* ========================================
   Background Image
======================================== */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100lvh;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* モバイルブラウザのナビバー表示/非表示による背景リサイズを防止 */
@supports (height: 100lvh) {
    .background-image {
        height: 100lvh;
    }
}

.background-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Loading Screen
======================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: #fff;
}

.loading-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    position: relative;
}

.loading-icon svg {
    width: 100%;
    height: 100%;
    fill: #e8b923;
}

.loading-company {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.loading-tagline {
    font-size: 14px;
    letter-spacing: 0.15em;
    color: #e8b923;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.loading-description {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading-spinner span {
    width: 10px;
    height: 10px;
    background: #e8b923;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-spinner span:nth-child(1) { animation-delay: -0.32s; }
.loading-spinner span:nth-child(2) { animation-delay: -0.16s; }
.loading-spinner span:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-status {
    margin-top: 20px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* ========================================
   Header
======================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #111;
    z-index: 1000;
}

header nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 16px 20px;
}

header a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.08em;
    transition: opacity 0.2s, color 0.3s;
    position: relative;
    padding-bottom: 6px;
    white-space: nowrap;
}

header a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #e8b923;
    transition: width 0.3s ease;
}

header a.active::after {
    width: 100%;
}

@media (hover: hover) {
    header a:hover::after {
        width: 100%;
    }
}

header a.active {
    color: #e8b923;
}

header a:focus-visible {
    outline: 2px solid #e8b923;
    outline-offset: 4px;
    border-radius: 2px;
}

/* ========================================
   Sections
======================================== */
section {
    padding: 100px 8% 80px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section:nth-of-type(odd) {
    background: rgba(248, 248, 248, 0.5);
}

section:nth-of-type(even) {
    background: rgba(255, 255, 255, 0.5);
}

h2 {
    margin: 0 0 40px;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #111;
    display: inline-block;
    padding-bottom: 8px;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

section.visible h2 {
    opacity: 1;
    transform: translateY(0);
}

.anchor {
    scroll-margin-top: 70px;
}

/* ========================================
   Property Grid
======================================== */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

section.visible .property-grid {
    opacity: 1;
    transform: translateY(0);
}

.property-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.property-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #eee;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.property-card .info {
    padding: 16px 20px;
}

.property-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
}

.property-card p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.status-message {
    padding: 40px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.status-message.error {
    color: #c00;
}

/* ========================================
   News
======================================== */
.news-list {
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

section.visible .news-list {
    opacity: 1;
    transform: translateY(0);
}

.news-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e0e0e0;
}

.news-item:first-child {
    border-radius: 8px 8px 0 0;
}

.news-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.news-item:only-child {
    border-radius: 8px;
}

.news-date {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-category {
    font-size: 11px;
    color: #fff;
    background: #111;
    padding: 2px 10px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-body {
    flex: 1;
    min-width: 0;
}

.news-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
}

.news-content {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.6;
    word-break: break-word;
}

/* ========================================
   Company Table
======================================== */
.company-table {
    width: 100%;
    max-width: 700px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

section.visible .company-table {
    opacity: 1;
    transform: translateY(0);
}

.company-table th {
    width: 28%;
    background: rgba(248, 248, 248, 0.95);
    text-align: left;
    padding: 16px 20px;
    font-weight: 500;
    vertical-align: top;
    border-bottom: 1px solid #e0e0e0;
}

.company-table td {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e0e0e0;
}

/* ========================================
   Contact
======================================== */
.contact-box {
    max-width: 700px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

section.visible .contact-box {
    opacity: 1;
    transform: translateY(0);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.contact-text {
    font-size: 15px;
}

.contact-text span {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.contact-text a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-text a:hover {
    color: #111;
    text-decoration: underline;
}

.contact-text a:focus-visible {
    outline: 2px solid #e8b923;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ========================================
   Recruit
======================================== */
.recruit-notice {
    max-width: 700px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

section.visible .recruit-notice {
    opacity: 1;
    transform: translateY(0);
}

.recruit-notice p {
    margin: 0;
    font-size: 15px;
    color: #666;
}

/* ========================================
   Footer
======================================== */
footer {
    text-align: center;
    padding: 30px 20px;
    background: rgba(17, 17, 17, 0.95);
    color: #fff;
    font-size: 13px;
}

footer p {
    margin: 0;
}

.footer-notice {
    margin-top: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   Responsive
======================================== */
@media screen and (max-width: 768px) {
    .loading-company {
        font-size: 22px;
    }

    .loading-tagline {
        font-size: 12px;
    }

    .loading-icon {
        width: 60px;
        height: 60px;
    }

    header nav {
        gap: 12px 20px;
        padding: 14px 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    header a {
        font-size: 13px;
        padding-bottom: 0;
    }

    header a::after {
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-radius: 50%;
        transition: width 0.3s ease, height 0.3s ease;
    }

    header a.active::after {
        width: 6px;
        height: 6px;
    }

    section {
        padding: 90px 5% 60px;
    }

    #contact {
        padding-bottom: 120px;
    }

    #recruit {
        padding-bottom: 120px;
    }

    h2 {
        font-size: 20px;
    }

    .property-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .company-table th,
    .company-table td {
        display: block;
        padding: 12px 16px;
    }

    .company-table th {
        border-bottom: none;
        padding-bottom: 4px;
    }

    .company-table td {
        padding-top: 4px;
    }

    .contact-box,
    .recruit-notice {
        padding: 30px 24px;
    }

    .news-item {
        flex-direction: column;
        gap: 8px;
        padding: 16px 20px;
    }

    .news-date {
        display: inline;
        margin-right: 8px;
    }

    .news-category {
        display: inline;
    }
}
