:root {
    /* Color Palette */
    --color-base: #FDFCF8;
    /* Off-white/Beige */
    --color-text: #4A4036;
    /* Charcoal Brown */
    --color-accent: #C16A4F;
    /* Muted Terracotta */
    --color-concept-bg: #2E2A25;
    /* Dark Brown */

    /* Typography */
    --font-serif: 'Zen Old Mincho', serif;
    --font-sans: 'Zen Kaku Gothic New', sans-serif;

    /* Spacing */
    --spacing-container: 1200px;
    --spacing-section: 100px;
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-base);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 500;
}

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

a:hover {
    opacity: 0.7;
}

/* Utilities */
.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 20px;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.2em;
}

.section-padding {
    padding: var(--spacing-section) 0;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    /* Increased to stay above nav-overlay (z-1500) */
    background-color: rgba(46, 42, 37, 0.95);
    /* Dark Brown for seamless look */
    color: white;
    /* Ensure text/icons are white */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo {
    line-height: 0;
}

.logo a {
    display: block;
}

.logo img {
    height: 70px;
    /* Increased from 50px for better visibility */
    width: auto;
    object-fit: contain;
}

/* Header Ticker */
.header-ticker {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: rgba(46, 42, 37, 0.9);
    /* Dark background to contrast with header */
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    z-index: 10;
}

.ticker-track {
    display: flex;
    animation: ticker-scroll 20s linear infinite;
    width: max-content;
}

.ticker-item {
    padding: 0 40px;
    display: flex;
    align-items: center;
}

.ticker-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

.ticker-item a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: right;
}

.ticker-item a:hover {
    color: var(--color-accent);
}

.ticker-item a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-33.333%);
    }
}

/* Adjust Header height to accommodate ticker */
header {
    height: 110px;
    padding-bottom: 30px;
    /* Space for ticker */
    align-items: flex-start;
    /* Align logo/nav to top */
}

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

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Maintain full-width coverage */
    object-position: center center;
    /* Center the image */
    z-index: -1;
    filter: brightness(0.95) contrast(1.25) saturate(1.35);
    /* Enhanced image quality: brighter, higher contrast, more vivid colors */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: var(--font-serif);
    letter-spacing: 0.2em;
}

.hero-subtitle {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    margin-top: 20px;
    font-weight: 300;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background-color: white;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    50.1% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}


/* Concept Section (Dramatic Redesign) */
.concept {
    position: relative;
    color: white;
    text-align: center;
    padding: 150px 0;
    overflow: hidden;
}

.concept-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/bg/concept_bg.jpg');
    /* Organized path */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    z-index: 0;
    filter: brightness(0.35) contrast(1.2) saturate(1.3);
    /* Enhanced: slightly brighter than before, more contrast and saturation for impact */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.concept .container {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.concept-content {
    display: flex;
    flex-direction: row-reverse;
    /* Right to Left for vertical text flow feel */
    gap: 80px;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.concept-title-vertical {
    font-size: 3.5rem;
    font-family: var(--font-serif);
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.3em;
    line-height: 1.8;
    height: 400px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    border-left: 1px solid var(--color-accent);
    /* Line decoration */
    padding-left: 2rem;
}

.concept-body-vertical {
    font-size: 1.1rem;
    font-family: var(--font-serif);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    line-height: 2.2;
    letter-spacing: 0.1em;
    height: 350px;
    /* Align roughly with title */
    color: #ffffff;
    /* Pure white */
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.8);
    /* Strong shadow for readability */
    font-weight: 500;
    /* Slightly bolder */
}

.concept-logo-mark {
    writing-mode: vertical-rl;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    opacity: 0.8;
    align-self: flex-end;
}

@media (max-width: 768px) {
    .concept {
        padding: 100px 0;
    }

    .concept-content {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .concept-title-vertical {
        writing-mode: horizontal-tb;
        font-size: 2rem;
        height: auto;
        border-left: none;
        padding-left: 0;
        border-bottom: 2px solid var(--color-accent);
        padding-bottom: 1rem;
        text-align: center;
    }

    .concept-body-vertical {
        writing-mode: horizontal-tb;
        height: auto;
        text-align: justify;
        width: 100%;
    }

    .concept-logo-mark {
        writing-mode: horizontal-tb;
    }
}

/* Fade-in Animation Class */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

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

/* =========================================
   Case Study Section
   ========================================= */
.case-study {
    background-color: var(--color-base);
    overflow: hidden;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-family: var(--font-serif);
}

.section-subtitle {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 3rem;
    color: var(--color-text);
    opacity: 0.8;
    letter-spacing: 0.1em;
}

.carousel-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 30px;
    padding: 0 max(20px, calc((100vw - var(--spacing-container)) / 2));
    width: max-content;
}

.carousel-item {
    width: 300px;
    flex-shrink: 0;
    transition: transform 0.3s;
    /* cursor: pointer; */
}

.carousel-item:hover {
    transform: translateY(-10px);
}

.case-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    margin-bottom: 1rem;
    background-color: #eee;
    /* Fallback color while loading or if missing */
}

