/* ==========================================================
   The spy: stick man on a rope (moved by spy.js)
   ========================================================== */
.spy {
  position: absolute;     /* measured from the very top of the page */
  top: 0;
  left: 36px;
  width: 42px;
  z-index: 50;            /* above the hero photo and content */
  pointer-events: none;   /* clicks pass straight through him */
}

/* The black rope from the top of the page down to his hand */
.spy-rope {
  position: absolute;
  top: 0;
  left: 11.85px;          /* lines up with the hand gripping the rope */
  width: 1.5px;
  background-color: #111111;
}

.spy-man {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  transform-origin: 12.6px 9.8px;   /* he swings around his hand on the rope */
  fill: none;
  stroke: #232323;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The rope below his hand: same black, same thickness as the rope above */
.spy-man .spy-rope-tail {
  stroke: #111111;
  stroke-width: 2.15;
}

.spy-man .spy-head {
  fill: #F6F2EA;          /* ivory face so the head reads as a shape */
}

.spy-man .spy-glasses {
  stroke: #111111;
  stroke-width: 3.5;
}

/* The scissors: thinner, steel-grey lines */
.spy-man .spy-scissors {
  stroke: #4A4A4A;
  stroke-width: 2;
}

.spy-man .spy-scissors circle {
  fill: none;
}

/* One blade snips open and closed */
.spy-blade {
  transform-origin: 47px 27px;   /* the scissors' pivot */
  animation: spy-snip 1.4s ease-in-out infinite;
}

@keyframes spy-snip {
  0%, 60%, 100% { transform: rotate(0deg); }
  30%           { transform: rotate(-22deg); }   /* blades close */
}

/* His legs sway gently while he hangs */
.spy-legs {
  transform-origin: 26px 52px;   /* swings from the hips */
  animation: spy-dangle 3.2s ease-in-out infinite;
}

@keyframes spy-dangle {
  0%, 100% { transform: rotate(-6deg); }
  50%      { transform: rotate(6deg); }
}

@media (max-width: 700px) {
  .spy {
    left: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spy-blade,
  .spy-legs {
    animation: none;
  }
}

/* Glide smoothly when a link jumps to a section, e.g. "View our work" */
html {
  scroll-behavior: smooth;
}

/* Page background: premium ivory white */
body {
  background-color: #F6F2EA;
  margin: 0;
}

/* Hero: the first full screen of the site */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  position: relative;   /* lets the background layers sit inside the hero */
  overflow: hidden;     /* hides the blurred photo's soft edges */
}

/* Layer 1: the shop photo, blurred */
.hero::before {
  content: "";
  position: absolute;
  inset: -30px;         /* a little bigger than the hero, so the blur has no faded edges */
  background-image: url("images/shop-interior.jpg");
  background-size: cover;
  background-position: center 30%;
  filter: blur(3px);
}

/* Layer 2: a soft ivory wash over the photo, so the charcoal text stands out.
   Towards the bottom it fades to solid ivory, blending into the rest of the page. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(246, 242, 234, 0.6) 0%,
    rgba(246, 242, 234, 0.6) 65%,
    rgba(246, 242, 234, 1) 100%
  );
}

/* Layer 3: the logo, headline, tagline and buttons sit on top */
.hero > * {
  position: relative;
  z-index: 1;
}

/* Logo above the headline */
.hero-logo {
  height: 150px;
  width: auto;
  margin-bottom: 36px;
  animation: breathe 6s ease-in-out infinite;
}

/* Main headline: charcoal black, large and spaced out */
h1 {
  color: #232323;
  font-size: 64px;
  letter-spacing: 8px;
  margin: 0;
}

/* A slow "breathing" pulse for the logo: it grows slightly and softens, then settles back */
@keyframes breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.035);
    opacity: 0.8;
  }
}

/* Visitors who have asked their device for less motion get a still logo */
@media (prefers-reduced-motion: reduce) {
  .hero-logo {
    animation: none;
  }
}

/* The line under the headline */
.tagline {
  color: #6B655C;
  font-size: 18px;
  letter-spacing: 2px;
  margin-top: 20px;
}

/* The row that holds the two buttons */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

