/* ===== PikuMail Homepage Styles (responsive) ===== */
:root {
    --bg: #ffffff;
    --bg-alt: #f5f7fa;
    --text: #1a1a1a;
    --muted: #5f6368;
    --accent: #0061FF;
    --accent-dark: #004dcc;
    --border: #e0e0e0;
    --card-bg: #ffffff;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }

/* Header */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.2rem; }
.nav-links { display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--text); font-weight: 500; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
    display: none;
    background: none; border: 1px solid var(--border); border-radius: 8px;
    width: 42px; height: 38px; cursor: pointer; padding: 8px;
    flex-direction: column; justify-content: center; gap: 5px;
    margin-left: auto;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-check { display: none; }

/* Mobile: checkbox toggles the menu without JavaScript */
@media (max-width: 640px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; gap: 0;
        background: var(--bg); border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 16px rgba(0,0,0,.08);
    }
    .nav-check:checked ~ .nav-links { display: flex; }
    .nav-links a {
        padding: 14px 20px; border-top: 1px solid var(--border);
        font-size: 1rem;
    }
    .nav-check:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-check:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
    .nav-check:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Hero */
.hero { text-align: center; padding: 70px 20px 50px; background: linear-gradient(180deg, #eef4ff, var(--bg)); }
.hero-logo { width: 120px; height: 120px; border-radius: 20px; object-fit: contain; margin-bottom: 16px; }
.hero video.hero-logo { width: 360px; height: 360px; max-width: 92vw; border-radius: 32px; object-fit: cover; background: transparent; }
.hero h1 { font-size: 2.8rem; margin-bottom: 8px; }
.tagline { font-size: 1.25rem; color: var(--muted); margin-bottom: 14px; }
.badge {
    display: inline-block; background: var(--accent); color: #fff;
    padding: 6px 16px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
}

/* Sections */
.section { padding: 60px 20px; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: 1.9rem; margin-bottom: 16px; }
.section p { max-width: 720px; }
.center { text-align: center; }
.center p { margin: 0 auto 12px; }
.muted { color: var(--muted); }
.note { font-size: 0.85rem; color: var(--muted); margin-top: 16px; }
code { background: var(--bg-alt); padding: 2px 5px; border-radius: 4px; font-size: 0.85em; }

/* Cards grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 12px; }
.card {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 12px; padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; color: var(--accent-dark); }
.card p { margin: 0; }

/* Screenshots */
.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 16px; }
.screenshot-grid figure { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.screenshot-grid img { width: 100%; display: block; cursor: zoom-in; }
.screenshot-grid figcaption { padding: 10px 14px; font-size: 0.9rem; color: var(--muted); }

/* Lightbox */
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,0.85); align-items: center; justify-content: center; padding: 24px;
}
.lightbox img {
    max-width: 95vw; max-height: 92vh; border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5); background: #fff; object-fit: contain;
}
.lightbox-close {
    position: absolute; top: 16px; right: 28px; color: #fff; font-size: 44px; cursor: pointer; line-height: 1;
}

/* Button */
.btn {
    display: inline-block; background: var(--accent); color: #fff;
    padding: 14px 28px; border-radius: 10px; font-weight: 600; font-size: 1rem;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-disabled {
    display: inline-block; background: var(--bg-alt); color: var(--muted);
    padding: 14px 28px; border-radius: 10px; font-weight: 600; font-size: 1rem;
    border: 1px solid var(--border); cursor: default;
}

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 26px 20px; text-align: center; }
.site-footer p { margin: 4px 0; color: var(--muted); font-size: 0.9rem; }

/* Privacy headings */
.narrow h1 { font-size: 2.2rem; margin-bottom: 6px; }
.narrow h2 { font-size: 1.3rem; margin: 26px 0 8px; }
.narrow ul { margin: 8px 0 8px 22px; }
.narrow li { margin: 4px 0; }

/* Bug report form */
.bug-form { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.bug-form label { font-weight: 600; margin-top: 8px; }
.bug-form .req { color: var(--accent-dark); }
.bug-form select,
.bug-form input[type=text],
.bug-form input[type=email],
.bug-form textarea {
    width: 100%; padding: 10px 12px; font-size: 1rem;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--card-bg); color: var(--text);
    box-sizing: border-box;
}
.bug-form textarea { resize: vertical; font-family: inherit; }
.bug-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* CAPTCHA */
.bug-captcha { margin-top: 10px; }
.captcha-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.captcha-question {
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 8px; padding: 10px 14px; font-weight: 700; font-size: 1rem;
    min-width: 90px; text-align: center; user-select: none;
}
.captcha-row input { width: 120px !important; }

/* Status banners */
.banner { padding: 12px 16px; border-radius: 8px; margin: 14px 0; font-weight: 500; }
.banner.ok { background: #e6f4ea; color: #1e7e34; border: 1px solid #b7e4c7; }
.banner.err { background: #fdecec; color: #c53030; border: 1px solid #f5c6c6; }
.btn-primary { background: var(--accent); color: #fff; border: none; cursor: pointer; padding: 14px 28px; border-radius: 10px; font-weight: 600; font-size: 1rem; }
.btn-primary:hover { background: var(--accent-dark); }
.bug-form .btn { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); cursor: pointer; }
.bug-form .btn:hover { color: var(--text); }

/* Bug list */
.bug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.bug-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.bug-top { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.bug-cat, .bug-sev { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.bug-cat { background: var(--accent); color: #fff; }
.bug-sev.sev-minor { background: #e8f0fe; color: #1a56db; }
.bug-sev.sev-major { background: #fff4e5; color: #b45309; }
.bug-sev.sev-critical { background: #fde8e8; color: #c53030; }
.bug-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.bug-card p { margin: 0 0 10px; color: var(--muted); font-size: 0.92rem; white-space: pre-wrap; }
.bug-meta { font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 8px; }

/* Responsive */
@media (max-width: 640px) {
    .hero { padding: 46px 16px 34px; }
    .hero h1 { font-size: 2.1rem; }
    .tagline { font-size: 1.05rem; }
    .section { padding: 44px 16px; }
    .brand-name { font-size: 1.05rem; }
}
