@import url("fonts.css");

:root {
    --rgb-light: 254, 254, 254;
    --rgb-dark: 21, 21, 21;
    --rgb-acent: 195, 102, 85;
    --rgb-acent-2: 200, 28, 22;

    --color-light: rgb(var(--rgb-light));
    --color-dark: rgb(var(--rgb-dark));
    --color-acent: rgb(var(--rgb-acent));
    --color-acent-2: rgb(var(--rgb-acent-2));
}

html {
    box-sizing: border-box;

    scroll-behavior: smooth;
    scroll-padding: 1rem;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea {
    border: none;
    padding: .75rem 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
button:focus {
    outline: 2px solid rgb(var(--rgb-acent), .75);
}

.container {
    max-width: 62rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

.banner {
    display: grid;
    place-content: center;
    height: 18rem;
    background-color: var(--color-dark);
    background-image: url("/assets/main/hero/hero-texture.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0px 3px 6px 0 rgba(0, 0, 0, 0.35);

    color: var(--color-light);
}

.banner h1 {
    font-size: 2rem;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
}

.gallery {
    display: grid;
    gap: 2rem;
}

.gallery .gallery-item {
    /* min-height: calc((62rem / 3) - 2rem); */
    max-height: calc((62rem / 3) - 2rem);
}

.gallery .gallery-text {
    display: grid;
    font-size: 1rem;
    padding: 2rem;
    color: var(--color-light);
    background-color: var(--color-dark);
}

.gallery .gallery-text .quote {
    display: none;
    margin-top: -2rem;
    margin-left: -1rem;
    width: 5rem;
    height: 5rem;
    fill: var(--color-acent);
}

.gallery .gallery-text p {
    margin-top: 0.5rem;
}

.gallery figure {
    margin: 0;
    width: 100%;
    height: 100%;
}

.gallery .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery .gallery-video {
    width: 100%;
    height: 100%;
}

.text-acent {
    color: var(--color-acent);
}

.spinner {
	display: inline-block;
	width: 1.25rem;
	height: 1.25rem;
	vertical-align: text-bottom;
	border: .25em solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin .75s linear infinite;
}

.dark {
    color: var(--color-light); 
    background-color: var(--color-dark);
}

.grecaptcha-badge { 
    visibility: hidden; 
}

/* HEADER */

header {
    height: 4rem;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .brand {
    font-size: 1.375rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-dark);
    display: flex;
    gap: 1rem;
    align-items: center;
    white-space: nowrap;
    height: 4rem;
}

header .brand svg {
    height: 2rem;
}

header .mobile-nav-toggle {
    display: none;
}

header nav {
    display: flex;
}

header .nav-link {
    display: flex;
    align-items: center;
    height: 4rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    padding-inline: 0.875rem;
    color: var(--color-dark);

    transition: color .35s ease,
        background-color .35s ease;
}

header .nav-link:hover {
    color: var(--color-light);
    background-color: var(--color-dark);
}

/* HERO */

.hero {
    background-color: var(--color-dark);
    position: relative;
    box-shadow: 0px 3px 6px 0 rgba(0, 0, 0, 0.35);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("/assets/main/hero/hero-texture.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.5;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    height: 32.5rem;

}

.hero .hero-text {
    color: var(--color-light);
    z-index: 2;
    text-shadow: 0.25rem 0.25rem .25rem rgb(0,0,0, 0.35);
}

.hero .hero-text p {
    margin-block: 0.5rem;
}

.hero .hero-text p:nth-child(1) {
    font-size: 3.25rem;
    line-height: 1;
}

.hero .hero-text p:nth-child(2) {
    font-size: 1.395rem;
}

.hero .hero-img {
    position: absolute;
    right: -2.75rem;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* WORKS */

.works .works-cards {
    display: grid;
    gap: 2rem;
}

.works .works-card {
    position: relative;
    overflow: hidden;
    background-color: var(--color-dark);
    box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.35);
    min-height: calc((62rem / 3) - 2rem);
}

.works .works-card .works-card-title {
    /* display: none; */
    position: absolute;
    left: 0;
    bottom: 0;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 500;
    padding: .25rem .75rem;
    color: var(--color-light);
    background-color: var(--color-dark);
}

.works .works-card .works-card-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.works .works-card .works-card-details {
    --gap: 1.5rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(var(--rgb-dark), 0.65);

    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: var(--gap);
    color: var(--color-light);
}

.works .works-card .works-card-details .works-card-date {
    margin-left: auto;
    font-weight: 600;
    font-size: .825rem;
}

.works .works-card .works-card-details h3,
.works .works-card .works-card-details p {
    margin: 0;
}

.works .works-card .works-card-details h3 {
    text-transform: uppercase;
    font-size: 1rem;
}

.works .works-card .works-card-details .works-card-details-text {
    font-size: .875rem;
    max-width: 40ch;
    flex: 1;
}

.works .works-card .works-card-details .works-card-details-text p {
    margin-bottom: .5rem;
}

.works .works-card .works-card-details a {
    text-decoration: none;
    font-weight: 500;
    place-self: start;
    padding: .125rem .5rem;
    color: var(--color-dark);
    background-color: var(--color-light);

    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    align-items: center;
}

/* BIOGRAPHY */

.biography .biography-content {
    display: grid;
    gap: 2rem;
}

.biography .biography-img {
    width: 100%;
    max-height: 30rem;
    object-fit: cover;
    object-position: center 15%;
}

.biography .biography-text {
    font-size: 1rem;
    text-indent: 1rem;
    line-height: 1.6;
}

.biography .biography-text ul {
    list-style: none;
    padding: 0;
}

.biography .biography-text ul li {
    padding-bottom: .5rem;
}

.biography .biography-text em {
    font-weight: 600;
}

/* CONTACT */
.contact {
    background-color: var(--color-dark);
    padding-block: 2rem;
}

.contact h2 {
    color: var(--color-light);
}

.contact .contact-content {
    display: grid;
    gap: 2rem;
}

.contact form {
    display: grid;
    gap: 1.5rem 2rem;
}

.contact form input,
.contact form textarea,
.contact form button {
    font-family: inherit;
    font-size: inherit;
}

.contact form input {
    display: block;
    width: 100%;
}

.contact form textarea {
    display: block;
    width: 100%;
    padding: .375rem 0.75rem;
    resize: vertical;
}

.contact form label {
    display: block;
    color: var(--color-light);
    margin-bottom: .25rem;
    text-transform: uppercase;
    font-size: .75rem;
    font-weight: 500;
}

.contact form button {
    justify-self: end;
    border: 0;
    background-color: var(--color-light);
    padding: .5rem 1rem;
    font-weight: 600;
    cursor: pointer;
}

.contact form .spinner {
    display: none;
}

.contact form.loading input,
.contact form.loading textarea {
    /* pointer-events: none; */
    background-color: rgb(var(--rgb-light), 0.75);
}

.contact form.loading .spinner {
    display: inline-block;
    margin-left: 0.25rem;
}

.contact .contact-social {
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* place-content: start center; */
    gap: 2rem;
}

footer {
    background-color: var(--color-dark);
    padding: 1rem;
}

footer .developed-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #fff;

    h5 {
        font-weight: 500;
        font-size: 10px;
        opacity: 0.75;
    }

    img {
        opacity: 0.75;
        transition: opacity 0.35s ease;

        &:hover {
            opacity: 1;
        }
    }
}

#scroll-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    background-color: rgb(var(--rgb-acent), 1);
    padding: 0.75rem;
}

.modal {
    display: none; 
    position: fixed;
    z-index: 1;
    inset: 0;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 1rem;
    max-width: 18rem;
    display: grid;
    text-align: center;
    box-shadow: 0px 3px 6px 0 rgba(0, 0, 0, 0.35);
    animation: modal-in 0.35s;
}

.modal .modal-close {
    color: #aaa;
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: auto;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1;
}
  
.modal .modal-close:hover,
.modal .modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* #demoliciones */
#demoliciones .banner .container img {
    max-height: 8rem;
    transform: rotate(-2.5deg);
}

/* #cucaracha */
#cucaracha .gallery .gallery-item {
    max-height: none;
}

/* Utilities */
.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.col-span-2 {
    grid-column: span 2 / span 2;
}

.row-span-2 {
    grid-row: span 2 / span 2;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-16 {
    margin-top: 4rem;
}

.mt-24 {
    margin-top: 6rem;
}

.mt-32 {
    margin-top: 8rem;
}

.ml-auto {
    margin-left: auto;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.sr-only	{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.font-bold	{
    font-weight: 700;
}

.italic {
    font-style: oblique;
}

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}


/* media-querys */
@media (max-width: 768px) {
    body.mobile-menu-open {
        overflow-y: hidden;
    }

    header nav {
        position: fixed;
        inset: 0 0 0 40%;
        z-index: 999;
        flex-direction: column;
        padding-block: min(30vh, 8rem);
        background-color: rgb(var(--rgb-dark), .85);

        transform: translateX(100%);
        transition: transform 0.35s ease-out;
    }

    header nav[data-visible="true"] {
        transform: translateX(0%);
    }

    header .nav-link {
        padding-inline: 3rem;
        color: var(--color-light);
    }

    header .nav-link:hover {
        color: var(--color-dark);
        background-color: var(--color-light);
    }

    header .mobile-nav-toggle {
        position: absolute;
        border: 0;
        background: url("/assets/icons/icon-hamburger.svg");
        background-repeat: no-repeat;
        width: 2rem;
        height: 2rem;
        top: 1rem;
        right: 2rem;
        z-index: 9999;
        display: block;
        outline: none;
    }

    header .mobile-nav-toggle[aria-expanded="true"] {
        background: url("/assets/icons/icon-times.svg");
    }
}

@media (min-width: 768px) {
    .works .works-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .works .works-card .works-card-img {
        transition: transform .5s ease,
                    opacity .5s ease;
    }

    .works .works-card .works-card-details {
        width: 70%;
        transform: translateX(-100%);
        transition: transform .5s ease;
    }

    .works .works-card:hover .works-card-img {
        opacity: 0.8;
        transform: translateX(20%);
    }
    
    .works .works-card:hover .works-card-details {
        transform: translateX(0%);
    }

    .biography .biography-content {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .contact .contact-content {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .contact .contact-social {
        grid-template-columns: auto;
        place-content: start center;
    }

    .gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery .gallery-item {
        min-height: calc((62rem / 3) - 2rem);
        max-height: none;
    }
    
    .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    
    .md\:row-span-2 {
        grid-row: span 2 / span 2;
    }

    #cucaracha .gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    #cucaracha .gallery .gallery-item {
        min-height: auto;
    }
}

@supports(backdrop-filter: blur(0.5rem)) {
    @media (max-width: 768px) {
        header nav {
            background-color: rgb(var(--rgb-dark), 0.75);
            backdrop-filter: blur(0.5rem);
        }
    }

    .works .works-card .works-card-details {
        backdrop-filter: blur(0.5rem);
    }
}

/* Animations */

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes modal-in {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}