/* FONTS */

@font-face {
    font-family: 'naguifont';
    src: url('../fonts/title-font.woff2') format('woff2');
    font-weight: 300;
}

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

:root {
    --bg: #f5f3ef;
    --ink: #1a1816;
    --muted: #8a8278;
    --line: #d8d3cc;
    --accent: #c8b89a;
    --footer-color: #ffffff;

    --brand-blue: #618499;
    --brand-dark: #2e4a58;
    --brand-light: #a9c0d8;
    --white: #ffffff;
    --overlay-start: rgba(46, 74, 88, 0);
    --overlay-end: rgba(46, 74, 88, 0.82);

    --bg: #f5f3ef;
    --text: #1a1a1a;
    --btn-bg: #1a1a1a;
    --btn-fg: #f5f3ef;
    --btn-size: 44px;
    --radius: 12px;

    --nav-height: 110px;
    --admin-bar: 0px;

    --nagui-font: 'Inter', sans-serif;
}

html {
    scroll-behavior: auto;
}

.main-nav {
    border-bottom: none;
}

.main-nav.scrolled {
    background: #fff;
    border-bottom: none;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

/* ── BLUEPRINT BACKGROUND ── */
.blueprint-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.blueprint-bg svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── HERO ── */

.hero {
    position: relative;
    width: 100%;
    height: 90vh;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: var(--bg);
    padding-top: calc(var(--nav-height) + var(--admin-bar));
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.04);
    animation: heroReveal 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroReveal {
    from {
        transform: scale(1.12);
        opacity: 0;
    }

    to {
        transform: scale(1.04);
        opacity: 1;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, transparent 40%, rgba(26, 24, 22, 0.45) 100%);
}

.hero-content {
    position: absolute;
    bottom: 72px;
    left: 56px;
    right: 56px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    animation: fadeUp 1.4s 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--nagui-font);
    font-weight: 300;
    font-size: clamp(2rem, 6vw, 5rem);
    line-height: 1.05;
    color: #f5f3ef;
    max-width: 640px;
}

.hero-title em {
    font-style: italic;
    font-weight: 300;
}

.hero-meta {
    text-align: right;
    color: rgba(245, 243, 239, 0.72);
}

.hero-meta .label {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
    color: var(--accent);
}

.hero-meta .location {
    font-size: 0.82rem;
    letter-spacing: 0.12em;
}

.hero-year {
    position: absolute;
    top: 50%;
    right: 56px;
    transform: translateY(-50%);
    font-family: var(--nagui-font);
    font-size: 1.25rem;
    letter-spacing: 0.3em;
    color: rgba(245, 243, 239, 0.38);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* HERO SECTION FRASE */

.hero-section-frase {
    position: relative;
    width: 100%;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 20px 20px;
    background-color: #f5f3ef;
    overflow: hidden;
}

/* Grid Texture */
.hero-section-frase::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(97, 132, 153, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(97, 132, 153, 0.06) 1px, transparent 1px);
    background-size: 63px 63px;

    -webkit-mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 1) 30%,
            rgba(0, 0, 0, 1) 70%,
            rgba(0, 0, 0, 0) 100%);

    mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 1) 30%,
            rgba(0, 0, 0, 1) 70%,
            rgba(0, 0, 0, 0) 100%);

    pointer-events: none;
}

/* thin accent lines left & right */
.hero-section-frase::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 80px;
    right: 80px;
    transform: translateY(-50%);
    height: 1px;
    pointer-events: none;
}

/* ── INNER WRAPPER ── */
.hero-section-frase .frase-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    max-width: 800px;
    text-align: center;
    padding-top: 50px;
}

/* decorative ornament top */
.hero-section-frase .frase-ornament {
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0;
}

.hero-section-frase .frase-ornament span {
    display: block;
    height: 1px;
    width: 40px;
    background: rgba(97, 132, 153, 0.5);
}

.hero-section-frase .frase-ornament svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

/* ── QUOTE MARK ── */
.hero-section-frase .frase-quote-mark {
    font-family: var(--nagui-font);
    font-size: 6rem;
    line-height: 0.6;
    color: rgba(97, 132, 153, 0.25);
    font-weight: 300;
    user-select: none;
    letter-spacing: -4px;
    opacity: 0;
}

