/* ============================================
   LUCÍA PIRIS 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).
   ============================================ */

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

.hero__column {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--color-border);
    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;
}

.hero__column-inner {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 28px 28px 28px;
    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;
}

.hero__number {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-text);
    flex-shrink: 0;
    text-shadow: 0 0 20px rgba(242, 239, 233, 0.8);
}

.hero__line {
    width: 32px;
    height: 1px;
    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-primary);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text);
    line-height: 1.6;
    text-shadow: 0 0 20px rgba(242, 239, 233, 0.9);
}

/* ---- Titles ---- */
/* Centred in their column */
.hero__title {
    --letter-height: min(3.4vw, 64px);
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    margin-top: 12px;
    opacity: 0;
    transform: translateY(40px);
    animation: titleReveal 1s var(--ease-out-expo) 0.3s forwards;
}

/* Title artwork is exported with transparent padding around the lettering.
   --w is the width of the whole PNG, derived from the shared --letter-height
   so the three titles get letters of the same size; negative margins
   (fractions of --w) trim the padding on every side, so what gets centred
   is the lettering itself, not the PNG canvas. */
.hero__title-img {
    display: block;
    width: var(--w);
    max-width: none;
    height: auto;
    transition: transform 0.6s var(--ease-out-expo);
}

.hero__column:hover .hero__title-img {
    transform: translateY(-4px) rotate(-1deg);
}

/* Concept Art — 2172×724, lettering spans x 59–2129, y 184–553,
   letters are 0.1225 × the PNG width tall */
.hero__title--concept .hero__title-img {
    --w: calc(var(--letter-height) / 0.1225);
    margin: calc(var(--w) * -0.085) calc(var(--w) * -0.020) calc(var(--w) * -0.079) calc(var(--w) * -0.027);
}

/* Animación — 1774×887, lettering spans x 40–1734, y 171–693,
   letters are 0.1747 × the PNG width tall */
.hero__title--animation {
    animation-delay: 0.4s;
}

.hero__title--animation .hero__title-img {
    --w: calc(var(--letter-height) / 0.1747);
    margin: calc(var(--w) * -0.096) calc(var(--w) * -0.023) calc(var(--w) * -0.109);
}

/* Pintura — 2172×724, lettering spans x 183–1989, y 190–549,
   letters are 0.1289 × the PNG width tall */
.hero__title--painting {
    animation-delay: 0.45s;
}

.hero__title--painting .hero__title-img {
    --w: calc(var(--letter-height) / 0.1289);
    margin: calc(var(--w) * -0.087) calc(var(--w) * -0.084) calc(var(--w) * -0.081);
}

/* ---- Arrow ---- */
.hero__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-top: 16px;
    color: var(--color-text);
    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);
}

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

.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);
}

/* Image overlay gradients */
.hero__image::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.hero__column--concept .hero__image::after {
    background: linear-gradient(
        180deg, 
        rgba(242, 239, 233, 0.75) 0%, 
        rgba(242, 239, 233, 0.35) 15%,
        rgba(242, 239, 233, 0.1) 35%,
        rgba(242, 239, 233, 0) 50%,
        rgba(242, 239, 233, 0.25) 80%,
        rgba(242, 239, 233, 0.65) 100%
    );
}

.hero__column--animation .hero__image::after {
    background: linear-gradient(
        180deg, 
        rgba(242, 239, 233, 0.8) 0%, 
        rgba(242, 239, 233, 0.4) 15%,
        rgba(242, 239, 233, 0.1) 35%,
        rgba(242, 239, 233, 0) 55%,
        rgba(242, 239, 233, 0.3) 80%,
        rgba(242, 239, 233, 0.7) 100%
    );
}

.hero__column--painting .hero__image::after {
    background: linear-gradient(
        180deg, 
        rgba(242, 239, 233, 0.75) 0%, 
        rgba(242, 239, 233, 0.35) 15%,
        rgba(242, 239, 233, 0.1) 35%,
        rgba(242, 239, 233, 0) 50%,
        rgba(242, 239, 233, 0.3) 80%,
        rgba(242, 239, 233, 0.65) 100%
    );
}

/* ---- 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 ---- */
.hero__star {
    font-size: 1.2rem;
    color: var(--color-text);
    position: relative;
    z-index: 5;
    opacity: 0;
    animation: starSpin 1s var(--ease-out-expo) 1.2s forwards;
}

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

.hero__star--mid {
    text-align: center;
    margin-top: 8px;
}

@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-primary);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* ---- Social Icons ---- */
.hero__social {
    display: flex;
    gap: 16px;
    margin-top: auto;
    justify-content: flex-end;
    position: relative;
    z-index: 5;
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) 1.3s forwards;
}

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

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

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

/* ---- Decorative SVG Lines ---- */
.hero__deco-lines {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    animation: fadeIn 2s ease 1s forwards;
}

.deco-line {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawLine 4s var(--ease-in-out) 0.5s forwards;
}

.deco-line--2 {
    animation-delay: 0.8s;
}

.deco-line--3 {
    animation-delay: 1.1s;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* ---- Hover glow effect on columns ---- */
.hero__column::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(184, 169, 232, 0.08) 0%,
        transparent 60%
    );
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.hero__column:hover::before {
    opacity: 1;
}
