/* Appily Fifty-One homepage — Plot Studio (unique living-plot layout) */

.page-home-plot {
  --plot-ink: #10241c;
  --plot-field: #d5ebe0;
  --plot-paper: #f4faf6;
  --plot-seed: #e8a526;
  --plot-seed-deep: #c48712;
  --plot-teal: #0d6e6a;
  --plot-teal-deep: #095450;
  --plot-mist: rgba(16, 36, 28, 0.55);
  --a51-font-display: 'Bricolage Grotesque', Georgia, serif;
  --a51-font-sans: 'Figtree', system-ui, sans-serif;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(232, 165, 38, 0.12), transparent 42%),
    radial-gradient(ellipse at 88% 18%, rgba(13, 110, 106, 0.1), transparent 40%),
    var(--plot-paper);
  color: var(--plot-ink);
}

.page-home-plot h1,
.page-home-plot h2,
.page-home-plot h3 {
  font-family: var(--a51-font-display);
  letter-spacing: -0.03em;
}

.page-home-plot .a51-btn-seed {
  background: var(--plot-seed);
  color: var(--plot-ink);
  border-color: var(--plot-seed);
  border-radius: 999px;
  font-weight: 800;
}
.page-home-plot .a51-btn-seed:hover {
  background: #fff;
  border-color: #fff;
  color: var(--plot-ink);
  transform: translateY(-2px);
}
.page-home-plot .a51-btn-ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
}
.page-home-plot .a51-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}
.page-home-plot .a51-btn-cart {
  background: var(--plot-teal);
  border-radius: 12px;
}
.page-home-plot .a51-btn-cart:hover {
  background: var(--plot-teal-deep);
  color: var(--plot-seed);
}
.page-home-plot .a51-price-row strong {
  color: var(--plot-teal-deep);
}

.a51-plot-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--plot-teal);
}

.a51-plot-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2rem;
}
.a51-plot-head h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  color: var(--plot-ink);
  max-width: 16ch;
}
.a51-plot-head > p {
  margin: 0;
  color: #4d6358;
  font-size: 1rem;
  max-width: 34rem;
}
.a51-plot-head--light h2 { color: #fff; }
.a51-plot-head--light .a51-plot-kicker { color: var(--plot-seed); }

/* ——— Full-bleed hero ——— */
.a51-plot-hero {
  position: relative;
  min-height: min(100svh, 880px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.a51-plot-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.a51-plot-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform: scale(1.06);
  animation: a51HeroDrift 18s ease-in-out infinite alternate;
}
.a51-plot-hero-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(8, 28, 22, 0.88) 0%, rgba(8, 28, 22, 0.55) 42%, rgba(8, 28, 22, 0.18) 72%, rgba(8, 28, 22, 0.35) 100%),
    linear-gradient(0deg, rgba(8, 28, 22, 0.55) 0%, transparent 42%);
}
.a51-plot-hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  animation: a51GrainShift 7s steps(2) infinite;
}
.a51-plot-hero-inner {
  position: relative;
  z-index: 3;
  padding: 8.5rem 0 5.5rem;
  max-width: 42rem;
}
.a51-plot-brand {
  margin: 0 0 1.1rem;
  font-family: var(--a51-font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--plot-seed);
  animation: a51RiseIn 0.9s ease both;
}
.a51-plot-hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 0.98;
  max-width: 11ch;
  animation: a51RiseIn 1s ease 0.08s both;
}
.a51-plot-lede {
  margin: 0 0 1.75rem;
  max-width: 32rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  animation: a51RiseIn 1s ease 0.16s both;
}
.a51-plot-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: a51RiseIn 1s ease 0.24s both;
}
.a51-plot-hero-slant {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 4;
  height: 72px;
  background: var(--plot-paper);
  clip-path: polygon(0 48%, 100% 0, 100% 100%, 0 100%);
}

