/* KountEm Website Styles
   Brand palette: Forest theme — greens, off-white, dark text */

:root {
    --color-primary: #2E7D4F;
    --color-primary-dark: #1F5A38;
    --color-primary-light: #4CAF50;
    --color-accent: #8BC34A;
    --color-warning: #F59E0B;
    --color-danger: #E53935;
    --color-bg: #F5F7F4;
    --color-bg-alt: #FFFFFF;
    --color-bg-dark: #1A2E22;
    --color-text: #1F2A24;
    --color-text-muted: #5A6B61;
    --color-border: #D8E2DA;
    --color-shadow: rgba(46, 125, 79, 0.08);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 14px rgba(46, 125, 79, 0.10);
    --shadow-lg: 0 12px 40px rgba(46, 125, 79, 0.15);

    --max-width: 1200px;
    --content-width: 880px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--color-text); }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

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

ul, ol {
    margin: 0 0 1rem 1.5rem;
}

li { margin-bottom: 0.35rem; }

/* ===== Navigation ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-primary);
    text-decoration: none;
}

.nav-brand:hover { text-decoration: none; }

.nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-block;
    object-fit: contain;
    box-shadow: var(--shadow-sm);
}

.hero-app-icon {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
}

.nav-links {
    display: flex;
    gap: 1.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom-color: var(--color-primary);
}

.nav-links a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
}

/* Language picker */
.lang-picker {
    appearance: none;
    -webkit-appearance: none;
    background: white url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%232E7D4F' d='M0 0l5 6 5-6z'/></svg>") no-repeat right 0.6rem center;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.35rem 1.6rem 0.35rem 0.7rem;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.lang-picker:hover,
.lang-picker:focus {
    border-color: var(--color-primary);
    outline: none;
}

@media (max-width: 760px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 1.5rem 1rem;
        border-bottom: 1px solid var(--color-border);
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a {
        display: block;
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--color-border);
    }
    .nav-toggle { display: block; }
    .lang-picker { margin-top: 0.5rem; align-self: flex-start; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 1.5px solid var(--color-border);
}

.btn-secondary:hover {
    color: var(--color-primary-dark);
    border-color: var(--color-primary);
}

/* App Store badge — Apple Marketing Guidelines:
   min height 40px, clear space >= 1/10 badge height, artwork unmodified. */
.btn-appstore {
    display: inline-flex;
    align-items: center;
    /* clear space: >= 10% of the 48px badge height on all sides */
    padding: 5px;
    line-height: 0;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.2s ease;
}

.btn-appstore img {
    height: 48px;
    width: auto;
    display: block;
}

.btn-appstore:hover {
    transform: translateY(-1px);
    opacity: 0.9;
    text-decoration: none;
}

.cta-banner .btn-appstore:hover { opacity: 0.85; }

/* Bottom CTA: badge on its own line, above the other button. */
.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Hero: badge on its own line, below the buttons. */
.hero-cta-badge {
    margin-top: 1rem;
}

@media (max-width: 860px) {
    .hero-cta-badge { text-align: center; }
}

/* ===== Layout sections ===== */
.section {
    padding: 5rem 1.5rem;
}

.section-tight { padding: 3rem 1.5rem; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.container-narrow {
    max-width: var(--content-width);
    margin: 0 auto;
}

.eyebrow {
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-primary);
    margin-bottom: 0.6rem;
}

.lead {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.5;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* ===== Hero ===== */
.hero {
    padding: 4rem 1.5rem 5rem;
    background:
        radial-gradient(ellipse at top left, rgba(139, 195, 74, 0.18), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(46, 125, 79, 0.15), transparent 50%),
        var(--color-bg);
    overflow: hidden;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    margin-bottom: 1.2rem;
}

.hero-text h1 .accent {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text .lead {
    text-align: left;
    margin: 0 0 2rem;
}

.hero-cta {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    text-align: center;
}

.hero-image img {
    max-height: 640px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 0 8px rgba(0,0,0,0.05);
}

@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-text .lead { text-align: center; }
    .hero-text h1 { text-align: center; }
    .hero-cta { justify-content: center; }
    .hero-image img { max-height: 520px; }
}

/* ===== Feature grid ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    padding: 2rem 1.6rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(46, 125, 79, 0.12), rgba(139, 195, 74, 0.18));
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.4rem;
}

.feature-card p {
    color: var(--color-text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* ===== Split sections ===== */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.split.reverse > :first-child {
    order: 2;
}

.split-image {
    text-align: center;
}

.split-image img {
    max-height: 560px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 0 6px rgba(0,0,0,0.04);
}

.split-text h2 { margin-bottom: 1rem; }
.split-text p { color: var(--color-text-muted); font-size: 1.05rem; }
.split-text ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.split-text ul li {
    padding-left: 1.7rem;
    position: relative;
    margin-bottom: 0.6rem;
    color: var(--color-text);
}
.split-text ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-primary);
    font-weight: 800;
}

