:root {
    --black: #111111;
    --anthracite: #2a2a2a;
    --white: #ffffff;
    --off: #f4f1ec;
    --warm: #ebe5dc;
    --grey: #dedbd5;
    --text: #666666;
    --wood: #b89b72;
    --line: rgba(17, 17, 17, .12);
    --shadow: 0 24px 80px rgba(17, 17, 17, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--off);
    color: var(--black);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 10px clamp(18px, 4vw, 58px);
    background: rgba(244, 241, 236, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}
.brand img {
    width: 74px;
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(17, 17, 17, .08));
}
.main-nav { display: flex; align-items: center; gap: 24px; color: var(--anthracite); font-size: .95rem; }
.main-nav a { transition: color .2s ease; }
.main-nav a:hover { color: var(--wood); }
.nav-cta {
    padding: 10px 14px;
    border: 1px solid var(--black);
    background: var(--black);
    color: var(--white);
}
.main-nav .nav-cta:hover { color: var(--white); background: var(--anthracite); }
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: var(--white);
}
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--black); }

.wrap { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.section { padding: clamp(42px, 6vw, 78px) 0; }
.section.no-top { padding-top: 0; }
.soft { background: var(--warm); }
.dark { background: var(--black); color: var(--white); }
.dark p { color: rgba(255, 255, 255, .72); }
.page-hero { padding: clamp(44px, 6vw, 76px) 0 clamp(34px, 5vw, 58px); background: var(--warm); }

.hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: grid;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(244,241,236,.98), rgba(244,241,236,.82)),
        url("../img/hero-atelier.svg") center/cover;
    border-bottom: 1px solid var(--line);
}
.hero::before {
    content: "π";
    position: absolute;
    right: clamp(18px, 8vw, 150px);
    top: 50%;
    transform: translateY(-50%);
    color: var(--black);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(18rem, 34vw, 35rem);
    font-weight: 700;
    line-height: .75;
    opacity: .045;
    pointer-events: none;
    z-index: 0;
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: clamp(28px, 6vw, 76px);
    align-items: center;
}
.hero-copy { padding: 34px 0; }
.hero-visual {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 50% 42%, rgba(255,255,255,.72), rgba(235,229,220,.34) 62%, rgba(184,155,114,.12));
    border: 1px solid rgba(184, 155, 114, .18);
    box-shadow: 0 22px 68px rgba(17, 17, 17, .10);
    backdrop-filter: blur(10px);
}
.hero-visual img {
    width: min(235px, 70%);
    filter: drop-shadow(0 12px 24px rgba(17, 17, 17, .10));
}
.eyebrow {
    color: var(--wood);
    display: inline-block;
    margin-bottom: 10px;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 4.9rem); max-width: 860px; }
h2 { font-size: clamp(1.75rem, 3.4vw, 3.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); }
p { color: var(--text); margin: 10px 0 0; }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.28rem); max-width: 760px; }
.meta { color: var(--text); font-size: .95rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.actions.centered { justify-content: center; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid var(--black);
    background: var(--black);
    color: var(--white);
    font-weight: 750;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--anthracite); }
.btn.secondary { background: transparent; color: var(--black); }
.btn.secondary:hover { background: var(--black); color: var(--white); }
.btn.light { background: var(--white); color: var(--black); border-color: var(--white); }
.text-link { color: var(--black); border-bottom: 1px solid var(--black); font-weight: 700; }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    gap: clamp(30px, 6vw, 76px);
    align-items: center;
}
.section-head { margin-bottom: 30px; max-width: 820px; }
.section-head.inline {
    max-width: none;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
}
.feature-grid, .service-grid, .project-grid, .admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.feature, .service, .contact-panel, .admin-card {
    border: 1px solid var(--line);
    background: var(--white);
    padding: 22px;
    box-shadow: 0 10px 34px rgba(17, 17, 17, .04);
}
.service { min-height: 220px; }
.media-frame {
    overflow: hidden;
    background: var(--grey);
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }

.project-card {
    border: 1px solid var(--line);
    background: var(--white);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--warm); }
.project-card-body { padding: 20px; }
.tag {
    display: inline-block;
    margin-bottom: 9px;
    color: var(--wood);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.filter-btn {
    min-height: 38px;
    border: 1px solid var(--line);
    background: var(--white);
    padding: 8px 14px;
    cursor: pointer;
}
.filter-btn.is-active { background: var(--black); color: var(--white); }
.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
}
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--off); }
.content { max-width: 860px; }

