Python/玄潮官网/css/style.css

236 lines
4.7 KiB
CSS

/* ==================== 玄潮科技 - Custom Styles ==================== */
/* ----- Base ----- */
* {
scroll-behavior: smooth;
}
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow-x: hidden;
}
/* ----- Hero Background Pattern ----- */
.hero-pattern {
background-image:
linear-gradient(rgba(154, 25, 30, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(154, 25, 30, 0.03) 1px, transparent 1px);
background-size: 50px 50px;
background-position: center center;
}
.hero-pattern::before {
content: '';
position: absolute;
inset: 0;
background-image: radial-gradient(circle, rgba(154, 25, 30, 0.08) 1px, transparent 1px);
background-size: 30px 30px;
}
/* ----- Floating Animations ----- */
@keyframes float-slow {
0%, 100% { transform: translate(0, 0) scale(1); }
50% { transform: translate(30px, -30px) scale(1.05); }
}
@keyframes float-delayed {
0%, 100% { transform: translate(0, 0) scale(1); }
50% { transform: translate(-20px, 20px) scale(0.95); }
}
.animate-float-slow {
animation: float-slow 8s ease-in-out infinite;
}
.animate-float-delayed {
animation: float-delayed 10s ease-in-out infinite;
animation-delay: 2s;
}
/* ----- Scroll Indicator Bounce ----- */
@keyframes bounce-slow {
0%, 100% { transform: translateY(0); opacity: 0.5; }
50% { transform: translateY(10px); opacity: 0.8; }
}
.animate-bounce-slow {
animation: bounce-slow 2s ease-in-out infinite;
}
/* ----- Reveal Animations (Scroll-triggered) ----- */
.reveal-up,
.reveal-left,
.reveal-right {
opacity: 0;
transform: translateY(30px);
transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left {
transform: translateX(-40px);
}
.reveal-right {
transform: translateX(40px);
}
.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
opacity: 1;
transform: translate(0, 0);
}
/* Apply reveal animation to elements that have inline animation-delay */
.reveal-up {
animation: none;
}
.reveal-up[style*="animation-delay"] {
transition-delay: var(--reveal-delay, 0s);
}
/* ----- Nav Link Active State ----- */
.nav-link.active {
color: #9a191e;
background-color: #fdf0ee;
}
.nav-link.active::after {
content: '';
display: block;
width: 20px;
height: 2px;
background: #9a191e;
margin: 2px auto 0;
border-radius: 2px;
}
/* ----- Header Scroll Effect ----- */
#header.scrolled {
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
/* ----- Service Card Hover ----- */
.service-card:hover {
transform: translateY(-4px);
}
/* ----- Advantage Card Hover ----- */
.advantage-card:hover {
transform: translateY(-4px);
}
/* ----- Industry Card Hover ----- */
.industry-card:hover {
transform: translateY(-3px);
}
/* ----- Stat Card Hover ----- */
.stat-card:hover {
transform: translateY(-4px);
}
/* ----- Form Input Styles ----- */
.form-input:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(154, 25, 30, 0.15);
border-color: #9a191e;
}
.form-input.error {
border-color: #ef4444;
box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
/* ----- Back to Top Button ----- */
#back-to-top.visible {
opacity: 1;
visibility: visible;
}
/* ----- Custom Scrollbar ----- */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
background: #94a3b8;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #64748b;
}
/* ----- Selection ----- */
::selection {
background: rgba(154, 25, 30, 0.2);
color: #171717;
}
/* ----- Mobile Menu Transition ----- */
#mobile-menu {
transition: max-height 0.3s ease, opacity 0.3s ease;
overflow: hidden;
}
#mobile-menu.show {
display: block;
animation: slideDown 0.3s ease;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ----- Gradient Text ----- */
.text-gradient {
background: linear-gradient(135deg, #e53935, #9a191e);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
/* ----- Responsive Adjustments ----- */
@media (max-width: 768px) {
.service-card,
.advantage-card,
.stat-card,
.industry-card {
transform: none;
}
.reveal-left,
.reveal-right {
transform: translateY(30px);
}
.reveal-left.revealed,
.reveal-right.revealed {
transform: translate(0, 0);
}
}
/* ----- Print Styles ----- */
@media print {
header,
#back-to-top,
.animate-float-slow,
.animate-float-delayed {
display: none !important;
}
}