@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600&display=swap');

:root {
    --ink: #0d0d0d;
    --paper: #ffffff;
    --soft: #f5f5f3;
    --muted: #767676;
    --line: #e8e8e5;
    --accent: #0d0d0d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Manrope', Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }

.site-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4vw;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 10;
}
.logo { font-size: 1.1rem; font-weight: 600; letter-spacing: -.045em; }
.logo span { color: #a4a4a4; }
nav { display: flex; gap: 2.4rem; }
.site-header nav a, .site-header > a:last-child { font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .09em; }
.site-header nav a:hover, .site-header > a:last-child:hover { color: var(--muted); }

.hero {
    min-height: 100vh;
    padding: 9vh 7vw 7vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    align-items: end;
    border-bottom: 1px solid var(--line);
    background-image: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.03)), url('hero-abstrato.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.eyebrow { margin: 0 0 1.5rem; text-transform: uppercase; letter-spacing: .16em; font-size: .65rem; font-weight: 600; color: var(--muted); }
.hero h1, .detail h1, .login-box h1, .admin-title h1 {
    grid-column: 1 / -1;
    margin: 0;
    max-width: 1200px;
    font-size: clamp(4rem, 10vw, 9.5rem);
    font-weight: 400;
    line-height: .92;
    letter-spacing: -.075em;
}
.intro { max-width: 470px; margin: 4rem 0 0; font-size: 1rem; line-height: 1.75; color: var(--muted); }

.work-section { padding: 8rem 4vw; }
.filter-bar { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(230px, .36fr); align-items: stretch; gap: 0; margin-bottom: 4rem; border: 1px solid var(--line); background: #fff; }
.filter-bar label { display: flex; align-items: center; gap: 1rem; min-width: 0; min-height: 70px; margin: 0; padding: 0 1.4rem; }
.filter-bar label > span { flex: 0 0 auto; margin: 0; color: var(--muted); font-size: .6rem; text-transform: uppercase; letter-spacing: .13em; }
.search-field::before { content: '⌕'; flex: 0 0 auto; font-size: 1.25rem; font-weight: 400; line-height: 1; transform: rotate(-15deg); }
.type-field { border-left: 1px solid var(--line); }
.filter-bar input, .filter-bar select { height: 68px; min-width: 0; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; border-radius: 0; font-size: .86rem; }
.filter-bar input { flex: 1; }
.filter-bar select { width: 100%; cursor: pointer; }
.filter-bar input::placeholder { color: #9b9b98; }
.filter-bar label:focus-within { background: var(--soft); }
.muted { color: var(--muted); }
.no-results { margin-top: 3rem; padding: 6rem 2rem; text-align: center; background: var(--soft); }
.no-results button { padding: 0 0 .35rem; border: 0; border-bottom: 1px solid var(--ink); background: none; font: 600 .72rem 'Manrope'; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6rem 2rem; }
.project-card { min-width: 0; }
.project-card:nth-child(3n) { grid-column: auto; }
.card-image { position: relative; overflow: hidden; background: var(--soft); }
.card-image img { width: 100%; height: auto; transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .3s; }
.card-image span { position: absolute; right: 1rem; bottom: 1rem; padding: .75rem 1rem; background: #fff; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: 0; transform: translateY(8px); transition: .25s; }
.project-card:hover .card-image img { transform: scale(1.018); opacity: .92; }
.project-card:hover .card-image span { opacity: 1; transform: none; }
.card-copy { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1rem; }
.card-copy h3 { margin: 0; font-size: 1rem; font-weight: 500; letter-spacing: -.02em; }
.card-copy p { margin: 0; color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .08em; }
.empty { padding: 7rem 2rem; text-align: center; background: var(--soft); }

.contact-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: 8vw; padding: 10rem 7vw; border-top: 1px solid var(--line); background: #f7f7f5; }
.contact-heading h2 { margin: 0; font-size: clamp(3.3rem, 6.7vw, 7rem); font-weight: 400; line-height: .92; letter-spacing: -.065em; }
.contact-heading > p:not(.eyebrow) { max-width: 430px; margin: 3rem 0; color: var(--muted); line-height: 1.75; }
.contact-direct { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
.contact-direct a { border-bottom: 1px solid #c5c5c1; font-size: .85rem; }
.contact-direct a:hover { border-color: var(--ink); }
.contact-form-wrap { align-self: end; }
.contact-form label { margin: 0 0 1.8rem; color: var(--muted); }
.contact-form input, .contact-form textarea { padding: .9rem 0; border: 0; border-bottom: 1px solid #c9c9c5; background: transparent; color: var(--ink); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--ink); }
.contact-form textarea { min-height: 130px; }
.consent-options { display: grid; gap: .9rem; margin: .5rem 0 2rem; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.contact-form .consent-option { display: grid; grid-template-columns: 20px 1fr; gap: .8rem; align-items: start; margin: 0; color: var(--muted); font-size: .7rem; font-weight: 400; line-height: 1.55; text-transform: none; letter-spacing: 0; cursor: pointer; }
.contact-form .consent-option input { width: 18px; height: 18px; margin: .1rem 0 0; padding: 0; border: 1px solid #aaa; accent-color: var(--ink); cursor: pointer; }
.consent-option strong { color: var(--ink); font-size: .58rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-submit { width: 100%; min-height: 74px; display: flex; align-items: center; justify-content: center; margin-top: 1rem; padding: 0 1.6rem; border: 1px solid var(--ink); border-radius: 18px; background: var(--ink); color: #fff; font: 600 .72rem 'Manrope'; text-transform: uppercase; letter-spacing: .11em; cursor: pointer; transition: background .25s, transform .2s; }
.contact-submit:hover { background: #272725; }
.contact-submit:focus-visible { outline: 3px solid #a9bce6; outline-offset: 3px; }
.contact-submit:active { transform: scale(.995); }
.contact-message { margin-bottom: 2rem; padding: 1rem; font-size: .8rem; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.button { display: inline-block; margin-top: 1rem; padding: 1rem 1.4rem; border: 1px solid var(--ink); background: var(--ink); color: white; font: 600 .75rem 'Manrope', sans-serif; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; transition: .2s; }
.button:hover { background: white; color: var(--ink); }

.detail { padding: 10vh 4vw; }
.detail-head { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 8rem; }
.detail-head .eyebrow { grid-column: 1 / -1; }
.detail h1 { grid-column: 1 / -1; max-width: none; font-size: clamp(2.275rem, 5.2vw, 4.875rem); }
.detail-head > p:last-child { grid-column: 2; max-width: 650px; margin: 4rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); margin: 0; }
.gallery figure { position: relative; margin: 0; background: var(--soft); cursor: zoom-in; overflow: hidden; }
.gallery .featured { grid-column: 1 / -1; }
.gallery img { width: 100%; height: auto; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.gallery figure:hover img { transform: scale(1.012); }
.image-number { position: absolute; right: 1.5rem; bottom: 1.25rem; padding: .45rem .65rem; background: rgba(255,255,255,.9); font-size: .65rem; letter-spacing: .1em; }
.modal-content { border: 0; border-radius: 0; background: #f2f2f0; }
.modal-body { display: flex; align-items: center; justify-content: center; padding: 4rem; }
.modal-body img { width: auto; max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; }
.modal-close { position: fixed; z-index: 1060; top: 1.5rem; right: 1.5rem; border: 0; padding: .7rem 1rem; background: #fff; font: 600 .7rem 'Manrope'; text-transform: uppercase; letter-spacing: .08em; }

footer { display: flex; justify-content: space-between; padding: 2.5rem 4vw; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }

.admin-body { min-height: 100vh; background: radial-gradient(circle at 12% 8%, rgba(176,192,221,.2), transparent 30%), radial-gradient(circle at 92% 88%, rgba(221,211,191,.28), transparent 28%), #f7f7f5; }
.admin-main { max-width: 1400px; margin: auto; padding: 8vh 4vw; }
.login-box { position: relative; max-width: 560px; margin: 4vh auto; padding: clamp(2rem, 5vw, 3.8rem); overflow: hidden; border: 1px solid rgba(13,13,13,.09); border-radius: 26px; background: rgba(255,255,255,.94); box-shadow: 0 28px 80px rgba(13,13,13,.09); }
.login-box::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, #111 0 38%, #a9bce6 38% 68%, #ddd2bd 68%); }
.login-brand { display: inline-block; margin-bottom: 4rem; font-size: .78rem; font-weight: 600; letter-spacing: -.02em; }
.smtp-setup-box { max-width: 820px; }
.login-box h1, .admin-title h1 { font-size: clamp(3rem, 6vw, 6rem); }
.login-box strong { font-weight: 600; }
.login-box > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.login-box input, .login-box select { border-radius: 12px; }
.login-box .button { width: 100%; min-height: 58px; border-radius: 14px; }
.setup-intro { display: grid; grid-template-columns: 42px 1fr; gap: 1rem; align-items: start; margin: 2rem 0 1rem; padding: 1.2rem; border-radius: 14px; background: var(--soft); }
.setup-intro > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: .65rem; }
.setup-intro h2 { margin: 0 0 .35rem; font-size: 1rem; }
.setup-intro p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.code-input { font-size: 1.8rem; letter-spacing: .4em; text-align: center; }
.login-secondary { display: inline-block; margin-top: 1.5rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
label { display: block; margin: 1.4rem 0; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
input, textarea, select { display: block; width: 100%; margin-top: .6rem; padding: 1rem; border: 1px solid var(--line); outline: none; background: white; font: inherit; text-transform: none; letter-spacing: normal; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); }
textarea { resize: vertical; }
.alert { margin: 1.5rem 0; padding: 1rem; font-size: .85rem; }
.error { background: #fff0ed; color: #812c1e; }
.success { background: #edf7eb; color: #315a2c; }
.admin-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 4rem; }
.admin-layout { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 2rem; }
.panel { padding: 2rem; background: white; border: 1px solid var(--line); }
.panel h2 { margin: 0 0 2rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.panel h2 span { color: var(--muted); font-weight: 400; }
.admin-layout > .panel:last-child { padding: 0; border: 0; background: transparent; }
.admin-layout > .panel:last-child > h2 { padding: 0 0 1rem; border-bottom: 1px solid var(--line); }
.admin-list { display: grid; gap: 1.25rem; }
.admin-list article { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 1rem; padding: 1.4rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 30px rgba(13,13,13,.025); transition: border-color .2s, box-shadow .2s; }
.admin-list article:hover { border-color: #d1d1cd; box-shadow: 0 12px 34px rgba(13,13,13,.045); }
.image-manager { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 140px)); gap: .8rem; padding: .5rem 0 .25rem; }
.managed-image { position: relative; min-width: 0; aspect-ratio: 1; margin: 0; overflow: hidden; border-radius: 12px; background: var(--soft); }
.managed-image img { width: 100%; height: 100%; object-fit: cover; }
.managed-image span { position: absolute; left: .55rem; bottom: .5rem; padding: .3rem .42rem; border-radius: 5px; background: rgba(255,255,255,.92); font-size: .58rem; }
.managed-image button { position: absolute; top: .5rem; right: .5rem; width: 30px; height: 30px; display: grid; place-items: center; padding: 0 0 2px; border: 0; border-radius: 50%; background: rgba(13,13,13,.9); color: white; font: 400 1.1rem/1 'Manrope'; cursor: pointer; transition: background .2s, transform .2s; }
.managed-image button:hover { background: #9f3423; transform: scale(1.06); }
.add-images-form { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: 12px; background: var(--soft); }
.add-images-form label { margin: 0; }
.add-images-form input { min-height: 46px; padding: .45rem; border: 1px solid #deded9; border-radius: 8px; background: white; }
.add-images-form input::file-selector-button { height: 34px; margin-right: .8rem; padding: 0 .9rem; border: 0; border-radius: 6px; background: #ecece8; font: 600 .65rem 'Manrope'; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.small-button { height: 46px; padding: 0 1.15rem; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: white; font: 600 .68rem 'Manrope'; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.small-button:hover { background: #333; }
.edit-project { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.edit-project summary { padding: 1rem .2rem .15rem; color: var(--muted); font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; cursor: pointer; }
.edit-project[open] summary { color: var(--ink); }
.edit-project-form { padding: .5rem 0 1rem; }
.edit-project-form label { margin-top: .8rem; }
.edit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.security-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; margin-top: 2rem; padding: 2.5rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.security-panel h2 { margin: 0 0 1rem; font-size: 1.5rem; letter-spacing: -.03em; }
.security-panel > div > p:last-child { max-width: 360px; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.password-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.password-form label:first-of-type { grid-column: 1 / -1; }
.password-form .small-button { grid-column: 1 / -1; justify-self: start; margin-top: .5rem; }
.settings-stack { display: grid; gap: 0; }
.smtp-form { min-width: 0; }
.smtp-grid { display: grid; grid-template-columns: 1fr 150px; gap: 0 1rem; }
.smtp-grid label:nth-child(3), .smtp-grid label:nth-child(4), .smtp-grid label:nth-child(6) { grid-column: 1 / -1; }
.smtp-form select { min-height: 52px; }
.smtp-form .small-button { margin-top: .5rem; }
.seo-form label { margin-top: 0; }
.seo-form small { display: block; margin-top: .45rem; line-height: 1.5; }
.seo-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.seo-links a { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); font-size: .64rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.seo-links a:hover { border-color: var(--ink); }
.thumb { width: 76px; height: 68px; overflow: hidden; border-radius: 10px; background: var(--soft); }
.thumb img { height: 100%; object-fit: cover; }
.admin-list h3 { margin: 0 0 .3rem; font-size: .95rem; letter-spacing: -.02em; }
.admin-list p { margin: 0; color: var(--muted); font-size: .73rem; }
.delete { padding: .55rem .7rem; border: 1px solid #efdbd6; border-radius: 8px; background: #fff9f7; color: #9f3423; font: 600 .62rem 'Manrope'; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.delete:hover { border-color: #9f3423; }
small { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }

@media (max-width: 750px) {
    .site-header { height: 68px; padding: 0 5vw; }
    nav { gap: 1.2rem; }
    .hero { min-height: 100vh; padding: 8vh 5vw 6vh; display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; background-position: 62% center; }
    .hero h1 { font-size: 16vw; }
    .intro { align-self: flex-end; max-width: 85%; margin: 4rem 0 2.5rem; }
    .work-section { padding: 5rem 5vw; }
    .filter-bar { grid-template-columns: 1fr; margin-bottom: 3rem; }
    .filter-bar label { min-height: 60px; padding: 0 1rem; }
    .filter-bar input, .filter-bar select { height: 58px; }
    .type-field { border-left: 0; border-top: 1px solid var(--line); }
    .grid { grid-template-columns: 1fr; gap: 4rem; }
    .card-image span { opacity: 1; transform: none; }
    .contact-section { grid-template-columns: 1fr; gap: 5rem; padding: 7rem 5vw; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .detail { padding: 5rem 5vw; }
    .detail-head { display: block; margin-bottom: 4rem; }
    .detail-head > p:last-child { margin-top: 2.5rem; }
    .gallery { grid-template-columns: 1fr; gap: 1.5rem; }
    .gallery .featured { grid-column: auto; }
    .gallery img, .gallery .featured img { width: 100%; height: auto; max-height: none; }
    .modal-body { padding: 1rem; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-title { align-items: start; }
    .admin-list article { grid-template-columns: 56px 1fr auto; }
    .add-images-form { grid-template-columns: 1fr; }
    .edit-fields { grid-template-columns: 1fr; gap: 0; }
    .security-panel { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
    .password-form { grid-template-columns: 1fr; }
    .password-form label:first-of-type, .password-form .small-button { grid-column: auto; }
    .smtp-grid { grid-template-columns: 1fr; }
    .smtp-grid label { grid-column: auto !important; }
    .thumb { width: 56px; height: 56px; }
    footer { gap: 2rem; }
}
