/* ==========================================================================
   ViewMapper — site styles
   Palette note: every text/background pair below is checked against WCAG AA
   (4.5:1 normal, 3:1 large). The old mint greens failed badly — body copy was
   3.22:1 and the footer copyright 1.43:1 — so the greens here are darker.
   ========================================================================== */

/* Self-hosted variable font: no third-party origin, no GDPR exposure. */
@font-face {
    font-family: 'Quicksand';
    src: url('../fonts/quicksand-var-latin-9d503278.woff2') format('woff2-variations');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --green-deep:  #2C6449;   /* header/footer gradient end  — white text 6.94:1 */
    --green-mid:   #37805D;   /* header/footer gradient start — white text 4.76:1 */
    --green-text:  #2F6B4F;   /* body copy on mint            — 5.95:1 */
    --green-accent:#4A9A74;   /* decorative only, never text-on-mint */
    --mint-bg:     #F0FBF6;
    --mint-panel:  rgba(47, 107, 79, 0.07);
    --mint-panel-hi: rgba(47, 107, 79, 0.12);
    --shadow-sm: 0 4px 15px rgba(44, 100, 73, 0.10);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --focus: #14532d;
}

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

body {
    font-family: 'Quicksand', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--green-text);
    overflow-x: hidden;
    background-color: var(--mint-bg);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Accessibility helpers ---------------------------------------------------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 12px 20px;
    background: var(--green-deep);
    color: #fff;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}
.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 4px;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.icon--solid {
    fill: currentColor;
    stroke: none;
}

/* Header ------------------------------------------------------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, var(--green-mid), var(--green-deep));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo-container {
    height: 40px;
    display: flex;
    align-items: center;
}

.logo-container img {
    height: 40px;
    width: auto;
    max-width: 100%;
}

/* Hamburger — a real <button> now, so it is keyboard reachable */
.menu-container {
    position: relative;
}

.hamburger {
    width: 44px;
    height: 44px;
    padding: 12px 7px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: 0;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.menu {
    position: absolute;
    top: 48px;
    right: 0;
    background-color: var(--green-deep);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 220px;
    display: none;
    z-index: 1000;
}

.menu.active {
    display: block;
}

.menu ul {
    list-style: none;
}

.menu ul li a {
    text-decoration: none;
    color: #fff;
    display: block;
    padding: 10px 20px;
    transition: background-color 0.2s ease;
}

.menu ul li a:hover,
.menu ul li a:focus-visible {
    background-color: rgba(255, 255, 255, 0.14);
}

/* Hero --------------------------------------------------------------------- */
.hero {
    padding: 110px 0 24px;
    text-align: center;
    background-color: var(--mint-bg);
}

.hero-title {
    font-size: clamp(1.9rem, 4.2vw, 3rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--green-deep);
    max-width: 22ch;
    margin: 0 auto;
    text-wrap: balance;
}

.hero-sub {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    max-width: 62ch;
    margin: 18px auto 0;
    color: var(--green-text);
}

.hero-cta {
    display: inline-block;
    margin-top: 22px;
}

.hero-cta .google-play-badge {
    height: 54px;
}

/* Feature carousel --------------------------------------------------------- */
.feature-graphics {
    position: relative;
    overflow: hidden;
    padding: 8px 0 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--mint-bg);
}