.case-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    font-family: var(--font-serif);
}

.case-info p {
    font-size: 0.9rem;
    color: var(--color-accent);
}

/* =========================================
   Renovation Menu Section
   ========================================= */
/* =========================================
   Services Section (Alternating Layout)
   ========================================= */
.services {
    background-color: #faf9f7;
}

.services-wrapper {
    display: flex;
    flex-direction: column;
    gap: 100px;
    margin-top: 60px;
}

.service-row {
    display: flex;
    align-items: center;
    gap: 60px;
}

.service-row.reverse {
    flex-direction: row-reverse;
}

.service-img {
    flex: 1;
    height: 400px;
    overflow: hidden;
    /* border-radius: 4px; Optional */
}

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

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

.service-text {
    flex: 1;
    text-align: left;
}

.service-text h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-family: var(--font-serif);
    color: var(--color-text);
}

.service-label {
    display: inline-block;
    color: var(--color-accent);
    font-weight: bold;
    margin-bottom: 25px;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 5px;
}

.service-desc {
    font-size: 1rem;
    line-height: 2;
    margin-bottom: 30px;
    color: #5d544b;
}

.service-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.service-tags li {
    font-size: 0.85rem;
    border: 1px solid #ccc;
    padding: 8px 16px;
    border-radius: 20px;
    color: #888;
    background-color: white;
}

@media (max-width: 768px) {
    .services-wrapper {
        gap: 60px;
    }

    .service-row,
    .service-row.reverse {
        flex-direction: column;
        gap: 30px;
    }

    .service-img {
        width: 100%;
        height: 300px;
    }

    .service-text {
        width: 100%;
    }

    .service-text h3 {
        font-size: 1.8rem;
    }
}

/* =========================================
   Company Section
   ========================================= */
.company {
    background-color: var(--color-base);
}

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

.company-row {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    padding: 25px 0;
}

.company-row:first-child {
    border-top: 1px solid #e0e0e0;
}

.company-row dt {
    width: 30%;
    font-weight: 500;
    color: var(--color-accent);
    font-family: var(--font-serif);
    flex-shrink: 0;
}

.company-row dd {
    width: 70%;
    margin: 0;
    line-height: 1.8;
}

/* =========================================
   Contact Section
   ========================================= */
.contact {
    background-color: var(--color-concept-bg);
    color: white;
    text-align: center;
}

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

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

.contact-desc {
    font-size: 1.1rem;
    margin: 40px 0 60px;
    line-height: 2;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin: 60px 0;
    flex-wrap: wrap;
}

.contact-item {
    flex: 0 1 300px;
    text-align: center;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--color-accent);
    font-weight: 500;
}

.contact-tel {
    font-size: 1.5rem;
    font-family: var(--font-serif);
    letter-spacing: 0.1em;
    margin-right: 1rem;
}

.contact-tel-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    margin: 10px 0;
}

