/* ============================================
   EDUARDO GARCÍA PORTFOLIO — HOME
   The three columns of the home page: titles, drawings, dotted reveal
   and details. The section and about pages reuse the column (.hero__column).
   On hover, the drawing turns into its dotted version, in red (on the home
   only: the portrait's dots in «Sobre mí» are black).
   Lines, labels, numbers and buttons have the drawings' mass: solid black
   rules, bold labels, the number as a black block, a solid round button.
   ============================================ */

/* ---- Hero Section ---- */
.hero {
    display: flex;
    width: 100vw;
    height: 100vh;
    padding-top: var(--nav-height);
}

.hero__column {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-right: var(--rule);
    transition: flex 0.7s var(--ease-out-expo);
}

.hero__column:last-child {
    border-right: none;
}

.hero__column:hover {
    flex: 1.25;
}

.hero__column:hover ~ .hero__column {
    flex: 0.875;
}

.hero__column:has(~ .hero__column:hover) {
    flex: 0.875;
}

/* The bottom padding leaves room for the copyright line under the columns */
.hero__column-inner {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 28px 28px 52px;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

/* ---- Meta info (top) ---- */
.hero__meta {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 0;
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.5s forwards;
}

/* The number as a black block, like the drawings' pieces (with paper-coloured
   figures, like their white lines) */
.hero__number {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--color-bg);
    background: var(--color-text);
    padding: 4px 7px 3px;
    flex-shrink: 0;
}

.hero__line {
    width: 28px;
    height: 3px;
    background: var(--color-text);
    margin-top: 8px;
    flex-shrink: 0;
}

.hero__keywords {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero__keywords span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text);
    line-height: 1.65;
}

/* ---- Titles ---- */
/* Anybody, bold: with the mass of the drawings, but clean. Centred in
   their column; their size follows the column's width (cqi: the column is a
   size container), so the widest title, "Diseño gráfico", always fits and
   the three share the same letter size, also while a column opens on hover. */
.hero__column {
    container-type: inline-size;
}

.hero__title {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    margin-top: 16px;
    font-family: var(--font-display);
    font-size: min(10.4cqi, 96px);
    font-weight: 700;
    font-stretch: 100%;
    letter-spacing: -0.035em;
    line-height: 1;
    opacity: 0;
    transform: translateY(40px);
    animation: titleReveal 1s var(--ease-out-expo) 0.3s forwards;
}

.hero__title-text {
    display: block;
    white-space: nowrap;
    transition: transform 0.6s var(--ease-out-expo);
}

.hero__column:hover .hero__title-text {
    transform: translateY(-4px);
}

.hero__title--web {
    animation-delay: 0.4s;
}

.hero__title--grafico {
    animation-delay: 0.45s;
}

/* ---- Arrow ---- */
/* A solid round button, black like the drawings; red on hover */
.hero__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-top: 16px;
    border-radius: 50%;
    background: var(--color-text);
    color: var(--color-bg);
    position: relative;
    z-index: 5;
    opacity: 0;
    transform: translateX(-20px);
    animation: arrowReveal 0.8s var(--ease-out-expo) 0.9s forwards;
    transition: transform 0.4s var(--ease-out-expo), background-color 0.3s ease, color 0.3s ease;
}

.hero__arrow:hover {
    background: var(--color-accent);
    color: var(--color-text);
}

.hero__arrow svg path {
    stroke-width: 3;
}

.hero__arrow svg {
    transition: transform 0.4s var(--ease-out-expo);
}

.hero__arrow:hover svg {
    transform: translateX(4px);
}

/* ---- Hero Image ---- */
.hero__image {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0;
    transform: scale(1.08);
    animation: imageReveal 1.6s var(--ease-out-expo) 0.2s forwards;
    transition: transform 0.8s var(--ease-out-expo), 
                opacity 0.5s ease;
}

.hero__column:hover .hero__image img {
    transform: scale(1.02);
}

/* ---- Dotted reveal (home) ----
   A blob that follows the cursor (three circles whose centre and radius
   js/main.js animates) swaps the drawing for its dotted version. Nothing is
   painted over the page: the drawing gets a hole in the shape of the blob and
   the dotted version shows only inside it, so the blob itself is invisible. */
.hero__image:has(.hero__dots) {
    --x1: 50%; --y1: 50%; --r1: 0px;
    --x2: 50%; --y2: 50%; --r2: 0px;
    --x3: 50%; --y3: 50%; --r3: 0px;
    --blob:
        radial-gradient(circle var(--r1) at var(--x1) var(--y1), #000 calc(var(--r1) - 1px), transparent var(--r1)),
        radial-gradient(circle var(--r2) at var(--x2) var(--y2), #000 calc(var(--r2) - 1px), transparent var(--r2)),
        radial-gradient(circle var(--r3) at var(--x3) var(--y3), #000 calc(var(--r3) - 1px), transparent var(--r3));
}

/* The drawing, minus the blob */
.hero__image:has(.hero__dots) > img {
    -webkit-mask-image: linear-gradient(#000 0 0), var(--blob);
    -webkit-mask-composite: source-out, source-over, source-over;
    mask-image: linear-gradient(#000 0 0), var(--blob);
    mask-composite: subtract, add, add;
}

/* The dotted version, only inside the blob */
.hero__dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    -webkit-mask-image: var(--blob);
    mask-image: var(--blob);
}

/* ---- Decorative Stars ---- */
/* A solid red cross, the site's mark: two thick bars (the glyph is hidden) */
.hero__star {
    width: 22px;
    height: 22px;
    font-size: 0;
    line-height: 0;
    color: transparent;
    position: relative;
    z-index: 5;
    opacity: 0;
    animation: starSpin 1s var(--ease-out-expo) 1.2s forwards;
}

.hero__star::before,
.hero__star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 6px;
    margin-top: -3px;
    background: var(--color-accent);
}

.hero__star::after {
    transform: rotate(90deg);
}

.hero__star--bottom {
    margin-top: auto;
    align-self: flex-start;
}

.hero__star--mid {
    align-self: center;
    margin-top: 14px;
}

@keyframes starSpin {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Continuous subtle rotation */
.hero__star {
    animation: starSpin 1s var(--ease-out-expo) 1.2s forwards,
               starFloat 6s ease-in-out 2.2s infinite;
}

@keyframes starFloat {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

/* ---- Bottom Info ---- */
.hero__bottom-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    position: relative;
    z-index: 5;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeInUp 0.7s var(--ease-out-expo) 1s forwards;
}

.hero__bottom-info span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text);
    line-height: 1.65;
}

/* ---- Social Icons ---- */
/* In the corner of the last column, so its bottom info lines up with the
   other columns' */
.hero__social {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    position: absolute;
    right: 28px;
    bottom: 52px;
    z-index: 5;
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) 1.3s forwards;
}

.hero__social-link {
    color: var(--color-text);
    transition: color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.hero__social-link:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
}

/* ---- Footer Copyright ---- */
.footer-copy {
    position: fixed;
    bottom: 20px;
    left: 28px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--color-text);
    z-index: 100;
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) 1.6s forwards;
}