@keyframes a51HeroDrift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.5%, 1%, 0); }
}
@keyframes a51GrainShift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-1%, 1%); }
}
@keyframes a51RiseIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ——— Featured spotlight ——— */
.a51-spotlight {
  padding: 1rem 0 4.5rem;
}
.a51-spotlight-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr 0.85fr;
  gap: 1.5rem;
  align-items: stretch;
}
.a51-spotlight-copy {
  align-self: end;
  padding-bottom: 1rem;
}
.a51-spotlight-copy h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  max-width: 10ch;
}
.a51-spotlight-copy > p {
  margin: 0;
  color: #4d6358;
  max-width: 22rem;
}
.a51-spotlight-lead {
  position: relative;
  display: block;
  min-height: 420px;
  overflow: hidden;
  border-radius: 28px 8px 28px 8px;
  background: #17352b;
  box-shadow: 0 28px 60px rgba(16, 36, 28, 0.18);
  transition: transform 0.35s ease;
}
.a51-spotlight-lead:hover { transform: translateY(-4px); }
.a51-spotlight-lead img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.a51-spotlight-lead:hover img { transform: scale(1.05); }
.a51-spotlight-lead-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.4rem 1.35rem 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(8, 28, 22, 0.92));
  color: #fff;
}
.a51-spotlight-lead-meta .a51-plot-kicker { color: var(--plot-seed); }
.a51-spotlight-lead-meta h3 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  color: #fff;
}
.a51-spotlight-lead-meta .a51-price-row strong { color: var(--plot-seed); }
.a51-spotlight-lead-meta .a51-price-row s { color: rgba(255, 255, 255, 0.55); }

.a51-spotlight-rail {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.a51-spotlight-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.65rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(13, 110, 106, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}
.a51-spotlight-row:hover {
  background: #fff;
  transform: translateX(4px);
}
.a51-spotlight-row img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
}
.a51-spotlight-row h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-family: var(--a51-font-sans);
  font-weight: 700;
}

/* ——— Horizontal seed tray ——— */
.a51-tray {
  padding: 1rem 0 4.5rem;
  overflow: hidden;
}
.a51-tray-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.35rem;
}
.a51-tray-tab {
  appearance: none;
  border: 1px solid rgba(13, 110, 106, 0.22);
  background: transparent;
  color: var(--plot-ink);
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  font-family: var(--a51-font-sans);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: 0.2s ease;
}
.a51-tray-tab.is-active,
.a51-tray-tab:hover {
  background: var(--plot-ink);
  border-color: var(--plot-ink);
  color: var(--plot-seed);
}
.a51-tray-panel { display: none; }
.a51-tray-panel.is-active { display: block; }
.a51-tray-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 1rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--plot-teal) transparent;
}
.a51-tray-cell {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(16, 36, 28, 0.08);
  box-shadow: 0 14px 36px rgba(16, 36, 28, 0.08);
  transition: transform 0.25s ease;
}
.a51-tray-cell:hover { transform: translateY(-5px); }
.a51-tray-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(160deg, #cfe6da, #a9d0c0);
}
.a51-tray-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.a51-tray-cell:hover .a51-tray-media img { transform: scale(1.06); }
.a51-tray-body {
  padding: 0.95rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.a51-tray-group {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plot-teal);
}
.a51-tray-body h3 {
  margin: 0;
  font-size: 0.98rem;
  font-family: var(--a51-font-sans);
  font-weight: 700;
}
.a51-tray-more {
  margin: 1.25rem 0 0;
  text-align: right;
}
.a51-tray-more a {
  font-weight: 800;
  color: var(--plot-teal-deep);
}
.a51-tray-more a:hover { color: var(--plot-seed-deep); }