/* ── MAIN PHRASE ── */
.hero-section-frase .frase-texto {
    font-family: var(--nagui-font);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: #1c2e38;
    opacity: 0;
    animation: fadeUp 1s ease 0.35s both;
    animation-delay: 2000ms;
}

@media (min-width: 769px) and (max-width: 1024px) {

    .hero {
        padding-top: calc(var(--nav-height-smalllaptop) + var(--admin-bar));
    }

    .hero-section-frase .frase-inner {
        padding-top: 30px;
    }

    .hero-section-frase .frase-texto {
        font-size: clamp(1.5rem, 2vw, 3rem);
    }
}


/* highlighted word */
.hero-section-frase .frase-texto .highlight {
    font-style: normal;
    font-weight: 400;
    color: #8fafc0;
    position: relative;
    display: inline-block;
    margin-left: 10px;
}

/* subtle underline on the highlighted word */
.hero-section-frase .frase-texto .highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(143, 175, 192, 0.45);
    transform: scaleX(var(--line-scale, 0));
    transform-origin: left;
}

@media (max-width: 480px) {
    .hero-section-frase .frase-texto {
        font-size: clamp(1.5rem, 5vw, 2.4rem);
        width: 90vw;
    }
}

/* ── SEPARATOR ── */
.hero-section-frase .frase-divider {
    width: 32px;
    height: 1px;
    background: rgba(97, 132, 153, 0.4);
    opacity: 0;
}

/* ── TAGLINE ── */
.hero-section-frase .frase-tag {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(143, 175, 192, 0.9);
    opacity: 0;
    animation: fadeIn 0.8s ease 0.85s both;
    animation-delay: 1300;
}

/* Initial State */

.hero-section-frase .frase-ornament {
    opacity: 0;
}

.hero-section-frase .frase-ornament span {
    transform: scaleX(0);
    transform-origin: left;
}

.hero-section-frase .frase-quote-mark {
    opacity: 0;
}

.hero-section-frase .frase-texto {
    opacity: 0;
    transform: translateY(18px);
}

.hero-section-frase .frase-divider {
    opacity: 0;
}

.hero-section-frase .frase-tag {
    opacity: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .hero-section-frase {
        padding: 0;
        justify-content: start;
    }

    .hero-section-frase::after {
        left: 32px;
        right: 32px;
    }
}

/* HERO LOGO ANIMATION */

.wrap {
    width: 30vw;
    max-width: 1100px;
}

.wrap svg {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 480px) {

    .wrap {
        width: 70vw;
    }
}

.logo-letters {
    visibility: hidden;
}

.show {
    visibility: visible;
}

#btn {
    margin: 32px auto 0;
    display: block;
    padding: 12px 40px;
    background: transparent;
    border: 2px solid #1D1D1B;
    color: #1D1D1B;
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: sans-serif;
    opacity: 0;
    transition: opacity .6s, background .2s, color .2s;
}

#btn.show {
    opacity: 1;
}

#btn:hover {
    background: #1D1D1B;
    color: #f5f4f0;
}

#triangleAnim {
    opacity: 0;
    transform: scale(0.1);
    transform-origin: center;
    animation: triangleReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes triangleReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── PROJECTS SECTION ── */
.projects {
    padding: 50px 70px 150px 70px;
    position: relative;
    z-index: 1;
}

@media (min-width: 769px) and (max-width: 1024px) {
    .projects {
        padding: 72px 24px;
    }
}

.end-projects {
    padding-bottom: 0px;
}

/* ── SECTION SEPARATORS ── */
.section-content-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 80px 0;
}

.section-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--line);
}

.section-content-container-row .section-text {
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 72px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

/* Animation for the section line */
.section-line-anim {
    transform: scaleX(0);
    transform-origin: center center;
}

.section-title {
    font-family: var(--nagui-font);
    font-weight: 300;
    font-size: 1.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.2rem;
        min-width: min-content;
        max-width: 270px;
    }

    .single-line {
        max-width: max-content;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .section-title {
        font-size: 1.1rem;
    }
}

/* Typewriter Animation */
.section-title-anim {
    display: block;
    white-space: nowrap;
    border-right: 1.5px solid transparent;
    overflow: hidden;
}

.section-count {
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    color: var(--muted);
    text-transform: uppercase;
}

/* ── PROJECT GRID ── */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
}

