/*--------------------------------------------------------------
# Tunas Muda Luxury — cinematic UI & motion
# Light theme only · Plus Jakarta Sans · adaptive
--------------------------------------------------------------*/

.tm-luxury {
  --tm-lux-glow: rgba(255, 199, 54, 0.38);
  --tm-lux-spotlight: rgba(255, 199, 54, 0.12);
  --tm-lux-nav-bg: rgba(255, 255, 255, 0.92);
  --tm-lux-card-bg: var(--tm-white);
}

/*--------------------------------------------------------------
# Tunas Muda Luxury — section rhythm & spacing
--------------------------------------------------------------*/

/* —— Section spacing system —— */
.tm-luxury .main > .section:not(.tm-hero) {
  padding-top: clamp(3.5rem, 6.5vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 6.5vw, 5.5rem);
  scroll-margin-top: calc(var(--tm-header-h) + 1rem);
}

.tm-luxury .tm-hero + .section {
  padding-top: clamp(4rem, 7vw, 5.75rem);
}

.tm-luxury .section > .container {
  padding-left: clamp(1rem, 4vw, 1.5rem);
  padding-right: clamp(1rem, 4vw, 1.5rem);
}

.tm-luxury .section > .container + .container {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

/* Fix main.css 60px section-title padding stacking */
.tm-luxury .section .section-title {
  padding-bottom: 0 !important;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  max-width: 680px;
}

.tm-luxury .section .section-title h2 {
  margin-bottom: 0.85rem;
}

.tm-luxury .section .section-title p {
  margin-top: 0;
  max-width: 54ch;
  margin-left: auto;
  margin-right: auto;
}

/* Inner content blocks — breathing room */
.tm-luxury .pencapaian-stats {
  margin-bottom: 0;
}

.tm-luxury .pencapaian-highlights {
  margin-top: 0;
}

.tm-luxury .pencapaian-full-list {
  margin-top: clamp(2rem, 4vw, 2.75rem) !important;
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--tm-border);
}

.tm-luxury .berita-featured {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.tm-luxury .berita-peristiwa-cta {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(0.5rem, 2vw, 1rem);
}

.tm-luxury .services-swiper {
  margin-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Story section — align with section rhythm */
.tm-luxury .tm-story {
  padding-top: clamp(3.5rem, 6.5vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 6.5vw, 5.5rem);
}

.tm-luxury .tm-story > .container {
  max-width: min(1140px, 100% - 2rem);
}

.tm-luxury .tm-story__wrap {
  gap: clamp(2rem, 4vw, 3rem);
}

/* CTA band inside its own section panel */
.tm-luxury .tm-cta-band {
  padding-top: clamp(3rem, 5.5vw, 4.5rem);
  padding-bottom: clamp(3.5rem, 6vw, 5rem);
}

.tm-luxury .tm-cta-band > .container {
  padding-left: clamp(1rem, 4vw, 1.5rem);
  padding-right: clamp(1rem, 4vw, 1.5rem);
}

/* Dark sections — content inset */
.tm-luxury .services-slider .section-title,
.tm-luxury .visi-dasar-kualiti .container {
  padding-left: clamp(1rem, 4vw, 1.5rem);
  padding-right: clamp(1rem, 4vw, 1.5rem);
}

.tm-luxury .visi-dasar-kualiti .row {
  --bs-gutter-x: clamp(1.25rem, 3vw, 2rem);
  --bs-gutter-y: clamp(1.25rem, 3vw, 2rem);
}

@media (max-width: 767px) {
  .tm-luxury .main > .section:not(.tm-hero) {
    padding-top: clamp(2.75rem, 8vw, 3.5rem);
    padding-bottom: clamp(2.75rem, 8vw, 3.5rem);
  }

  .tm-luxury .section .section-title {
    margin-bottom: 1.75rem;
  }

  .tm-luxury .section > .container + .container {
    margin-top: 1.25rem;
  }

  .tm-luxury .tm-hero__glass {
    max-width: 100%;
  }

  .tm-luxury .tm-hero__scroll-hint {
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }
}

/* —— Skip link —— */
.tm-skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 100050;
  padding: 0.75rem 1.25rem;
  border-radius: var(--tm-radius-pill);
  background: var(--tm-navy-deep);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  box-shadow: var(--tm-shadow-lg);
  transition: top 0.2s ease;
}

.tm-skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--tm-gold);
  outline-offset: 3px;
}