.graphics-container {
    height: 56vh;
    min-height: 260px;
    width: 98%;
    max-width: 1600px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* The slide fills the container via inset:0, so every height below it is
   definite. The earlier version sized .graphic with height:auto +
   aspect-ratio, which left percentage heights in its descendants
   indefinite — so max-height:100% on the image resolved to nothing, the
   screenshot overflowed its box and got clipped by overflow:hidden. The
   image now carries the frame itself and is capped in viewport units. */
.graphic {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.graphic.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.graphic-inner {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-image {
    max-width: 100%;
    max-height: 56vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* Dots + pause ------------------------------------------------------------- */
.dot-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
}

.dots {
    display: flex;
    align-items: center;
}

.dot {
    width: 14px;
    height: 14px;
    padding: 0;
    background-color: rgba(47, 107, 79, 0.28);
    border-radius: 50%;
    margin: 0 7px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    transform: scale(1.2);
}

.dot.active {
    background-color: var(--green-deep);
    transform: scale(1.2);
}

.auto-rotate-toggle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(47, 107, 79, 0.14);
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 14px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    color: var(--green-deep);
}

.auto-rotate-toggle:hover {
    background-color: rgba(47, 107, 79, 0.24);
    transform: scale(1.1);
}

.auto-rotate-toggle .icon {
    width: 14px;
    height: 14px;
}

/* Slogan + description ----------------------------------------------------- */
.slogan-section {
    padding: 60px 0;
    text-align: center;
    background-color: var(--mint-bg);
    border-bottom: 1px solid rgba(47, 107, 79, 0.12);
}

.slogan {
    font-weight: 300;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    color: var(--green-deep);
    letter-spacing: 1px;
    line-height: 1.2;
    display: inline-block;
}

.app-description {
    max-width: 800px;
    margin: 30px auto 0;
}

.app-description p {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.features {
    max-width: 1000px;
    margin: 46px auto;
    padding: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
    list-style: none;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px;
    background-color: var(--mint-panel);
    border-radius: 18px;
    transition: transform 0.4s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(47, 107, 79, 0.14);
}

.feature-item:hover {
    transform: translateY(-5px) scale(1.02);
    background-color: var(--mint-panel-hi);
    box-shadow: 0 10px 25px rgba(44, 100, 73, 0.16);
}

.feature-item .icon {
    color: var(--green-deep);
    margin-top: 2px;
}

.feature-item span {
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.5;
}

.ideal-for {
    font-style: italic;
    text-align: center;
    font-weight: 500;
    color: var(--green-text);
}

/* FAQ ---------------------------------------------------------------------- */
.faq-section {
    padding: 64px 0;
    background-color: var(--mint-bg);
    border-bottom: 1px solid rgba(47, 107, 79, 0.12);
}

.faq-section h2 {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 600;
    color: var(--green-deep);
    margin-bottom: 32px;
}

.faq {
    max-width: 780px;
    margin: 0 auto;
}

.faq dt {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--green-deep);
    margin-top: 26px;
}

.faq dt:first-of-type {
    margin-top: 0;
}

.faq dd {
    margin: 8px 0 0;
    color: var(--green-text);
}

/* Download CTA ------------------------------------------------------------- */
.download-cta {
    padding: 72px 0;
    text-align: center;
    background-color: var(--mint-bg);
}

.download-cta h2 {
    font-size: clamp(1.5rem, 3.4vw, 2.4rem);
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--green-deep);
}

.download-cta p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 26px;
}

.google-play-button-link {
    display: inline-block;
    margin-top: 8px;
}

.google-play-badge {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.google-play-badge:hover {
    transform: scale(1.05);
}

/* Footer ------------------------------------------------------------------- */
footer {
    background: linear-gradient(to bottom, var(--green-mid), var(--green-deep));
    color: #fff;
    padding: 40px 0;
}

.legal-links {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.legal-links a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin: 0 15px;
}

.legal-links a:hover {
    text-decoration-thickness: 2px;
}

.copyright {
    text-align: center;
    font-size: 0.9rem;
    color: #fff;           /* was #A9E7CA — 1.43:1, effectively invisible */
}

/* JS-driven reveal animations ---------------------------------------------
   These only apply once JS adds .js-anim to <html>. Without JS the content
   is simply visible, instead of being stuck at opacity:0 forever. */
.js-anim .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.js-anim .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive --------------------------------------------------------------- */
@media (max-width: 900px) {
    .features {
        grid-template-columns: 1fr;
        gap: 18px;
        margin: 36px auto;
    }
    /* Below this width the image is constrained by width, not height, so a
       fixed vh container just leaves a gap under it. Let the container take
       the image's own aspect ratio instead. */
    .graphics-container {
        height: auto;
        aspect-ratio: 1024 / 500;
    }
    .feature-image {
        max-height: none;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 96px 0 18px;
    }
    .graphics-container {
        min-height: 0;
    }
    .feature-item {
        padding: 16px 18px;
    }
    .feature-item span {
        font-size: 0.98rem;
    }
    .legal-links {
        flex-direction: column;
        align-items: center;
    }
    .legal-links a {
        margin: 5px 0;
    }
    .google-play-badge,
    .hero-cta .google-play-badge {
        height: 48px;
    }
}

/* Respect reduced-motion: no slide transitions, no reveal animation, and the
   carousel stops auto-advancing (handled in script.js). */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .js-anim .reveal {
        opacity: 1;
        transform: none;
    }
}
