/* ========== IBERIASTUDIO STYLES ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: url('media/IberiaStudioFondo.png');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Helvetica, Arial, sans-serif;
}

/* HEADER */
header {
    width: 100%;
    padding-top: 10px;
    text-align: center;
    z-index: 100;
}

h1 {
    font-weight: 900;
    font-size: 85px;
    font-family: Helvetica, Arial, sans-serif;
    letter-spacing: -3px;
    line-height: 0.9;
    margin: 0;
    color: white;
    mix-blend-mode: difference;
}

/* CONTENEDOR CENTRAL - Home */
.main-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.card {
    max-width: 600px;
    text-align: center;
    background: transparent;
}

/* FORM PAGE */
.form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    width: 100%;
}

.form-container {
    background-color: rgba(0, 0, 0);
    padding: 30px;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    color: white;
}

.form-container h2 {
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-container label {
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    display: block;
    color: white;
}

.form-container input,
.form-container textarea {
    margin-bottom: 20px;
    padding: 12px;
    background: transparent;
    border: 1px solid #ffffff;
    color: white;
    font-family: inherit;
    outline: none;
    width: 100%;
}

.form-container input:focus,
.form-container textarea:focus {
    border-color: #cccccc;
}

.form-container textarea {
    min-height: 120px;
    resize: vertical;
}

/* TEXTO CON INVERSIÓN */
p {
    color: white;
    mix-blend-mode: difference;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 40px;
    z-index: 10;
}

/* BOTÓN BRUTALISTA */
.btn-iberia {
    display: inline-block;
    padding: 15px 40px;
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    border: 2px solid white;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
}

.btn-iberia:hover {
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
}

/* FOOTER */
.main-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #000000;
    padding: 20px 0;
    text-align: center;
    z-index: 1000;
}

.main-footer p {
    mix-blend-mode: normal;
    font-size: 0.7rem;
    letter-spacing: 2px;
    margin: 0;
    opacity: 0.7;
    font-family: 'Consolas', 'Courier New', monospace;
}

/* COMING SOON */
.coming-soon {
    font-weight: 900;
    font-size: 85px;
    letter-spacing: -3px;
    text-transform: lowercase;
    color: white;
    mix-blend-mode: difference;
}

.coming-soon-text::after {
    content: '';
    animation: dots 3s steps(4, end) infinite;
}

@keyframes dots {
    0%, 10% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    100% { content: '...'; }
}

/* LOGO FOOTER */
.footer-logo {
    position: fixed;
    left: 20px;
    bottom: 70px;
    z-index: 1001;
}

.footer-logo img {
    width: 60px;
    height: auto;
    filter: invert(1);
}

/* BOTONES FLEX ROW */
.btn-row {
    display: flex;
    gap: 15px;
}

.btn-row .btn-iberia {
    flex: 1;
}

/* VOLVER */
.btn-volver {
    margin-top: 15px;
    text-align: center;
    display: block;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
}

/* TOAST NOTIFICATION */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    color: white;
    font-family: Helvetica, Arial, sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    border: 2px solid white;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success { background-color: #000; }
.toast.error { background-color: #900; }

/* ========== PROJECTS PAGE ========== */

.projects-page {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects-intro {
    text-align: center;
    margin-bottom: 48px;
    text-transform: lowercase;
}

/* Grid adaptable a N proyectos */
.projects-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

/* Card = ventana de navegador (cuadrangular, B/N) */
.project-window {
    background: #000000;
    border: 2px solid #ffffff;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.project-window-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    min-height: 0;
}

/* Barra tipo chrome del navegador */
.project-window-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid #ffffff;
    background: #000000;
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.project-window-dot {
    width: 8px;
    height: 8px;
    border: 1px solid #ffffff;
    background: transparent;
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.project-window-url {
    margin-left: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #ffffff;
    opacity: 0.7;
    text-transform: lowercase;
    mix-blend-mode: normal;
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* Vista previa de la home del proyecto */
.project-window-preview {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    border-bottom: 1px solid #ffffff;
    background: #000000;
    position: relative;
}

.project-window-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    filter: grayscale(100%) contrast(1.05);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.project-window-body {
    flex-shrink: 0;
    padding: 16px 14px 18px;
    background: #000000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.project-window-title {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: #ffffff;
    text-transform: lowercase;
    margin: 0;
    mix-blend-mode: normal;
    transition: color 0.2s ease;
}

/* Override del p global (mix-blend / tamaño) dentro de la card */
.project-window-desc {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 0.75rem;
    line-height: 1.35;
    color: #ffffff;
    opacity: 0.85;
    margin: 0;
    mix-blend-mode: normal;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.project-window-cta {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 900;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    margin-top: 4px;
    transition: color 0.2s ease;
}

/* Hover: inversión total B/N (sin scale, sin sombra) */
.project-window:hover {
    background: #ffffff;
    border-color: #000000;
}

.project-window:hover .project-window-chrome,
.project-window:hover .project-window-body {
    background: #ffffff;
    border-color: #000000;
}

.project-window:hover .project-window-preview {
    border-color: #000000;
}

.project-window:hover .project-window-dot {
    border-color: #000000;
    background: #000000;
}

.project-window:hover .project-window-url,
.project-window:hover .project-window-title,
.project-window:hover .project-window-desc,
.project-window:hover .project-window-cta {
    color: #000000;
    opacity: 1;
}

.project-window:hover .project-window-preview img {
    transform: none;
    filter: grayscale(100%) contrast(1.1) invert(0);
}

.projects-back {
    max-width: 280px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    h1, .coming-soon {
        font-size: 45px;
        letter-spacing: -1px;
        padding: 0 10px;
    }

    header { padding-top: 15px; }

    .card {
        width: 90%;
        padding: 20px;
    }

    p {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 25px;
    }

    .btn-iberia {
        width: 100%;
        padding: 18px 0;
        font-size: 1rem;
    }

    .main-footer { padding: 10px 0; }
    .main-footer p { font-size: 0.6rem; }

    .form-container { max-width: 90%; }
    .btn-volver { max-width: 90%; }

    .projects-page {
        padding: 24px 20px 110px;
    }

    .projects-intro {
        margin-bottom: 32px;
        font-size: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    .project-window-title {
        font-size: 1rem;
    }

    .project-window-desc {
        font-size: 0.7rem;
    }
}

@media (max-width: 380px) {
    h1, .coming-soon { font-size: 35px; }
}
