/* ── Base & Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(123, 45, 59, 0.15);
    color: #1A1514;
}

/* ── Header ── */
#header {
    background: rgba(250, 247, 245, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

#header.scrolled {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #7B2D3B;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ── Mobile Menu ── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .menu-line-close {
    transform: rotate(45deg);
}

#mobile-menu.open .menu-line-close:nth-child(2) {
    transform: rotate(-45deg);
    margin-top: -2px;
}

/* ── Hero Animations ── */
.hero-headline span {
    display: block;
}

.hero-headline span span {
    display: block;
    transform: translateY(100%);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-headline span:nth-child(1) span { animation-delay: 0.1s; }
.hero-headline span:nth-child(2) span { animation-delay: 0.2s; }
.hero-headline span:nth-child(3) span { animation-delay: 0.3s; }
.hero-headline span:nth-child(4) span { animation-delay: 0.4s; }
.hero-headline span:nth-child(5) span { animation-delay: 0.5s; }

.hero-eyebrow {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-subtext {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-cta-primary {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.hero-cta-secondary {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-image-wrapper {
    overflow: hidden;
}

.hero-image-wrapper img {
    transform: scale(1.08);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image-wrapper:hover img {
    transform: scale(1);
}

.hero-floating-card {
    animation: floatUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1s;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

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

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }

/* ── Philosophy ── */
.philosophy-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.philosophy-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* ── Service Cards ── */
.service-card {
    transition: background 0.4s ease;
}

.service-card:hover {
    background: #fff;
}

.service-card:hover .service-icon svg {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* ── Form Inputs ── */
.form-input,
.form-select,
.form-textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid #E8E4DF;
    padding: 0.75rem 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: #1A1514;
    outline: none;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    border-radius: 0;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #D4CFC8;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-bottom-color: #7B2D3B;
}

.form-select {
    cursor: pointer;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.form-submit {
    position: relative;
    overflow: hidden;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.form-submit:hover::before {
    left: 100%;
}

/* ── Smooth Scroll Offset ── */
section[id] {
    scroll-margin-top: 80px;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.75rem !important;
    }

    .hero-floating-card {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 4rem !important;
    }
}

@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
