/*
 * Site — shared chrome
 * ---------------------------------------------------------------------------
 * Design tokens, reset, header, footer, buttons, and the components reused
 * across every public page (store badges, FAQ accordion, CTA banner).
 * Page-specific rules live in home.css and pages.css.
 */

/* Rapidx landing — Chowdeck-inspired layout */
:root {
    /* Aligned with admin dashboard (resources/css/colors.css) */
    --rt-green: #1b4d3e;
    --rt-green-dark: #153d32;
    --rt-green-deeper: #0f2f26;
    --rt-green-mid: #2d7a63;
    --rt-green-soft: #5a9d87;
    --rt-green-light: #f3f6f5;
    --rt-green-muted: #e8eeeb;
    --rt-green-accent: #84e1bc;
    --rt-ink: #111827;
    --rt-muted: #6b7280;
    --rt-white: #ffffff;
    --rt-radius: 1.25rem;
    --rt-radius-lg: 2rem;
    --font: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body.site {
    font-family: var(--font);
    color: var(--rt-ink);
    background: var(--rt-green-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.site-container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}


/* Accessibility */
.site-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    background: var(--rt-green);
    color: var(--rt-white);
    font-weight: 700;
    border-radius: 0 0 0.75rem 0;
}

.site-skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 3px solid var(--rt-green-mid);
    outline-offset: 2px;
}

.site-container--narrow {
    width: min(820px, 92vw);
}

/* Leaves room for the fixed header on pages without a full-bleed hero. */
main {
    display: block;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

.site-header.is-scrolled {
    background: color-mix(in srgb, var(--rt-green-light) 92%, transparent);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(12, 12, 12, 0.06);
    padding: 0.65rem 0;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--rt-green);
}

.site-logo img {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.site-nav a {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--rt-ink);
    opacity: 0.85;
    transition: opacity 0.2s, color 0.2s;
}

.site-nav a:hover {
    opacity: 1;
    color: var(--rt-green);
}

.site-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9375rem;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    border: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.site-btn:hover {
    transform: translateY(-2px);
}

.site-btn--primary {
    background: var(--rt-green);
    color: var(--rt-white);
    box-shadow: 0 8px 24px rgba(27, 77, 62, 0.25);
}

.site-btn--accent {
    background: var(--rt-green-accent);
    color: var(--rt-green-dark);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--rt-green-mid) 25%, transparent);
}

.site-btn--outline {
    background: transparent;
    border: 2px solid var(--rt-ink);
    color: var(--rt-ink);
}

.site-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}


.site-nav a.is-current {
    opacity: 1;
    color: var(--rt-green);
}

.site-btn--secondary {
    background: var(--rt-white);
    color: var(--rt-green);
    box-shadow: 0 8px 24px rgba(15, 47, 38, 0.2);
}

.site-btn--secondary:hover {
    background: var(--rt-green-light);
    color: var(--rt-green-dark);
}

/* Store badges (hero, CTA, footer) */
.site-store-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.site-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    background: var(--rt-ink);
    color: var(--rt-white);
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: transform 0.25s ease, background 0.25s ease;
}

.site-store-badge:hover {
    transform: scale(1.04);
    background: var(--rt-green);
}

/* A badge with no configured store URL is shown but not clickable. */
.site-store-badge.is-disabled {
    background: color-mix(in srgb, var(--rt-ink) 45%, transparent);
    cursor: default;
}

.site-store-badge.is-disabled:hover {
    transform: none;
    background: color-mix(in srgb, var(--rt-ink) 45%, transparent);
}

/* Section headings */
.site-section-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rt-muted);
    margin-bottom: 0.75rem;
}

.site-section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
    max-width: 16ch;
}

