/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --bg-color: #F5F5F7;
    --text-main: #1d1d1f;
    --text-gray: #86868b;
    --accent: #0066ff;
    --accent-light: #e6f0ff;
    --card-bg: #ffffff;
    --border: rgba(0,0,0,0.06);
    --gradient-pink: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    --gradient-blue: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    --gradient-green: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: 20px;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(32px, 8vw, 50px);
    line-height: 1.05;
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(28px, 5vw, 50px);
    margin-bottom: 20px;
    text-align: center;
}

h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

p {
    color: var(--text-gray);
    font-size: 17px;
}

/* Жирный текст внутри карточек делаем чёрным */
.card strong {
    color: var(--text-main);
}

.subHeader {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
    font-size: clamp(16px, 3vw, 20px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   UI ELEMENTS
   ============================================ */
.btn {
    display: inline-block;
    padding: 16px 32px;
    background: var(--text-main);
    color: #fff;
    text-decoration: none;
    border-radius: 980px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    user-select: none;
}

nav .nav-links a.btn-contact {
    background: var(--text-main);
    color: white;
}

.btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--card-bg);
}

/* Фокус для доступности */
a:focus:not(:focus-visible) {
    outline: none;
}
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================
   FORM MESSAGE & HONEYPOT
   ============================================ */
.form-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 16px 32px;
    border-radius: 60px;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 90%;
    animation: slideDown 0.3s ease;
}

.form-message.success {
    background: #000;
}

.form-message.error {
    background: #dc3545;
}

@keyframes slideDown {
    from { top: -100px; opacity: 0; }
    to { top: 20px; opacity: 1; }
}

.honeypot {
    display: none;
    visibility: hidden;
    position: absolute;
    left: -9999px;
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(245, 245, 247, 0.8);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 26px;
    font-weight: 700;
    flex-shrink: 0;
}

.nav-quote {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-left: 30px;
    padding-left: 30px;
    border-left: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-gray);
    line-height: 1.4;
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 14px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-main);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-main);
    margin-left: auto;
}

@media (min-width: 1150px) {
    .nav-quote {
        display: flex;
    }
    nav {
        justify-content: flex-start;
    }
    .nav-links {
        margin-left: auto;
        flex-shrink: 0;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px 40px;
    position: relative;
}

.hero p {
    max-width: 640px;
    margin-bottom: 20px;
    font-size: clamp(16px, 3vw, 20px);
}

.orb-container {
    width: 310px;
    height: 310px;
    margin: 60px auto 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.crystal-img {
    width: 100%;
    height: auto;
    max-width: 280px;
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(100, 100, 150, 0.3));
    transition: transform 0.5s ease;
}

.crystal-img:hover {
    transform: scale(1.05);
}

.orb-shadow {
    width: 80%;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.15) 0%, transparent 70%);
    position: absolute;
    bottom: -40px;
    left: 10%;
    z-index: 1;
    animation: shadow-pulse 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes shadow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(0.6); opacity: 0.3; }
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-section {
    padding: 40px 0;
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.trust-track {
    display: inline-flex;
    animation: scroll 25s linear infinite;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 40px;
    font-weight: 600;
    color: var(--text-gray);
}

.trust-item span {
    font-size: 12px;
    opacity: 0.6;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-25%); }
}

/* ============================================
   SECTIONS & BENTO GRID
   ============================================ */
.section {
    padding: 80px 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 28px;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.c-large {
    grid-column: span 2;
    grid-row: span 2;
}

.c-wide {
    grid-column: span 2;
}

.avatar-row {
    display: flex;
    margin-top: auto;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    border: 2px solid #fff;
    margin-left: -10px;
}

.avatar:first-child {
    margin-left: 0;
}

/* ============================================
   MOBILE PHOTO CARD (НОВОЕ)
   ============================================ */
.mobile-photo-card {
    display: none;
}

.profile-card {
    text-align: center;
    padding: 30px 20px;
    max-width: 320px;
    margin: 0 auto;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background-image: url('/images/foto.jpg');
    background-size: cover;
    background-position: center;
    border: 4px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
}

.profile-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 15px;
    font-weight: 500;
}

.profile-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    text-align: left;
    margin-top: 15px;
}

/* ============================================
   PROCESS
   ============================================ */
.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step-number {
    font-size: 64px;
    font-weight: 800;
    color: var(--bg-color);
    -webkit-text-stroke: 1px var(--border);
    margin-bottom: -20px;
    transition: color 0.3s;
}

.card:hover .step-number {
    color: var(--accent);
    -webkit-text-stroke: 0;
}

/* ============================================
   PRINCIPLES SECTION
   ============================================ */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.principle-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 28px;
    border: 1px solid var(--border);
    text-align: center;
}

