/* ============================================================
   Apple-style homepage — DH Geo Consultancy
   Full-bleed product sections, huge centered type, pill CTAs,
   alternating black / light canvases. Loaded on index.html only.
   ============================================================ */

:root {
    --ah-blue: #0071e3;
    --ah-blue-hover: #0077ed;
    --ah-link-dark: #2997ff;   /* link blue on black */
    --ah-light: #f5f5f7;       /* Apple light gray  */
    --ah-black: #000000;
    --ah-text-on-light: #1d1d1f;
    --ah-muted-on-light: #6e6e73;
    --ah-muted-on-dark: #86868b;
}

.ah-home {
    background: var(--ah-black);
}

/* --- Brand statement band --- */
.ah-brand {
    padding: 7.5rem 0 3rem;
    background: linear-gradient(180deg, #0d1526 0%, var(--bg) 100%);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ah-brand-title {
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-strong);
}

.ah-brand-sub {
    margin-top: 0.5rem;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    color: var(--text-muted);
}

/* --- Full-bleed hero sections --- */
.ah-hero {
    padding: 5.5rem 1.5rem 4.5rem;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.ah-hero.ah-dark {
    background:
        radial-gradient(ellipse 90% 55% at 50% 0%, rgba(41, 62, 104, 0.35) 0%, rgba(41, 62, 104, 0) 65%),
        linear-gradient(180deg, #0b0f18 0%, #030407 55%, #000000 100%);
    color: var(--ah-light);
}

.ah-hero.ah-light {
    background:
        radial-gradient(ellipse 90% 60% at 50% 0%, rgba(213, 226, 244, 0.9) 0%, rgba(213, 226, 244, 0) 70%),
        linear-gradient(180deg, #fbfbfd 0%, #eef1f7 55%, #e3e8f2 100%);
    color: var(--ah-text-on-light);
}

.ah-copy {
    position: relative;
    z-index: 2;
    max-width: 780px;
    margin: 0 auto;
}

.ah-title {
    font-size: clamp(2.5rem, 5.4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.07;
}

.ah-tag {
    margin-top: 0.55rem;
    font-size: clamp(1.2rem, 2.4vw, 1.75rem);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.ah-dark .ah-tag { color: var(--ah-light); }
.ah-light .ah-tag { color: var(--ah-text-on-light); }

.ah-note {
    margin-top: 0.8rem;
    font-size: 1rem;
    color: var(--ah-muted-on-dark);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* --- CTAs: Apple pill buttons --- */
.ah-cta {
    margin-top: 1.4rem;
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ah-btn {
    display: inline-block;
    background: var(--ah-blue);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.72rem 1.6rem;
    border-radius: 980px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ah-btn:hover {
    background: var(--ah-blue-hover);
    transform: scale(1.02);
}

.ah-btn-ghost {
    background: transparent;
    border: 1px solid var(--ah-blue);
    color: var(--ah-blue);
}

.ah-dark .ah-btn-ghost,
.ah-hydro .ah-btn-ghost {
    border-color: var(--ah-link-dark);
    color: var(--ah-link-dark);
}

.ah-btn-ghost:hover {
    background: rgba(0, 113, 227, 0.12);
}

/* --- Animation stage --- */
.ah-stage {
    max-width: 980px;
    margin: 3rem auto 0;
    position: relative;
    z-index: 2;
}

.ah-stage .explainer-svg,
.ah-stage svg.explainer-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* cinematic hero video */
.ah-video {
    width: 100%;
    display: block;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

/* dark rounded canvas so dark-designed scenes sit on light sections */
.ah-canvas {
    background: #0a1120;
    border-radius: 22px;
    padding: 1.2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

/* --- Hydro gradient hero --- */
.ah-hero.ah-hydro {
    background: linear-gradient(180deg, #05101f 0%, #072a45 70%, #0a3a5c 100%);
    color: var(--ah-light);
    padding-bottom: 0;
}

.ah-hydro-waves {
    display: block;
    width: 100%;
    height: 180px;
    margin-top: 3rem;
}

/* --- Tile grid --- */
.ah-grid-wrap {
    background: var(--ah-black);
    padding: 12px;
}

.ah-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 1440px;
    margin: 0 auto;
}

/* odd tile count: let the last tile go full-width like Apple's wide rows */
.ah-grid > .ah-tile:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.ah-tile {
    padding: 3.6rem 2rem 2.6rem;
    text-align: center;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 480px;
}

.ah-tile.ah-dark {
    background:
        radial-gradient(ellipse 100% 60% at 50% 0%, rgba(48, 66, 105, 0.30) 0%, rgba(48, 66, 105, 0) 65%),
        linear-gradient(180deg, #15181f 0%, #0a0b0e 100%);
    color: var(--ah-light);
}

.ah-tile.ah-light {
    background:
        radial-gradient(ellipse 100% 60% at 50% 0%, rgba(218, 229, 245, 0.85) 0%, rgba(218, 229, 245, 0) 70%),
        linear-gradient(180deg, #fbfbfd 0%, #e9edf5 100%);
    color: var(--ah-text-on-light);
}

.ah-tile.ah-forest {
    background: linear-gradient(180deg, #0b1512 0%, #10231a 100%);
}

.ah-tile-title {
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.015em;
}

.ah-tile-tag {
    margin-top: 0.4rem;
    font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.ah-tile.ah-light .ah-tile-tag { color: var(--ah-muted-on-light); }
.ah-tile.ah-dark .ah-tile-tag { color: var(--ah-muted-on-dark); }

.ah-cta-links {
    margin-top: 0.9rem;
    gap: 1.6rem;
}

.ah-link {
    color: var(--ah-blue);
    text-decoration: none;
    font-size: 1.02rem;
}

.ah-tile.ah-dark .ah-link,
.ah-hydro .ah-link {
    color: var(--ah-link-dark);
}

.ah-link:hover {
    text-decoration: underline;
}

.ah-tile-art {
    margin-top: auto;
    padding-top: 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.ah-tile-art svg {
    width: min(400px, 92%);
    height: auto;
}

.ah-tile-art .fas {
    font-size: 6rem;
    opacity: 0.85;
}

.ah-tile-scene .ah-canvas {
    margin-top: auto;
    width: 100%;
    padding: 0.8rem;
}

.ah-tile-scene .explainer-svg {
    width: 100%;
    height: auto;
}

.ah-tile.ah-dark .ah-canvas {
    box-shadow: none;
    background: #0a1120;
}

/* --- Stats --- */
.ah-stats {
    background: var(--ah-black);
    padding: 5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ah-stats .stat-number {
    font-size: clamp(2.6rem, 5vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.ah-stats .stat-label {
    color: var(--ah-muted-on-dark);
    margin-top: 0.3rem;
}

/* --- Clients --- */
.ah-clients {
    background: var(--bg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- hide legacy hero controls that ship inside reused scenes --- */
.ah-home .hero-hidden-controls {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    opacity: 0;
    pointer-events: none;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .ah-grid {
        grid-template-columns: 1fr;
    }

    .ah-tile {
        min-height: 0;
    }

    .ah-hero {
        padding: 4rem 1rem 3rem;
    }

    .ah-brand {
        padding-top: 6rem;
    }
}
