Overview
Proyecto Neptuno uses a single, well-organized CSS file (style.css) that follows a component-based architecture with clear sectioning and modern CSS practices.
File Structure
The stylesheet is organized into logical sections:CSS Custom Properties (Variables)
The project uses CSS custom properties defined in the:root selector for maintainability and theming:
Using CSS variables allows for easy theme customization and consistent color usage throughout the application.
Reset Styles
A minimal CSS reset ensures consistent cross-browser rendering:Base Styles
Global typography settings:Component Organization
The CSS is organized by page components with clear comment headers:Main Component Sections
Main Component Sections
- Header - Navigation and hamburger menu
- Hero Section - Landing page hero with background image
- Landing Grid - Two-column grid for landing cards
- Page Hero - Interior page headers
- Ocio (Leisure) - Image/text blocks for leisure pages
- Proyecto (Project) - Render grids and project sections
- Gastro - Restaurant category cards
- Contact Form - Form styles with tabs
- Footer - Site footer
- Responsive - Media queries
Naming Conventions
The project uses BEM-inspired naming with double underscores for elements:.landing-card.landing-card__label.landing-card__cta.proyecto-seccion--dark
The consistent naming convention makes it easy to understand the relationship between CSS classes and HTML structure.
Transitions and Animations
A global transition variable ensures consistent animations:Best Practices
Use CSS Variables
Always reference
var(--color-primario) instead of hardcoding colorsComponent Sections
Keep related styles together under comment headers
Mobile-First
Base styles for mobile, enhance with media queries
Semantic Names
Use descriptive class names like
.gastro-card instead of .card-3