/**
 * TRISTA MEDIA — base styles (mobile-first)
 * Tema: data-theme="dark" | "light" pada <html>
 */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-surface-elevated: #1c1c1c;
  --color-primary: #f58220;
  --color-secondary: #c52b75;
  --color-text: #f5f5f5;
  --color-text-muted: #a3a3a3;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-header-bg: rgba(10, 10, 10, 0.85);
  --color-hero-glow-1: rgba(245, 130, 32, 0.18);
  --color-hero-glow-2: rgba(197, 43, 117, 0.14);
  --color-cta-overlay: rgba(245, 130, 32, 0.08);
  --color-drawer-backdrop: rgba(0, 0, 0, 0.6);
  --gradient-brand: linear-gradient(135deg, #f58220 0%, #c52b75 100%);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 32px rgba(245, 130, 32, 0.15);
  --product-accent: var(--color-primary);
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-hero: clamp(1.75rem, 5vw + 1rem, 3rem);
  --text-xl: clamp(1.25rem, 2vw + 0.9rem, 1.5rem);
  --text-lg: clamp(1.0625rem, 1vw + 0.9rem, 1.25rem);
  --text-base: clamp(0.9375rem, 0.5vw + 0.875rem, 1rem);
  --container-pad: 1.25rem;
  --header-height: 56px;
}

[data-theme="light"] {
  color-scheme: light;
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-surface-elevated: #f3f4f6;
  --color-primary: #e06f10;
  --color-secondary: #b82465;
  --color-text: #1a1a2e;
  --color-text-muted: #5c5c6e;
  --color-border: rgba(0, 0, 0, 0.1);
  --color-header-bg: rgba(250, 248, 245, 0.9);
  --color-hero-glow-1: rgba(245, 130, 32, 0.12);
  --color-hero-glow-2: rgba(197, 43, 117, 0.08);
  --color-cta-overlay: rgba(245, 130, 32, 0.06);
  --color-drawer-backdrop: rgba(0, 0, 0, 0.35);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 32px rgba(245, 130, 32, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: #ffa04d;
}

.tm-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.tm-section {
  padding-block: 3rem;
}

.tm-section--hero {
  padding-block: 2.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.tm-section--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, var(--color-hero-glow-1), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 20%, var(--color-hero-glow-2), transparent 55%);
  pointer-events: none;
}

.tm-section__title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.25;
}

.tm-section__lead {
  color: var(--color-text-muted);
  max-width: 65ch;
  margin: 0 0 1.5rem;
}

/* Header */
.tm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--color-header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding-top: env(safe-area-inset-top, 0);
  transition: background-color var(--transition-base), border-color var(--transition-base);
}

.tm-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.tm-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: transform var(--transition-base), border-color var(--transition-base), background-color var(--transition-base);
}

.tm-theme-toggle:active {
  transform: scale(0.96);
}

.tm-theme-toggle__icon {
  font-size: 1.125rem;
  line-height: 1;
}

.tm-theme-toggle--drawer {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-width: 44px;
  padding: 0 0.875rem;
  gap: 0.5rem;
}

.tm-theme-toggle__text {
  font-size: 0.875rem;
  font-weight: 500;
}

.tm-nav-drawer__theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.tm-nav-drawer__theme-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

[data-theme="dark"] .tm-theme-toggle__icon--moon,
[data-theme="light"] .tm-theme-toggle__icon--sun {
  display: none;
}

[data-theme="dark"] .tm-theme-toggle__icon--sun,
[data-theme="light"] .tm-theme-toggle__icon--moon {
  display: inline;
}

.tm-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.tm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.tm-brand:hover {
  color: var(--color-text);
}

.tm-brand__logo {
  width: 36px;
  height: auto;
  flex-shrink: 0;
}

.tm-brand__text--short {
  display: inline;
}

.tm-brand__text--full {
  display: none;
}

.tm-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.tm-nav-toggle:active {
  transform: scale(0.96);
}

.tm-nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin: 3px 0;
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.tm-nav {
  display: none;
}

.tm-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

.tm-nav-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.tm-nav-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: var(--color-drawer-backdrop);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.tm-nav-drawer.is-open .tm-nav-drawer__backdrop {
  opacity: 1;
}

.tm-nav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(18rem, 88vw);
  height: 100%;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1.25rem 1.5rem;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
}

