/* Reza Mohammadi theme — performance-tuned base styles */

:root {
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Outfit", var(--font-sans);
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, monospace;
  --color-brand-dark: #07121E;
  --color-gold-start: #EAD19E;
  --color-gold-end: #C79F5E;
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-brand-dark);
  color: #ffffff;
  margin: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

img,
video {
  max-width: 100%;
  height: auto;
}

img {
  content-visibility: auto;
}

/* Cheap ambient glow — no live CSS blur filters */
.rm-glow {
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  will-change: auto;
  contain: layout paint;
}

.rm-glow--amber {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
}

.rm-glow--a { top: -5%; right: -5%; width: 420px; height: 420px; }
.rm-glow--b { top: 30%; left: -5%; width: 320px; height: 320px; }
.rm-glow--c { bottom: 20%; right: -5%; width: 380px; height: 380px; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #07121E; }
::-webkit-scrollbar-thumb { background: #14293f; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #1f3c5b; }

.btn-luxury {
  background: linear-gradient(90deg, #EAD19E 0%, #C79F5E 100%);
  color: #07121E !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 9999px;
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s ease, background 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(199, 159, 94, 0.15);
  border: none !important;
  text-decoration: none;
  cursor: pointer;
  will-change: transform;
}

.btn-luxury:hover {
  background: linear-gradient(90deg, #f2ddb5 0%, #dda95f 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(199, 159, 94, 0.22);
}

.btn-luxury:active {
  transform: translateY(0);
}

/* Smooth hover focus — transform/opacity only, no filter:blur */
.rm-focus-group .rm-focus-item {
  transition: transform 0.28s var(--ease-smooth), opacity 0.28s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.rm-focus-group.is-active .rm-focus-item:not(.is-hovered) {
  transform: scale(0.985);
  opacity: 0.72;
}

.rm-focus-group .rm-focus-item.is-hovered {
  transform: scale(1.02);
  opacity: 1;
  z-index: 20;
}

@media (hover: none), (pointer: coarse) {
  .rm-focus-group.is-active .rm-focus-item:not(.is-hovered),
  .rm-focus-group .rm-focus-item.is-hovered {
    transform: none;
    opacity: 1;
  }
}

/* Brand marquee — GPU-friendly + pause offscreen via JS class */
@keyframes rm-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.rm-marquee-track {
  display: flex;
  width: max-content;
  animation: rm-marquee 28s linear infinite;
  will-change: transform;
}

.rm-marquee-track.is-paused {
  animation-play-state: paused;
}

[dir="rtl"] .rm-marquee-track {
  animation-name: rm-marquee-rtl;
}

@keyframes rm-marquee-rtl {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(50%, 0, 0); }
}

#rm-mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-smooth), opacity 0.25s ease;
  opacity: 0;
}

#rm-mobile-menu.is-open {
  max-height: 480px;
  opacity: 1;
}

#rm-scroll-top {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 10px, 0) scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s var(--ease-smooth);
}

#rm-scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.rm-contact-success { display: none; }
.rm-contact-success.is-visible { display: flex; }
.rm-contact-form.is-hidden { display: none; }

/* Soft ping — less aggressive than default */
@keyframes rm-ping {
  75%, 100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.rm-ping {
  animation: rm-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.rm-gradient-text {
  background: linear-gradient(to right, #ffffff, #a1a1aa, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[dir="rtl"] .rm-arrow {
  transform: rotate(180deg);
}

[dir="rtl"] .group:hover .rm-arrow-hover {
  transform: translateX(-0.25rem) rotate(180deg);
}

.admin-bar .rm-fixed-header { top: 32px; }

@media screen and (max-width: 782px) {
  .admin-bar .rm-fixed-header { top: 46px; }
}

/* Solid header — avoids expensive backdrop-filter while scrolling */
.rm-fixed-header {
  background: rgba(7, 18, 30, 0.96);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Soft pulse replacement (cheaper than animate-pulse everywhere) */
@keyframes rm-soft-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.rm-soft-pulse {
  animation: rm-soft-pulse 2.4s ease-in-out infinite;
}

/* Video: keep compositor layer light until visible */
.rm-lazy-video {
  background: #090f18;
}

.rm-lazy-video.is-ready {
  background: transparent;
}