.section-project-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.grid-1 {
    display: grid;
    gap: 3px;
    grid-template-columns: 1fr 1fr;
}

.grid-1 .project-card:first-child {
    grid-column: span 2;
}

.grid-2 {
    display: grid;
    gap: 3px;
    grid-template-columns: 1fr 1fr;
}

.grid-3 {
    display: grid;
    gap: 3px;
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 768px) {
    .grid-1, .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
}

.project-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: transparent;

    aspect-ratio: 4/3;
    overflow: hidden;
}

.project-img {
    display: block;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;

    width: 100%;
    height: 100%;
    object-fit: cover;

    /* Optimizado */
    will-change: transform;
    transform: translateZ(0);
}

.project-card:hover .project-img {
    transform: scale(1.05);
    filter: brightness(0.85);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 28px;
    background: linear-gradient(transparent, rgba(26, 24, 22, 0.82));
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.project-card:hover .project-info {
    opacity: 1;
    transform: translateY(0);
}

.project-name {
    font-family: var(--nagui-font);
    font-weight: 300;
    font-size: 1.6rem;
    color: #f5f3ef;
    letter-spacing: 0.06em;
    display: block;
}

.project-tag {
    font-size: 0.86rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 6px;
    display: block;
}

.project-index {
    position: absolute;
    top: 25px;
    left: 25px;
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    color: rgba(245, 243, 239, 0.5);
    font-weight: 400;
    z-index: 1;
}

@media (max-width: 480px) {
    .project-info {
        padding: 20px 16px;
		opacity: 1;
    }

    .project-name {
        font-size: 1.2rem;
    }

    .project-tag {
        font-size: 0.7rem;
        letter-spacing: 0.14em;
    }

    .project-index {
        top: 14px;
        left: 14px;
        font-size: 0.76rem;
    }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
		
	.project-info {
		opacity: 1;
	}
	
    .main-nav {
        padding: 22px 24px;
    }

    .nav-links {
        display: none;
    }

    .hero-content {
        left: 24px;
        right: 24px;
        bottom: 48px;
        flex-direction: column;
        gap: 16px;
    }

    .hero-meta {
        text-align: left;
    }

    .projects {
        padding: 72px 24px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .section-title-anim {
        white-space: normal;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content {
        left: 24px;
        right: 24px;
        bottom: 48px;
    }

    .projects {
        padding: 72px 24px;
    }
    
    .project-index {
        top: 18px;
        left: 18px;
        font-size: 0.68rem;
    }

    .project-info {
        padding: 20px 16px;
    }

    .project-name {
        font-size: 0.9rem;
    }

    .project-tag {
        font-size: 0.6rem;
        letter-spacing: 0.14em;
    }
}

/* INSTAGRAM */

/* ── SECTION ── */
.section-instagram-container {
    position: relative;
    width: 100%;
    padding: 90px 80px 100px;
    background-color: var(--brand-dark);
    overflow: hidden;
}

/* Subtle grain texture overlay */
.section-instagram-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 480 480' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.1'/%3E%3C/svg%3E");
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

/* ── HEADER ── */
.section-instagram-container .section-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 48px;
    gap: 24px;
}

@media (max-width: 480px) {
    .section-instagram-container .section-header {
        align-items: start;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .section-instagram-container {
        padding: 72px 24px;
    }

}

.section-instagram-container .section-title {
    font-family: var(--nagui-font);
    font-weight: 300;
    font-size: clamp(1.3rem, 2.8vw, 2.4rem);
    line-height: 1.25;
    color: var(--white);
    max-width: 900px;
    letter-spacing: 0.01em;
    text-align: left;
    max-width: max-content;
}

.section-instagram-container .section-title em {
    font-style: italic;
    color: var(--brand-light);
}

.section-instagram-container .instagram-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(143, 175, 192, 0.4);
    padding-bottom: 4px;
    white-space: nowrap;
    transition: color 0.3s, border-color 0.3s;
}

.instagram-cta:hover {
    color: var(--white);
    border-color: var(--white);
}

.instagram-cta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.instagram-cta:hover svg {
    transform: translateX(3px);
}

/* ── GRID ── */
.instagram-grid-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* ── CARD ── */
.instagram-card-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3/5;
    overflow: hidden;
    cursor: pointer;
}

.skeleton .instagram-card {
    width: 100%;
    height: 100%;
    background: #111;
}

/* rounded corners on first and last */
.instagram-card-container:first-child {
    border-radius: 4px 0 0 4px;
}

.instagram-card-container:last-child {
    border-radius: 0 4px 4px 0;
}

.instagram-card-container video,
.instagram-card-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.65s ease;
    filter: saturate(0.9) brightness(0.95);

    /* Optimizado */

    will-change: transform;
    transform: translateZ(0);
}

