@font-face {
  font-family: "Brittany Signature";
  src: url("/assets/fonts/BrittanySignature.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f8f8f8;
}

section {
  padding: 80px 10%;
}

h1, h2 {
  font-family: "Brittany Signature", cursive;
  font-size: 2.4rem;
  color: black;
  text-decoration: none;
  position: relative;
  transition: 0.3s ease;
  margin-bottom: 20px;
  font-weight: normal;
  display: inline-block;
}

.h1::after, h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: #8cc5c9;
  transition: width 0.3s ease;
}

.h1, h2:hover::after {
  width: 100%;
}

p {
  max-width: 700px;
}

/* ========================
   HERO SECTION
   ======================== */

.hero {
  min-height: 100vh;
  background-color: #f0ece3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 15px;
  position: relative;
  overflow: hidden;
}

.hero-image {
  height: 90vh;
  width: auto;
  max-width: 75%;
  object-fit: contain;
  flex-shrink: 0;
  transform: translateX(-120px); /* desktop offset */
}

/* ========================
   NAVIGATION
   ======================== */

.main-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 34px;
  padding-right: 25px;
}

.main-nav a {
  font-family: "Brittany Signature", cursive;
  font-size: 2.4rem;
  color: black;
  text-decoration: none;
  position: relative;
  transition: 0.3s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: #8cc5c9;
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

/* ========================
   SECTION STYLES
   ======================== */

.light {
  background: #ffffff;
}

.dark {
  background: #ece7df;
}

/* ========================
   SERVICES
   ======================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: white;
  padding: 30px;
  border-radius: 8px;
}

/* ========================
   GALLERY
   ======================== */

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

.gallery img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* ========================
   CONTACT
   ======================== */

.contact a {
  color: black;
  text-decoration: none;
}

/* ========================
   TO TOP BUTTON
   ======================== */

.to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: #e6007a;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.to-top svg {
  width: 34px;
  height: 34px;
  transition: transform 0.2s ease;
}

.to-top:hover svg polygon {
  fill: #cc0066;
}

.to-top:hover svg {
  transform: translateY(-2px);
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top:hover {
  background-color: #f5f5f5;
}

/* ========================
   FOOTER
   ======================== */

footer {
  text-align: center;
  padding: 40px;
  background: #111;
  color: white;
}

/* ========================
   RESPONSIVE — TABLET
   ======================== */

@media (max-width: 900px) {
  .hero-image {
    max-width: 55%;
    transform: translateX(-60px);
  }

  .main-nav {
    gap: 22px;
  }

  .main-nav a {
    font-size: 1.8rem;
  }
}

/* ========================
   RESPONSIVE — MOBILE
   ======================== */

@media (max-width: 768px) {
  /* Hero: stack vertically, remove the desktop offset */
  .hero {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 15px 40px;
    min-height: 100svh; /* safer on mobile browsers */
  }

  .hero-image {
    height: auto;
    width: 85%;
    max-width: 340px;
    transform: none; /* remove the translateX that breaks mobile layout */
    object-fit: contain;
    flex-shrink: 0;
  }

  /* Nav: horizontal, centred, wrapping */
  .main-nav {
    position: static;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    padding-right: 0;
    margin-top: 24px;
    width: 100%;
  }

  .main-nav a {
    font-size: 1.4rem;
  }

  /* Section padding */
  section {
    padding: 50px 6%;
  }

  /* Headings */
  h1, h2 {
    font-size: 1.9rem;
  }

  /* Services: single column on very small screens */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Gallery: single column */
  .gallery {
    grid-template-columns: 1fr;
  }

  /* Prevent long email address from overflowing */
  .contact a {
    word-break: break-all;
  }

  /* Shrink to-top button slightly on mobile */
  .to-top {
    width: 44px;
    height: 44px;
    bottom: 1rem;
    right: 1rem;
  }

  .to-top svg {
    width: 26px;
    height: 26px;
  }
}

/* ========================
   RESPONSIVE — SMALL MOBILE
   ======================== */

@media (max-width: 400px) {
  .hero-image {
    width: 95%;
    max-width: 280px;
  }

  .main-nav a {
    font-size: 1.2rem;
  }

  h1, h2 {
    font-size: 1.6rem;
  }

  section {
    padding: 40px 5%;
  }
}