.site-section-title--center {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.site-section-label--center {
    text-align: center;
}

.site-section-title--invert {
    color: var(--rt-white);
}

/* FAQ */
.site-faq {
    padding: 6rem 0;
}

.site-faq__list {
    max-width: 720px;
    margin: 2rem auto 0;
}

.site-faq__item {
    border-bottom: 1px solid rgba(12, 12, 12, 0.1);
}

.site-faq__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1.0625rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    color: var(--rt-ink);
}

.site-faq__answer {
    max-height: 0;
    overflow: hidden;
    color: var(--rt-muted);
    line-height: 1.65;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.site-faq__item.is-open .site-faq__answer {
    max-height: 200px;
    padding-bottom: 1.35rem;
}

.site-faq__icon {
    transition: transform 0.3s;
    flex-shrink: 0;
}

.site-faq__item.is-open .site-faq__icon {
    transform: rotate(45deg);
}


.site-faq__answer p {
    margin: 0;
}

.site-faq__more {
    text-align: center;
    margin-top: 2rem;
    color: var(--rt-muted);
}

.site-faq__more a {
    color: var(--rt-green);
    font-weight: 700;
    text-decoration: underline;
}

/* CTA banner */
.site-cta {
    padding: 4rem 0 6rem;
}

.site-cta__card {
    background: linear-gradient(135deg, var(--rt-green) 0%, var(--rt-green-mid) 100%);
    border-radius: var(--rt-radius-lg);
    padding: 4rem 3rem;
    text-align: center;
    color: var(--rt-white);
    position: relative;
    overflow: hidden;
}

.site-cta__card::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.site-cta__card h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.site-cta__card p {
    opacity: 0.9;
    margin-bottom: 2rem;
    font-size: 1.0625rem;
    position: relative;
    z-index: 1;
}

.site-cta__promo {
    display: inline-block;
    background: var(--rt-green-muted);
    color: var(--rt-green);
    font-weight: 800;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.site-cta__card .site-btn--secondary {
    background: var(--rt-white);
    color: var(--rt-green);
    box-shadow: 0 8px 24px rgba(15, 47, 38, 0.2);
}

.site-cta__card .site-btn--secondary:hover {
    background: var(--rt-green-light);
    color: var(--rt-green-dark);
}


.site-cta__badges {
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Footer */
.site-footer {
    background: var(--rt-ink);
    color: rgba(255, 255, 255, 0.75);
    padding: 4rem 0 2rem;
}

/* Brand column plus one column per config('site.footer') group. */
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.site-footer h4 {
    color: var(--rt-white);
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
}

.site-footer ul {
    list-style: none;
}

.site-footer li {
    margin-bottom: 0.65rem;
}

.site-footer a:hover {
    color: var(--rt-white);
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.5rem;
    font-size: 0.8125rem;
    text-align: center;
}


.site-footer__brand p {
    line-height: 1.65;
    font-size: 0.9375rem;
    max-width: 30ch;
}

.site-footer__contact {
    list-style: none;
    margin-top: 1.5rem;
}

.site-footer__contact li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
}

.site-footer__social {
    display: flex;
    gap: 0.6rem;
    list-style: none;
    margin-top: 1.5rem;
}

.site-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.25s ease, color 0.25s ease;
}

.site-footer__social a:hover {
    background: var(--rt-green-accent);
    color: var(--rt-green-dark);
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
}

.site-footer__bottom p {
    margin: 0;
}

.site-footer__badges .site-store-badge {
    background: rgba(255, 255, 255, 0.1);
}

/* Reveal helper */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
}

/* Without JS (or with GSAP blocked) revealed content must still be visible. */
.no-js [data-reveal] {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 992px) {
    .site-nav {
        display: none;
    }

    .site-menu-toggle {
        display: block;
    }

    .site-header__cta {
        display: none;
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 4vw;
    right: 4vw;
    background: var(--rt-green-light);
    padding: 1.5rem;
    border-radius: var(--rt-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    z-index: 99;
    gap: 1rem;
}

@media (max-width: 640px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .site-footer__bottom {
        justify-content: center;
        text-align: center;
    }
}
