/* ─── Typography ─── */
body {
    font-family: 'Open Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', 'Open Sans', sans-serif;
}

/* ─── Vertical Decorative Text ─── */
.vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 6rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.04);
    letter-spacing: 0.4em;
    line-height: 1;
    text-transform: uppercase;
    font-family: 'Oswald', sans-serif;
}

/* ─── Dot Pattern ─── */
.dot-vertical {
    background-image: radial-gradient(circle, #d1d5db 3px, transparent 4px);
    background-repeat: repeat-y;
    background-position: center top;
    background-size: 6px 28px;
    border-radius: 9999px;
}

.lg-hide-dot-grid .absolute.-left-16.-top-8 {
    display: none;
}

/* ─── Service Card Texture ─── */
.service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/assets/image/card-texture.svg');
    background-position: center;
    background-size: cover;
    opacity: 0.03;
    pointer-events: none;
}

/* ─── Footer ─── */
.footer-contact a {
    color: inherit;
}

.footer-social a {
    transition: transform .18s ease, background-color .18s ease;
}

.footer-social a:hover {
    transform: translateY(-3px);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out both;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out both;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out both;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out both;
}

/* Scroll-triggered animation classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animation delays */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.5s; }

/* ─── FAQ ─── */
.faq-toggle i {
    transition: transform 0.3s ease;
}

.faq-toggle i.rotate-180 {
    transform: rotate(180deg);
}

/* ─── Service Detail Content ─── */
.service-content h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.service-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.service-content ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.service-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    background: #c9a96e;
    border-radius: 50%;
}

.service-content p {
    margin-bottom: 1rem;
}

/* ─── Legal Pages ─── */
.legal-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #c9a96e;
    color: #1f2937;
}

.legal-content h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.legal-content h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: #4b5563;
}

.legal-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content ul li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
    color: #4b5563;
}

.legal-content a {
    color: #c9a96e;
    text-decoration: underline;
}

.legal-content a:hover {
    color: #b38a5b;
}

/* ─── Portfolio ─── */
.portfolio-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ─── Progress Bars ─── */
.progress-bar {
    transition: width 1.5s ease-out;
}

/* ─── CTA Section ─── */
.cta-section a {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta-section a:hover {
    transform: translateY(-2px);
}

/* ─── Hero Typing/Focus Effect ─── */
.hero-heading span {
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.hero-heading span:nth-child(1) { animation-delay: 0.1s; }
.hero-heading span:nth-child(2) { animation-delay: 0.3s; }
.hero-heading span:nth-child(3) { animation-delay: 0.5s; }

/* ─── Responsive Fixes ─── */
@media (max-width: 1023px) {
    .vertical-text {
        display: none;
    }
}

/* area calculator fine-tuning */
.area-calculator-table th,
.area-calculator-table td {
    white-space: nowrap;
}

/* ensure unit toggle buttons aren't too narrow */
.unit-toggle {
    min-width: 3rem;
    text-align: center;
}

/* mobile-friendly adjustments (below Tailwind sm: breakpoint) */
@media (max-width: 639px) {
    .hero-heading {
        line-height: 1.15;
    }

    .service-card {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* ─── Area Calculator Card Layout ─── */
    .area-calculator-table thead {
        display: none;
    }

    .area-calculator-table tbody {
        display: block;
    }

    .area-calculator-table .rooms-tbody > * + * {
        border-top-width: 0;
    }

    .area-calculator-table .room-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.375rem 0.5rem;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 0.75rem;
        padding: 0.875rem;
        margin-bottom: 0.625rem;
        position: relative;
    }

    .area-calculator-table .room-row td {
        display: block;
        padding: 0;
        white-space: normal;
    }

    .area-calculator-table .room-row td::before {
        content: attr(data-label);
        display: flex;
        align-items: flex-end;
        height: 2.5rem;          /* fixed label height ensures consistent baseline */
        min-height: 2.5rem;
        font-size: 0.625rem;
        font-weight: 600;
        color: #9ca3af;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.25rem;
    }

    .area-calculator-table .room-row .room-cell-serial {
        display: none;
    }

    .area-calculator-table .room-row .room-cell-name {
        grid-column: 1 / -1;
        grid-row: 1;
        padding-right: 2rem;
    }

    .area-calculator-table .room-row .room-cell-action {
        position: absolute;
        top: 0.875rem;
        right: 0.875rem;
    }

    .area-calculator-table .room-row .room-cell-action::before {
        display: none;
    }

    .area-calculator-table .room-row .room-cell-action .btn-remove-room {
        font-size: 1rem;
        color: #d1d5db;
    }

    .area-calculator-table .room-row .room-cell-qty {
        grid-column: 1;
        grid-row: 2;
    }

    .area-calculator-table .room-row .room-cell-length {
        grid-column: 2;
        grid-row: 2;
    }

    .area-calculator-table .room-row .room-cell-breadth {
        grid-column: 3;
        grid-row: 2;
    }

    .area-calculator-table .room-row .room-cell-convert {
        display: none !important;
    }

    .area-calculator-table .room-row .room-cell-area {
        grid-column: 1 / -1;
        grid-row: 3;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding-top: 0.5rem;
        border-top: 1px dashed #e5e7eb;
        margin-top: 0.125rem;
        font-size: 1rem;
    }

    .area-calculator-table .room-row input {
        font-size: 0.875rem;
        padding: 0.5rem 0.625rem;
        width: 100%;
        border-radius: 0.5rem;
    }

    .area-calculator-table tfoot {
        display: block;
    }

    .area-calculator-table tfoot .floor-total-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        background: #f3f4f6;
        border-radius: 0.75rem;
    }

    .area-calculator-table tfoot .floor-total-row td {
        padding: 0;
        white-space: normal;
    }

    .area-calculator-table tfoot .floor-total-label {
        text-align: left;
    }

    .area-calculator-table tfoot .floor-total-spacer,
    .area-calculator-table tfoot .floor-total-end {
        display: none;
    }
}

/* Touch devices: disable background-attachment: fixed (unsupported on iOS Safari) */
@supports (-webkit-touch-callout: none) {
    .bg-fixed {
        background-attachment: scroll !important;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in-up,
    .animate-fade-in,
    .animate-slide-in-left,
    .animate-slide-in-right,
    .hero-heading span {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ─── Back to Top ─── */
#back-to-top {
    transition: opacity 0.3s ease, background-color 0.2s ease;
}

/* ─── Selection Color ─── */
::selection {
    background: #c9a96e;
    color: #fff;
}