/* ==========================================================================
   index.html — Landing page
   ========================================================================== */

/* ---------- 1. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, hsl(var(--cream)) 0%, transparent 60%),
    linear-gradient(180deg, hsl(var(--background)) 0%, hsl(var(--cream-dark)) 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.hero__blob { position: absolute; z-index: 0; }
.hero__blob--1 { --blob-size: clamp(320px, 45vw, 640px); top: -14%; right: -12%; --blob-duration: 26s; }
.hero__blob--2 { --blob-size: clamp(300px, 40vw, 560px); bottom: -18%; left: -14%; --blob-duration: 32s; }
.hero__blob--3 { --blob-size: clamp(200px, 26vw, 380px); top: 34%; left: 48%; --blob-opacity: 0.45; --blob-duration: 38s; }

.hero__inner {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: clamp(2.5rem, 2rem + 4vw, 5rem) clamp(2rem, 1.5rem + 3vw, 4rem);
}

.hero__content {
  display: grid;
  justify-items: center;
  gap: clamp(1rem, 0.8rem + 1vw, 1.75rem);
  max-width: 860px;
  text-align: center;
}

.hero__eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.hero__title {
  font-size: clamp(2.6rem, 1.5rem + 4.6vw, 6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.hero__lead {
  max-width: 34em;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: hsl(var(--muted-foreground));
  text-wrap: pretty;
}

.hero .referral-form { margin-top: var(--space-2); }

.hero__active-code {
  margin-top: calc(var(--space-2) * -1);
  font-size: var(--fs-sm);
  color: hsl(var(--muted-foreground));
}

.hero__active-code a { font-weight: 600; }

/* Floating photos (wide screens only, never over the text) */
.hero__photos {
  display: none;
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-photo {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: hsl(var(--cream-dark));
  box-shadow: var(--shadow-lg);
  animation: hero-float 9s ease-in-out infinite alternate;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo--arch {
  top: 14%;
  left: max(2rem, calc(50% - 640px));
  width: clamp(150px, 13vw, 200px);
  aspect-ratio: 3 / 4;
  /* Exact semicircle top for a 3:4 box (oversized radii would flatten the bottom corners) */
  border-radius: 50% 50% var(--radius-xl) var(--radius-xl) / 37.5% 37.5% var(--radius-xl) var(--radius-xl);
}

.hero-photo--pill {
  top: 10%;
  right: max(2rem, calc(50% - 640px));
  width: clamp(130px, 11vw, 170px);
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-pill);
  animation-duration: 11s;
  animation-delay: -3s;
}

.hero-photo--circle {
  bottom: 18%;
  left: max(4rem, calc(50% - 600px));
  width: clamp(90px, 8vw, 120px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid hsl(var(--cream));
  animation-duration: 8s;
  animation-delay: -5s;
}

.hero__ring {
  position: absolute;
  bottom: 22%;
  right: max(3rem, calc(50% - 600px));
  width: clamp(110px, 10vw, 150px);
  aspect-ratio: 1;
  border: 1px solid hsl(var(--gold) / 0.7);
  border-radius: 50%;
  animation: hero-float 12s ease-in-out infinite alternate-reverse;
}

.hero__ring::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px dashed hsl(var(--gold) / 0.5);
  border-radius: 50%;
}

@media (min-width: 1100px) {
  .hero__photos { display: block; }
}

@keyframes hero-float {
  from { transform: translateY(-10px) rotate(-1.5deg); }
  to { transform: translateY(12px) rotate(1.5deg); }
}

/* Marquee strip */
.hero__marquee {
  --marquee-duration: 45s;
  padding-block: var(--space-4);
  border-top: 1px solid hsl(var(--gold) / 0.35);
  background: hsl(var(--background) / 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem);
  font-style: italic;
  white-space: nowrap;
  color: hsl(var(--brown));
}

.hero__marquee .marquee__track {
  align-items: center;
  gap: var(--space-6);
  padding-inline-end: var(--space-6);
}

.hero__marquee i {
  font-style: normal;
  color: hsl(var(--gold));
}

/* ---------- 2. Purpose ---------- */
.purpose__grid {
  display: grid;
  gap: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.purpose__intro {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

@media (min-width: 1024px) {
  .purpose__grid {
    grid-template-columns: 5fr 6fr;
    align-items: center;
  }
}

.steps {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  align-items: start;
  padding: var(--space-6);
  border: 1px solid hsl(var(--border) / 0.9);
  border-radius: var(--radius-xl);
  background: hsl(0 0% 100% / 0.6);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) ease;
}

/* Thin gold connector between steps */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--space-6) + 1.4rem);
  bottom: calc(var(--space-4) * -1);
  width: 1px;
  height: var(--space-4);
  background: hsl(var(--gold));
}

@media (hover: hover) {
  .step:hover {
    transform: translateX(6px);
    border-color: hsl(var(--gold-light));
    box-shadow: var(--shadow-md);
  }
}

