/* Appily Twentyseven — homepage · Citrus Grove motion UI
   Same section layout; fresh orchard-atelier visual system. */

@keyframes ap27-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ap27-bloom {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes ap27-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-1.5%, 1%, 0) scale(1.04); }
}
@keyframes ap27-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ── Hero (2-col: visual + copy) ── */
.ts-hero {
  position: relative;
  padding: 40px 0 64px;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(213, 238, 227, .9) 0%, transparent 48%),
    linear-gradient(25deg, rgba(255, 244, 214, .65) 0%, transparent 40%),
    var(--ts-paper);
}
.ts-hero::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  right: -80px; top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 193, 75, .35), transparent 70%);
  pointer-events: none;
  animation: ap27-drift 14s ease-in-out infinite;
}
.ts-hero::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  left: -60px; bottom: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 107, 74, .18), transparent 70%);
  pointer-events: none;
  animation: ap27-drift 18s ease-in-out infinite reverse;
}
.ts-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}
.ts-hero-visual {
  position: relative;
  min-height: 440px;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  background: var(--ts-surface-2);
  box-shadow: var(--shadow);
  animation: ap27-bloom .8s var(--ease-out) both;
}
.ts-hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 42%),
    linear-gradient(to top, rgba(10, 31, 24, .28) 0%, transparent 45%);
}
.ts-hero-visual::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius);
  z-index: 2;
  pointer-events: none;
}
.ts-hero-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  max-height: 520px;
  min-height: 440px;
  animation: ap27-drift 16s ease-in-out infinite;
}
.ts-hero-copy {
  padding: 12px 0 12px 8px;
  animation: ap27-rise .75s var(--ease-out) .12s both;
}
.ts-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ts-grove-deep);
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(27, 107, 74, .2);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.ts-hero-kicker::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ts-wine);
  box-shadow: 0 0 0 4px rgba(224, 122, 47, .22);
}
.ts-hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.6vw, 3.35rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 0 0 28px;
  max-width: 14ch;
  background: linear-gradient(120deg, var(--ts-ink) 40%, var(--ts-grove) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ts-hero-copy .ts-btn { margin-top: 4px; }

/* ── Promo tiles (3-col) ── */
.ts-promo-tiles {
  padding: 28px 0 56px;
}
.ts-promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.ts-promo-tile {
  position: relative;
  aspect-ratio: 3/4;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ts-surface);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
  animation: ap27-rise .7s var(--ease-out) both;
}
.ts-promo-tile:nth-child(1) { animation-delay: .05s; }
.ts-promo-tile:nth-child(2) { animation-delay: .15s; }
.ts-promo-tile:nth-child(3) { animation-delay: .25s; }
.ts-promo-tile:hover {
  transform: translateY(-8px) rotate(-.4deg);
  box-shadow: var(--shadow);
}
.ts-promo-tile:nth-child(2):hover { transform: translateY(-8px) rotate(.4deg); }
.ts-promo-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease-out), filter .45s;
  filter: saturate(1.05);
}
.ts-promo-tile:hover img {
  transform: scale(1.1);
  filter: saturate(1.15) brightness(1.03);
}
.ts-promo-overlay {
  position: absolute;
  bottom: 18px; left: 18px; right: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: rgba(246, 251, 248, .88);
  border: 1px solid rgba(255, 255, 255, .65);
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 8px 24px rgba(10, 31, 24, .12);
  transform: translateY(4px);
  transition: transform .4s var(--ease-out);
}
.ts-promo-tile:hover .ts-promo-overlay { transform: translateY(0); }
.ts-promo-overlay h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}
.ts-promo-overlay span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ts-wine);
}
.ts-promo-overlay span::after {
  content: '→';
  transition: transform .3s var(--ease-out);
}
.ts-promo-tile:hover .ts-promo-overlay span::after {
  transform: translateX(4px);
}

/* ── Summer's Best (tabs + grid) ── */
.ts-featured {
  position: relative;
  padding: 64px 0 72px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(224, 122, 47, .08), transparent 70%),
    linear-gradient(180deg, transparent, rgba(227, 241, 233, .55) 40%, transparent);
}
.ts-featured h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -.02em;
  text-transform: none;
  margin: 0 0 8px;
}
.ts-featured h2::after {
  content: '';
  display: block;
  width: 56px; height: 4px;
  margin: 14px auto 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ts-grove), var(--ts-wine), var(--ts-gold));
  background-size: 200% 100%;
  animation: ap27-shimmer 3.5s linear infinite;
}
.ts-tabs {
  display: inline-flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 40px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .65);
  border: 1px solid var(--ts-line);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}