/* Shared look for every button */
.button {
  display: inline-block;
  padding: 16px 36px;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #232323;
  transition: background-color 0.3s, color 0.3s;
}

/* "Book": filled charcoal, the main action */
.button-solid {
  background-color: #232323;
  color: #F6F2EA;
}

.button-solid:hover {
  background-color: transparent;
  color: #232323;
}

/* "View our work": outline only, the secondary action */
.button-outline {
  background-color: transparent;
  color: #232323;
}

.button-outline:hover {
  background-color: #232323;
  color: #F6F2EA;
}

/* Over the hero photo, outline buttons get a solid ivory fill so they stand out */
.hero .button-outline:not(:hover) {
  background-color: rgba(246, 242, 234, 0.9);
}

/* Hero on phones (placed after the main hero rules so these win) */
@media (max-width: 700px) {
  .hero-logo {
    height: 110px;
  }

  /* Smaller headline so it fits the screen */
  h1 {
    font-size: 36px;
    letter-spacing: 4px;
  }

  /* Stack the buttons as a neat column, all the same width */
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
  }

  .hero-buttons .button {
    text-align: center;
  }
}

/* Gallery */
.gallery {
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 20px;
  text-align: center;
}

.gallery h2 {
  color: #232323;
  font-size: 32px;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin: 0 0 60px;
}

/* Cards in a grid: three across, kept to a compact width so the pictures stay small */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

/* A single photo card */
.card {
  background-color: #FFFFFF;
  border: 1px solid #DDD6C9;
  border-radius: 12px;   /* softly rounded corners */
  overflow: hidden;      /* keeps the photo (and its zoom) inside the rounded corners */
  transition: transform 0.3s, box-shadow 0.3s;
}

/* Every photo gets the same frame, cropped neatly to fit */
.card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;   /* square photos, shorter than before */
  object-fit: cover;
  transition: transform 0.5s;
}

/* The card lifts with a soft shadow, and the photo zooms in slightly.
   On a computer this happens on hover; on phones it happens when tapped
   (gallery.js adds the "is-active" class). */
.card.is-active {
  transform: translateY(-6px);
  box-shadow: 0 12px 14px -6px rgba(0, 0, 0, 0.35);   /* small shadow just below the photo */
}

.card.is-active img {
  transform: scale(1.05);
}

/* Only devices with a real mouse use hover. Phones fake a "sticky" hover
   after a tap, which would fight with the tap effect above. */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 14px -6px rgba(0, 0, 0, 0.35);   /* small shadow just below the photo */
  }

  .card:hover img {
    transform: scale(1.05);
  }
}

/* Tapped cards show a pointer-style cursor hint and no grey tap flash on phones */
.card {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Two across on phones, one across on very small screens */
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 320px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Appointments (Square booking)
   ========================================================== */
.booking {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 20px;
  color: #232323;
}

.booking h2 {
  font-size: 32px;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 60px;
}

/* Underline the "Gallery" and "Appointments" headings */
.gallery h2,
.booking h2 {
  text-decoration: underline;
  text-decoration-thickness: 2px;   /* a fine, crisp line */
  text-underline-offset: 12px;      /* space between the letters and the line */
}

.booking-intro,
.booking-note {
  text-align: center;
  color: #6B655C;
}

.booking-intro {
  font-size: 17px;
  letter-spacing: 1px;
  margin: -36px 0 50px;
}

.booking-note {
  font-size: 14px;
  margin: 40px 0 0;
}

/* Service cards: three across on wide screens */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  background-color: #FFFFFF;
  border: 1px solid #DDD6C9;
  border-radius: 12px;   /* softly rounded corners, matching the gallery */
}

.service h3 {
  font-size: 18px;
  font-weight: normal;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.service-details {
  color: #6B655C;
  font-size: 14px;
  letter-spacing: 1px;
  margin: 0;
}

.service-price {
  font-size: 30px;
  margin: 18px 0 26px;
}

/* Pushes the button to the bottom so all cards line up */
.service .button {
  margin-top: auto;
}

@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Hover glow: a soft black glow around every clickable button
   ========================================================== */
.button,
.service {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.button:hover,
.button:focus-visible,
.service:hover {
  box-shadow: 0 0 16px 2px rgba(0, 0, 0, 0.25);
}