/* ——— Pulse / why band ——— */
.a51-pulse {
  position: relative;
  padding: 4.25rem 0;
  background:
    linear-gradient(135deg, #0c2f27 0%, #0d6e6a 48%, #163d32 100%);
  color: #fff;
  overflow: hidden;
}
.a51-pulse::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 165, 38, 0.28), transparent 68%);
  animation: a51PulseGlow 6s ease-in-out infinite;
}
.a51-pulse-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  position: relative;
  z-index: 1;
}
.a51-pulse-beat {
  padding: 1.35rem 1.2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  transform: translateY(calc((var(--beat) - 1) * 12px));
  transition: transform 0.3s ease, background 0.3s ease;
}
.a51-pulse-beat:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(calc((var(--beat) - 1) * 12px - 4px));
}
.a51-pulse-num {
  display: block;
  font-family: var(--a51-font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--plot-seed);
  line-height: 1;
  margin-bottom: 0.85rem;
}
.a51-pulse-beat h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  color: #fff;
}
.a51-pulse-beat p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
}
@keyframes a51PulseGlow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* ——— Mosaic best sellers ——— */
.a51-mosaic {
  padding: 4.5rem 0;
}
.a51-mosaic-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 1rem;
}
.a51-mosaic-cell {
  display: grid;
  grid-template-rows: 1fr auto;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(16, 36, 28, 0.08);
  box-shadow: 0 16px 40px rgba(16, 36, 28, 0.07);
}
.a51-mosaic-cell--wide {
  grid-column: span 2;
}
.a51-mosaic-media {
  display: block;
  min-height: 180px;
  overflow: hidden;
  background: #cfe6da;
}
.a51-mosaic-cell--wide .a51-mosaic-media { min-height: 260px; }
.a51-mosaic-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.a51-mosaic-cell:hover .a51-mosaic-media img { transform: scale(1.05); }
.a51-mosaic-body {
  padding: 0.95rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.a51-mosaic-body h3 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--a51-font-sans);
  font-weight: 700;
}

/* ——— Image-led lanes ——— */
.a51-lanes {
  padding: 0 0 5rem;
}
.a51-lane-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.a51-lane {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 1.1rem;
  align-items: center;
  padding: 0.55rem 1rem 0.55rem 0.55rem;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(16, 36, 28, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.a51-lane:nth-child(even) {
  background: linear-gradient(90deg, rgba(13, 110, 106, 0.08), #fff 42%);
}
.a51-lane:hover {
  transform: translateX(6px);
  box-shadow: 0 18px 40px rgba(16, 36, 28, 0.1);
}
.a51-lane-visual {
  width: 160px;
  height: 110px;
  border-radius: 16px;
  overflow: hidden;
  background: #cfe6da;
}
.a51-lane-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.a51-lane-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plot-teal);
  margin-bottom: 0.25rem;
}
.a51-lane-copy strong {
  display: block;
  font-family: var(--a51-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.a51-lane-meta {
  display: block;
  color: #4d6358;
  font-size: 0.88rem;
}
.a51-lane-go {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--plot-field);
  color: var(--plot-ink);
  font-size: 1.2rem;
  transition: 0.2s ease;
}
.a51-lane:hover .a51-lane-go {
  background: var(--plot-seed);
}

/* Reveal motion */
.a51-spotlight,
.a51-tray,
.a51-pulse,
.a51-mosaic,
.a51-lanes {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.a51-spotlight.is-inview,
.a51-tray.is-inview,
.a51-pulse.is-inview,
.a51-mosaic.is-inview,
.a51-lanes.is-inview {
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  .a51-spotlight-grid {
    grid-template-columns: 1fr 1fr;
  }
  .a51-spotlight-copy { grid-column: 1 / -1; }
  .a51-mosaic-board { grid-template-columns: repeat(2, 1fr); }
  .a51-pulse-list { grid-template-columns: 1fr 1fr; }
  .a51-pulse-beat { transform: none; }
  .a51-pulse-beat:hover { transform: translateY(-4px); }
}

@media (max-width: 760px) {
  .a51-plot-head { grid-template-columns: 1fr; }
  .a51-spotlight-grid { grid-template-columns: 1fr; }
  .a51-spotlight-lead { min-height: 340px; }
  .a51-plot-hero-inner { padding: 7rem 0 4.5rem; }
  .a51-pulse-list { grid-template-columns: 1fr; }
  .a51-mosaic-board { grid-template-columns: 1fr; }
  .a51-mosaic-cell--wide { grid-column: auto; }
  .a51-lane {
    grid-template-columns: 96px 1fr;
    padding-right: 0.75rem;
  }
  .a51-lane-visual { width: 96px; height: 96px; }
  .a51-lane-go { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .a51-plot-hero-media img,
  .a51-plot-hero-grain,
  .a51-pulse::before,
  .a51-plot-brand,
  .a51-plot-hero h1,
  .a51-plot-lede,
  .a51-plot-cta {
    animation: none !important;
  }
  .a51-spotlight,
  .a51-tray,
  .a51-pulse,
  .a51-mosaic,
  .a51-lanes {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