/* —— Floating section nav —— */
.tm-float-nav {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 9990;
  display: none;
  padding: 0.6rem 0.4rem;
  border-radius: var(--tm-radius-pill);
  background: var(--tm-lux-nav-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--tm-border);
  box-shadow: var(--tm-shadow);
  transition: opacity 0.35s ease, transform 0.35s var(--tm-ease);
}

.tm-float-nav.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(12px);
}

@media (min-width: 1200px) {
  .tm-luxury.index-page .tm-float-nav {
    display: block;
  }
}

.tm-float-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tm-float-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--tm-radius-pill);
  text-decoration: none;
  color: var(--tm-text-muted);
  font-size: 0;
  transition: color 0.2s ease, background 0.2s ease;
}

.tm-float-nav a::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  flex-shrink: 0;
  transition: transform 0.25s var(--tm-ease-spring), opacity 0.2s ease, background 0.2s ease;
}

.tm-float-nav a:hover,
.tm-float-nav a:focus-visible {
  color: var(--tm-navy);
  background: var(--tm-surface-2);
}

.tm-float-nav a.is-active {
  color: var(--tm-navy);
}

.tm-float-nav a.is-active::before {
  opacity: 1;
  background: var(--tm-gold);
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--tm-lux-glow);
}

.tm-float-nav a span {
  position: absolute;
  right: calc(100% + 0.65rem);
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: var(--tm-navy-deep);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tm-float-nav a:hover span,
.tm-float-nav a:focus-visible span {
  opacity: 1;
  transform: none;
}

/* —— Hero — static background —— */
.tm-luxury .tm-hero__bg img {
  will-change: auto;
  transition: none;
}

.tm-luxury .tm-hero__ambient-shapes {
  transform: none !important;
}

/* —— Hero enhancements —— */

.tm-luxury .tm-hero__scroll-hint {
  position: absolute;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, transform 0.2s ease;
}

.tm-luxury .tm-hero__scroll-hint:hover,
.tm-luxury .tm-hero__scroll-hint:focus-visible {
  color: rgba(255, 255, 255, 0.92);
  outline: none;
}

.tm-luxury .tm-hero__scroll-hint:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 199, 54, 0.55);
  border-radius: 8px;
}

.tm-luxury .tm-hero__scroll-hint i {
  font-size: 1.15rem;
  animation: tmScrollBounce 2.2s ease-in-out infinite;
}

@keyframes tmScrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(5px); opacity: 1; }
}

@media (max-height: 720px) {
  .tm-luxury .tm-hero__scroll-hint {
    display: none;
  }
}

.tm-luxury .tm-hero__glass {
  position: relative;
  transform-style: preserve-3d;
  perspective: 1200px;
}

.tm-luxury .tm-hero__glass-inner {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
}

/* —— Story section —— */
.tm-story {
  position: relative;
  overflow: visible;
}

.tm-story > .container {
  overflow: visible;
}

.tm-story__wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 768px) {
  .tm-story__wrap {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: clamp(1.75rem, 3.5vw, 3rem);
  }

  .tm-story__intro {
    position: sticky;
    top: calc(var(--tm-header-h) + 1.5rem);
  }

  .tm-story__lead {
    max-width: none;
  }
}

@media (min-width: 992px) {
  .tm-story__wrap {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }
}

.tm-story__intro {
  position: static;
  top: calc(var(--tm-header-h) + 2rem);
}

.tm-story__intro .tm-section-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tm-gold-deep);
}