.step__num {
  min-width: 2.8rem;
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 2rem + 1.5vw, 3.25rem);
  font-style: italic;
  font-weight: 500;
  line-height: 0.9;
  background-image: linear-gradient(135deg, hsl(var(--gold-dark)), hsl(var(--gold)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: hsl(var(--gold-text));
}

.step__title {
  font-size: var(--fs-h4);
  font-weight: 600;
}

.step__text {
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
  color: hsl(var(--muted-foreground));
}

/* ---------- 3. About + gallery ---------- */
.about__head {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3rem);
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.about__intro {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .about__head {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-2) clamp(0.5rem, 0.2rem + 1.5vw, 1.5rem);
  border-left: 1px solid hsl(var(--gold) / 0.45);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat__value {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  color: hsl(var(--foreground));
}

.stat__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  color: hsl(var(--muted-foreground));
}

/* Asymmetric masonry-style grid (explicit placement, no holes) */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: clamp(84px, 24vw, 170px);
  gap: clamp(0.5rem, 0.3rem + 1vw, 1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery__item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.gallery__item:nth-child(2) { grid-column: 1; grid-row: 3 / 5; }
.gallery__item:nth-child(3) { grid-column: 2; grid-row: 3 / 6; }
.gallery__item:nth-child(4) { grid-column: 1; grid-row: 5 / 7; }
.gallery__item:nth-child(5) { grid-column: 2; grid-row: 6 / 9; }
.gallery__item:nth-child(6) { grid-column: 1; grid-row: 7 / 9; }

@media (min-width: 768px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: clamp(90px, 9.5vw, 132px);
  }

  .gallery__item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 4; }
  .gallery__item:nth-child(2) { grid-column: 3; grid-row: 1 / 3; }
  .gallery__item:nth-child(3) { grid-column: 4; grid-row: 1 / 4; }
  .gallery__item:nth-child(4) { grid-column: 3; grid-row: 3 / 6; }
  .gallery__item:nth-child(5) { grid-column: 1 / 3; grid-row: 4 / 6; }
  .gallery__item:nth-child(6) { grid-column: 4; grid-row: 4 / 6; }
}

.gallery__item { min-width: 0; min-height: 0; }

.gallery__btn {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--cream-dark)), hsl(var(--blush)));
  cursor: zoom-in;
}

.gallery__item:nth-child(3) { container-type: inline-size; }

.gallery__item:nth-child(3) .gallery__btn {
  border-radius: var(--radius-xl);
  border-radius: 50cqi 50cqi var(--radius-xl) var(--radius-xl); /* semicircle top at any width */
}
.gallery__item:nth-child(6) .gallery__btn { border-radius: var(--radius-xl) var(--radius-xl) 120px var(--radius-xl); }

.gallery__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out), filter var(--dur-slow) ease;
}

.gallery__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(27, 22, 18, 0.55));
  pointer-events: none;
}

.gallery__caption {
  position: absolute;
  z-index: 1;
  left: var(--space-3);
  bottom: var(--space-3);
  max-width: calc(100% - var(--space-6));
  padding: 0.35em 0.9em;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: rgba(27, 22, 18, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  line-height: 1.3;
}

@media (hover: hover) {
  .gallery__btn:hover img { transform: scale(1.06); }
}

.gallery__btn:focus-visible {
  outline: 3px solid hsl(var(--ring));
  outline-offset: 3px;
}

/* ---------- 4. Why us ---------- */
.why {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.why__blob {
  --blob-size: clamp(320px, 50vw, 620px);
  top: 10%;
  left: 50%;
  translate: -50% 0;
}

.why__grid {
  display: grid;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why__grid > :last-child { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .why__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.why-card {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
  background: hsl(0 0% 100% / 0.7);
}

.why-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--space-8);
  right: var(--space-8);
  height: 1px;
  background: linear-gradient(90deg, transparent, hsl(var(--gold)), transparent);
}

.why-card__icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--gold-light)), hsl(var(--gold)));
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-gold);
}

.why-card__icon .icon { width: 26px; height: 26px; }

.why-card__title {
  font-size: var(--fs-h4);
  font-weight: 600;
}

.why-card__text { color: hsl(var(--muted-foreground)); }

/* ---------- 5. Testimonials (dark, glass) ---------- */
.testimonials {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.testimonials::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30%;
  left: 50%;
  width: min(900px, 120vw);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-soft), transparent 65%);
  pointer-events: none;
}

.testimonials__track {
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0 0 var(--space-4);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.testimonial {
  flex: 0 0 86%;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .testimonials__track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
    overflow: visible;
    padding-bottom: 0;
  }
}

.testimonial figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  height: 100%;
  margin: 0;
  padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) ease;
}

@media (hover: hover) {
  .testimonial figure:hover {
    transform: translateY(-6px);
    border-color: rgba(201, 165, 106, 0.5);
  }
}

.testimonial__mark {
  width: 40px;
  height: 40px;
  fill: var(--dark-gold);
  stroke: none;
  opacity: 0.9;
}

.testimonial__quote {
  flex: 1;
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.875rem);
  font-style: italic;
  line-height: 1.35;
  color: var(--dark-text);
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600;
  color: var(--dark-text);
}

.testimonial__avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dark-cta);
  color: #1b1612;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* ---------- 6. Closing CTA ---------- */
.closing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
}

.closing__blob {
  --blob-size: clamp(320px, 55vw, 640px);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}

.closing__inner {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
}

.closing__inner .lead { margin-inline: auto; }
.closing .referral-form { margin-top: var(--space-4); }
