/* Foggo Apps homepage - quiet app-page style */

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

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #444444;
    --heading: #25292b;
    --muted: #8b908d;
    --green: #1f5132;
    --green-soft: #2c6b45;
    --rule: #ececec;
    --field: #fafafa;
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --maxw: 1080px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--display);
    color: var(--heading);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.12;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-soft); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.86);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--rule);
}

.header-flex { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.logo-area { color: var(--heading); }
.logo-text h1 { font-size: 1.1rem; font-weight: 600; }
.logo-text .subtitle { display: none; }

.main-nav ul { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.main-nav a { color: var(--text); font-size: 0.95rem; font-weight: 500; }
.main-nav a:hover, .main-nav a.nav-cta { color: var(--green); }

.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.mobile-menu-btn span { width: 22px; height: 2px; background: var(--heading); transition: transform 0.2s ease, opacity 0.2s ease; }

/* Hero */
.hero { padding: 5rem 0 4.5rem; }
.hero .container { max-width: var(--maxw); }
.hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}
.hero-content { max-width: 640px; }
.hero-eyebrow {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.hero h2 {
    font-size: clamp(2.35rem, 6vw, 4.1rem);
    font-weight: 500;
    margin-bottom: 1.1rem;
}
.hero-accent { color: inherit; box-shadow: none; }
.hero-description {
    color: var(--text);
    font-size: 1.18rem;
    max-width: 560px;
    margin-bottom: 1.4rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: center; }
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--green);
    font-weight: 600;
}
.text-link::after { content: "\2192"; transform: translateY(-1px); }
.text-link:hover::after { transform: translate(3px, -1px); }
.muted-link { color: var(--text); font-weight: 500; }
.muted-link:hover { color: var(--green); }
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 1.35rem;
}
.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.hero-meta span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    opacity: 0.5;
}
.hero-visual {
    display: block;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 1rem 0;
}
.featured-app {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    color: var(--heading);
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--rule);
}
.featured-app img,
.hero-icon-grid img {
    border-radius: 14px;
    flex-shrink: 0;
}
.featured-app img {
    width: 64px;
    height: 64px;
}
.featured-app strong {
    display: block;
    color: var(--heading);
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}
.featured-app small {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.1rem;
}
.featured-app:hover strong { color: var(--green); }
.hero-icon-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    padding-top: 1rem;
}
.hero-icon-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.hero-icon-grid img {
    width: 48px;
    height: 48px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 42px;
    padding: 0.55rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--rule);
    background: var(--surface);
    color: var(--heading);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.btn-primary { background: var(--heading); border-color: var(--heading); color: #fff; }
.btn-primary:hover { background: var(--green); border-color: var(--green); color: #fff; }
.btn-secondary:hover { border-color: var(--green); color: var(--green); }

/* Sections */
main, .tools-section, .services-teaser { padding: 4rem 0; border-top: 1px solid var(--rule); }
.section-header { margin-bottom: 1.25rem; }
.section-title { font-size: 1.45rem; font-weight: 600; }
.section-subtitle { color: var(--text); font-size: 1rem; }

/* Apps */
.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 3.5rem;
}
@media (min-width: 760px) { .app-grid { grid-template-columns: 1fr 1fr; } }

.app, .app-hidden, .app-visible { opacity: 1 !important; transform: none !important; }
.app {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--rule);
}
.app-header { display: flex; align-items: center; gap: 0.95rem; }
.app-header .app-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    box-shadow: none;
}
.app-header .icon-wordpile { background-image: url("Icons/WordPileIcon.png"); }
.app-header .icon-hexabounce { background-image: url("Icons/HexaBounceIcon.png"); }
.app-header .app-icon::before,
.app-header .app-icon::after { display: none; }
.app:hover .app-icon { transform: none; box-shadow: none; }
.app:hover .app-title-area h2 { color: var(--green); }
.app-title-area h2 { color: var(--heading); font-size: 1.08rem; font-weight: 600; letter-spacing: 0; transition: color 0.18s ease; }
.app-category {
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 0.05rem;
}
.app-category strong { font-weight: 400; }
.app > p, .app ul { display: none; }
.app-footer { display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; margin-top: 0.8rem; padding-left: 67px; }
.app-store-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--green);
    font-size: 0.9rem;
    font-weight: 600;
}
.app-store-link::after { content: "\2192"; transform: translateY(-1px); }
.app-store-link:hover::after { transform: translate(3px, -1px); }

