:root {
    color-scheme: light;
    --ink: #17202a;
    --muted: #5f6b76;
    --line: #dce5eb;
    --surface: #ffffff;
    --soft: #eef7f7;
    --blue: #0f8fb3;
    --blue-dark: #08617d;
    --green: #4d8b63;
    --sand: #f3efe7;
    --shadow: 0 18px 45px rgba(17, 42, 54, 0.12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f8fbfc;
}

a {
    color: inherit;
}

.hero {
    min-height: 88vh;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(8, 42, 56, 0.84), rgba(8, 74, 95, 0.48)),
        url("https://images.unsplash.com/photo-1572331165267-854da2b10ccc?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;
}

.brand {
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 22px;
}

.nav-links a,
.admin-link {
    font-weight: 700;
    text-decoration: none;
}

.hero-content {
    max-width: 760px;
    padding: 13vh 24px 80px;
    margin: 0 auto;
}

.kicker,
.section-label {
    margin: 0 0 10px;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero .kicker {
    color: #aee8e8;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    max-width: 700px;
    margin: 0 0 22px;
    font-size: clamp(2.4rem, 7vw, 5.6rem);
    line-height: 0.98;
}

h2 {
    margin: 0 0 20px;
    font-size: clamp(1.7rem, 3.5vw, 3rem);
    line-height: 1.08;
}

h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.hero-content p:not(.kicker) {
    max-width: 620px;
    margin: 0 0 28px;
    color: #e9f7f8;
    font-size: 1.16rem;
    line-height: 1.65;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.primary {
    color: #fff;
    background: var(--blue);
}

.primary:hover {
    background: var(--blue-dark);
}

.secondary {
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 76px 24px;
}

.intro {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
    gap: 36px;
}

.company-data {
    align-self: start;
    padding: 24px;
    border-left: 4px solid var(--blue);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.company-data p,
.services p,
.contact p,
.empty-gallery p,
.upload-form p,
.admin-card p {
    color: var(--muted);
    line-height: 1.6;
}

.services {
    max-width: none;
    background: var(--soft);
}

.services > * {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.service-grid article {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.section-heading,
.admin-header,
.admin-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.gallery-item {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: var(--sand);
}

.gallery-item img,
.manage-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item img {
    display: block;
    transition: transform 0.2s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.empty-gallery,
.contact {
    background: var(--surface);
}

.empty-gallery {
    padding: 34px;
    border: 1px dashed var(--line);
    border-radius: 8px;
}

.contact {
    margin-bottom: 50px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact .secondary {
    border-color: var(--line);
    color: var(--ink);
    background: var(--surface);
}

footer {
    padding: 28px 24px;
    color: var(--muted);
    text-align: center;
}

.text-button {
    border: 0;
    color: var(--blue-dark);
    background: transparent;
    font-weight: 800;
    cursor: pointer;
}

.danger {
    width: 100%;
    padding: 12px;
    color: #9a2a2a;
    text-align: center;
}

@media (max-width: 760px) {
    .nav,
    .section-heading,
    .admin-header,
    .admin-card-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .hero-content {
        padding-top: 9vh;
    }

    .intro,
    .service-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 56px 18px;
    }
}
