/* =========================================================================
   AmazingDens — home page styles
   Hero, services grid overrides, about, gallery strip, team, book.
   Shared design tokens live in shared.css.
   ========================================================================= */

.page-home {
    background: var(--bg);
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: var(--header-h);
    padding-bottom: var(--sp-9);
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    transform-origin: center;
    will-change: transform;
}

.hero__scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(39, 39, 39, 0.55) 0%, rgba(39, 39, 39, 0.88) 70%),
        linear-gradient(180deg, rgba(39, 39, 39, 0.65) 0%, rgba(28, 28, 28, 0.95) 100%);
}

/* Mid-layer fog — a soft off-centre gradient that drifts at a
   different scroll rate than the bg image, giving the hero real
   dimensional depth. */
.hero__fog {
    position: absolute;
    inset: -5% -5% -20% -5%;
    background:
        radial-gradient(ellipse 50% 40% at 70% 30%, rgba(151, 60, 32, 0.18) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 75%, rgba(77, 91, 72, 0.15) 0%, transparent 70%);
    filter: blur(30px);
    mix-blend-mode: screen;
    will-change: transform;
}

/* Foreground warm glow — sits closest to the viewer so it moves most
   on scroll. Very subtle, acts like a key-light. */
.hero__glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 45% 60%,
        rgba(255, 180, 120, 0.08) 0%,
        transparent 55%
    );
    mix-blend-mode: screen;
    will-change: transform;
}

.hero__inner {
    position: relative;
    z-index: 1;
    padding-block: var(--sp-9);
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
    max-width: 48rem;
}

/* Hero from-states — only applied once .js-ready is set on body by
   main.js. If GSAP fails to load, the class is never added and these
   rules never apply, so the hero remains visible. */
.js-ready .hero__eyebrow { opacity: 0; transform: translateY(16px); }
.js-ready .hero__lede    { opacity: 0; transform: translateY(24px); }
.js-ready .hero__ctas    { opacity: 0; transform: translateY(16px); }
.js-ready .hero__marquee { opacity: 0; transform: translateY(12px); }
.js-ready .hero__bg img  { transform: scale(1.2); }

/* Character reveal — each letter of the hero display is wrapped in a
   .hero__char by main.js before the timeline runs, and each word is
   wrapped in a .hero__word with white-space:nowrap so line breaks only
   happen at word boundaries, not mid-word. Inline-block lets transforms
   apply without breaking text flow. */
.hero__word {
    display: inline-block;
    white-space: nowrap;
}
.hero__char {
    display: inline-block;
    will-change: transform, opacity;
}
.js-ready .hero__char {
    opacity: 0;
    transform: translateY(60%);
}

@media (prefers-reduced-motion: reduce) {
    .js-ready .hero__eyebrow,
    .js-ready .hero__line,
    .js-ready .hero__lede,
    .js-ready .hero__ctas,
    .js-ready .hero__marquee {
        opacity: 1;
        transform: none;
    }
    .js-ready .hero__bg img { transform: scale(1.08); }
}

.hero__eyebrow {
    color: var(--ink);
    opacity: 0.85;
}

.hero__display {
    font-family: var(--font-display);
    font-size: var(--fs-4);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 144, "SOFT" 50;
    color: var(--ink);
    text-wrap: balance;
}

.hero__display em {
    font-style: italic;
    color: var(--accent-soft);
    font-variation-settings: "opsz" 144, "SOFT" 100;
}

.hero__line {
    display: block;
}

.hero__lede {
    font-family: var(--font-body);
    font-size: var(--fs-1);
    line-height: 1.5;
    max-width: 36ch;
    color: var(--ink-muted);
}

.hero__ctas {
    margin-top: var(--sp-4);
}

.hero__marquee {
    margin-top: var(--sp-7);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--ink-subtle);
}

/* -------------------------------------------------------------------------
   Section head pattern (shared by services/about/gallery/team/book)
   ------------------------------------------------------------------------- */
