/* ========== COMMON STYLES (DEFERRED) ========== */
/* Non-critical styles loaded after page render */
/* Critical above-the-fold styles are in critical.css */

/* ========== CARDS ========== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #1D2531;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.card:hover {
  border-color: var(--text-accent);
  transform: translateY(-4px);
}

.card-image {
  position: relative;
  aspect-ratio: 16 / 6;
  overflow: hidden;
}

.card-image img,
.card-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Video Card — Hover Preview */
.video-card .card-image video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.video-card:hover .card-image video {
  opacity: 1;
}

.video-card .card-image img {
  position: relative;
  z-index: 1;
  transition: opacity var(--transition-slow);
}

.video-card:hover .card-image img {
  opacity: 0;
}

.card-content {
  padding: var(--space-lg);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 400;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-xs);
  transition: color var(--transition-base);
}

.card:hover .card-title {
  color: var(--text-accent);
}

.card-description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== CTA SECTION ========== */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-video-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.cta-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3);
}

.cta-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-family: var(--font-display);
  font-size: var(--font-size-section);
  font-weight: 400;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  line-height: 1.2;
  margin-bottom: var(--space-3xl);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand .logo-text {
  font-size: var(--font-size-lg);
}

.footer-nav {
  display: flex;
  gap: var(--space-2xl);
}

.footer-nav a {
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  transition: .3s;
}

.footer-nav a:hover {
  color: var(--text-accent);
  opacity: 1;
}

.footer-contact {
  text-align: right;
}

.footer-contact p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.footer-socials {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.footer-socials a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-socials a:hover {
  color: var(--text-primary);
  opacity: 1;
}

.footer-socials svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
}

.footer-legal {
  display: flex;
  gap: var(--space-lg);
}

.footer-legal a {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-family: var(--font-display);
}

.footer-copyright {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .footer-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xl);
  }

  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }

  .footer-contact {
    text-align: center;
  }

  .footer-socials {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
  }
}


/* ========== GRID (Legacy Support) ========== */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 991px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ========== FORMS ========== */
.form-group {
  margin-bottom: var(--space-xl);
  position: relative;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-md) 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--text-primary);
}

/* Hide input border when .form-line handles it */
.form-input:focus ~ .form-line,
.form-textarea:focus ~ .form-line {
  transform: scaleX(1);
}

.form-line {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-size: var(--font-size-sm);
}

.form-textarea {
  display: block;
  min-height: 100px;
  resize: none;
}

/* ========== MODAL ========== */
.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(15, 22, 33, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-3xl);
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--font-size-xl);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  font-weight: 400;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-md);
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  letter-spacing: var(--tracking-wide);
}

.modal-plan-badge {
  display: inline-block;
  margin-top: var(--space-md);
  padding: 8px 16px;
  background: var(--accent);
  color: var(--bg-dark);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.modal-form .form-group {
  position: relative;
  margin-bottom: var(--space-xl);
}

.form-error {
  display: block;
  color: #e05c5c;
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
}

.form-input-error {
  border-color: #e05c5c !important;
}

.form-input-error ~ .form-line {
  background: #e05c5c;
  transform: scaleX(1);
}

.btn-full {
  width: 100%;
  margin-top: var(--space-lg);
}

/* Modal animations */
.modal-content {
  animation: none;
}

.modal.active .modal-content {
  animation: modalSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Success Modal */
.modal-content--success {
  text-align: center;
  padding: var(--space-4xl) var(--space-3xl);
}

.modal-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-xl);
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-success-icon svg {
  width: 40px;
  height: 40px;
  color: var(--text-primary);
}

.modal-content--success .modal-title {
  margin-bottom: var(--space-sm);
}

.modal-content--success .modal-subtitle {
  margin-bottom: var(--space-xl);
}

.modal-content--success .btn {
  min-width: 200px;
}

/* ========== VIDEO PLAYER ========== */
.video-fullscreen {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  background: rgba(15, 22, 33, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.6s ease;
}

.video-fullscreen.active {
  background: rgba(15, 22, 33, 1);
  pointer-events: all;
}

.video-fullscreen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.video-fullscreen.active video {
  transform: scale(1);
  opacity: 1;
}

.video-fullscreen-close {
  position: absolute;
  top: var(--space-2xl);
  right: var(--space-2xl);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s, background 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.video-fullscreen-close svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.video-fullscreen.active .video-fullscreen-close {
  opacity: 1;
  transform: translateY(0);
}

.video-fullscreen-close:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
}

.video-fullscreen-close:hover svg {
  stroke: var(--bg-primary);
  transform: scale(1.1);
}

/* Video Controls */
.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(to top, rgba(15, 22, 33, 0.8), transparent);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-fullscreen.active .video-controls {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) {
  .video-fullscreen.active:hover .video-controls {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-control-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-control-btn:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
}

.video-control-btn:hover svg {
  fill: var(--bg-primary);
}

.video-control-btn svg {
  width: 20px;
  height: 20px;
}

.video-play-pause .icon-pause,
.video-fullscreen.playing .video-play-pause .icon-play {
  display: none;
}

.video-fullscreen.playing .video-play-pause .icon-pause {
  display: block;
}

.video-mute .icon-muted,
.video-fullscreen.muted .video-mute .icon-volume {
  display: none;
}

.video-fullscreen.muted .video-mute .icon-muted {
  display: block;
}

.video-progress {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.video-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
}

.video-progress-filled {
  height: 100%;
  background: var(--text-primary);
  width: 0%;
  transition: width 0.1s linear;
}

.video-progress:hover .video-progress-bar {
  height: 6px;
}

.video-time {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  min-width: 90px;
}

.video-separator {
  opacity: 0.5;
}

.video-fullscreen-toggle .icon-compress,
.video-fullscreen.is-fullscreen .video-fullscreen-toggle .icon-expand {
  display: none;
}

.video-fullscreen.is-fullscreen .video-fullscreen-toggle .icon-compress {
  display: block;
}

.video-fullscreen.is-fullscreen .video-fullscreen-close {
  display: none;
}

/* Auto-hide controls in fullscreen */
.video-fullscreen.controls-hidden {
  cursor: none;
}

.video-fullscreen.controls-hidden .video-controls {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) transparent;
}
