Proyecto Neptuno uses two types of hero sections: the full-screen landing hero on the homepage and page heroes for interior pages.
Landing Hero (#hero)
The main hero section appears on index.html with a full-screen background image and gradient overlay.
HTML Structure
From index.html (lines 34-43):
< section id = "hero" >
< div class = "container" >
< h2 > Un icono transformado para una nueva era de ocio y negocios en Granada. </ h2 >
< h1 > Proyecto Neptuno </ h1 >
< div class = "cta" >
< a href = "./proyecto.html" class = "btn btn-primary" > Descubrir el proyecto </ a >
< a href = "./contact.html" class = "btn btn-secondary" > Contacto </ a >
</ div >
</ div >
</ section >
CSS Styling
From style.css (lines 114-158):
#hero {
background :
/* Three-phase gradient overlay */
linear-gradient ( to top ,
rgba ( 0 , 0 , 0 , 0.9 ) 0 % , /* Phase 1: Almost black */
rgba ( 0 , 0 , 0 , 0.4 ) 60 % , /* Phase 2: Medium shadow at mid-height */
rgba ( 0 , 0 , 0 , 0 ) 100 % /* Phase 3: Full transparency */
),
url ( ./img/ccneptuno.webp );
background-size : cover ;
background-position : center ;
display : flex ;
justify-content : center ;
align-items : flex-end ;
text-align : center ;
height : 85 vh ;
padding-bottom : 8 vh ;
}
#hero .container {
max-width : 900 px ;
margin : 0 auto ;
padding : 0 20 px ;
}
#hero h1 {
font-size : 6 rem ;
color : var ( --texto-claro );
margin : 2 rem 0 ;
text-shadow : 2 px 2 px 4 px rgba ( 0 , 0 , 0 , 0.7 );
letter-spacing : 2 px ;
line-height : 1.2 ;
}
#hero h2 {
color : var ( --color-secundario-claro );
font-size : 1.1 rem ;
margin : 0 auto ;
max-width : 60 % ;
text-transform : uppercase ;
letter-spacing : 2 px ;
line-height : 1.6 ;
text-shadow : 2 px 2 px 4 px rgba ( 0 , 0 , 0 , 0.7 );
}
From style.css (lines 226-267):
.cta {
display : flex ;
justify-content : center ;
gap : 20 px ;
margin-top : 1 rem ;
}
.btn {
padding : 16 px 32 px ;
font-weight : 600 ;
text-transform : uppercase ;
font-size : 0.9 rem ;
letter-spacing : 1 px ;
transition : var ( --transicion-suave );
cursor : pointer ;
border-radius : 2 px ;
text-decoration : none ;
display : inline-block ;
}
.btn-primary {
background-color : var ( --color-primario );
color : var ( --texto-claro );
border : 1 px solid var ( --color-primario );
}
.btn-primary:hover {
background-color : var ( --color-primario-claro );
border-color : var ( --color-primario-claro );
transform : translateY ( -3 px );
}
.btn-secondary {
color : var ( --texto-claro );
border : 1 px solid var ( --texto-claro );
}
.btn-secondary:hover {
border-color : var ( --color-secundario );
background-color : var ( --color-secundario );
transform : translateY ( -3 px );
}
Responsive Behavior
From style.css (lines 956-966):
@media ( max-width : 576 px ) {
#hero h1 {
font-size : 2.5 rem ;
}
#hero h2 {
max-width : 90 % ;
font-size : 0.9 rem ;
}
.cta {
flex-direction : column ;
gap : 10 px ;
}
}
Page Hero (.page-hero)
Interior pages use a simpler page hero without background images.
HTML Structure
From contact.html (lines 36-40):
< section class = "page-hero" >
< span class = "page-hero__label" > Hablemos </ span >
< h1 > Contacto </ h1 >
< p > El Proyecto Neptuno se construye con personas. Cuéntanos quién eres y de qué quieres hablar. </ p >
</ section >
Other examples:
Gastronomía (gastro.html)
El Proyecto (proyecto.html)
< section class = "page-hero" >
< span class = "page-hero__label" > Saborea </ span >
< h1 > Gastronomía </ h1 >
< p > El nuevo Neptuno apuesta por una oferta gastronómica variada y de calidad, desde la tapa tradicional granadina hasta la restauración internacional. </ p >
</ section >
CSS Styling
From style.css (lines 272-303):
.page-hero {
background-color : var ( --bg-secundario );
border-left : 4 px solid var ( --color-primario );
padding : 5 rem 5 % 4 rem ;
min-height : 30 vh ;
display : flex ;
flex-direction : column ;
justify-content : flex-end ;
}
.page-hero__label {
font-size : 0.75 rem ;
font-weight : 700 ;
letter-spacing : 3 px ;
text-transform : uppercase ;
color : var ( --color-secundario );
margin-bottom : 1 rem ;
}
.page-hero h1 {
font-size : 4.5 rem ;
color : var ( --texto-oscuro );
line-height : 1 ;
margin-bottom : 1.5 rem ;
}
.page-hero p {
color : var ( --texto-muted );
font-size : 1 rem ;
line-height : 1.7 ;
max-width : 520 px ;
}
Responsive Behavior
From style.css (lines 968-970):
@media ( max-width : 576 px ) {
.page-hero h1 {
font-size : 2.5 rem ;
}
}
Comparison
Landing Hero (#hero)
Page Hero (.page-hero)
Location : index.html onlyHeight : 85vh (full-screen)Background :
Background image (ccneptuno.webp)
Three-phase gradient overlay (dark to transparent)
background-size: cover
Typography :
White text with text shadows
Huge h1 (6rem → 2.5rem mobile)
Uppercase subtitle in golden color
Two CTA buttons
Alignment :
Content aligned to bottom center
Flexbox centered horizontally
Location : All interior pagesHeight : min-height 30vhBackground :
Solid light gray background (--bg-secundario)
Red left border accent (4px)
Typography :
Dark text on light background
Large h1 (4.5rem → 2.5rem mobile)
Small uppercase label in golden color
Descriptive paragraph (max-width 520px)
Alignment :
Content aligned to bottom left
Flexbox column layout
Design Patterns
Gradient Overlay Technique The landing hero uses a three-phase linear gradient from dark (bottom) to transparent (top), ensuring text readability while preserving image visibility in the upper portion. linear-gradient(to top,
rgba(0,0,0,0 .9 ) 0%,
rgba(0,0,0,0 .4 ) 60%,
rgba(0,0,0,0) 100%
)
Text Shadows for Legibility Both hero headings use text-shadow: 2px 2px 4px rgba(0,0,0,0.7) to ensure text remains readable over the background image.
Vertical Rhythm Page heroes use justify-content: flex-end to push content to the bottom, creating visual weight and a strong entry point for page content.
Left Border Accent The 4px red left border (border-left: 4px solid var(--color-primario)) creates a subtle brand accent without overwhelming the design.
Both button types feature a lift animation on hover:
transform: translateY(-3px);
This creates a subtle 3D effect that enhances the perceived clickability.
The landing hero uses viewport height units (85vh) to ensure it fills most of the screen on any device, while the page hero uses min-height: 30vh to allow content to expand naturally.