.ts-tab {
  padding: 11px 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ts-muted);
  cursor: pointer;
  transition: color .25s, background .25s, box-shadow .25s, transform .25s;
}
.ts-tab + .ts-tab { border-left: 0; }
.ts-tab.is-active {
  background: linear-gradient(135deg, var(--ts-grove) 0%, var(--ts-grove-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(27, 107, 74, .28);
}
.ts-tab:not(.is-active):hover {
  color: var(--ts-ink);
  background: var(--ts-surface);
}
.ts-tab-panel .ts-product-grid > .ts-product-card {
  animation: ap27-rise .55s var(--ease-out) both;
}
.ts-tab-panel .ts-product-grid > .ts-product-card:nth-child(1) { animation-delay: .04s; }
.ts-tab-panel .ts-product-grid > .ts-product-card:nth-child(2) { animation-delay: .08s; }
.ts-tab-panel .ts-product-grid > .ts-product-card:nth-child(3) { animation-delay: .12s; }
.ts-tab-panel .ts-product-grid > .ts-product-card:nth-child(4) { animation-delay: .16s; }
.ts-tab-panel .ts-product-grid > .ts-product-card:nth-child(5) { animation-delay: .2s; }
.ts-tab-panel .ts-product-grid > .ts-product-card:nth-child(6) { animation-delay: .24s; }
.ts-tab-panel .ts-product-grid > .ts-product-card:nth-child(7) { animation-delay: .28s; }
.ts-tab-panel .ts-product-grid > .ts-product-card:nth-child(8) { animation-delay: .32s; }

/* ── Info strip ── */
.ts-info-strip {
  position: relative;
  padding: 28px 0;
  border: 0;
  background:
    linear-gradient(110deg, var(--ts-grove-deep), var(--ts-grove) 45%, #2A8A5C 70%, var(--ts-wine));
  background-size: 220% 100%;
  animation: ap27-shimmer 10s ease-in-out infinite alternate;
  color: #fff;
  overflow: hidden;
}
.ts-info-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 50%, rgba(240, 193, 75, .22), transparent 35%),
    radial-gradient(circle at 85% 50%, rgba(255, 255, 255, .12), transparent 40%);
  pointer-events: none;
}
.ts-info-strip-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 20px 40px;
  flex-wrap: wrap;
  font-size: 13px;
  text-align: center;
}
.ts-info-strip-inner > div {
  flex: 1 1 160px;
  max-width: 220px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(4px);
  transition: transform .35s var(--ease-out), background .3s;
}
.ts-info-strip-inner > div:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .14);
}
.ts-info-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -.01em;
}
.ts-info-strip span {
  opacity: .85;
  font-size: 12px;
}

@media (max-width: 900px) {
  .ts-hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .ts-hero-visual { min-height: 300px; order: -1; }
  .ts-hero-visual img { min-height: 300px; max-height: 380px; }
  .ts-hero-copy { padding: 0; text-align: center; }
  .ts-hero-copy h1 { max-width: none; margin-left: auto; margin-right: auto; }
  .ts-promo-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .ts-promo-tile:hover,
  .ts-promo-tile:nth-child(2):hover { transform: translateY(-6px); }
}
@media (max-width: 560px) {
  .ts-tabs {
    width: 100%;
    flex-wrap: wrap;
    border-radius: var(--radius-sm);
  }
  .ts-tab { flex: 1; min-width: 100px; }
  .ts-hero { padding: 28px 0 40px; }
  .ts-featured { padding: 48px 0 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .ts-hero::before,
  .ts-hero::after,
  .ts-hero-visual,
  .ts-hero-visual img,
  .ts-hero-copy,
  .ts-promo-tile,
  .ts-featured h2::after,
  .ts-info-strip,
  .ts-tab-panel .ts-product-grid > .ts-product-card {
    animation: none !important;
  }
  .ts-promo-tile:hover,
  .ts-product-card:hover { transform: none; }
}
