/* Regen Designs LLC - Main Styles */

:root {
    --primary-white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --navy-blue: #2c3e50;
    --navy-light: #34495e;
    --accent-blue: #3498db;
    --accent-color-button: #c7d7db;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --border-radius: 5px;
    --transition-fast: 200ms ease; 
    --transition-mid: 300ms ease; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--navy-blue);
    background-color: var(--light-gray);
}

/* Header Styles */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

/* Ефект при прокручуванні сторінки */
header.scrolled {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(18px) saturate(200%);
  -webkit-backdrop-filter: blur(18px) saturate(200%);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--navy-blue);
    text-decoration: none;
}

/* Main Content */
main {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
}

/* Card Styles */
.card {
    background: var(--primary-white);
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px var(--shadow-light);
    transition: var(--transition);
    position: relative;
}

.card::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 100%;
    height: 100%;
    background: var(--medium-gray);
    border-radius: var(--border-radius);
    z-index: -1;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.card:hover::after {
    bottom: -8px;
    right: -8px;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* фон виносимо на ::after і анімуємо масштаб */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/hero/hero-image.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 0;

  /* Початковий стан — невидимий */
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.2s ease-out, transform 8s ease-in-out;
  will-change: opacity, transform;
}

/* Коли зображення повністю завантажилось */
.hero.loaded::after {
  opacity: 1;
  transform: scale(1);
  animation: heroScale 18s ease-in-out infinite alternate;
}

/* М’яке "дихання" після появи */
@keyframes heroScale {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

/* .hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../images/hero/hero-image.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 0;
  transform: scale(1);
  will-change: transform;
  animation: heroScale 18s ease-in-out infinite alternate;
}

@keyframes heroScale {
  from { transform: scale(1); }
  to   { transform: scale(1.1); } 
} */

/* напівпрозорий білий шар за бажанням */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(2px);
  z-index: 1;
}

.hero .container { position: relative; z-index: 2; }

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--navy-blue);
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    color: var(--dark-gray);
    max-width: 600px;
    margin: 0 auto 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--navy-blue);
    color: var(--primary-white);
    text-decoration: none;
    border-radius: var(--border-radius);
    border: 1px solid var(--navy-blue);
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 100%;
    height: 100%;
    background: var(--navy-light);
    border-radius: var(--border-radius);
    z-index: -1;
    transition: var(--transition);
}

.btn:hover {
    background: var(--accent-color-button);
    border-color: var(--accent-blue);
    transform: translateY(-3px);
}

.btn:hover::after {
    bottom: -6px;
    right: -6px;
}

.btn-secondary {
    background: var(--primary-white);
    color: var(--navy-blue);
    border: 1px solid var(--navy-blue);
}

.btn-secondary::after {
    background: var(--light-gray);
}

.btn-secondary:hover {
    background: var(--navy-blue);
    color: var(--navy-blue);
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Section Styles */
.section {
    padding: 4rem 0;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--navy-blue);
}

.section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    color: var(--navy-blue);
}

/* Footer */
footer {
    background: var(--navy-blue);
    color: var(--primary-white);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-white);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: var(--border-radius);
}

.footer-links a:hover {
    color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease;
}

.char-counter {
    font-size: 0.8rem;
    color: var(--dark-gray);
    text-align: right;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 1rem 5%;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    header.menu-open {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: none; /* прибирає сіру тінь під хедером */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001; /* над меню */
    transition: all 0.3s ease;
  }
}

.copyright {
    font-size: 14px;
    color: var(--dark-gray);
}


/* Animations */
* { backface-visibility: hidden; }

.hero h1,
.hero p,
.card,
.btn,
.btn::after,
.card::after,
.modal,
.modal-content {
  will-change: transform, opacity;
  transform: translateZ(0);
}

nav a,
.nav-links a {
  transition: color var(--transition-mid), background-color var(--transition-mid), transform var(--transition-fast);
}

.card {
  background: var(--primary-white);
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px var(--shadow-light);
  transition: transform var(--transition-fast), box-shadow var(--transition-mid);
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0; 
  border-radius: var(--border-radius);
  background: var(--medium-gray);
  z-index: -1;
  transform: translate(3px, 3px);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  opacity: 1;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-medium);
}

.card:hover::after {
  transform: translate(6px, 6px);
  opacity: 1;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--navy-blue);
  color: var(--primary-white);
  text-decoration: none;
  border-radius: var(--border-radius);
  border: 1px solid var(--navy-blue);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), background-color var(--transition-mid), border-color var(--transition-mid), color var(--transition-mid), box-shadow var(--transition-mid);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--border-radius);
  background: var(--navy-light);
  z-index: -1;
  transform: translate(2px, 2px);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  opacity: 1;
}

.btn:hover {
  background: var(--accent-color-button);
  border-color: var(--accent-color-button);
  transform: translateY(-3px);
}

.btn:hover::after {
  transform: translate(3px, 3px);
  opacity: 1;
}

.btn-secondary {
  background: var(--primary-white);
  color: var(--navy-blue);
  border: 1px solid var(--navy-blue);
}

.btn-secondary::after { background: var(--light-gray); }

.btn-secondary:hover {
  background: var(--navy-blue);
  color: var(--navy-blue);
  border-color: var(--navy-blue);
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 300ms ease forwards;
}

.modal-content {
  background-color: var(--primary-white);
  margin: 5% auto;
  padding: 2rem;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 10px 30px var(--shadow-medium);
  animation: slideIn 300ms ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

@keyframes slideOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-50px);
    opacity: 0;
  }
}

.modal.hide {
  animation: slideOut 0.3s ease forwards;
}


@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain; 
  display: block;
}

/* ---------------------- */

/* Плавна поява елементів без стрибка */
.card,
.section {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.card.fade-in,
.section.fade-in {
  opacity: 1;
  transform: translateY(0);
}