.tm-story__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--tm-navy);
  margin: 0 0 1rem;
  line-height: 1.15;
}

.tm-story__lead {
  color: var(--tm-text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 1.75rem;
  max-width: 42ch;
}

.tm-story__progress {
  height: 3px;
  border-radius: 99px;
  background: var(--tm-surface-2);
  overflow: hidden;
}

.tm-story__progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tm-navy), var(--tm-gold));
  transition: width 0.12s linear;
}

.tm-story__timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 0;
}

@media (min-width: 768px) {
  .tm-story__timeline {
    padding-left: 1.35rem;
    margin-left: 0.35rem;
    border-left: 2px solid var(--tm-surface-2);
    overflow: visible;
  }
}

.tm-story__chapter {
  position: relative;
  padding: clamp(1.35rem, 3vw, 1.75rem) clamp(1.35rem, 3vw, 1.85rem);
  border-radius: var(--tm-radius-lg);
  background: var(--tm-lux-card-bg);
  border: 1px solid var(--tm-border);
  box-shadow: var(--tm-shadow-sm);
  overflow: hidden;
  transition:
    transform 0.35s var(--tm-ease),
    box-shadow 0.35s var(--tm-ease),
    border-color 0.3s ease,
    opacity 0.35s ease;
}

@media (min-width: 768px) {
  .tm-story__chapter::after {
    content: "";
    position: absolute;
    left: calc(-1.35rem - 5px);
    top: 1.65rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tm-surface-2);
    border: 2px solid var(--tm-white);
    box-shadow: 0 0 0 2px var(--tm-surface-2);
    transition: background 0.3s ease, box-shadow 0.3s ease;
  }

  .tm-story__chapter.is-active::after {
    background: var(--tm-gold);
    box-shadow: 0 0 0 2px var(--tm-gold-soft), 0 0 12px var(--tm-lux-glow);
  }
}

.tm-story__chapter.is-active {
  border-color: rgba(255, 199, 54, 0.35);
  box-shadow: var(--tm-shadow);
}

.tm-story__year {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--tm-radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tm-gold-deep);
  background: var(--tm-gold-soft);
}

.tm-story__chapter h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tm-navy);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.tm-story__chapter p {
  margin: 0;
  color: var(--tm-text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.tm-story__chapter .tm-story__stat {
  display: inline-flex;
  margin-top: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--tm-radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tm-navy);
  background: var(--tm-surface-2);
}

/* —— Card spotlight —— */
.tm-luxury .partner-card,
.tm-luxury .pencapaian-card,
.tm-luxury .berita-item,
.tm-luxury .media-embed-card {
  background: var(--tm-lux-card-bg);
  position: relative;
  overflow: hidden;
}

.tm-luxury .partner-card::after,
.tm-luxury .pencapaian-card::after,
.tm-luxury .berita-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px circle at var(--card-x, 50%) var(--card-y, 50%),
    var(--tm-lux-spotlight),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.tm-luxury .partner-card:hover::after,
.tm-luxury .pencapaian-card:hover::after,
.tm-luxury .berita-item:hover::after {
  opacity: 1;
}

.tm-luxury [data-tilt] {
  will-change: transform;
}

/* —— Conversion CTA —— */
.tm-cta-band {
  position: relative;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  overflow: hidden;
}

.tm-cta-band__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 2.75rem);
  border-radius: var(--tm-radius-lg);
  background: linear-gradient(145deg, var(--tm-navy-deep) 0%, var(--tm-navy-soft) 100%);
  border: 1px solid rgba(255, 199, 54, 0.22);
  box-shadow: 0 20px 60px rgba(29, 54, 92, 0.22);
  color: #fff;
}

.tm-cta-band__inner h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  color: #fff;
}

.tm-cta-band__inner p {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
  font-size: 1rem;
}

.tm-cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.tm-cta-band__glow {
  position: absolute;
  width: 50%;
  height: 50%;
  top: 25%;
  left: 25%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 199, 54, 0.14), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  animation: tmCtaGlow 8s ease-in-out infinite;
}

