/* =========================================================
   SMALL TOWN MAHJ — EDITORIAL HOMEPAGE + PHOTO SHUFFLE HERO
   The side rails carry the decorative language. The center is calmer,
   more editorial, and more photography-led.
   ========================================================= */

.home-photo-hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(4rem, 8vw, 7rem);
}

.home-photo-hero__grid {
  display: grid;
  grid-template-columns: minmax(0,.92fr) minmax(360px,1.08fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
}

.home-photo-hero__copy {
  position: relative;
  z-index: 5;
  max-width: 620px;
}

.home-photo-hero__eyebrow {
  margin: 0 0 1rem;
  color: #174b8f;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
  line-height: 1.35;
  text-transform: uppercase;
}

.home-photo-hero h1 {
  max-width: 7.8em;
  margin: 0;
  color: #082f67;
  font-size: clamp(3.8rem, 7vw, 7.4rem);
  line-height: .9;
  letter-spacing: -.035em;
}

.home-photo-hero h1 em {
  color: #174b8f;
  font-weight: 500;
}

.home-photo-hero__intro {
  max-width: 32rem;
  margin: 1.6rem 0 0;
  color: #5d6e83;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.65;
}

.home-photo-hero__actions {
  display: flex;
  align-items: center;
  gap: 1rem 1.4rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.home-photo-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 52px;
  border: 1px solid #174b8f;
  border-radius: 999px;
  background: #174b8f;
  color: #fffaf1;
  padding: 0 1.35rem;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
}

.home-photo-hero__secondary {
  color: #174b8f;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}

.photo-shuffle-hero {
  position: relative;
  width: min(510px, 100%);
  min-height: 620px;
  margin-left: auto;
}

.photo-shuffle-hero__stack {
  position: absolute;
  inset: 0 0 68px;
}

.shuffle-photo {
  --photo-rotation: 0deg;
  --photo-x: 0px;
  --photo-y: 0px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82%;
  aspect-ratio: 4 / 5;
  margin: 0;
  border: 9px solid #fffdf7;
  border-bottom-width: 38px;
  border-radius: 9px;
  background: #fffdf7;
  box-shadow: 0 18px 42px rgba(15,45,83,.18);
  overflow: hidden;
  transform: translate(calc(-50% + var(--photo-x)), calc(-50% + var(--photo-y))) rotate(var(--photo-rotation));
  transform-origin: 50% 75%;
  transition:
    transform .62s cubic-bezier(.2,.75,.2,1),
    opacity .42s ease,
    filter .42s ease,
    z-index 0s linear .31s;
}

.shuffle-photo__image {
  position: absolute;
  inset: 0 0 29px;
  overflow: hidden;
  background:
    var(--photo, linear-gradient(135deg, #dfe9f3, #f2dfd9 52%, #dce6d6));
  background-position: center;
  background-size: cover;
}

.shuffle-photo__image::after {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(180deg, transparent 58%, rgba(7,44,94,.22));
}

.shuffle-photo__hint {
  position: absolute;
  right: 14px;
  bottom: 9px;
  left: 14px;
  color: #174b8f;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
}

.shuffle-photo[data-position="0"] {
  --photo-rotation: -1.5deg;
  --photo-x: 0px;
  --photo-y: -4px;
  z-index: 4;
  opacity: 1;
  filter: none;
}

.shuffle-photo[data-position="1"] {
  --photo-rotation: 5deg;
  --photo-x: 24px;
  --photo-y: 12px;
  z-index: 3;
  opacity: .96;
}

.shuffle-photo[data-position="2"] {
  --photo-rotation: -6deg;
  --photo-x: -25px;
  --photo-y: 20px;
  z-index: 2;
  opacity: .91;
  filter: saturate(.92);
}

.shuffle-photo[data-position="3"] {
  --photo-rotation: 2deg;
  --photo-x: 7px;
  --photo-y: 25px;
  z-index: 1;
  opacity: .48;
  filter: saturate(.82);
}

.photo-shuffle-hero.is-shuffling .shuffle-photo[data-position="0"] {
  --photo-x: 155px;
  --photo-y: -12px;
  --photo-rotation: 11deg;
  opacity: 0;
}

.photo-shuffle-hero__control {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: .75rem;
  border: 0;
  border-bottom: 1px solid rgba(23,75,143,.3);
  background: transparent;
  color: #174b8f;
  padding: .4rem .1rem;
  font: inherit;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  cursor: pointer;
  text-transform: uppercase;
}

.photo-shuffle-hero__control i {
  font-size: 1.1rem;
  font-style: normal;
}

/* Temporary image-ready surfaces. These deliberately read like muted photo
   placeholders rather than cartoon Mahjong tiles. Replace --photo with real
   event photography as soon as those files are added to the repo. */
.shuffle-photo--one { --photo: radial-gradient(circle at 25% 28%, rgba(255,255,255,.7), transparent 16%), linear-gradient(145deg,#a9bdd0,#e7d1cb 55%,#8eaa91); }
.shuffle-photo--two { --photo: radial-gradient(circle at 72% 25%, rgba(255,255,255,.64), transparent 14%), linear-gradient(145deg,#d6e1ec,#9eb6cf 55%,#e4c0b8); }
.shuffle-photo--three { --photo: radial-gradient(circle at 35% 68%, rgba(255,255,255,.58), transparent 16%), linear-gradient(145deg,#b7c8b1,#e3d6c4 48%,#98b3cd); }
.shuffle-photo--four { --photo: radial-gradient(circle at 60% 34%, rgba(255,255,255,.58), transparent 15%), linear-gradient(145deg,#d7c4b8,#9db3c7 50%,#d9e0d0); }

/* ---------------------------------------------------------
   Traditional content field
   --------------------------------------------------------- */
.home-tile-flow {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 5rem;
  background: transparent;
}

.home-piece {
  width: 100%;
  padding-inline: 0 !important;
}

.home-piece + .home-piece {
  margin-top: clamp(4.5rem, 8vw, 8rem);
}

.home-piece--statement {
  padding-top: clamp(1rem, 2vw, 2rem);
}

.field-heading,
.field-heading--centered {
  width: min(720px, 100%);
  margin: 0 0 2rem;
  color: #082f67;
  text-align: left;
}

.field-heading .tile-kicker,
.field-heading--centered .tile-kicker {
  color: #174b8f;
}

.field-heading h2,
.field-heading--centered h2 {
  max-width: 10em;
  margin: 0;
  color: #082f67;
  font-size: clamp(2.7rem, 5vw, 5.3rem);
}

.content-tile,
.mahjong-step,
.photo-tile,
.signoff-piece {
  border-radius: 14px !important;
  box-shadow: 0 14px 34px rgba(18,54,94,.08) !important;
}

.content-tile {
  border: 1px solid rgba(23,75,143,.18) !important;
  background: rgba(255,253,248,.88) !important;
  padding: clamp(1.6rem, 4vw, 3.2rem) !important;
}

.content-tile::before {
  display: none !important;
}

.content-tile--statement,
.content-tile--reassurance,
.content-tile--ledger {
  width: min(900px, 100%) !important;
}

.content-tile--statement {
  text-align: left !important;
}

.gathering-tile-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.25rem;
  width: 100%;
}

.content-tile--offset-left,
.content-tile--offset-right,
.content-tile--offset-left-wide {
  width: 100% !important;
  justify-self: stretch !important;
}

.tile-symbol,
.content-tile__botanical,
.invitation-flower,
.atmosphere-piece,
.photo-tile__flower {
  opacity: .13 !important;
}

.about-object-pair {
  width: 100%;
  gap: clamp(2rem, 5vw, 5rem);
}

.photo-tile {
  border: 1px solid rgba(23,75,143,.16) !important;
  padding: 8px 8px 12px !important;
  background: #fffdf8 !important;
}

.content-tile--story {
  transform: none !important;
}

.step-piece-stack {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.25rem;
}

.mahjong-step {
  width: 100% !important;
  min-height: 0 !important;
  grid-template-columns: 48px 1fr !important;
  border: 1px solid rgba(23,75,143,.15) !important;
  background: #fffdf8 !important;
  padding: 1.4rem !important;
}

.mahjong-step::before { display: none !important; }

.mahjong-step__number {
  width: 42px !important;
  border: 0 !important;
  background: transparent !important;
  font-family: var(--sans) !important;
  font-size: .74rem !important;
  font-weight: 900;
  letter-spacing: .1em;
}

.photo-tile--wide {
  width: min(860px, 100%) !important;
  transform: none !important;
}

.photo-tile__surface--table {
  min-height: 380px;
  background: linear-gradient(145deg,#dce6ef,#f0dfd8 52%,#dce5d7) !important;
}

.field-link {
  margin-left: 0 !important;
  color: #174b8f !important;
  border-bottom-color: rgba(23,75,143,.28) !important;
}

.home-piece--signoff {
  color: #174b8f !important;
}

@media (max-width: 900px) {
  .home-photo-hero__grid {
    grid-template-columns: 1fr;
  }

  .home-photo-hero__copy {
    max-width: 680px;
  }

  .photo-shuffle-hero {
    width: min(500px, 92%);
    min-height: 570px;
    margin: 0 auto;
  }

  .gathering-tile-stack,
  .step-piece-stack {
    grid-template-columns: 1fr;
  }

  .about-object-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .home-photo-hero {
    width: calc(100% - 28px);
    padding: 2.8rem 0 4.4rem;
  }

  .home-photo-hero__grid {
    gap: 2.6rem;
  }

  .home-photo-hero h1 {
    max-width: 7.3em;
    font-size: clamp(3.45rem, 15vw, 5.1rem);
  }

  .home-photo-hero__intro {
    margin-top: 1.3rem;
    font-size: 1.05rem;
  }

  .home-photo-hero__actions {
    margin-top: 1.5rem;
  }

  .photo-shuffle-hero {
    width: 100%;
    min-height: 500px;
  }

  .photo-shuffle-hero__stack {
    inset-bottom: 60px;
  }

  .shuffle-photo {
    width: 78%;
    border-width: 7px;
    border-bottom-width: 32px;
  }

  .shuffle-photo__image {
    inset-bottom: 24px;
  }

  .shuffle-photo__hint {
    bottom: 7px;
  }

  .photo-shuffle-hero__control {
    right: 2px;
  }

  .home-tile-flow {
    width: calc(100% - 28px);
    padding-bottom: 4rem;
  }

  .home-piece + .home-piece {
    margin-top: 4.5rem;
  }

  .content-tile h2,
  .field-heading h2,
  .field-heading--centered h2 {
    font-size: clamp(2.55rem, 12vw, 3.75rem) !important;
  }

  .photo-tile__surface,
  .photo-tile__surface--table {
    min-height: 300px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shuffle-photo {
    transition: none !important;
  }
}
