@import url('../components/services-grid.css');
@import url('../components/home-storia.css');
@import url('../components/home-journal.css');
@import url('../components/home-reviews.css');

/* ========================================
   HOME PAGE STYLES
   ======================================== */

/* Hero entrance keyframes */
@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-image-reveal {
  from {
    opacity: 0;
    transform: scale(1.05);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hero-coords-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-main {
    width: 100%;
    overflow-x: clip;
}

/* Sticky curtain frame - gives hero 100dvh of pinning scroll room */
.home-hero-sticky-frame {
    position: relative;
    height: 270dvh;
}

/* ========================================
   HERO SECTION
   ======================================== */

.home-hero {
    display: grid;
    grid-template-columns: 55fr 45fr;
    min-height: 100dvh;
    transform-origin: 50% 50%;
    will-change: transform, filter;
    overflow: hidden;
    gap: 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ---- Left panel ---- */

.home-hero__panel--left {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-dark-navy);
    padding: 80px 64px;
    backface-visibility: hidden;
}

.home-hero__content {
    max-width: 480px;
    color: #ffffff;
    margin-bottom: 8vh;
}

.home-hero__label {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
    margin: 0 0 var(--spacing-xl) 0;
    animation: hero-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.home-hero__title {
    font-family: var(--font-serif-display);
    font-size: clamp(52px, 5.5vw, 84px);
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 var(--spacing-lg) 0;
    animation: hero-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.home-hero__description {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 var(--spacing-2xl) 0;
    padding-left: 18px;
    border-left: 1px solid rgba(212, 165, 116, 0.4);
    animation: hero-fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.48s both;
}

.home-hero__buttons {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    animation: hero-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.62s both;
}

.home-hero__button {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.home-hero__button--solid {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 14px 36px;
    background-color: var(--color-light-cream);
    border: 1px solid transparent;
    color: var(--color-dark-navy);
}

.home-hero__button--solid:hover {
    background-color: var(--color-panel-light);
    transform: translateY(-1px);
}

.home-hero__button--solid:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.home-hero__button--text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.65);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 2px 0;
    background: none;
}

.home-hero__button--text:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

.home-hero__button--text:focus-visible {
    outline: 2px solid rgba(212, 165, 116, 0.8);
    outline-offset: 4px;
    border-radius: 2px;
}

.home-hero__button-arrow {
    display: block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.home-hero__button--text:hover .home-hero__button-arrow {
    transform: translateX(3px);
}

/* ---- Right panel ---- */

.home-hero__panel--right {
    position: relative;
    overflow: hidden;
    margin-left: -1px;
}

.home-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    animation: hero-image-reveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.home-hero__edge-gradient {
    position: absolute;
    inset-block: 0;
    left: 0;
    width: 12rem;
    background: linear-gradient(to right, var(--color-dark-navy), transparent);
    opacity: 0.9;
    pointer-events: none;
}

.home-hero__coords {
    position: absolute;
    bottom: 32px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: rgba(249, 249, 247, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 10, 30, 0.06);
    padding: 12px 20px;
    font-family: var(--font-sans);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--color-dark-navy);
    text-transform: uppercase;
    user-select: none;
    animation: hero-coords-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.85s both;
}

.home-hero__coords-divider {
    display: block;
    width: 1px;
    height: 12px;
    background-color: rgba(0, 10, 30, 0.2);
    flex-shrink: 0;
}

/* ---- Mobile ---- */

/* Home: navbar always white (override any legacy transparent/light-logo rules) */
body.home {
    --site-header-offset: 96px;
}

body.home .site-header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 33, 71, 0.08);
    opacity: 1;
    transform: none;
}

body.home .site-header .site-header__brand-logo--light {
    display: none;
}

body.home .site-header .site-header__brand-logo {
    display: block;
}

body.home .site-header .site-header__toggle-bar {
    background-color: var(--color-dark-blue);
}

@media (max-width: 1023px) {
    .home-hero-sticky-frame {
        height: auto;
    }

    .home-hero {
        position: relative;
        top: auto;
        z-index: 0;
    }
}

@media (max-width: 767px) {
    body.home {
        --site-header-offset: 100px;
        padding-top: var(--site-header-offset);
    }

    body.home .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 300;
        animation: none;
        background-color: #ffffff;
        border-bottom: 1px solid rgba(0, 33, 71, 0.08);
    }

    body.home .site-header--open .site-nav {
        border-bottom: 1px solid rgba(0, 33, 71, 0.08);
    }

    .home-hero-sticky-frame {
        height: auto;
        margin-top: 0;
    }

    .home-hero {
        grid-template-columns: 1fr;
        min-height: calc(100svh - var(--site-header-offset));
        min-height: calc(100dvh - var(--site-header-offset));
        position: relative;
        top: auto;
        z-index: 0;
        will-change: auto;
        overflow: hidden;
    }

    /* Image becomes full-bleed background layer */
    .home-hero__panel--right {
        position: absolute;
        inset: 0;
        height: 100%;
        overflow: hidden;
        margin-left: 0;
        z-index: 0;
    }

    /* Side gradient not relevant in stacked layout */
    .home-hero__edge-gradient {
        display: none;
    }

    /* Content panel fills hero above the image */
    .home-hero__panel--left {
        position: relative;
        z-index: 1;
        background: transparent;
        min-height: calc(100svh - var(--site-header-offset));
        min-height: calc(100dvh - var(--site-header-offset));
        width: 100%;
        padding: 32px 24px 56px;
        align-items: flex-start;
    }

    /* Semi-transparent dark navy overlay over the background image */
    .home-hero__overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 10, 30, 0.68);
        z-index: 0;
        pointer-events: none;
    }

    /* Content sits above overlay */
    .home-hero__content {
        position: relative;
        z-index: 1;
    }

    .home-hero__description {
        padding-left: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero__label,
    .home-hero__title,
    .home-hero__description,
    .home-hero__buttons,
    .home-hero__image {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .home-hero__panel--left {
        padding: 64px 40px;
    }
}

/* ========================================
   EXPERTISE SECTION -BENTO GRID
   ======================================== */

.home-expertise {
    background-color: var(--color-light-cream);
    padding: 128px 0;
}

.home-expertise__container {
    max-width: var(--size-container-max);
    margin: 0 auto;
    padding: 0 48px;
}

.home-expertise__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--spacing-2xl);
    margin-bottom: 80px;
}

