/* Styles for Skyline Design & Build website
 *
 * This CSS file defines the core styles for the construction
 * company website. It sets up a cohesive colour palette,
 * responsive layouts and reusable utility classes. The
 * variables at the top of the file control the primary
 * colours used throughout the site, making it easy to
 * tweak the look and feel without touching every rule.
 */

/* Colour variables */
:root {
  --primary-color: #0a4d68; /* deep blue used for headers and footer */
  --secondary-color: #1269a7; /* secondary blue for buttons */
  --accent-color: #f9a826; /* warm accent colour for call‑to‑actions */
  --accent-hover: #e58e0a; /* slightly darker accent on hover */
  --text-color: #333333; /* default text colour */
  --light-bg: #f5f5f5; /* light grey background for sections */
}

/* Global resets and typography */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  text-decoration: underline;
}

/* Utility container for consistent widths */
.container {
  width: 90%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Header and navigation */
header {
  background: var(--primary-color);
  color: #ffffff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffffff;
}

header .logo img {
  height: 80px; /* increased from 50px */
  width: auto;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav li {
  margin-left: 1.5rem;
}

nav a {
  color: #ffffff;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

nav a:hover {
  opacity: 0.8;
}

/* Hero section for the home page */
.hero {
  position: relative;
  /* Increase hero height to fill the viewport for a more immersive effect */
  height: 100vh;
  /* Flattened folder structure: reference hero image in project root */
  background-image: url('hero.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.hero .hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent-color);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  display: inline-block;
  background: var(--secondary-color);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.3s ease;
}

.btn-secondary:hover {
  background: #0b5c8c;
}

/* Preview sections on the home page */
.preview {
  padding: 4rem 2rem;
  text-align: center;
}

.preview h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.preview p {
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.service-list {
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: 0 auto 1rem;
  text-align: left;
}

.service-list li {
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  position: relative;
}

.service-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.project-card {
  overflow: hidden;
  border-radius: 8px;
  background: var(--light-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.project-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.project-card h3 {
  margin: 0;
  padding: 1rem;
  font-size: 1.1rem;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: #ffffff;
  padding: 2rem 1rem;
  text-align: center;
}

footer a {
  color: #ffffff;
  text-decoration: underline;
}

/* Shared page hero for subpages */
.page-hero {
  position: relative;
  height: 40vh;
  /* Flattened folder structure: reference hero image in project root */
  background-image: url('hero.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.page-hero .hero-text {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: 2.5rem;
  margin: 0;
}

/* About page styles */
.about-section {
  padding: 4rem 2rem;
  background: #ffffff;
}

.about-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.about-section p {
  margin-bottom: 1rem;
  max-width: 800px;
}

.values-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.value-item {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.value-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* Services page styles */
.services-section {
  padding: 4rem 2rem;
  background: #ffffff;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-card {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.service-card h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.service-card p {
  margin-bottom: 0;
}

/* Projects page styles */
.projects-section {
  padding: 4rem 2rem;
  background: #ffffff;
}

.projects-section .projects-grid {
  margin-top: 1.5rem;
}

/* Contact page styles */
.contact-section {
  padding: 4rem 2rem;
  background: var(--light-bg);
}

.contact-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-details {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.5;
}

.contact-details p {
  margin: 0.3rem 0;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form form {
  display: grid;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-size: 1rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  background: var(--accent-color);
  color: #ffffff;
  border: none;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background: var(--accent-hover);
}

/* Larger logo in hero section */
.hero-logo {
  width: 200px;
  margin-bottom: 1rem;
}

/* Keyframes for hero background zoom effect */
@keyframes heroZoom {
  0% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/*
 * Intro animation overlay
 *
 * The home page features an animated introduction sequence that
 * showcases the Skyline logo and transitions into an aerial view of
 * a cityscape. The sequence plays on page load: the logo spins
 * 360° and fades out, the aerial view fades in and slowly zooms
 * towards the city, and then the entire overlay fades away to
 * reveal the underlying hero section. To customise the timing or
 * effect, adjust the animation durations and delays below.
 */

/* Container for the intro animation overlay */
#intro-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  z-index: 2000;
  /* Fade the overlay out after all animations complete */
  animation: hideIntro 1s ease 7.5s forwards;
}

/* Logo inside the intro animation */
#animated-logo {
  width: 200px;
  height: auto;
  /* Spin the logo and then fade it out */
  animation: spin 2s linear 0s forwards, fadeOutLogo 0.5s ease 2s forwards;
}

/* Aerial image that appears after the logo fades */
#building-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  /* Fade the image in and zoom it */
  animation: fadeInBuilding 1s ease 2.5s forwards, zoomInBuilding 4s ease 2.5s forwards;
}

/* Keyframes controlling the intro sequence */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeOutLogo {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeInBuilding {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomInBuilding {
  from { transform: scale(1); }
  to { transform: scale(1.4); }
}

@keyframes hideIntro {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}