/* Tools */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 3.5rem;
}
@media (min-width: 760px) { .tools-grid { grid-template-columns: 1fr 1fr; } }

.tool-card, .tool-card-hidden, .tool-card-visible { opacity: 1 !important; transform: none !important; }
.tool-card {
    display: block;
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--rule);
    color: var(--text);
}
.tool-icon { display: none; }
.tool-card h3 { color: var(--heading); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; margin-bottom: 0.1rem; }
.tool-tag { color: var(--muted); font-size: 0.88rem; }
.tool-card > p { color: var(--text); font-size: 0.96rem; margin: 0.55rem 0 0.7rem; max-width: 34rem; }
.tool-cta { color: var(--green); font-size: 0.9rem; font-weight: 600; }
.tool-cta svg { display: none; }
.tool-card:hover h3 { color: var(--green); }

/* Services */
.services-teaser { text-align: left; }
.services-content { max-width: 620px; }
.services-content h2 { font-size: 1.45rem; font-weight: 600; margin-bottom: 0.55rem; }
.services-content p { color: var(--text); margin-bottom: 1.1rem; }

/* Footer */
footer { border-top: 1px solid var(--rule); padding: 2.2rem 0 1.4rem; }
.footer-content { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-brand p { color: var(--green); font-family: var(--display); font-weight: 600; }
.footer-links { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.footer-links a { color: var(--text); font-size: 0.92rem; }
.footer-links a:hover { color: var(--green); }
.copyright { color: var(--muted); font-size: 0.82rem; margin-top: 1.3rem; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(37, 41, 43, 0.42);
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
}
.modal-content {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 18px;
    width: 100%;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(37, 41, 43, 0.18);
}
.modal-content { max-width: 760px; max-height: 90vh; overflow-y: auto; }
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
}
.close-btn:hover { color: var(--heading); }

.modal-header { margin-bottom: 1.4rem; }
.modal-header h2 { font-size: 1.45rem; font-weight: 600; margin-bottom: 0.4rem; }
.modal-header p { color: var(--text); }
.modal-body { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .modal-body { grid-template-columns: 1fr 1fr; } }
.form-group { margin-bottom: 1rem; }
.form-group label, .form-section label { display: block; color: var(--heading); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.optional { color: var(--muted); font-weight: 400; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--rule);
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    background: var(--field);
    color: var(--heading);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--green-soft); background: #fff; }
.form-section { margin-bottom: 1.2rem; }
.option-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.option-btn {
    border: 1px solid var(--rule);
    background: #fff;
    color: var(--text);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.option-btn:hover { border-color: var(--green-soft); color: var(--green); }
.option-btn.selected { background: var(--green); color: #fff; border-color: var(--green); }
.form-error { color: #b3261e; font-size: 0.88rem; margin-top: 0.6rem; min-height: 1.2em; }
.modal-footer { margin-top: 1.4rem; }
.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--heading);
    color: #fff;
    border: 0;
    padding: 0.7rem 1.1rem;
    border-radius: 12px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.submit-btn:hover { background: var(--green); }
.submit-btn.completed { background: var(--green-soft); }
.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
    .container { padding: 0 1.25rem; }
    .mobile-menu-btn { display: flex; }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--rule);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }
    .main-nav.active { max-height: 320px; }
    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; padding: 0.5rem 1.25rem 1rem; }
    .main-nav li { width: 100%; }
    .main-nav a { display: block; width: 100%; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
    .hero { padding: 3.5rem 0 3rem; }
    .hero h2 { font-size: clamp(2.1rem, 13vw, 3.2rem); }
    .hero-description { font-size: 1.08rem; }
    .hero-layout { gap: 2rem; }
    .hero-visual { margin-top: 0.25rem; }
    .hero-icon-grid {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding-bottom: 0.15rem;
    }
    .hero-icon-grid::-webkit-scrollbar { display: none; }
    .hero-icon-grid a { flex: 0 0 auto; scroll-snap-align: start; }
    .hero-icon-grid img { width: 52px; height: 52px; }
    main, .tools-section, .services-teaser { padding: 3rem 0; }
    .app-footer { padding-left: 0; }
    .footer-content { align-items: flex-start; flex-direction: column; }
}

@media (min-width: 820px) {
    .hero-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