.instagram-card-container video {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* gradient overlay */
.instagram-card-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            var(--overlay-end) 0%,
            rgba(46, 74, 88, 0.2) 50%,
            var(--overlay-start) 100%);
    opacity: 0;
    transition: opacity 0.45s ease;
    z-index: 1;
}

/* instagram icon badge */
.card-icon {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.card-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card-icon span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    opacity: 0;
    transition: .3s;
    cursor: pointer;
    z-index: 2;
}

.instagram-card-container:hover .play-btn {
    opacity: 1;
}

@media (max-width: 480px) {
    .play-btn svg {
        width: 45px;
        height: 45px;
    }

    .card-icon svg {
        width: 20px;
        height: 20px;
    }

    .card-icon span {
        font-size: 0.7rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .play-btn svg {
        width: 35px;
        height: 35px;
    }

    .card-icon svg {
        width: 15px;
        height: 15px;
    }

    .card-icon span {
        font-size: 0.5rem;
    }
}

/* hover states */
.instagram-card-container:hover img {
    transform: scale(1.06);
    filter: saturate(1.05) brightness(1.0);
}

.instagram-card-container:hover::before {
    opacity: 1;
}

.instagram-card-container:hover .card-icon {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* staggered entrance animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instagram-card-container {
    opacity: 0;
    transform: translateY(28px);
}

.instagram-card-container:nth-child(1) {
    animation-delay: 0.05s;
}

.instagram-card-container:nth-child(2) {
    animation-delay: 0.15s;
}

.instagram-card-container:nth-child(3) {
    animation-delay: 0.25s;
}

.instagram-card-container:nth-child(4) {
    animation-delay: 0.35s;
}

.instagram-card-container:nth-child(5) {
    animation-delay: 0.45s;
}

/* ── FOOTER NOTE ── */
.instagram-footnote {
    position: relative;
    z-index: 1;
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
}

.instagram-footnote::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

@media (min-width: 481px) and (max-width: 768px) {
    .section-instagram-container .section-title {
        align-self: start;
		font-size: 1.5rem;
    }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
	
    .section-instagram-container {
        padding: 60px 32px 70px;
    }

    .section-instagram-container::after {
        left: 32px;
    }

    .instagram-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .instagram-card-container {
        border-radius: 4px 4px 4px 4px;
    }
	
	.instagram-card-container:first-child {
        border-radius: 4px;
    }
    
    .instagram-card-container:last-child {
        border-radius: 4px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .instagram-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .instagram-card-container {
        aspect-ratio: 1 / 2;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    
    .section-instagram-container .section-title {
        font-size: 1.5rem;
    }

    .section-instagram-container .instagram-cta {
        font-size: 0.5rem;
    }

    .section-instagram-container .instagram-footnote {
        font-size: 0.5rem;
    }
}

/* FRASE FOOTER */

.footer-section-frase {
    position: relative;
    width: 100%;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 150px 80px;
    background-color: #f5f3ef;
    overflow: hidden;
}

/* very subtle grid texture */
.footer-section-frase::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(97, 132, 153, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(97, 132, 153, 0.06) 1px, transparent 1px);
    background-size: 63px 63px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 45%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 45%);
    pointer-events: none;
}

/* thin accent lines left & right */
.footer-section-frase::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 80px;
    right: 80px;
    transform: translateY(-50%);
    height: 1px;
    pointer-events: none;
}

/* ── INNER WRAPPER ── */
.footer-section-frase .frase-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    max-width: 800px;
    text-align: center;
}

