/* Typography + motion layer. Loaded after modern.css / home.css. */

/* ---------- Typography ---------- */
body {
    font-family: "DM Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4,
.home-strip strong,
.prod-num,
.prod-step::before,
.home-hero-card strong,
.home-faq summary {
    font-family: "Bricolage Grotesque", sans-serif;
    font-optical-sizing: auto;
}

.prod-hero h1,
.home-hero h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.prod-head h2,
.prod-why h2,
.home-pellets h2,
.prod-cta h2 {
    font-weight: 700;
    letter-spacing: -0.015em;
}

.prod-card h3,
.prod-step h3,
.home-why-grid h3 {
    font-weight: 650;
    letter-spacing: -0.005em;
}

.prod-tag,
.prod-eyebrow,
.prod-btn {
    font-family: "DM Sans", sans-serif;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    height: 3px;
    width: 100%;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--amber), var(--green));
}

/* ---------- Navbar polish ---------- */
.navbar_all {
    transition: padding .3s ease, box-shadow .3s ease, background-color .3s ease;
}

.navbar_all.scrolled {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .35);
}

.nav_links a {
    position: relative;
    font-weight: 500;
}

.nav_links a::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 8px;
    height: 2px;
    border-radius: 2px;
    background: var(--amber);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s ease;
}

.nav_links a:hover::after,
.nav_links a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav_links a.active {
    color: var(--green);
}

/* ---------- Typed headline ---------- */
.typed-line {
    display: block;
    min-height: 1.15em;
    color: var(--amber);
}

.typed-cursor {
    color: var(--amber);
    font-weight: 300;
}

/* ---------- Hero ambience ---------- */
.home-hero > *:not(.hero-blob) {
    position: relative;
    z-index: 1;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    pointer-events: none;
    animation: blob-drift 14s ease-in-out infinite alternate;
}

.hero-blob.one {
    width: 420px;
    height: 420px;
    top: -120px;
    right: 8%;
    background: rgba(251, 172, 54, .45);
}

.hero-blob.two {
    width: 360px;
    height: 360px;
    bottom: -140px;
    left: -80px;
    background: rgba(0, 160, 70, .55);
    animation-duration: 18s;
    animation-delay: -6s;
}

@keyframes blob-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.12); }
    100% { transform: translate(-30px, 10px) scale(.95); }
}

/* ---------- Hero slider ---------- */
.hero-slider {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
    animation: hero-img-in 1.1s cubic-bezier(.2, .7, .2, 1) .25s both;
}

.home-hero-media {
    align-self: center;
}

.home-hero > div {
    min-width: 0;
}

.hero-slider {
    overflow: hidden;
    max-width: 100%;
}

.hero-slider .swiper-slide {
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #0d1511;
}

.home-hero-media .hero-slider img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
    animation: none;
    transform: scale(1.12);
    transition: transform 6s ease-out;
}

.hero-slider .swiper-slide-active img {
    transform: scale(1);
}

.home-hero-card {
    z-index: 6;
}

.slide-cap {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(13, 21, 17, .7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .5s ease .4s, transform .5s ease .4s;
}

.swiper-slide-active .slide-cap {
    opacity: 1;
    transform: none;
}

.hero-slider .swiper-pagination {
    bottom: 18px !important;
    left: auto !important;
    right: 18px;
    width: auto !important;
}

.hero-slider .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #fff;
    opacity: .55;
    transition: width .3s ease, opacity .3s ease;
}

.hero-slider .swiper-pagination-bullet-active {
    width: 26px;
    border-radius: 6px;
    background: var(--amber);
    opacity: 1;
}

.hero-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-top: -21px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--ink);
    cursor: pointer;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease, background-color .2s ease;
}

.hero-nav.prev { left: 16px; transform: translateX(-8px); }
.hero-nav.next { right: 16px; transform: translateX(8px); }

.hero-slider:hover .hero-nav {
    opacity: 1;
    transform: none;
}

