:root {
    --hmg-bg: #f7f7f9;
    --hmg-surface: #ffffff;
    --hmg-ink: #1c1f2a;
    --hmg-ink-soft: #656b78;
    --hmg-header: #1c1f2a;
    --hmg-accent: #4f46e5;
    --hmg-accent-dark: #3f37c9;
    --hmg-error: #c02b3c;
    --hmg-success: #1a8a5f;
    --hmg-radius: 14px;
    --hmg-shadow: 0 4px 16px rgba(28, 31, 42, 0.07);
    --font-heading: "Inter", "Segoe UI", sans-serif;
    --font-body: "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--hmg-bg);
    color: var(--hmg-ink);
    line-height: 1.6;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.25;
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--hmg-header);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    position: relative;
}

.logo {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-emoji { font-size: 1.5rem; }

.site-header nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-header nav a {
    color: #c6c9d1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.site-header nav a:hover { color: #fff; }

.nav-cta {
    background: var(--hmg-accent);
    color: #fff !important;
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 600 !important;
}

.nav-cta:hover { background: var(--hmg-accent-dark); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 0 auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero */
main.wrap {
    padding-top: 0;
    padding-bottom: 56px;
    min-height: 60vh;
}

.hero {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
    padding: 56px 24px 8px;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin: 0 0 14px;
    color: var(--hmg-ink);
    font-weight: 700;
}

.hero p {
    color: var(--hmg-ink-soft);
    font-size: 1.1rem;
    margin: 0 0 24px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-compact {
    padding: 40px 24px 8px;
    margin-bottom: 32px;
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--hmg-accent);
    color: #fff;
}

.btn-primary:hover { background: var(--hmg-accent-dark); }

.btn-ghost {
    background: #fff;
    color: var(--hmg-ink);
    border: 1px solid #dcdfe4;
}

.btn-ghost:hover { border-color: var(--hmg-accent); color: var(--hmg-accent); }

.btn-outline {
    background: transparent;
    color: var(--hmg-accent);
    border: 1px solid var(--hmg-accent);
    padding: 11px 26px;
}

.btn-outline:hover { background: var(--hmg-accent); color: #fff; }

/* Teaser section */
.teaser h2 {
    text-align: center;
    font-size: 1.6rem;
    margin: 0 0 24px;
}

.teaser-more {
    text-align: center;
    margin-top: 32px;
}

/* Legal pages */
.legal-content {
    max-width: 720px;
    margin: 0 auto;
    background: var(--hmg-surface);
    padding: 32px 36px;
    border-radius: var(--hmg-radius);
    box-shadow: var(--hmg-shadow);
}

.legal-content h2 {
    font-size: 1.15rem;
    margin: 28px 0 8px;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p {
    color: var(--hmg-ink-soft);
}

.legal-content a {
    color: var(--hmg-accent);
}

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

.gallery-item {
    margin: 0;
    background: var(--hmg-surface);
    border-radius: var(--hmg-radius);
    overflow: hidden;
    box-shadow: var(--hmg-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(28, 31, 42, 0.12);
    border-color: #e0e2ea;
}

.gallery-open {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.gallery-item figcaption {
    padding: 14px 16px;
    font-size: 0.95rem;
    color: var(--hmg-ink-soft);
}

.empty-state {
    text-align: center;
    color: var(--hmg-ink-soft);
    padding: 40px 0;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 22, 30, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 24px;
}

.lightbox[hidden] {
    display: none;
}

.lightbox figure {
    margin: 0;
    max-width: min(90vw, 900px);
    text-align: center;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 14px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.lightbox figcaption {
    color: #e4e6ec;
    margin-top: 14px;
    font-size: 0.95rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    cursor: pointer;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }

/* Upload form */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto;
    background: var(--hmg-surface);
    padding: 28px;
    border-radius: var(--hmg-radius);
    box-shadow: var(--hmg-shadow);
}

.upload-form label {
    font-weight: 600;
    margin-top: 14px;
    font-size: 0.95rem;
}

.upload-form input[type="text"],
.upload-form textarea {
    padding: 12px;
    border: 2px solid #e7e1fb;
    border-radius: 12px;
    font: inherit;
    background: var(--hmg-bg);
}

.upload-form input[type="text"]:focus,
.upload-form textarea:focus,
.file-drop:focus-within {
    outline: none;
    border-color: var(--hmg-accent);
}

.file-drop {
    position: relative;
    border: 2px dashed #d6d9e0;
    border-radius: 12px;
    padding: 22px 14px;
    text-align: center;
    background: var(--hmg-bg);
    color: var(--hmg-ink-soft);
    font-size: 0.9rem;
}

.file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400 !important;
    font-size: 0.85rem;
    color: var(--hmg-ink-soft);
    margin-top: 16px !important;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--hmg-accent);
}

.checkbox-label a { color: var(--hmg-accent); }

.upload-form button {
    margin-top: 22px;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    max-width: 480px;
}

.alert-success {
    background: #e2fbef;
    color: var(--hmg-success);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.alert-error {
    background: #ffe3ee;
    color: var(--hmg-error);
    margin-left: auto;
    margin-right: auto;
}

.alert-error ul {
    margin: 0;
    padding-left: 20px;
}

/* Footer */
.site-footer {
    background: var(--hmg-header);
    color: #a49bce;
    padding: 22px 0;
    font-size: 0.85rem;
    text-align: center;
}

.footer-legal {
    margin-top: 6px;
}

.footer-legal a {
    color: #a49bce;
}

.footer-legal a:hover {
    color: #fff;
}

/* Mobile */
@media (max-width: 720px) {
    .nav-toggle { display: flex; }

    .site-header nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--hmg-header);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .site-header nav.is-open {
        max-height: 240px;
    }

    .site-header nav a {
        padding: 14px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-cta {
        border-radius: 0;
        text-align: center;
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .gallery-item img { height: 150px; }
}

@media (max-width: 460px) {
    .gallery { grid-template-columns: 1fr; }
    .gallery-item img { height: 200px; }
}