label { display: grid; gap: 7px; font-weight: 700; }
input, textarea, select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    padding: 10px 12px;
    background: var(--white);
    color: var(--black);
    font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: auto; }
.form-grid { display: grid; gap: 16px; max-width: 780px; }
.form-grid.narrow { max-width: 560px; margin-bottom: 28px; }
.check-row { display: flex; align-items: center; gap: 10px; }
.settings-form {
    max-width: 980px;
}
fieldset {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 22px;
    border: 1px solid var(--line);
    background: var(--white);
}
legend {
    padding: 0 8px;
    color: var(--wood);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 34px;
    padding: 38px clamp(18px, 4vw, 58px);
    border-top: 1px solid var(--line);
    background: var(--warm);
}
.footer-logo {
    width: 86px;
    margin-bottom: 12px;
    filter: drop-shadow(0 8px 18px rgba(17, 17, 17, .08));
}
.site-footer p { max-width: 520px; }
.footer-credit {
    color: var(--anthracite);
    font-size: .9rem;
    margin-top: 14px;
}
.footer-credit a {
    border-bottom: 1px solid currentColor;
    font-weight: 750;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-content: start; }

.floating-social {
    position: fixed;
    right: clamp(14px, 2vw, 26px);
    bottom: clamp(14px, 2vw, 26px);
    z-index: 40;
    display: grid;
    gap: 8px;
    padding: 8px;
    background: rgba(17, 17, 17, .86);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 18px 48px rgba(17, 17, 17, .24);
    backdrop-filter: blur(14px);
}
.floating-social-link {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .08);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .03em;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}
.floating-social-link svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}
.floating-social-link.instagram svg {
    width: 20px;
    height: 20px;
}
.floating-social-link.linkedin svg {
    width: 19px;
    height: 19px;
}
.floating-social-link:hover {
    transform: translateY(-2px);
    background: var(--white);
    color: var(--black);
}
.floating-social-link.whatsapp {
    background: var(--wood);
    color: var(--black);
}
.floating-social-link.whatsapp:hover {
    background: var(--white);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--off);
    padding: 20px;
}
.login-card {
    width: min(430px, 100%);
    display: grid;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--line);
    padding: 34px;
    box-shadow: var(--shadow);
}
.login-card img { width: 112px; margin: 0 auto 8px; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--black); color: var(--white); padding: 24px; }
.admin-logo { width: 96px; background: var(--white); padding: 8px; margin-bottom: 16px; }
.admin-sidebar p { color: rgba(255,255,255,.7); font-size: .9rem; }
.admin-sidebar a { display: block; color: rgba(255,255,255,.78); padding: 9px 0; }
.admin-sidebar a:hover { color: var(--white); }
.admin-main { padding: 34px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); margin-top: 18px; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.thumb { width: 86px; height: 64px; object-fit: cover; background: var(--off); }
.notice { padding: 12px 14px; background: #eef5ef; border: 1px solid rgba(17, 80, 38, .2); margin: 18px 0; }
.error { padding: 12px 14px; background: #fff0ec; border: 1px solid rgba(140, 40, 20, .25); margin: 12px 0; }
.inline-form { display: inline; }
.link-danger { border: 0; background: transparent; color: #9d2b1e; cursor: pointer; font: inherit; padding: 0; }
.admin-photo-grid { margin-top: 24px; }

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
        background: var(--white);
        border-bottom: 1px solid var(--line);
    }
    .main-nav.is-open { display: flex; }
    .hero-inner, .split, .admin-shell { grid-template-columns: 1fr; }
    .hero { min-height: auto; padding: 42px 0; }
    .hero::before {
        right: -2rem;
        top: 5rem;
        transform: none;
        font-size: 18rem;
        opacity: .035;
    }
    .hero-visual { max-width: 360px; }
    .feature-grid, .service-grid, .project-grid, .admin-grid, .gallery { grid-template-columns: 1fr 1fr; }
    .section-head.inline { display: grid; align-items: start; }
}

@media (max-width: 620px) {
    .brand img { width: 78px; }
    .hero::before {
        font-size: 14rem;
        right: -3.5rem;
        top: 3rem;
    }
    .feature-grid, .service-grid, .project-grid, .admin-grid, .gallery { grid-template-columns: 1fr; }
    .site-footer { display: grid; }
    .floating-social {
        right: 12px;
        bottom: 12px;
        display: flex;
    }
    .floating-social-link {
        width: 40px;
        height: 40px;
    }
    .admin-main { padding: 20px; overflow-x: auto; }
    .admin-table { display: block; overflow-x: auto; }
}