.principle-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 32px;
    font-weight: 700;
}

/* ============================================
   PRICE REQUEST
   ============================================ */
.price-request {
    background: var(--gradient-green);
    border-radius: 32px;
    padding: 60px 24px;
    text-align: center;
    color: #000;
}

.price-request h2 {
    color: #000;
}

.price-request p {
    color: rgba(0,0,0,0.7);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ============================================
   CALLBACK FORM
   ============================================ */
.callback-form {
    max-width: 400px;
    margin: 30px auto 0;
    text-align: left;
}

.callback-form input {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: 40px;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.2s;
}

.callback-form input:focus {
    border-color: var(--accent);
    outline: none;
}

.callback-form button {
    width: 100%;
    background: #000;
    color: #fff;
    padding: 18px;
    font-size: 17px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.callback-form button:hover {
    opacity: 0.9;
}

/* ============================================
   GUARANTEE
   ============================================ */
.guarantee-box {
    background: #fff;
    border-radius: 32px;
    padding: 60px 24px;
    text-align: center;
    border: 1px solid var(--border);
    margin-top: 40px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: #fff;
    padding: 60px 0 30px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-grid a:not(.btn) {
    color: var(--text-gray);
    text-decoration: none;
}

.footer-grid a:not(.btn):hover {
    color: var(--text-main);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-gray);
}

.footer-bottom a {
    color: var(--text-gray);
    text-decoration: none;
    margin-left: 20px;
}

.footer-bottom a:hover {
    color: var(--text-main);
}

.social-links a {
    margin-left: 20px;
    font-size: 14px;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--text-main, #1d1d1f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: none;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: scale(1.1);
    background: var(--accent, #0066ff);
}

.scroll-top svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   ВЫРАВНИВАНИЕ КАРТОЧЕК ОТЗЫВОВ
   ============================================ */
.testimonials-flex {
    align-items: stretch;
}

.testimonials-flex .card {
    display: flex;
    flex-direction: column;
    height: auto;
}

.testimonials-flex .card p {
    flex: 1;
}

/* ============================================
   ДОПОЛНЕНИЯ ДЛЯ КАРТОЧЕК
   ============================================ */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        padding: 15px 20px;
        position: relative;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
        text-align: center;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links a {
        padding: 10px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    .nav-links .btn {
        width: fit-content;
        margin: 0 auto;
    }
    .menu-toggle {
        display: block;
    }
    .mobile-photo-card {
        display: block;
    }
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }
    .c-large {
        grid-column: span 2;
        grid-row: span 1;
    }
    .process-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .nav-links a:not(.show-in-mobile):not(.btn):not(.about-link) {
        display: none;
    }
    .btn {
        padding: 14px 24px;
        font-size: 14px;
    }
    .hero {
        padding-top: 80px;
    }
    .hero > div:first-of-type {
        flex-direction: column;
        width: 100%;
    }
    .hero .btn {
        width: 100%;
        text-align: center;
    }
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .c-large, .c-wide {
        grid-column: span 1;
    }
    .guarantee-box {
        padding: 40px 20px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .footer-bottom a {
        margin: 0 10px;
    }
    .orb-container {
        width: min(280px, 70vw);
        height: min(280px, 70vw);
        margin-top: 30px;
    }
    .trust-item {
        padding: 0 20px;
        font-size: 14px;
    }
    .trust-track {
        animation-duration: 20s;
    }
    .card, .principle-card {
        padding: 20px;
    }
    .principle-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    .step-number {
        font-size: 48px;
    }
    .footer-grid .btn {
        width: 100%;
        text-align: center;
    }
    .principles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: clamp(28px, 10vw, 48px);
    }
    h2 {
        font-size: clamp(24px, 7vw, 36px);
    }
    .hero p {
        font-size: 16px;
    }
    .orb-container {
        width: min(220px, 70vw);
        height: min(220px, 70vw);
    }
    .trust-item {
        padding: 0 15px;
        font-size: 13px;
    }
    .btn {
        padding: 14px 20px;
        font-size: 14px;
    }
    .card h3 {
        font-size: 20px;
    }
    .principle-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    .step-number {
        font-size: 40px;
        margin-bottom: -10px;
    }
    .footer-grid {
        gap: 30px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 16px;
    }
    h1 {
        font-size: clamp(24px, 8vw, 36px);
    }
    .hero p {
        font-size: 15px;
    }
    .orb-container {
        width: min(180px, 60vw);
        height: min(180px, 60vw);
    }
    .trust-item {
        padding: 0 10px;
        font-size: 12px;
    }
    .btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    .card, .principle-card {
        padding: 16px;
    }
    .card h3 {
        font-size: 18px;
    }
    .principle-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}