.home-expertise__heading {
    font-family: var(--font-serif-display);
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-dark-navy);
    margin: 0;
}

.home-expertise__intro {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.65;
    color: var(--color-text-tertiary);
    max-width: 320px;
    margin: 0;
}

/* ---- Bento container ---- */

.home-expertise__bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    background-color: var(--color-panel-light);
    padding: 4px;
}

/* ---- Card base ---- */

.home-expertise__card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
    padding: 48px;
    transition: background-color 0.4s ease;
}

.home-expertise__card:hover {
    background-color: var(--color-light-cream);
}

.home-expertise__card--wide {
    grid-column: span 8;
    min-height: 400px;
}

.home-expertise__card--tall {
    grid-column: span 4;
}

.home-expertise__card--half {
    grid-column: span 6;
    min-height: 300px;
}

/* ---- Card parts ---- */

.home-expertise__card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.home-expertise__card--half .home-expertise__card-top {
    margin-bottom: 32px;
}

.home-expertise__card-icon {
    display: block;
    color: rgba(0, 10, 30, 0.35);
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.home-expertise__card:hover .home-expertise__card-icon {
    color: var(--color-dark-navy);
}

.home-expertise__card-num {
    font-family: var(--font-sans);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    background-color: var(--color-panel-light);
    padding: 4px 10px;
}

.home-expertise__card-num--accent {
    background-color: var(--color-accent-beige);
    color: var(--color-dark-navy);
}

.home-expertise__card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-expertise__card-title {
    font-family: var(--font-serif-display);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-dark-navy);
    margin: 0;
}

.home-expertise__card--half .home-expertise__card-title {
    font-size: 1.25rem;
}

.home-expertise__card-desc {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.65;
    color: var(--color-text-tertiary);
    margin: 0;
}

/* ---- Responsive: Expertise ---- */

@media (max-width: 1024px) {
    .home-expertise__card--wide {
        grid-column: span 12;
    }

    .home-expertise__card--tall {
        grid-column: span 12;
    }

    .home-expertise__card--half {
        grid-column: span 6;
    }
}

@media (max-width: 767px) {
    .home-expertise {
        padding: 72px 0;
    }

    .home-expertise__container {
        padding: 0 24px;
    }

    .home-expertise__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-lg);
        margin-bottom: 48px;
    }

    .home-expertise__intro {
        max-width: 100%;
    }

    .home-expertise__card--wide,
    .home-expertise__card--tall,
    .home-expertise__card--half {
        grid-column: span 12;
    }

    .home-expertise__card {
        padding: 32px 24px;
    }
}

/* ========================================
   STATS STRIP
   ======================================== */

.home-stats-strip {
    background: var(--color-dark-navy);
    padding: 0 48px;
    border-top: 0.5px solid rgba(212, 165, 116, 0.15);
}

.home-stats-strip__inner {
    max-width: var(--size-container-max);
    margin: 0 auto;
    display: flex;
    align-items: stretch;
}

.home-stats-strip__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 36px 24px;
    text-align: center;
    position: relative;
}

.home-stats-strip__item + .home-stats-strip__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.5px;
    height: 44px;
    background: rgba(212, 165, 116, 0.18);
}

.home-stats-strip__value {
    font-family: var(--font-serif-display);
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 400;
    line-height: 1;
    color: var(--color-text-white);
    letter-spacing: -0.02em;
}

.home-stats-strip__label {
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

@media (max-width: 767px) {
    .home-stats-strip {
        display: none;
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .home-hero__label,
    .home-hero__title,
    .home-hero__description,
    .home-hero__buttons,
    .home-hero__image,
    .home-hero__coords {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