.section__head {
    max-width: 48rem;
    margin-bottom: var(--sp-8);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.section__head h2 {
    font-size: var(--fs-3);
    line-height: 1.02;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

/* -------------------------------------------------------------------------
   Services
   ------------------------------------------------------------------------- */
.services__grid {
    --grid-gap: var(--sp-5);
}

/* 6 cards → 3×2 at desktop, 2×3 at tablet, 1×6 on mobile. */
@media (min-width: 700px) and (max-width: 959px) {
    .services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 960px) {
    .services__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* -------------------------------------------------------------------------
   About
   ------------------------------------------------------------------------- */
.about__grid {
    display: grid;
    gap: var(--sp-8);
    grid-template-columns: 1fr;
    align-items: center;
}

@media (min-width: 900px) {
    .about__grid {
        grid-template-columns: 1.1fr 1fr;
        gap: var(--sp-9);
    }
}

.about__copy {
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
}

.about__copy h2 {
    font-size: var(--fs-3);
    line-height: 1.05;
}

.about__copy p {
    color: var(--ink-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.about__copy .btn {
    align-self: flex-start;
    margin-top: var(--sp-3);
}

.about__media {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 5;
    position: relative;
}

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

.about__lede {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--ink-muted);
    max-width: 54ch;
}

/* Long-form origin story and "why we do" beats. Two-column at desktop,
   single-column below 900px. */
.about__story {
    margin-top: var(--sp-10);
    display: grid;
    gap: var(--sp-8);
    grid-template-columns: 1fr;
    max-width: 64rem;
    margin-inline: auto;
}

@media (min-width: 900px) {
    .about__story {
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-9);
    }
}

.about__beat h3 {
    font-family: var(--font-display);
    font-size: var(--fs-2);
    line-height: 1.1;
    margin-bottom: var(--sp-5);
    text-wrap: balance;
}

.about__beat p {
    color: var(--ink-muted);
    font-size: 1.02rem;
    line-height: 1.75;
    margin-bottom: var(--sp-4);
    max-width: 42ch;
}

.about__beat p:last-of-type {
    margin-bottom: 0;
}

.about__signoff {
    margin-top: var(--sp-5) !important;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.35rem !important;
    line-height: 1.4;
    color: var(--ink) !important;
    font-variation-settings: "opsz" 144, "SOFT" 100;
}

/* -------------------------------------------------------------------------
   Gallery strip (horizontal drifting rail)
   ------------------------------------------------------------------------- */
.gallery-strip {
    overflow: hidden;
}

.gallery-strip__track {
    display: flex;
    gap: var(--sp-4);
    padding-inline: var(--gutter);
    padding-block: var(--sp-7) var(--sp-4);
    will-change: transform;
}

.gallery-strip__item {
    flex: 0 0 auto;
    width: clamp(14rem, 24vw, 22rem);
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-raised);
}

.gallery-strip__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -------------------------------------------------------------------------
   Team
   ------------------------------------------------------------------------- */
.team__grid {
    display: grid;
    gap: var(--sp-7);
    grid-template-columns: 1fr;
}

@media (min-width: 780px) {
    .team__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.team__card {
    display: grid;
    gap: var(--sp-5);
    grid-template-columns: 1fr;
    align-items: start;
}

@media (min-width: 520px) {
    .team__card {
        grid-template-columns: 10rem 1fr;
        gap: var(--sp-6);
    }
}

.team__photo {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 5;
    background: var(--bg-raised);
}

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

.team__copy h3 {
    font-family: var(--font-display);
    font-size: var(--fs-2);
    line-height: 1.1;
    margin-bottom: var(--sp-3);
}

.team__copy p {
    color: var(--ink-muted);
    line-height: 1.7;
    margin-bottom: var(--sp-3);
}

.team__copy p:last-of-type {
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Book / CTA
   ------------------------------------------------------------------------- */
.book {
    background:
        linear-gradient(180deg, var(--bg) 0%, var(--bg-sunken) 100%);
    border-top: 1px solid var(--border);
    margin-top: var(--sp-10);
}

.book__inner {
    max-width: 44rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book__inner .eyebrow {
    margin-bottom: var(--sp-4);
}

.book__headline {
    font-family: var(--font-display);
    font-size: var(--fs-3);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: var(--sp-5);
    text-wrap: balance;
}

.book__inner .cluster {
    justify-content: center;
}
