@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;700&family=Outfit:wght@300;400;500;700&display=swap');

/* ==========================================================================
   Design System & Variables
   ========================================================================== */
:root {
    /* Colors */
    --color-primary: #ea3800;
    /* Vibrant Orange */
    --color-primary-rgb: 234, 56, 0;
    --color-secondary: #0f172a;
    /* Deep Navy */
    --color-accent: #007aff;
    --color-text: #1a1a1a;
    --color-text-light: #4a4a4a;
    --color-bg-body: #f9f9f9;
    --color-bg-white: #ffffff;
    --color-bg-light-gray: #f5f5f0;
    --color-border: #e2e2e2;

    /* Typography */
    --font-jp: 'Noto Serif JP', serif;
    --font-en: 'Outfit', sans-serif;
    --font-base: var(--font-jp);
    --font-size-base: 18px;
    /* Increased from 16px */
    --font-size-h1: 2.5rem;
    --font-size-h2: 1.8rem;
    --font-size-h3: 1.5rem;
    --font-size-body: 1rem;
    --line-height-base: 1.8;
    --line-height-heading: 1.4;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;

    /* Effects */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-md: 8px;
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.6s ease-out;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

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

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
}

/* Stagger delay utility */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

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

body {
    font-family: var(--font-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-bg-white);
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

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

/* Typography Utility */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-jp);
    font-weight: 700;
    line-height: var(--line-height-heading);
    color: var(--color-secondary);
    letter-spacing: 0.08em;
}

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

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

/* ==========================================================================
   Components
   ========================================================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.btn-primary:hover {
    background-color: #c93000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.4);
}

/* Cards */
.card {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

/* Container */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* Section */
.section {
    padding: var(--spacing-xl) 0;
}

.section-bg-white {
    background-color: white;
}

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

.section-title {
    font-size: var(--font-size-h2);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
    margin: var(--spacing-sm) auto 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-secondary);
    font-family: var(--font-en);
}

.header-logo img {
    height: 32px;
    /* Reduced from 40px */
    width: auto;
    max-width: 100%;
}

.header-logo span {
    display: none;
    /* Hide text as it's in the logo image */
}

/* Navigation Styles */
.header-nav ul {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.header-nav a {
    font-weight: 500;
    font-size: 0.95rem;
}

.header-nav a:not(.btn):hover {
    color: var(--color-primary);
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--color-secondary);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        padding: 100px 40px;
    }

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

    .header-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

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

    /* Hamburger Animation */
    .header.nav-open .hamburger span:first-child {
        transform: rotate(45deg);
    }

    .header.nav-open .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .header.nav-open .hamburger span:nth-child(3) {
        transform: rotate(-45deg);
    }
}

.header-nav {
    flex-shrink: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--color-secondary);
    color: white;
    padding: var(--spacing-lg) 0;
    font-size: 0.95rem;
    /* Increased from 0.9rem */
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.footer-logo img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-nav ul {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-nav a {
    font-weight: 500;
    /* Match header nav weight */
}

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

.copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-family: var(--font-en);
}

/* ==========================================================================
   Top Page Specific
   ========================================================================== */
.hero {
    height: 700px;
    min-height: 600px;
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: var(--header-height);
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.1rem;
    /* Adjusted to maintain similar visual size (approx 56px) with 18px base */
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
}

.hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    /* Increased width for more impact */
    height: 100%;
    background-color: var(--color-secondary);
    background-image: url('../images/hero_bg_luxury.png');
    background-size: cover;
    background-position: center;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    /* Sharper angle */
}

.hero::after {
    /* Overlay for text readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.95) 60%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero::after {
    /* Overlay for text readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.95) 60%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
    pointer-events: none;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    padding: 0;
    /* Remove default padding to allow image to flush to edges */
    text-align: left;
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-content h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
    color: var(--color-primary);
}

.service-content p {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.6;
}

/* Reset old icon styles just in case, though we are replacing logic */
.service-icon {
    display: none;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    align-items: baseline;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.news-item time {
    font-family: var(--font-en);
    font-weight: 700;
    color: var(--color-text-light);
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
}

.news-category {
    font-size: 0.8rem;
    padding: 2px 8px;
    background: var(--color-bg-light-gray);
    border-radius: 4px;
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
}

/* ==========================================================================
   About Page Specific
   ========================================================================== */
.page-header {
    background-color: var(--color-bg-light-gray);
    padding: var(--spacing-lg) 0;
    margin-top: var(--header-height);
    text-align: center;
}

.page-header h1 {
    margin-bottom: var(--spacing-xs);
}

.page-header p {
    font-family: var(--font-jp);
    /* Changed to Mincho */
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.mission-block {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
}

.mission-block ul {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 1.5rem;
    text-align: left;
    display: inline-block;
}

.list-bullet {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 1.5rem;
}

.mission-text {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.company-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    max-width: 800px;
}

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

.company-table th {
    width: 30%;
    font-weight: 700;
    color: var(--color-secondary);
}

.ceo-message {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.ceo-text {
    flex: 1;
}

.ceo-image {
    flex: 0 0 300px;
    height: 300px;
    border-radius: var(--radius-md);
    overflow: hidden;
    /* Ensure image respects border-radius */
}

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

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    /* Simplified mobile handling */
    .ceo-message {
        flex-direction: column-reverse;
    }

    .ceo-image {
        width: 100%;
        max-width: 400px;
    }

    .hero-visual {
        display: none;
    }
}

/* ==========================================================================
   Works Page Styles
   ========================================================================== */

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

.work-block {
    margin-bottom: var(--spacing-xl);
}

.work-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.work-item {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s;
}

.work-item:hover {
    transform: translateY(-2px);
}

.work-item h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-secondary);
}

.work-item ul {
    list-style-type: disc;
    padding-left: 1.2rem;
    margin-top: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.work-card {
    padding: 0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.work-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 700;
}

.work-content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-secondary);
}

.work-category {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.work-content p:last-child {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-top: auto;
}

/* Legal Tables */
.legal-table {
    width: 100%;
    border-collapse: collapse;
}

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

.legal-table th {
    width: 30%;
    background-color: var(--color-bg-light-gray);
    font-weight: 700;
    color: var(--color-secondary);
}

@media (max-width: 600px) {

    .legal-table th,
    .legal-table td {
        display: block;
        width: 100%;
    }

    .legal-table th {
        background-color: transparent;
        padding-bottom: 0.5rem;
        color: var(--color-primary);
    }

    .legal-table td {
        padding-top: 0;
    }
}