@keyframes tmCtaGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, -4%) scale(1.08); }
}

/* —— Page transition —— */
.tm-page-transition {
  position: fixed;
  inset: 0;
  z-index: 100040;
  background: var(--tm-navy-deep);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.tm-page-transition.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.tm-page-transition__logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 56px;
  opacity: 0;
  transition: opacity 0.3s ease 0.1s, transform 0.4s var(--tm-ease);
}

.tm-page-transition.is-active .tm-page-transition__logo {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@supports (view-transition-name: none) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.4s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* —— Performance tiers —— */
.tm-perf-minimal .tm-hero__scroll-hint {
  display: none;
}

.tm-perf-lite .tm-float-nav,
.tm-perf-minimal .tm-float-nav {
  display: none !important;
}

.tm-perf-lite .partner-card::after,
.tm-perf-lite .pencapaian-card::after,
.tm-perf-lite .berita-item::after,
.tm-perf-minimal .partner-card::after,
.tm-perf-minimal .pencapaian-card::after,
.tm-perf-minimal .berita-item::after {
  display: none;
}

.tm-perf-lite .tm-cta-band__glow,
.tm-perf-minimal .tm-cta-band__glow {
  display: none;
}

/* —— Reduced motion —— */
@media (prefers-reduced-motion: reduce) {
  .tm-luxury .tm-hero__scroll-hint i {
    animation: none;
  }

  .tm-cta-band__glow {
    animation: none;
  }

  .tm-float-nav a span {
    display: none;
  }
}

@media (max-width: 767px) {
  .tm-story__intro {
    position: static;
  }
}

/* —— Tablet: 768px – 1199px —— */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .tm-luxury .tm-hero {
    padding-bottom: 3.5rem;
  }

  .tm-luxury .tm-hero__glass {
    max-width: min(520px, 46vw);
  }

  .tm-luxury .tm-hero__title {
    font-size: clamp(2rem, 4.8vw, 2.75rem);
    max-width: none;
  }

  .tm-luxury .tm-hero__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    max-width: 100%;
  }

  .tm-luxury .tm-stat-pill {
    padding: 0.85rem 0.65rem;
  }

  .tm-luxury .tm-stat-pill strong {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
  }

  .tm-luxury .tm-stat-pill span {
    font-size: 0.62rem;
    line-height: 1.35;
  }

  .tm-luxury .pencapaian-stat {
    padding: 1.35rem 0.85rem;
  }

  .tm-luxury .pencapaian-stat-value {
    font-size: clamp(1.2rem, 2.8vw, 1.65rem);
  }

  .tm-luxury .pencapaian-stat-label {
    font-size: 0.68rem;
  }

  .tm-luxury .pencapaian-card {
    padding: 1.35rem 1.15rem 1.15rem;
  }

  .tm-luxury .pencapaian-card h3 {
    font-size: 0.92rem;
    line-height: 1.35;
    padding-right: 2.5rem;
  }

  .tm-luxury .berita-featured__content {
    padding: 1.5rem;
  }

  .tm-luxury .media-embed-card {
    margin-bottom: 0;
  }

  .tm-luxury .visi-dasar-kualiti-card,
  .tm-luxury .visi-dasar-kualiti-media {
    margin-bottom: 0;
  }

  .tm-luxury .section > .container {
    padding-left: clamp(1.25rem, 3vw, 2rem);
    padding-right: clamp(1.25rem, 3vw, 2rem);
  }
}

/* Touch devices — no stuck card transforms */
@media (hover: none), (pointer: coarse) {
  .tm-luxury .partner-card,
  .tm-luxury .pencapaian-card,
  .tm-luxury .berita-item,
  .tm-luxury .berita-featured,
  .tm-luxury .tm-story__chapter,
  .tm-luxury [data-tilt] {
    transform: none !important;
  }

  .tm-luxury .tm-story__chapter {
    opacity: 1 !important;
  }
}