.contact-email {
    font-size: 1.3rem;
    margin: 10px 0;
    letter-spacing: 0.05em;
}

.contact-hours {
    font-size: 0.9rem;
    opacity: 0.8;
}

.contact-note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 10px;
}

.btn-primary {
    display: inline-block;
    padding: 18px 60px;
    background-color: white;
    color: var(--color-text);
    border: 2px solid white;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    transition: all 0.3s;
    margin-top: 40px;
    letter-spacing: 0.1em;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: transparent;
    color: white;
}

/* =========================================
   Footer
   ========================================= */
footer {
    background-color: #1a1816;
    color: #888;
    padding: 30px 0;
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

/* =========================================
   Mobile Menu (Hamburger)
   ========================================= */
.menu-trigger {
    position: relative;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 2000;
    display: block;
}

.menu-trigger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.4s;
    display: block;
}

.menu-trigger span:nth-of-type(1) {
    top: 0;
}

.menu-trigger span:nth-of-type(2) {
    top: 9px;
}

.menu-trigger span:nth-of-type(3) {
    bottom: 0;
}

.menu-trigger.active span:nth-of-type(1) {
    transform: translateY(9px) rotate(-45deg);
}

.menu-trigger.active span:nth-of-type(2) {
    opacity: 0;
}

.menu-trigger.active span:nth-of-type(3) {
    transform: translateY(-9px) rotate(45deg);
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 42, 37, 0.95);
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-list {
    list-style: none;
    text-align: center;
}

.nav-link {
    display: block;
    font-size: 1.5rem;
    font-family: var(--font-serif);
    color: white;
    padding: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s;
}

.nav-overlay.active .nav-link {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive Adjustments
   ========================================= */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

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

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

    .company-table th {
        background-color: transparent;
        padding-bottom: 5px;
        color: var(--color-accent);
        font-weight: bold;
        border-bottom: none;
        padding-left: 20px;
    }

    .company-table td {
        padding-top: 5px;
        padding-left: 20px;
        border-top: none;
    }

    .menu-item {
        height: 300px;
    }

    .contact-tel {
        font-size: 1.5rem;
    }

    .contact-btn {
        padding: 15px 30px;
        width: 100%;
        max-width: 300px;
    }

    header {
        padding: 15px 20px;
    }
}

/* =========================================
   Loading Screen
   ========================================= */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-base);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

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

.loading-logo {
    /* Replaced with image styles */
    margin-bottom: 20px;
}

.loading-logo img {
    height: 120px;
    width: auto;
    object-fit: contain;
}

/* Footer Logo */
.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 120px;
    /* Increased from 80px for better visibility */
    width: auto;
    object-fit: contain;
    /* Removed invert filter to show original logo colors */
}

/* Footer Social */
.footer-social {
    margin-bottom: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--color-accent);
}

.social-link svg {
    transition: transform 0.3s;
}

.social-link:hover svg {
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.95);
    }
}

/* =========================================
   Lightbox
   ========================================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
    color: white;
    margin-top: 1rem;
}

.lightbox-caption h3 {
    font-size: 1.5rem;
    font-family: var(--font-serif);
    margin-bottom: 0.5rem;
}

.lightbox-caption p {
    font-size: 1rem;
    color: #ccc;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s;
    z-index: 3001;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

/* =========================================
   Contact Form Styles
   ========================================= */
.contact-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: white;
}

.required {
    background-color: var(--color-accent);
    font-size: 0.7rem;
    padding: 2px 5px;
    margin-left: 5px;
    border-radius: 2px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-sans);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid var(--color-accent);
}

.form-submit {
    width: 100%;
    cursor: pointer;
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
    border: none;
    margin-bottom: 0px;
    /* Override button generic margin */
    display: block;
}

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

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: white;
}

/* =========================================
   Back to Top Button
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-text);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 1.2rem;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--color-accent);
    transform: translateY(-5px);
    opacity: 1;
}

html {
    scroll-behavior: smooth;
}