.tm-nav-drawer.is-open .tm-nav-drawer__panel {
  transform: translateX(0);
}

.tm-nav-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.tm-nav-drawer__list,
.tm-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tm-nav-drawer__list a,
.tm-nav__list a {
  display: block;
  padding: 0.75rem 0;
  color: var(--color-text);
  font-size: 1.0625rem;
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
  min-height: 44px;
}

.tm-nav-drawer__list a:hover,
.tm-nav__list a:hover {
  color: var(--color-primary);
}

/* Hero */
.tm-hero {
  position: relative;
  z-index: 1;
}

.tm-hero__layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tm-hero__content {
  min-width: 0;
}

.tm-hero__media {
  width: 100%;
  min-width: 0;
}

.tm-hero__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.tm-hero__image--logo {
  aspect-ratio: auto;
  object-fit: contain;
  max-height: 10rem;
  box-shadow: none;
  border: none;
}

.tm-hero__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid rgba(245, 130, 32, 0.35);
  background: rgba(245, 130, 32, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.tm-hero__title {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.tm-hero__subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 42ch;
  margin: 0 0 1.5rem;
}

.tm-hero__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 1.25rem;
}

/* Buttons */
.tm-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: transform var(--transition-base), opacity var(--transition-base), box-shadow var(--transition-base);
}

.tm-btn:active {
  transform: scale(0.98);
}

.tm-btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 20px rgba(197, 43, 117, 0.25);
}

.tm-btn--primary:hover {
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.tm-btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.tm-btn--secondary:hover {
  border-color: rgba(245, 130, 32, 0.5);
  color: var(--color-primary);
}

.tm-btn--block {
  width: 100%;
}

/* Product cards */
.tm-product-grid {
  display: grid;
  gap: 1.25rem;
}

.tm-product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background-color var(--transition-base);
}

.tm-product-card:active {
  transform: scale(0.99);
}

.tm-product-card__logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 1rem;
  background: #fff;
  padding: 6px;
}

.tm-product-card__name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.tm-product-card__tagline {
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.tm-product-card__desc {
  color: var(--color-text-muted);
  margin: 0 0 1rem;
}

.tm-product-card__features {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.tm-product-card__features li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.tm-product-card__features li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-secondary);
}

/* Feature cards */
.tm-feature-grid {
  display: grid;
  gap: 1rem;
}

.tm-feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.tm-feature-card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.tm-feature-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.tm-feature-card__text {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.9375rem;
}

/* Audience */
.tm-audience-grid {
  display: grid;
  gap: 1.25rem;
}

.tm-audience-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.tm-audience-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
}

.tm-audience-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
}

.tm-audience-card li {
  margin-bottom: 0.35rem;
}

/* CTA closing */
.tm-cta-closing {
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.tm-cta-closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-cta-overlay);
  pointer-events: none;
}

.tm-cta-closing > * {
  position: relative;
  z-index: 1;
}

.tm-cta-closing .tm-actions {
  max-width: 20rem;
  margin-inline: auto;
}

.tm-cta-closing__note {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* Footer */
.tm-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  margin-top: 1rem;
}

.tm-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.tm-footer__brand {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tm-footer__copy {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* Single produk */
.tm-product-hero {
  padding-block: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.tm-product-hero__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--product-accent) 20%, transparent);
  color: var(--product-accent);
  border: 1px solid color-mix(in srgb, var(--product-accent) 40%, transparent);
  margin-bottom: 0.75rem;
}

.tm-product-hero__title {
  font-size: var(--text-hero);
  margin: 0 0 0.5rem;
}

.tm-product-hero__tagline {
  font-size: var(--text-lg);
  color: var(--product-accent);
  font-weight: 600;
  margin: 0 0 1rem;
}

.tm-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.tm-feature-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
}

.tm-feature-list li::before {
  content: "✓";
  color: var(--product-accent);
  font-weight: 700;
  flex-shrink: 0;
}

.tm-gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.tm-gallery__item {
  flex: 0 0 85vw;
  max-width: 520px;
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.tm-gallery__item img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
}

.tm-video-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #000;
}

.tm-video-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.tm-related-grid {
  display: grid;
  gap: 1rem;
}

.tm-archive-grid {
  display: grid;
  gap: 1.25rem;
}

.tm-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #000;
}

.tm-skip-link:focus {
  left: 0;
}
