/* ==========================================================================
   Grace Home Spa — one-page spa site
   Order: tokens → base → hero → philosophy → packages → book → footer
          → placeholders → reveal animations
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --green: #263f28;
  --pink: #f8ccc3;
  --cream: #f7efe3;
  --cream-dim: rgba(247, 239, 227, 0.75);
  --mauve: #b98d95;
  --mauve-dark: #a4757f;

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --container: 68rem;
  --section-pad: clamp(4rem, 10vw, 8rem);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  color: var(--pink);
  background-color: var(--green);
}

h1,
h2,
h3 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
}

p {
  margin: 0 0 1rem;
}

figure {
  margin: 0;
}

.container {
  width: min(100% - 3rem, var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-pad);
}

.section__intro {
  max-width: 40rem;
  margin: 0 auto clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
}

.section__intro h2 {
  margin-bottom: 0.5rem;
  font-size: 68px;
}

.section__intro p {
  color: var(--pink);
  font-size: 22px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  padding: 1.75rem 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
  background-color: var(--green);
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: -0.5rem;
  content: "";
  background: url("../assets/images/head-fallback.jpg") center / cover no-repeat;
  background-image: image-set(
    url("../assets/images/head.avif") type("image/avif"),
    url("../assets/images/head.webp") type("image/webp"),
    url("../assets/images/head-fallback.jpg") type("image/jpeg")
  );
  filter: blur(2.5px);
}

.hero > * {
  position: relative;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.hero__logo {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  object-fit: contain;
}

.hero__brand > picture {
  display: flex;
  width: 2.4rem;
  height: 2.4rem;
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 7vh, 4.5rem);
}

.hero__title {
  margin: 0;
  font-size: 112px;
}

.hero__name {
  font-size: 32px;
  font-family: var(--font-serif);
}

.btn {
  display: inline-block;
  padding: 0.8rem 2.1rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.btn--ghost {
  color: var(--pink);
  border: 1px solid var(--pink);
  background: rgba(30, 61, 43, 0.18);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.btn--ghost:hover {
  color: var(--green);
  background: var(--pink);
}

/* ---------- Our Philosophy ---------- */
.philosophy__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.philosophy__text h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.philosophy__text p {
  max-width: 32rem;
}

.philosophy__images {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.philosophy__images img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.philosophy__img--large {
  width: 82%;
  aspect-ratio: 383 / 434;
}

.philosophy__img--small {
  align-self: flex-start;
  width: 72%;
  aspect-ratio: 383 / 286;
  margin: -2.5rem 0 0 2rem;
}

.philosophy__img--accent {
  align-self: flex-end;
  width: 58%;
  aspect-ratio: 285 / 246;
  margin: -1rem 1rem 0 0;
}

/* ---------- Our Packages ---------- */
.packages__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.package__img {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.package__trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.package__trigger:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 5px;
}

.package__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.package__trigger:hover .package__img img {
  transform: scale(1.03);
}

.package figcaption {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-size: 28px;
  text-align: center;
}

/* ---------- Book an Appointment ---------- */
.book {
  display: grid;
  grid-template-columns: 1fr;
}

.book__info {
  display: flex;
  align-items: center;
  padding: var(--section-pad) 1.5rem;
  color: var(--green);
  background: var(--pink);
}

.book__inner {
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
}

.book__inner h2 {
  font-size: 68px;
}

.book__contact {
  display: grid;
  gap: 1.75rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.book__label {
  display: inline-block;
  margin-bottom: 0.3rem;
  padding-bottom: 0.15rem;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 32px;
}

.book__contact a {
  color: inherit;
  text-decoration: none;
  font-size: 18px;
}

.book__contact a:hover {
  text-decoration: underline;
}

.book__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 22rem;
}

/* ---------- Footer ---------- */
.footer {
  padding: 1.5rem;
  background: var(--pink);
  color: var(--green);
  font-size: 0.85rem;
  text-align: center;
}

.footer p {
  margin: 0;
}

/* ---------- Image placeholders ---------- */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 8rem;
}

.placeholder::after {
  content: attr(data-label);
  padding: 0.3rem 0.7rem;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.placeholder--sand   { background-color: #cbb297; }
.placeholder--rose   { background-color: #c98f96; }
.placeholder--clay   { background-color: #a9746e; }
.placeholder--sage   { background-color: #6d8b74; }
.placeholder--olive  { background-color: #7a7a52; }
.placeholder--stone  { background-color: #9a8f85; }
.placeholder--blush  { background-color: #e3a8a2; }
.placeholder--moss   { background-color: #4f6f57; }
.placeholder--forest { background-color: #22492f; }

/* ---------- Scroll reveal (JS-gated progressive enhancement) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 47.99rem) {
  .hero::before {
    background-image: image-set(
      url("../assets/images/head-mobile.avif") type("image/avif"),
      url("../assets/images/head-mobile.webp") type("image/webp"),
      url("../assets/images/head-mobile-fallback.jpg") type("image/jpeg")
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Tablet & up ---------- */
@media (min-width: 48rem) {
  .philosophy {
    padding-block: 0;
  }

  .philosophy__grid {
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .philosophy__text {
    align-self: center;
    justify-self: center;
    width: min(100% - 5rem, 39rem);
    text-align: center;
  }

  .philosophy__text h2 {
    font-size: clamp(2.75rem, 4.2vw, 4.75rem);
  }

  .philosophy__text p {
    max-width: none;
    font-size: clamp(1rem, 1.4vw, 1.45rem);
  }

  .philosophy__images {
    position: relative;
    aspect-ratio: 4 / 4.5;
    overflow: hidden;
  }

  .philosophy__images picture {
    position: absolute;
    margin: 0;
  }

  .philosophy__img--large {
    top: 0;
    right: 9%;
    width: 56%;
  }

  .philosophy__img--small {
    bottom: 0;
    left: 5%;
    width: 55%;
    z-index: 2;
  }

  .philosophy__img--accent {
    top: 50%;
    right: 5%;
    width: 41%;
    transform: translateY(-20%);
    z-index: 1;
  }

  .packages__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .book {
    grid-template-columns: 1fr 1fr;
  }

  .book__img {
    min-height: 32rem;
  }
}