.hero-nav:hover {
    background: var(--amber);
}

@media (hover: none) {
    .hero-nav { display: none; }
}

.home-hero-card {
    animation: card-in .8s cubic-bezier(.2, .7, .2, 1) .9s both, bob 5s ease-in-out 1.7s infinite;
}

@keyframes hero-img-in {
    from { opacity: 0; transform: translateY(30px) scale(.94) rotate(2deg); }
    to { opacity: 1; transform: none; }
}

@keyframes card-in {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: none; }
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Staggered hero copy entrance (home + products) */
.hero-copy > *,
.prod-hero-inner > * {
    animation: fade-up .8s cubic-bezier(.2, .7, .2, 1) both;
}

.hero-copy > *:nth-child(1), .prod-hero-inner > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2), .prod-hero-inner > *:nth-child(2) { animation-delay: .18s; }
.hero-copy > *:nth-child(3), .prod-hero-inner > *:nth-child(3) { animation-delay: .32s; }
.hero-copy > *:nth-child(4), .prod-hero-inner > *:nth-child(4) { animation-delay: .46s; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Ticker ---------- */
.ticker {
    margin-top: 60px;
    overflow: hidden;
    border-block: 1px solid var(--line);
    background: #fff;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker 38s linear infinite;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

.ticker span {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    padding: 22px 0 22px 28px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

.ticker span::after {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--amber);
}

@keyframes ticker {
    to { transform: translateX(-50%); }
}

/* ---------- Buttons ---------- */
.prod-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.prod-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .7s ease;
}

.prod-btn:hover::before {
    transform: translateX(120%);
}

.prod-btn-primary:hover {
    box-shadow: 0 14px 30px -12px rgba(251, 172, 54, .8);
}

.prod-btn i {
    transition: transform .25s ease;
}

.prod-btn:hover .fa-arrow-right {
    transform: translateX(4px);
}

/* ---------- Cards ---------- */
.prod-icon {
    transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), background-color .3s ease, color .3s ease;
}

.prod-card:hover .prod-icon {
    transform: rotate(-8deg) scale(1.12);
    background: var(--green);
    color: #fff;
}

.prod-card.amber:hover .prod-icon {
    background: var(--amber);
    color: var(--ink);
}

.prod-card::after {
    content: "";
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, var(--green), var(--amber));
    transform: scaleX(0);
    transition: transform .4s ease;
}

.prod-card:hover::after {
    transform: scaleX(1);
}

.prod-step {
    transition: transform .3s ease, box-shadow .3s ease;
}

.prod-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px -24px rgba(0, 64, 28, .35);
}

.home-why-grid > div {
    transition: transform .3s ease, background-color .3s ease;
}

.home-why-grid > div:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, .14);
}

.prod-media-stack img {
    transition: transform .5s ease;
}

.prod-media-stack:hover .main {
    transform: scale(1.02);
}

.prod-media-stack:hover .float {
    transform: translate(-6px, -6px) rotate(-2deg);
}

/* ---------- Scroll reveal (enabled by js/main.js) ---------- */
.motion .reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--d, 0s);
}

.motion .reveal.from-left { transform: translateX(-40px); }
.motion .reveal.from-right { transform: translateX(40px); }
.motion .reveal.zoom { transform: scale(.94); }

.motion .reveal.in {
    opacity: 1;
    transform: none;
}

/* ---------- Mobile ---------- */
.prod-hero {
    min-height: min(60vh, 620px);
}

@media (max-width: 600px) {
    .home-hero h1 {
        font-size: clamp(26px, 8vw, 34px);
    }

    .typed-line {
        white-space: nowrap;
    }

    .hero-blob.one { width: 260px; height: 260px; }
    .hero-blob.two { width: 240px; height: 240px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .ticker-track { animation: none; }
    .motion .reveal { opacity: 1; transform: none; }
}