/* decorative ornament top */
.footer-section-frase .frase-ornament {
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0;
}

.footer-section-frase .frase-ornament span {
    display: block;
    height: 1px;
    width: 40px;
    background: rgba(97, 132, 153, 0.5);
}

.footer-section-frase .frase-ornament svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

/* ── QUOTE MARK ── */
.footer-section-frase .frase-quote-mark {
    font-family: var(--nagui-font);
    font-size: 6rem;
    line-height: 0.6;
    color: rgba(97, 132, 153, 0.25);
    font-weight: 300;
    user-select: none;
    letter-spacing: -4px;
    opacity: 0;
}

/* ── MAIN PHRASE ── */
.footer-section-frase .frase-texto {
    font-family: var(--nagui-font);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(2.1rem, 4.5vw, 3.6rem);
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: #1c2e38;
    opacity: 0;
}

@media (max-width: 480px) {
    .footer-section-frase .frase-texto {
        font-size: clamp(1.7rem, 4vw, 3rem);
        width: 90vw;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .footer-section-frase .frase-texto {
        font-size: clamp(2rem, 3vw, 3rem);
    }
}

/* highlighted word */
.footer-section-frase .frase-texto .highlight {
    font-style: normal;
    font-weight: 400;
    color: #8fafc0;
    position: relative;
    display: inline-block;
    margin-left: 10px;
}

/* subtle underline on the highlighted word */
.footer-section-frase .frase-texto .highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(143, 175, 192, 0.45);
    transform: scaleX(var(--line-scale, 0));
    transform-origin: left;
}

/* ── SEPARATOR ── */
.footer-section-frase .frase-divider {
    width: 32px;
    height: 1px;
    background: rgba(97, 132, 153, 0.4);
    opacity: 0;
}

/* ── TAGLINE ── */
.footer-section-frase .frase-tag {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(143, 175, 192, 0.9);
    opacity: 0;
}

/* estados iniciales correctos */

.footer-section-frase .frase-ornament {
    opacity: 0;
}

.footer-section-frase .frase-ornament span {
    transform: scaleX(0);
    transform-origin: left;
}

.footer-section-frase .frase-quote-mark {
    opacity: 0;
}

.footer-section-frase .frase-texto {
    opacity: 0;
    transform: translateY(18px);
}

.footer-section-frase .frase-divider {
    opacity: 0;
}

.footer-section-frase .frase-tag {
    opacity: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .footer-section-frase .section-frase {
        padding: 80px 32px;
    }

    .footer-section-frase .section-frase::after {
        left: 32px;
        right: 32px;
    }
}


/* ── Scroll To Top Button ── */
#scrollTop {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: var(--btn-size);
    height: var(--btn-size);
    border-radius: var(--radius);
    background: var(--btn-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;

    /* Hidden by default */
    opacity: 0;
    transform: translateY(12px) scale(0.92);
    pointer-events: none;

    /* Appear animation */
    transition:
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.2s ease,
        box-shadow 0.2s ease;

    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

@media (min-width: 769px) and (max-width: 1024px) {
    #scrollTop {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }
}

#scrollTop.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#scrollTop:hover {
    background: #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px) scale(1);
}

#scrollTop:active {
    transform: translateY(0) scale(0.95);
}

#scrollTop svg {
    display: block;
    transition: transform 0.2s ease;
}

#scrollTop:hover svg {
    transform: translateY(-2px);
}

/* ----------------------------------------------------------------- */

/* Optimizado */
.project-img,
.project-info,
.instagram-card-container,
.frase-texto,
.section-title-anim,
.section-line-anim {
    will-change: transform, opacity;
}

/* Optimizado */
.hero,
.projects,
.section-instagram-container,
.footer-section-frase {
    contain: layout paint;
}

.hs-track {
    will-change: transform;
    transform: translateZ(0);
}