@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; gap: 2.5rem; }
    .split.reverse > :first-child { order: 0; }
    .split-image img { max-height: 480px; }
}

/* ===== Gallery ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

.gallery-item-caption {
    padding: 0.9rem 1.1rem 1.1rem;
}

.gallery-item-caption h4 { font-size: 0.98rem; margin-bottom: 0.1rem; }
.gallery-item-caption p { font-size: 0.85rem; color: var(--color-text-muted); margin: 0; }

/* ===== How-it-works steps ===== */
.steps {
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.step {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    position: relative;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: -16px;
    left: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: var(--shadow-md);
}

.step h3 { margin-top: 0.6rem; }
.step p { color: var(--color-text-muted); margin: 0; font-size: 0.95rem; }

/* ===== CTA banner ===== */
.cta-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border-radius: var(--radius-xl);
    padding: 3.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.cta-banner h2 { color: white; margin-bottom: 0.6rem; }
.cta-banner p { color: rgba(255,255,255,0.92); font-size: 1.1rem; margin-bottom: 1.6rem; }
.cta-banner .btn-secondary { background: white; color: var(--color-primary); }

/* ===== Legal pages ===== */
.legal-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.legal-content h1 { margin-bottom: 0.5rem; }
.legal-content .updated { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 2.5rem; }

.legal-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
}

.legal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    color: var(--color-primary-dark);
}

.legal-content p, .legal-content li {
    color: var(--color-text);
    font-size: 1rem;
}

.legal-content ul { margin: 0.5rem 0 1rem 1.4rem; }

.toc {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
}

.toc h4 {
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 0.6rem;
}

.toc ol {
    margin: 0 0 0 1.2rem;
}

.toc li { margin-bottom: 0.2rem; font-size: 0.95rem; }

/* ===== Footer ===== */
.footer {
    background: var(--color-bg-dark);
    color: #C5D5CC;
    padding: 3rem 1.5rem 2rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
}

.footer-brand { color: white; }
.footer-brand h3 { color: white; margin-bottom: 0.4rem; }
.footer-brand p { color: #9CB0A4; font-size: 0.92rem; max-width: 320px; }

.footer h4 {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer ul li { margin-bottom: 0.4rem; }

.footer a {
    color: #C5D5CC;
    font-size: 0.92rem;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    color: #8FA89A;
    font-size: 0.88rem;
}

.footer-bottom a { color: #C5D5CC; }

.powered-by {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.powered-by strong {
    color: white;
}

@media (max-width: 760px) {
    .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* ===== Stats row ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.stat {
    padding: 1.5rem 1rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    margin-top: 0.4rem;
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.bg-alt { background: var(--color-bg-alt); }
.bg-soft {
    background: linear-gradient(180deg, var(--color-bg) 0%, #ECF2EE 100%);
}
