
/* ==========================================================================
   Variables
   ========================================================================== */
   :root {
    --ico-color: #4a5260;
    --line-color: #dfe2e7;
    --bg-color: #eef0f3;
    --text-color: #2a2d33;
    --shadow-dark: #d5d8de;
    --shadow-light: #ffffff;
    --gradient-light: #f7f8fa;
    --gradient-dark: #e4e6eb;
    --modal-bg: #f4f5f7;
    --scrollbar-color: #d5d8de;
    --spacing: 20px;
    --border-radius: 5px;
    /* Spacing scale for consistent vertical rhythm */
    --space-xxs: 2px;
    --space-xs: 6px;
    --space-sm: 12px;
    --space-md: 24px;
    --space-lg: 32px;
    /* Motion timings */
    --modal-open-duration: 380ms;
    --modal-close-duration: 280ms;
    --modal-swap-in-duration: 340ms;
    --modal-swap-out-duration: 200ms;
    --modal-ease-enter: cubic-bezier(0.32, 0.72, 0, 1);
    --modal-ease-exit: cubic-bezier(0.4, 0, 1, 1);
    /* Nav alignment */
    --nav-panel-right: 24px; /* must match .nav-panel right */
    --nav-panel-height: 260px; /* must match .nav-panel height */
    --ai-dock-below-nav: 52px; /* gap from nav pill to docked AI */
    /* Tooltip metrics */
    --tip-line: 44px;   /* length of the horizontal line to the left */
    --tip-pad-x: 8px;   /* label horizontal padding */
    --tip-pad-y: 4px;   /* label vertical padding */
    --tip-radius: 6px;  /* label border radius */
    --tip-fs: 11px;     /* label font size */
    --tip-pointer: 10px; /* width of the right arrow pointer */
    /* Gap between modal and right screen edge on desktop */
    --modal-right-gap: 54px;
  }

/* Inform the UA we support both schemes (affects built-in form controls) */
html { color-scheme: light; }

/* Performance: skip rendering heavy sections until visible */
.modal-body {
  content-visibility: auto;
  contain-intrinsic-size: 800px 1000px;
}

/* Tooltip with animated line (from center-left edge) */
.nav-panel-button,
.center-button { position: relative; }

/* Line */
.nav-panel-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-100%, -50%);
  height: 1px;
  width: 0;
  background: rgba(0,0,0,0.55);
  transition: width 220ms ease, opacity 200ms ease;
  opacity: 0;
}

/* Label */
.nav-panel-button::after {
  content: attr(aria-label);
  position: absolute;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  right: calc(100% + var(--tip-line) - 1px);
  background: rgba(0,0,0,0.88);
  color: #fff;
  padding: var(--tip-pad-y) calc(var(--tip-pad-x) + var(--tip-pointer)) var(--tip-pad-y) var(--tip-pad-x);
  border-radius: var(--tip-radius);
  font-size: var(--tip-fs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0ms;
  transform-origin: right center;
  z-index: 120;
  -webkit-clip-path: polygon(0% 0%, calc(100% - var(--tip-pointer)) 0%, 100% 50%, calc(100% - var(--tip-pointer)) 100%, 0% 100%, 0% 0%);
          clip-path: polygon(0% 0%, calc(100% - var(--tip-pointer)) 0%, 100% 50%, calc(100% - var(--tip-pointer)) 100%, 0% 100%, 0% 0%);
}

.nav-panel-button:hover::before,
.nav-panel-button:focus::before {
  width: var(--tip-line);
  opacity: 1;
}

.nav-panel-button:hover::after,
.nav-panel-button:focus::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  transition-delay: 60ms;
}

/* No tooltip on the Продвижение button — clue-text serves as its label */
.nav-panel-button[data-modal="modal-resume"]::before,
.nav-panel-button[data-modal="modal-resume"]::after { content: none !important; }

/* Продвижение button: hidden until line arrives, then springs in */
.nav-panel-button[data-modal="modal-resume"] {
    opacity: 0;
    transform: scale(0.3);
    animation: navBtnIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) 0.47s forwards;
}
.nav-panel-button[data-modal="modal-resume"].nav-btn-ready {
    animation: none;
    opacity: 1;
    transform: scale(1);
}
/* allow the larger button to overflow the nav panel */
.nav-panel { overflow: visible; }

@keyframes navBtnIn {
    0%   { opacity: 0; transform: scale(0.3); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: scale(1); }
}

/* Disable hover/focus tooltips on touch-only devices */
@media (hover: none), (pointer: coarse) {
  .nav-panel-button::before,
  .nav-panel-button::after {
    content: none !important;
  }
}

/* ==========================================================================
   Global Styles (Desktop by default)
   ========================================================================== */
body {
    background: var(--bg-color);
    margin: 0;
    height: 100vh;
    overflow-y: auto;
    font-family: 'Titillium Web', Arial, sans-serif;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-color);
}

h2 {
    font-size: 28px;
    color: var(--text-color);
    margin: 0 0 20px;
}

/* Standardize heading font stack */
h1, h2, h3 { font-family: 'Titillium Web', Arial, sans-serif; }

/* Accessible focus-visible outlines for interactive elements */
:focus { outline: none; }
/* never show focus ring on center-button — it gets focus programmatically on return */
.center-button:focus, .center-button:focus-visible {
    outline: none;
    box-shadow:
        6px 10px 26px rgba(145, 154, 166, 0.2),
        2px 4px 10px rgba(145, 154, 166, 0.1),
        -6px -8px 18px rgba(255, 255, 255, 0.92);
}
.nav-panel-button:focus-visible,
.social-button:focus-visible,
.ai-assistant-button:focus-visible,
.contact-button:focus-visible{
  outline: 2px solid #0a84ff;
  outline-offset: 3px;
  border-radius: 6px;
}

.close-button:focus-visible .close-well,
.contact-details-close:focus-visible .close-well {
  outline: 2px solid #0a84ff;
  outline-offset: 2px;
}

.close-button:focus-visible,
.contact-details-close:focus-visible {
  outline: none;
}

/* ==========================================================================
   Components
   ========================================================================== */
/* Navigation panel */
.nav-panel {
    width: 40px;
    height: 260px;
    background: var(--bg-color);
    border-radius: 32px;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    position: fixed;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    z-index: 15;
    animation: navPanelIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}
.nav-panel.nav-panel-ready {
    animation: none;
    transform: translateY(-50%);
}

@keyframes navPanelIn {
    from {
        transform: translateY(-50%) translateX(calc(100% + var(--nav-panel-right) + 16px));
    }
    to {
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes navPanelInMobile {
    from { transform: translateX(calc(100% + 16px)); }
    to   { transform: translateX(0); }
}

.nav-panel-button {
    --cta-ring: 1px;
    --cta-pad: 5px;
    --cta-rim: 1.25px;
    width: 48px;
    height: 48px;
    font-size: 14px;
    border: none;
    border-radius: 50%;
    color: var(--ico-color);
    padding: var(--cta-pad);
    box-sizing: border-box;
    background: var(--bg-color);
    box-shadow:
        inset 3px 4px 8px rgba(155, 164, 176, 0.26),
        inset -2px -3px 6px rgba(255, 255, 255, 0.92);
    transition: box-shadow 120ms ease, background 120ms ease, transform 120ms ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.nav-btn-ring {
    position: absolute;
    inset: var(--cta-ring);
    padding: var(--cta-rim);
    border-radius: 50%;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 2;
    background: var(--bg-color);
    box-shadow:
        1px 1px 2px rgba(160, 168, 178, 0.2),
        -1px -1px 2px rgba(255, 255, 255, 0.95),
        inset 0.5px 0.5px 0.5px rgba(255, 255, 255, 0.9),
        inset -0.5px -0.5px 0.5px rgba(150, 158, 170, 0.22);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.nav-btn-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    box-shadow:
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
    transition: box-shadow 120ms ease, transform 120ms ease;
}

@media (prefers-reduced-motion: reduce) {
    .nav-panel,
    .nav-panel.nav-panel-ready {
        animation: none;
        transform: translateY(-50%);
    }
}

.nav-panel-button i { font-size: 14px; }
.nav-panel-button:active .nav-btn-face,
.nav-panel-button.active .nav-btn-face {
    box-shadow: none;
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    transform: none;
    transition-duration: 0ms;
}

/* Apply hover style only on real hover-capable devices (prevents sticky hover on touch) */
@media (hover: hover) and (pointer: fine) {
  .nav-panel-button:hover .nav-btn-face { box-shadow: none; }
}

.center-wave-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    opacity: 0;
    /* dot reaches top at 0.06+0.14+0.32=0.52s → button pops in */
    animation: fadeInCenter 0.28s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

/* after intro animation ends JS adds this class — keeps button visible via CSS (no inline styles) */
.center-wave-container.center-ready {
    animation: none;
    opacity: 1;
}

.center-button {
    width: 110px;
    height: 110px;
    padding: 0;
    box-sizing: border-box;
    font-size: 24px;
    border: none;
    border-radius: 50%;
    color: var(--ico-color);
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    box-shadow:
        6px 10px 26px rgba(145, 154, 166, 0.2),
        2px 4px 10px rgba(145, 154, 166, 0.1),
        -6px -8px 18px rgba(255, 255, 255, 0.92);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: visible;
    z-index: 100;
    transition: box-shadow 0.3s ease, background 0.3s ease, transform 0.2s ease;
}

.center-button i { font-size: 18px; }
.center-logo {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    opacity: 1;
    background: var(--shadow-light);
    border: 2px solid var(--line-color);
}
.center-logo-mark {
    width: 34px;
    height: auto;
    display: block;
    pointer-events: none;
    filter:
        drop-shadow(-1px -1px 1px rgba(255, 255, 255, 0.9))
        drop-shadow(1px 1px 1px rgba(140, 152, 168, 0.18));
}
.center-logo-word {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 13.5px;
    letter-spacing: 0.14em;
    line-height: 1;
    color: var(--ico-color);
    text-shadow:
        -1px -1px 1px rgba(255, 255, 255, 0.9),
         1px  1px 1px rgba(140, 152, 168, 0.18);
}
.center-button:hover .center-logo-mark {
    filter:
        drop-shadow(-1px -1px 1px rgba(255, 255, 255, 0.95))
        drop-shadow(1px 1px 1px rgba(140, 152, 168, 0.16));
}
.center-button:hover {
    box-shadow: none;
}
.center-button:active {
    box-shadow: inset 10px 10px 20px var(--shadow-dark), inset -10px -10px 20px var(--shadow-light);
    background: var(--gradient-dark);
}

/* Wave animation — rounded ridge, not a sharp disc edge */
.wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: none;
    background: transparent;
    transform: translate(-50%, -50%) scale(0);
    animation: wave-animation 2.8s infinite ease-out;
    z-index: -1;
    filter: blur(0.65px);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.62),
        0 0 0 5px var(--bg-color),
        0 0 0 7px rgba(165, 174, 186, 0.18),
        4px 7px 14px 5px rgba(120, 132, 148, 0.11),
        -2px -5px 12px 5px rgba(255, 255, 255, 0.62);
}

.wave:nth-child(3) { animation-delay: 0.5s; }
.wave:nth-child(4) { animation-delay: 1s; }
.wave:nth-child(5) { animation-delay: 1.5s; }

/* Social buttons */
.social-links {
    position: fixed;
    display: flex;
    gap: 20px;
    z-index: 101;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    flex-direction: column;
}

.social-button {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    text-decoration: none;
    color: var(--ico-color);
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    transition: box-shadow 0.3s ease, background 0.3s ease, transform 0.2s ease, color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-button i { font-size: 12px; }
.social-button:hover { box-shadow: none; }
.social-button:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    background: var(--gradient-dark);
}

/* Back to home — top left, visible after leaving the homepage */
.home-back-btn {
    position: fixed;
    top: 12px;
    left: 18px;
    z-index: 8;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ico-color);
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
    font-size: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition:
        opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s ease,
        color 0.28s ease,
        background 0.28s ease;
}

body.main-exited .home-back-btn {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

@media (hover: hover) and (pointer: fine) {
    body.main-exited .home-back-btn:hover {
        transform: translateY(-1px);
        box-shadow: 3px 4px 7px var(--shadow-dark), -2px -2px 6px var(--shadow-light);
        color: #3a4250;
    }
}

.home-back-btn:active,
body.main-exited .home-back-btn:active {
    transform: translateY(1px);
    background: var(--gradient-dark);
    box-shadow:
        inset 2px 2px 5px var(--shadow-dark),
        inset -2px -2px 5px var(--shadow-light);
}

.home-back-btn:focus-visible {
    outline: none;
    box-shadow:
        2px 2px 5px var(--shadow-dark),
        -2px -2px 5px var(--shadow-light),
        0 0 0 2px rgba(125, 140, 160, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    .home-back-btn { transition: opacity 0.2s ease; transform: none; }
    body.main-exited .home-back-btn:hover { transform: none; }
}

/* Modal close — circle + hover flatten, thin X, ESC hint */
.close-button {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0;
    line-height: 0;
    color: #6a7280;
    box-shadow: none;
    overflow: visible;
}

.close-well {
    --cta-ring: 1px;
    --cta-pad: 4px;
    --cta-rim: 1.25px;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: var(--cta-pad);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    background: #f1f3f6;
    box-shadow:
        inset 2px 2px 4px rgba(155, 164, 176, 0.18),
        inset -1px -2px 3px rgba(255, 255, 255, 0.7);
}

.close-well::before {
    content: '';
    position: absolute;
    inset: var(--cta-ring);
    padding: var(--cta-rim);
    border-radius: 50%;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 2;
    background: #f1f3f6;
    box-shadow:
        1px 1px 2px rgba(160, 168, 178, 0.16),
        -1px -1px 2px rgba(255, 255, 255, 0.85),
        inset 1px 1px 1px rgba(255, 255, 255, 0.7),
        inset -1px -1px 1px rgba(168, 176, 186, 0.12);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.close-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, #ffffff, #f4f5f8);
    box-shadow:
        1px 1px 3px rgba(180, 188, 198, 0.16),
        -1px -1px 2px rgba(255, 255, 255, 0.9);
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.close-button .x-icon,
.contact-details-close .x-icon {
    position: relative;
    display: block;
    width: 7px;
    height: 7px;
    line-height: 0;
    font-size: 0;
    color: inherit;
    flex-shrink: 0;
    pointer-events: none;
}

.close-button .x-icon::before,
.close-button .x-icon::after,
.contact-details-close .x-icon::before,
.contact-details-close .x-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 1.4px;
    background: #7a8490;
    border-radius: 1px;
    transform-origin: center;
    box-shadow:
        0.5px 0.5px 0 rgba(255, 255, 255, 0.9),
        -0.4px -0.4px 0 rgba(80, 88, 98, 0.22);
}

.close-button .x-icon::before,
.contact-details-close .x-icon::before { transform: translate(-50%, -50%) rotate(45deg); }
.close-button .x-icon::after,
.contact-details-close .x-icon::after { transform: translate(-50%, -50%) rotate(-45deg); }

.close-esc-line {
    width: 22px;
    height: 1px;
    flex-shrink: 0;
    background: linear-gradient(
        90deg,
        rgba(150, 158, 170, 0.34) 0%,
        rgba(150, 158, 170, 0.16) 62%,
        transparent 100%
    );
    border-radius: 1px;
    pointer-events: none;
}

.close-esc-label {
    margin: 0;
    padding: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.14em;
    line-height: 1;
    color: #8a919c;
    opacity: 0.7;
    white-space: nowrap;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .close-button:hover .close-face,
    .contact-details-close:hover .close-face {
        transform: translateY(-0.5px);
        box-shadow:
            1px 2px 4px rgba(180, 188, 198, 0.2),
            -1px -1px 3px rgba(255, 255, 255, 0.95);
    }
    .close-button:hover .close-esc-label {
        opacity: 0.95;
        color: #6a7280;
    }
}

.close-button:active .close-face,
.contact-details-close:active .close-face {
    transform: translateY(0.5px);
    box-shadow:
        inset 2px 2px 4px rgba(180, 188, 198, 0.22),
        inset -1px -1px 3px rgba(255, 255, 255, 0.85);
}

@media (prefers-reduced-motion: reduce) {
    .close-face { transition: none; }
    .close-button:hover .close-face,
    .contact-details-close:hover .close-face { transform: none; }
}

/* AI Assistant button — same rim well as nav-panel buttons, 28×28 */
.ai-assistant-button {
    --cta-ring: 1px;
    --cta-pad: 3.5px;
    --cta-rim: 1px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    border: none;
    border-radius: 50%;
    color: var(--ico-color);
    padding: var(--cta-pad);
    box-sizing: border-box;
    background: var(--bg-color);
    box-shadow:
        inset 2px 3px 5px rgba(155, 164, 176, 0.26),
        inset -2px -2px 4px rgba(255, 255, 255, 0.92);
    transition: box-shadow 120ms ease, background 120ms ease, transform 120ms ease;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: visible;
}

.ai-assist-ring {
    position: absolute;
    inset: var(--cta-ring);
    padding: var(--cta-rim);
    border-radius: 50%;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 2;
    background: var(--bg-color);
    box-shadow:
        1px 1px 2px rgba(160, 168, 178, 0.2),
        -1px -1px 2px rgba(255, 255, 255, 0.95),
        inset 0.5px 0.5px 0.5px rgba(255, 255, 255, 0.9),
        inset -0.5px -0.5px 0.5px rgba(150, 158, 170, 0.22);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.ai-assist-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    box-shadow:
        3px 3px 6px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
    transition: box-shadow 120ms ease, transform 120ms ease;
}

.ai-assistant-button i {
    font-size: 12px;
    color: inherit;
}

.ai-assistant-button:active .ai-assist-face {
    box-shadow: none;
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    transform: none;
    transition-duration: 0ms;
}

@media (hover: hover) and (pointer: fine) {
    .ai-assistant-button:hover .ai-assist-face { box-shadow: none; }
}

/* Contact buttons */
.contact-button {
    background-color: transparent;
    border: 2px solid #333;
    color: #333;
    width: 80px;
    height: 80px;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.contact-button:hover {
    background-color: #333;
    color: #fff;
}

/* ==========================================================================
   Sections
   ========================================================================== */
/* Main section */
.home-container {
    position: fixed;
    top: 50%;
    left: 4%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    z-index: 5;
}

.home-card { padding: 5px 20px; }

/* ── Label "ВЕБ-СТУДИЯ" ─────────────────────────────────── */
.home-label {
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Raleway', sans-serif;
    font-size: clamp(7px, 0.54vw, 9px);
    font-weight: 300;
    letter-spacing: 0.48em;
    text-transform: uppercase;
    color: #b8c2cc;
    opacity: 0;
    animation: homeItemIn 0.9s cubic-bezier(0.22,1,0.36,1) 0.1s forwards;
}

.home-label::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 1px;
    background: #c8d2da;
    flex-shrink: 0;
}

/* ── Основной заголовок ─────────────────────────────────── */
.home-name {
    margin: 0 0 14px;
    padding: 0;
    line-height: 0.94;
    font-size: inherit;
    font-weight: 400;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* «РАЗРАБОТКА» — Raleway 200, воздушное, трекинг */
.home-name-thin {
    display: block;
    margin: 0;
    padding: 0;
    text-indent: 0;
    text-align: left;
    font-family: 'Raleway', sans-serif;
    font-weight: 200;
    font-size: clamp(26px, 2.8vw, 42px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a0aab5;
    text-shadow:
        -1px -1px 4px rgba(255,255,255,0.88),
         1px  1px 6px rgba(155,165,178,0.32);
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    animation: homeTitleReveal 0.82s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}

/* «сайтов» — Raleway 300, чуть темнее и крупнее */
.home-name-word {
    display: block;
    margin: 0.04em 0 0 0;
    padding: 0;
    text-indent: 0;
    text-align: left;
    font-family: 'Raleway', sans-serif;
    font-weight: 300;
    font-size: clamp(32px, 3.55vw, 52px);
    letter-spacing: 0.08em;
    color: #3c4452;
    text-shadow:
        -2px -2px 6px rgba(255,255,255,0.94),
         2px  2px 9px rgba(140,152,168,0.40);
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    animation: homeWordReveal 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.32s forwards;
}

/* ── Подзаголовок ───────────────────────────────────────── */
.home-sub {
    margin: 20px 0 0;
    padding: 0;
    font-family: 'Raleway', sans-serif;
    font-size: clamp(9px, 0.78vw, 11.5px);
    font-weight: 300;
    color: #b8c2cc;
    letter-spacing: 0.08em;
    opacity: 0;
    animation: homeItemIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.62s forwards;
}

/* ── Анимация появления элементов заголовка ─────────────── */
@keyframes homeItemIn {
    from {
        opacity: 0;
        transform: translateY(16px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes homeTitleReveal {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
        transform: translateX(-22px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes homeWordReveal {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
        transform: translateY(18px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: translateY(0);
        filter: blur(0);
    }
}

#Typewriter_skills {
    position: absolute;
    left: 0;
    top: 100%;
    width: max-content;
    max-width: min(42ch, 52vw);
    min-height: 2.6em;
    margin-top: 14px;
    padding: 0 20px;
    box-sizing: border-box;
    font-size: clamp(11px, 1vw, 14px);
    line-height: 1.45;
    color: #7a8088;
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    letter-spacing: 0.01em;
    pointer-events: none;
}

/* Resume tooltip */
/* Container anchored at nav-panel left edge, width = line length */
.clue-resume {
    position: fixed;
    top: 50%;
    right: 64px;                /* right edge = nav-panel left edge */
    width: 10vw;                /* matches line max-width */
    transform: translateY(-50%);
    z-index: 5;
}

/* Tooltip — sits just to the LEFT of the container (line start) */
.clue-text {
    position: absolute;
    right: 100%;                /* flush to container left edge */
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    font-family: 'Titillium Web', sans-serif;
    color: #fff;
    background: rgba(0, 0, 0, 0.88);
    padding: 3px calc(8px + var(--tip-pointer)) 3px 8px;
    border-radius: var(--tip-radius);
    white-space: nowrap;
    /* appears first: grows left→right from arrow tip */
    opacity: 0;
    transform: translateY(-50%) scaleY(0.05);
    transform-origin: center center;
    animation: clueTextIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0s forwards;
    -webkit-clip-path: polygon(0% 0%, calc(100% - var(--tip-pointer)) 0%, 100% 50%, calc(100% - var(--tip-pointer)) 100%, 0% 100%);
            clip-path: polygon(0% 0%, calc(100% - var(--tip-pointer)) 0%, 100% 50%, calc(100% - var(--tip-pointer)) 100%, 0% 100%);
}

@keyframes clueTextIn {
    /* phase 1: appear as thin horizontal line */
    0%   { opacity: 0; transform: translateY(-50%) scaleY(0.05); }
    30%  { opacity: 1; transform: translateY(-50%) scaleY(0.05); }
    /* phase 2: expand vertically to full tooltip */
    100% { opacity: 1; transform: translateY(-50%) scaleY(1);    }
}

/* Carved slit that sinks into the background toward the nav */
.clue-line {
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    background: linear-gradient(
        180deg,
        rgba(148, 156, 166, 0.42) 0%,
        rgba(148, 156, 166, 0.08) 48%,
        rgba(255, 255, 255, 0.7) 100%
    );
    -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.4) 52%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.4) 52%, transparent 100%);
    transform: scaleX(0);
    transform-origin: left center;
    animation: grow-line 0.25s linear 0.22s forwards;
}

/* Modal window */
.modal {
    position: fixed;
    top: 2%;
    right: 0;
    height: 96%;
    width: calc(96% - 70px);
    background-color: var(--modal-bg);
    border-radius: 24px;
    z-index: 10;
    transform: translate3d(100%, 0, 0);
    opacity: 0;
    transition: transform var(--modal-open-duration) var(--modal-ease-enter),
                opacity var(--modal-open-duration) var(--modal-ease-enter);
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.2), 0 0 8px 2px rgba(0, 0, 0, 0.2);
    display: none;
    will-change: transform;
    backface-visibility: hidden;
    contain: layout paint;
}

#modal-profile,
#modal-resume {
    background-color: #ffffff;
}

.modal.show {
    transform: translate3d(calc(-1 * var(--modal-right-gap)), 0, 0);
    opacity: 1;
    display: block;
}

.modal.closing {
    transition-duration: var(--modal-close-duration), var(--modal-close-duration);
    transition-timing-function: var(--modal-ease-exit), var(--modal-ease-exit);
}
.modal.hide { transform: translate3d(100%, 0, 0); opacity: 0; }

/* Same-slot replace (О нас ↔ Продвижение): overlap, no full slide-off */
.modal.modal-swap-in {
    z-index: 12;
    transform: translate3d(calc(-1 * var(--modal-right-gap) + 36px), 0, 0) scale(0.985);
    opacity: 0;
    transition-duration: var(--modal-swap-in-duration), var(--modal-swap-in-duration);
    transition-timing-function: var(--modal-ease-enter), var(--modal-ease-enter);
}
.modal.modal-swap-in.show {
    transform: translate3d(calc(-1 * var(--modal-right-gap)), 0, 0) scale(1);
    opacity: 1;
}
.modal.modal-swap-out {
    z-index: 9;
}
.modal.modal-swap-out.closing,
.modal.modal-swap-out.hide {
    transition-duration: var(--modal-swap-out-duration), var(--modal-swap-out-duration);
    transition-timing-function: var(--modal-ease-exit), var(--modal-ease-exit);
    transform: translate3d(calc(-1 * var(--modal-right-gap) - 10px), 0, 0) scale(0.985);
    opacity: 0;
    filter: none;
}

/* Мобильный Firefox/браузеры с touch: во время анимации убираем тяжёлую тень,
   чтобы избавиться от микрофризов при выезде модалки */
@media (hover: none), (pointer: coarse) {
  .modal.animating { box-shadow: none; }
}

/* Портретная ориентация: полностью отключаем тени у модалок для лучшей производительности */
@media (orientation: portrait) {
  .modal { box-shadow: none; }
}

/* Во время анимации подскажем браузеру композитинг по transform */
.modal.animating { will-change: transform; }

.modal-content {
    padding: 40px 40px 40px 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modal-body {
    padding-left: 80px;
    padding-right: 30px;
    max-height: calc(100% - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-color) transparent;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
    /* Улучшение поведения скролла в мобильных браузерах */
    overscroll-behavior: contain;
    touch-action: pan-y;
    /* Изоляция перерисовок содержимого модалки */
    contain: content;
}

.modal-body::-webkit-scrollbar { width: 2px; }
.modal-body::-webkit-scrollbar-button { display: none; height: 0; }
.modal-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-color);
    border-radius: 99px;
}
.modal-body::-webkit-scrollbar-track {
    background: transparent;
    margin: 22px 0;
}

/* ==========================================================================
   О НАС — i-WOW студия (modal-profile)
   ========================================================================== */

#modal-profile .ac-wrap {
    padding: 4px 0 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

#modal-profile .ac-wrap h2,
#modal-profile .ac-wrap h4,
#modal-profile .ac-wrap p,
#modal-profile .ac-wrap ul,
#modal-profile .ac-wrap li {
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: inherit;
}

/* ── Шапка ──────────────────────────────────────────────── */
#modal-profile .ac-header {
    padding: 8px 40px 0;
}

#modal-profile .ac-eyebrow,
#modal-profile .ac-section-eyebrow {
    font-family: 'Raleway', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: #a8b4c0;
    margin: 0 0 14px;
}

#modal-profile .ac-title {
    font-family: 'Raleway', sans-serif !important;
    font-weight: 200 !important;
    font-size: clamp(36px, 4.2vw, 58px) !important;
    color: #1a2030 !important;
    margin: 0 0 12px !important;
    line-height: 1.02 !important;
    letter-spacing: 0.01em;
}

#modal-profile .ac-title-accent {
    font-weight: 300;
    color: #5a6578;
}

#modal-profile .ac-tagline {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(13px, 1.15vw, 16px);
    font-weight: 300;
    color: #7a8898;
    margin: 0 !important;
    max-width: 520px;
    line-height: 1.55;
}

/* ── Цитата: печать прямо на фоне ───────────────────────── */
#modal-profile .ac-quote {
    margin: 0 40px;
    padding: 4px 0 2px;
    min-height: 72px;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

#modal-profile .ac-quote-text {
    font-family: 'Raleway', sans-serif !important;
    font-weight: 300 !important;
    font-size: clamp(15px, 1.45vw, 20px) !important;
    color: #2c3444 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    min-height: 1.5em;
}

#modal-profile .ac-quote-caret {
    display: inline-block;
    width: 1.5px;
    height: 0.9em;
    margin-left: 3px;
    background: #4a5468;
    vertical-align: -2px;
    animation: acCaret 1s steps(1) infinite;
}

@keyframes acCaret {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

#modal-profile .ac-quote-author {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a8b2be;
    margin-top: 10px;
    min-height: 1.2em;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

#modal-profile .ac-quote-author.is-on {
    opacity: 1;
    transform: translateY(0);
}

/* ── Статистика — неоморфные плитки ─────────────────────── */
#modal-profile .ac-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 2px 48px 6px;
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

#modal-profile .ac-stat {
    background: #fff;
    border: 1px solid rgba(20, 24, 32, 0.08);
    box-shadow: none;
    border-radius: 14px;
    padding: 10px 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
    transition: box-shadow 0.28s ease, transform 0.28s ease;
}

#modal-profile .ac-stat::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0) 46%
    );
    pointer-events: none;
}

#modal-profile .ac-stat.is-live::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        105deg,
        transparent 42%,
        rgba(255, 255, 255, 0.28) 50%,
        transparent 58%
    );
    background-size: 220% 100%;
    background-position: 120% 0;
    animation: acStatShine 0.9s ease forwards;
    pointer-events: none;
}

@keyframes acStatShine {
    from { background-position: 120% 0; }
    to   { background-position: -30% 0; }
}

#modal-profile .ac-stat:hover {
    transform: none;
    border-color: rgba(20, 24, 32, 0.16);
    box-shadow: none;
}

#modal-profile .ac-stat-value {
    font-family: 'Jost', 'Raleway', sans-serif;
    font-weight: 200;
    font-size: clamp(26px, 3vw, 36px);
    font-variant-numeric: lining-nums tabular-nums;
    font-feature-settings: "lnum" 1, "tnum" 1, "onum" 0;
    font-kerning: none;
    color: #1f2630;
    line-height: 1;
    height: 1em;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.02em;
    letter-spacing: 0.03em;
    position: relative;
    z-index: 1;
}

#modal-profile .ac-digit {
    display: block;
    height: 1em;
    width: 0.58em;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

#modal-profile .ac-digit-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

#modal-profile .ac-digit-track > span {
    display: block;
    height: 1em;
    line-height: 1;
    text-align: center;
    font-variant-numeric: lining-nums tabular-nums;
}

#modal-profile .ac-stat-glyph {
    display: block;
    line-height: 1;
    margin-bottom: 0.02em;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

#modal-profile .ac-stat-value.is-landed .ac-stat-glyph {
    opacity: 0.42;
    transform: translateY(0);
}

#modal-profile .ac-stat-bar {
    width: 0;
    height: 1px;
    border-radius: 1px;
    margin-top: 1px;
    background: linear-gradient(90deg, transparent, #b4c0cc, transparent);
    position: relative;
    z-index: 1;
    transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

#modal-profile .ac-stat.is-live .ac-stat-bar {
    width: 22px;
}

#modal-profile .ac-stat-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    font-weight: 400;
    color: #a4b0bc;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    text-align: center;
    line-height: 1.5;
}

#modal-profile .ac-stat:hover .ac-stat-value {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    #modal-profile .ac-stat.is-live::after { animation: none; }
    #modal-profile .ac-stat-bar { transition: none; }
    #modal-profile .ac-digit {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

/* ── Фото команды ───────────────────────────────────────── */
#modal-profile .ac-photo-wrap {
    margin: 0 40px;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    box-shadow: none;
    border: 1px solid rgba(20, 24, 32, 0.08);
}

#modal-profile .ac-team-photo {
    width: 100%;
    aspect-ratio: 16 / 8.2;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

#modal-profile .ac-photo-wrap:hover .ac-team-photo {
    transform: scale(1.03);
}

/* ── О компании — два абзаца ────────────────────────────── */
#modal-profile .ac-about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 4px 40px 6px;
}

#modal-profile .ac-about p {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    color: #5c6a78 !important;
    line-height: 1.8 !important;
    margin: 0 !important;
}

/* ── Принципы ───────────────────────────────────────────── */
#modal-profile .ac-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 0 40px;
}

#modal-profile .ac-value-card {
    --ac-accent: #5b8dee;
    background: #ffffff;
    border-radius: 24px;
    padding: 26px 24px 22px;
    min-height: 248px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(20, 24, 32, 0.08);
    box-shadow: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

#modal-profile .ac-val--result { --ac-accent: #5b8dee; }
#modal-profile .ac-val--speed  { --ac-accent: #e09a2b; }
#modal-profile .ac-val--trust  { --ac-accent: #2db37c; }
#modal-profile .ac-val--grow   { --ac-accent: #7c5cbf; }

#modal-profile .ac-value-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 22px;
    width: 2px;
    background: var(--ac-accent);
    transform: scaleY(0.22);
    transform-origin: top;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.85;
}

#modal-profile .ac-value-card:hover {
    transform: none;
    border-color: color-mix(in srgb, var(--ac-accent) 42%, rgba(20, 24, 32, 0.08));
    box-shadow: none;
}

#modal-profile .ac-value-card:hover::before {
    transform: scaleY(1);
}

#modal-profile .ac-value-num {
    position: absolute;
    right: 10px;
    bottom: -18px;
    font-family: 'Raleway', sans-serif;
    font-weight: 200;
    font-size: 118px;
    line-height: 1;
    letter-spacing: -0.06em;
    color: var(--ac-accent);
    opacity: 0.08;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.45s ease;
}

#modal-profile .ac-value-card:hover .ac-value-num {
    opacity: 0.16;
    transform: translateY(-6px);
}

#modal-profile .ac-value-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f4f6f8;
    color: var(--ac-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 16px;
    position: relative;
}

#modal-profile .ac-value-title {
    font-family: 'Raleway', sans-serif !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    color: #1a2030 !important;
    margin: 0 0 8px !important;
    letter-spacing: 0.01em;
    position: relative;
}

#modal-profile .ac-value-text {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 300 !important;
    color: #6a7686 !important;
    line-height: 1.65 !important;
    margin: 0 0 16px !important;
    max-width: 92%;
    position: relative;
}

#modal-profile .ac-value-list {
    list-style: none;
    margin: auto 0 0 !important;
    padding: 14px 0 0 !important;
    border-top: 1px solid rgba(180, 192, 210, 0.22);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
}

#modal-profile .ac-value-list li {
    font-family: 'DM Sans', sans-serif;
    font-size: 11.5px;
    font-weight: 400;
    color: #5a6678;
    margin: 0 !important;
    padding: 6px 11px;
    border-radius: 999px;
    background: #f3f5f8;
    line-height: 1.3;
}

/* ── Анимации ───────────────────────────────────────────── */
@keyframes acFadeUp {
    from { opacity: 0; transform: translateY(22px); filter: blur(3px); }
    to   { opacity: 1; transform: translateY(0);    filter: blur(0);   }
}

@keyframes acFadeScale {
    from { opacity: 0; transform: scale(0.96); filter: blur(2px); }
    to   { opacity: 1; transform: scale(1);    filter: blur(0);   }
}

#modal-profile.show .ac-eyebrow  { animation: acFadeUp 0.55s cubic-bezier(0.22,1,0.36,1) 0.08s both; }
#modal-profile.show .ac-title    { animation: acFadeUp 0.65s cubic-bezier(0.22,1,0.36,1) 0.16s both; }
#modal-profile.show .ac-tagline  { animation: acFadeUp 0.55s cubic-bezier(0.22,1,0.36,1) 0.24s both; }
#modal-profile.show .ac-quote    { animation: acFadeScale 0.7s cubic-bezier(0.22,1,0.36,1) 0.30s both; }

#modal-profile.show .ac-stat:nth-child(1) { animation: acFadeUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.38s both; }
#modal-profile.show .ac-stat:nth-child(2) { animation: acFadeUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.46s both; }
#modal-profile.show .ac-stat:nth-child(3) { animation: acFadeUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.54s both; }
#modal-profile.show .ac-stat:nth-child(4) { animation: acFadeUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.62s both; }

#modal-profile.show .ac-photo-wrap { animation: acFadeScale 0.75s cubic-bezier(0.22,1,0.36,1) 0.68s both; }
#modal-profile.show .ac-about      { animation: acFadeUp 0.6s cubic-bezier(0.22,1,0.36,1) 0.78s both; }

#modal-profile.show .ac-value-card:nth-child(1) { animation: acFadeUp 0.6s cubic-bezier(0.22,1,0.36,1) 0.86s both; }
#modal-profile.show .ac-value-card:nth-child(2) { animation: acFadeUp 0.6s cubic-bezier(0.22,1,0.36,1) 0.96s both; }
#modal-profile.show .ac-value-card:nth-child(3) { animation: acFadeUp 0.6s cubic-bezier(0.22,1,0.36,1) 1.06s both; }
#modal-profile.show .ac-value-card:nth-child(4) { animation: acFadeUp 0.6s cubic-bezier(0.22,1,0.36,1) 1.16s both; }

#modal-profile.show .ac-stat:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    #modal-profile .ac-header,
    #modal-profile .ac-stats,
    #modal-profile .ac-about,
    #modal-profile .ac-values { padding-left: 18px; padding-right: 18px; }

    #modal-profile .ac-quote,
    #modal-profile .ac-photo-wrap { margin-left: 18px; margin-right: 18px; }

    #modal-profile .ac-stats { grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 18px 8px; }

    #modal-profile .ac-about,
    #modal-profile .ac-values { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    #modal-profile .ac-title { font-size: 32px !important; }
    #modal-profile .ac-quote { padding: 2px 0; min-height: 68px; }
}

/* ==========================================================================
   ПРОДВИЖЕНИЕ — modal-resume
   ========================================================================== */

.pr-wrap {
    --pr-gap: 22px;
    --pr-pad: 8px;
    --pr-card-bg: #ffffff;
    --pr-card-shadow: none;
    padding: 4px var(--pr-pad) 28px;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.pr-header {
    padding: 8px 0 22px;
}

.pr-card--seo,
.pr-card--stock { --pkg-accent: #10b981; }
.pr-card--ads { --pkg-accent: #3d8ef0; }
.pr-card--smm { --pkg-accent: #8b5cf6; }
.pr-card--sit { --pkg-accent: #e5484d; }
.pr-card--term { --pkg-accent: #f59e0b; }

.pr-eyebrow {
    font-family: 'Raleway', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: #a8b4c0;
    margin: 0 0 14px;
}

.pr-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 200;
    font-size: clamp(36px, 4.2vw, 58px);
    color: #1a2030;
    margin: 0 0 12px;
    line-height: 1.02;
    letter-spacing: 0.01em;
}

.pr-title-accent {
    font-weight: 300;
    color: #5a6578;
}

.pr-tagline {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(14px, 1.2vw, 17px);
    font-weight: 300;
    color: #7a8898;
    margin: 0;
    max-width: 560px;
    line-height: 1.5;
}

.pr-products,
.pr-fit,
.pr-mix,
.pr-process {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--pr-gap);
    align-items: stretch;
}

.pr-products {
    padding: 4px 0 8px;
}

.pr-block {
    padding: 32px 0 0;
}

.pr-block--last {
    padding-bottom: 8px;
}

.pr-h2 {
    font-family: 'Raleway', sans-serif;
    font-weight: 300;
    font-size: clamp(22px, 2.2vw, 28px);
    color: #1a2030;
    margin: 0 0 18px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.pr-h2--tight { margin-bottom: 10px; }

.pr-lead {
    font-family: 'DM Sans', sans-serif;
    font-size: 14.5px;
    font-weight: 300;
    color: #7a8898;
    line-height: 1.65;
    margin: 0 0 22px;
    max-width: 720px;
}

.pr-service-card,
.pr-fit-card,
.pr-mix-col,
.pr-step {
    background: var(--pr-card-bg);
    border-radius: 18px;
    padding: 22px 20px 20px;
    border: 1px solid rgba(20, 24, 32, 0.08);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    box-sizing: border-box;
    contain: layout style;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.pr-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.pr-card-icon,
.pr-step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--pkg-accent, #6a7380) 10%, #ffffff);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--pkg-accent, #6a7380);
}

.pr-step-num {
    font-family: 'Jost', 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.pr-card-badge {
    display: inline-flex;
    align-items: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pkg-accent, #7a8494);
    background: color-mix(in srgb, var(--pkg-accent, #7a8494) 12%, #ffffff);
    border-radius: 999px;
    padding: 5px 10px;
    box-shadow: none;
}

.pr-fit-title,
.pr-mix-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    font-size: 17px;
    color: #1a2030;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.pr-fit-text,
.pr-mix-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 300;
    color: #6a7684;
    line-height: 1.6;
    margin: 0;
}

.pr-service-title {
    font-family: 'Raleway', sans-serif;
    font-size: 21px;
    font-weight: 400;
    color: #1a2030;
    margin: 4px 0 0;
    letter-spacing: -0.02em;
    line-height: 1.22;
}

.pr-service-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 300;
    color: #6a7684;
    line-height: 1.6;
    margin: 0 0 4px;
}

.pr-service-list {
    list-style: none;
    padding: 0;
    margin: 2px 0 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pr-service-list li {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #374151;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    line-height: 1.4;
}

.pr-service-list li:last-child { border-bottom: none; }

.pr-service-list li i {
    font-size: 9px;
    margin-top: 4px;
    flex-shrink: 0;
    width: 12px;
    text-align: center;
    color: var(--pkg-accent, #10b981);
}

@media (hover: hover) and (pointer: fine) {
    .pr-service-card:hover,
    .pr-fit-card:hover,
    .pr-mix-col:hover,
    .pr-step:hover {
        transform: none;
        border-color: color-mix(in srgb, var(--pkg-accent, #6a7380) 38%, rgba(20, 24, 32, 0.08));
        box-shadow: none;
    }
}

.pr-step-title {
    font-family: 'Raleway', sans-serif;
    font-size: 17px;
    font-weight: 400;
    color: #1a2030;
    margin: 0;
    letter-spacing: -0.02em;
}

.pr-step-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 300;
    color: #6a7684;
    line-height: 1.65;
    margin: 0;
}

.pr-acc {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pr-acc-item {
    background: #fff;
    border: 1px solid rgba(20, 24, 32, 0.08);
    border-radius: 14px;
    box-shadow: none;
    overflow: hidden;
    contain: layout style;
    transition: box-shadow 0.22s ease;
}

.pr-acc-item[open] {
    box-shadow: none;
    border-color: rgba(20, 24, 32, 0.14);
}

.pr-acc-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #1a2030;
    letter-spacing: -0.015em;
    line-height: 1.35;
    user-select: none;
}

.pr-acc-item summary::-webkit-details-marker { display: none; }

.pr-acc-item summary i {
    font-size: 11px;
    color: #9aa3ae;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.pr-acc-item[open] summary i {
    transform: rotate(180deg);
}

.pr-acc-item summary:focus-visible {
    outline: 2px solid rgba(90, 101, 120, 0.35);
    outline-offset: -2px;
}

.pr-acc-a {
    padding: 0 20px 18px;
}

.pr-acc-item[open] .pr-acc-a {
    animation: prAccIn 0.26s ease;
}

.pr-acc-a p {
    font-family: 'DM Sans', sans-serif;
    font-size: 14.5px;
    font-weight: 300;
    color: #5c6a78;
    line-height: 1.75;
    margin: 0;
}

@keyframes prAccIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

.pr-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 26px 28px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(20, 24, 32, 0.08);
    box-shadow: none;
}

.pr-cta-copy {
    flex: 1;
    min-width: 0;
}

.pr-cta-copy p {
    font-family: 'DM Sans', sans-serif;
    font-size: 14.5px;
    font-weight: 300;
    color: #6a7684;
    line-height: 1.65;
    margin: 0;
    max-width: 520px;
}

.pr-cta-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #fff;
    background: #111318;
    border-radius: 999px;
    padding: 14px 22px 14px 24px;
    box-shadow: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.pr-cta-btn i {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
    transition: transform 0.22s ease, color 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
    .pr-cta-btn:hover {
        transform: none;
        color: #fff;
        background: #2a2f38;
        box-shadow: none;
    }
    .pr-cta-btn:hover i {
        transform: translateX(2px);
        color: #fff;
    }
}

.pr-cta-btn:active {
    transform: translateY(1px);
}

.pr-cta-btn:focus-visible {
    outline: 2px solid rgba(90, 101, 120, 0.4);
    outline-offset: 3px;
}

#modal-resume.show .pr-eyebrow  { animation: acFadeUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.06s both; }
#modal-resume.show .pr-title    { animation: acFadeUp 0.55s cubic-bezier(0.22,1,0.36,1) 0.12s both; }
#modal-resume.show .pr-tagline  { animation: acFadeUp 0.45s cubic-bezier(0.22,1,0.36,1) 0.18s both; }
#modal-resume.show .pr-products .pr-service-card:nth-child(1) { animation: acFadeUp 0.45s cubic-bezier(0.22,1,0.36,1) 0.24s backwards; }
#modal-resume.show .pr-products .pr-service-card:nth-child(2) { animation: acFadeUp 0.45s cubic-bezier(0.22,1,0.36,1) 0.30s backwards; }
#modal-resume.show .pr-products .pr-service-card:nth-child(3) { animation: acFadeUp 0.45s cubic-bezier(0.22,1,0.36,1) 0.36s backwards; }
#modal-resume.show .pr-fit-card:nth-child(1) { animation: acFadeUp 0.45s cubic-bezier(0.22,1,0.36,1) 0.44s backwards; }
#modal-resume.show .pr-fit-card:nth-child(2) { animation: acFadeUp 0.45s cubic-bezier(0.22,1,0.36,1) 0.50s backwards; }
#modal-resume.show .pr-fit-card:nth-child(3) { animation: acFadeUp 0.45s cubic-bezier(0.22,1,0.36,1) 0.56s backwards; }

@media (prefers-reduced-motion: reduce) {
    .pr-service-card,
    .pr-fit-card,
    .pr-step,
    .pr-mix-col,
    .pr-cta-btn,
    .pr-acc-item,
    .pr-acc-item summary i {
        transition: none !important;
    }
    .pr-service-card:hover,
    .pr-fit-card:hover,
    .pr-step:hover,
    .pr-mix-col:hover,
    .pr-cta-btn:hover {
        transform: none !important;
    }
    .pr-acc-item[open] .pr-acc-a,
    #modal-resume.show .pr-eyebrow,
    #modal-resume.show .pr-title,
    #modal-resume.show .pr-tagline,
    #modal-resume.show .pr-service-card,
    #modal-resume.show .pr-fit-card {
        animation: none !important;
    }
}

@media (max-width: 900px) {
    .pr-products, .pr-fit, .pr-mix, .pr-process {
        gap: 16px;
        grid-template-columns: 1fr;
    }
    .pr-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
    .pr-wrap { --pr-pad: 4px; }
    .pr-fit { grid-template-columns: 1fr; }
    .pr-cta { padding: 22px 20px; }
    .pr-cta-btn { width: 100%; justify-content: center; }
}

/* Resume */

/* ==================================================================
   Unified headings & spacing for Profile and Resume modals
   - Keeps typography consistent between sections
   - Improves vertical rhythm (different gaps: title→text vs text→title)
   ================================================================== */
#modal-profile .modal-body h2{
  font-size: clamp(22px, 2.2vw, 28px);
  color: var(--text-color);
  margin: 0 0 var(--space-sm);
  line-height: 1.25;
}

#modal-profile .modal-body h3{
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--text-color);
  margin: 0 0 var(--space-xs);
  line-height: 1.3;
}

#modal-profile .modal-body p{
  margin: 0 0 var(--space-sm);
}

/* Larger top margin when a heading follows text; tighter when text follows heading */
#modal-profile .modal-body p + h2,
#modal-profile .modal-body p + h3 { margin-top: var(--space-md); }

#modal-profile .modal-body h2 + p,
#modal-profile .modal-body h3 + p { margin-top: var(--space-xs); }

/* Consistent stacking inside main columns */

/* Scoped spacing variables for modals (safer than global change) */
#modal-profile .modal-body,
#modal-resume .modal-body {
  --space-xs: 8px;
  --space-sm: 14px;
  --space-md: 24px;
}

/* Shared wrapper metrics for layout parity */

/* Mobile spacing tweaks for wrappers and modal paddings */
@media (max-width: 768px) {
  
  .modal-content { padding: 24px 20px; }
  .modal-body { padding-left: 40px; padding-right: 16px; }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .wave,
  .line-containe_down::after { animation: none !important; }
  .home-label,
  .home-name-thin,
  .home-name-word,
  .home-sub {
    opacity: 1 !important;
    animation: none !important;
    filter: none !important;
    transform: none !important;
    clip-path: none !important;
  }
  .modal,
  .modal.show,
  .modal.hide{ transition-duration: 0ms !important; }
  html { scroll-behavior: auto; }
}

@media (hover: none) and (pointer: coarse) {
  .modal-content {
    box-shadow: none !important;
  }
  .modal {
    will-change: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wave { animation: none !important; }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Line from «Разработка» to the center button (stepped, with travelling dot) */
.title-clue-line {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    overflow: visible;
}
.title-clue-line.is-hidden { display: none; }
.title-clue-label {
    position: fixed;
    z-index: 6;
    margin: 0;
    border: none;
    cursor: pointer;
    pointer-events: auto;
    white-space: nowrap;
    color: var(--text-color);
    background: transparent;
    font-size: 9px;
    font-family: 'Titillium Web', sans-serif;
    letter-spacing: 0.06em;
    line-height: 1;
    padding: 4px 0 0;
    transform: translateX(-50%);
    opacity: 0;
}
.title-clue-label.is-hidden { display: none; }
.title-clue-label:hover { color: #000; }
.title-clue-label:active { transform: translateX(-50%) scale(0.96); }
.title-clue-label.is-shown {
    animation: titleClueLabelIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.title-clue-label.is-leaving {
    animation: none !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.45, 0.05, 0.2, 1);
}
.title-clue-line.is-leaving .title-clue-dot {
    animation: none !important;
    opacity: 0 !important;
}

@keyframes titleClueLabelIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.title-clue-path {
    fill: none;
    stroke: #fff;
    stroke-width: 8;
    stroke-linecap: square;
    stroke-linejoin: miter;
}
.title-clue-groove-shadow {
    fill: none;
    stroke: url(#title-groove-shadow);
    stroke-width: 1.1;
    stroke-linecap: square;
    stroke-linejoin: miter;
    transform: translate(0.35px, 0.4px);
}
.title-clue-groove-light {
    fill: none;
    stroke: url(#title-groove-light);
    stroke-width: 1.1;
    stroke-linecap: square;
    stroke-linejoin: miter;
    transform: translate(-0.3px, -0.4px);
}
.title-clue-dot-wrap {
    transform-box: view-box;
    transform-origin: 0 0;
}
.title-clue-dot {
    fill: var(--text-color);
    pointer-events: none;
    opacity: 0;
    shape-rendering: geometricPrecision;
}

@media (prefers-reduced-motion: reduce) {
    .title-clue-path { transition: none !important; stroke-dashoffset: 0; }
    .title-clue-dot { display: none; }
    .title-clue-label { animation: none; opacity: 1; transform: translateX(-50%); }
}

@media (orientation: portrait) {
    .title-clue-label { display: none !important; }
}

@media (orientation: landscape) {
    .line-containe_down { display: none !important; }
}
.line-containe_down {
    position: fixed;
    left: 50%;
    /* start just below the button bottom edge (button = 110px → 55px from center + 12px gap) */
    top: calc(50% + 67px);
    transform: translateX(-50%);
    z-index: 5;
    width: 1px;
    height: 130px;
    overflow: visible;
}

.line-containe_down .line { position: absolute; background: var(--line-color); }

/* draws UPWARD in sync with dot — delay matches dot's horizontal phase */
.vertical_down {
    width: 1px;
    height: 0;
    top: auto;
    bottom: 0;
    animation: drawVertical 0.32s linear 0.2s forwards;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 28%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 28%);
}

/* draws RIGHT-TO-LEFT in sync with dot — starts when dot starts */
.horizontal_down {
    width: 28px;
    height: 1px;
    top: 130px;
    left: 0;
    transform: scaleX(0);
    transform-origin: right center;
    animation: drawHorizontal 0.14s linear 0.06s forwards;
}

/* tooltip pops in instantly at t=0 */
.line-down-text {
    position: absolute;
    font-size: 9px;
    top: 130px;
    left: 29px;
    transform: translateY(-50%) scaleY(0.05);
    transform-origin: center center;
    opacity: 0;
    white-space: nowrap;
    color: #fff;
    background: rgba(0, 0, 0, 0.88);
    padding: 3px 8px 3px calc(8px + var(--tip-pointer));
    border-radius: var(--tip-radius);
    pointer-events: auto;
    cursor: pointer;
    animation: showText 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0s forwards;
    font-family: 'Titillium Web', sans-serif;
    transition: background 0.15s ease, transform 0.15s ease;
    -webkit-clip-path: polygon(var(--tip-pointer) 0%, 100% 0%, 100% 100%, var(--tip-pointer) 100%, 0% 50%);
            clip-path: polygon(var(--tip-pointer) 0%, 100% 0%, 100% 100%, var(--tip-pointer) 100%, 0% 50%);
}

.line-down-text:hover { background: rgba(0, 0, 0, 1); transform: translateY(-50%) scaleX(1) scale(1.06); }
.line-down-text:active { transform: translateY(-50%) scaleX(1) scale(0.96); }

/* Travelling dot: tooltip → left along horizontal → up vertical → button */
.line-containe_down::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-color);
    box-shadow: 0 0 6px 2px rgba(42, 45, 51, 0.3);
    opacity: 0;
    /* start: right end of horizontal line (x=28), centred: left=28-3=25, top=130.5-3=128 */
    left: 25px;
    top: 128px;
    animation: none;
    pointer-events: none;
}

.line-containe_down.dot-run::after {
    animation: dotTravel var(--dot-cycle, 1.8s) linear var(--dot-delay, 0.05s) infinite;
}

@keyframes dotTravel {
    /* same cycle as the upper G-line dot: arrive at 62%, fade by 70% */
    0%   { left: 25px; top: 128px; opacity: 0;   transform: scale(0.5); }
    6%   { left: 24px; top: 128px; opacity: 1;   transform: scale(1);   }
    18%  { left: -3px; top: 128px; opacity: 1;   transform: scale(1);   }
    24%  { left: -3px; top: 118px; opacity: 1;   transform: scale(1);   }
    62%  { left: -3px; top: 4px;   opacity: 1;   transform: scale(0.8); }
    70%  { left: -3px; top: 0;     opacity: 0;   transform: scale(0.3); }
    100% { left: -3px; top: 0;     opacity: 0;   transform: scale(0.3); }
}

/* Portrait: line sits at y=110, tooltip tip at x=29 — start the 6px dot on that tip */
@keyframes dotTravelPortrait {
    0%   { left: 26px; top: 107px; opacity: 0;   transform: scale(0.5); }
    6%   { left: 26px; top: 107px; opacity: 1;   transform: scale(1);   }
    18%  { left: -3px; top: 107px; opacity: 1;   transform: scale(1);   }
    24%  { left: -3px; top: 97px;  opacity: 1;   transform: scale(1);   }
    62%  { left: -3px; top: 4px;   opacity: 1;   transform: scale(0.8); }
    70%  { left: -3px; top: 0;     opacity: 0;   transform: scale(0.3); }
    100% { left: -3px; top: 0;     opacity: 0;   transform: scale(0.3); }
}

/* Central button icon */

/* AI Assistant container */
.ai-assistant-container {
    position: fixed;
    display: flex;
    align-items: center;
    gap: 10px;
    left: 58%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.ai-assistant-text {
    font-size: 12px;
    color: #575656;
    font-family: 'Titillium Web', sans-serif;
}

/* Docked AI — independent of the home button, grows in place under the nav */
.ai-assistant-dock {
    position: fixed;
    left: calc(100% - var(--nav-panel-right) - 44px);
    top: calc(50% + (var(--nav-panel-height) / 2) + var(--ai-dock-below-nav));
    z-index: 15;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transform-origin: center center;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

body.main-exited .ai-assistant-dock,
body:has(.modal.show:not(.modal-ai)) .ai-assistant-dock,
body:has(.modal.closing:not(.modal-ai)) .ai-assistant-dock{
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

body.contact-visible .ai-assistant-dock,
body.contacts-hub-visible .ai-assistant-dock {
    opacity: 0 !important;
    transform: scale(0) !important;
    pointer-events: none !important;
}

@media (orientation: portrait) {
    .ai-assistant-dock {
        opacity: 0 !important;
        visibility: hidden;
        transform: scale(0) !important;
        pointer-events: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-assistant-dock {
        transition: opacity 0.2s ease;
        transform: none;
    }
    body.contact-visible .ai-assistant-dock,
    body.contacts-hub-visible .ai-assistant-dock {
        transform: none !important;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes wave-animation {
    0% { transform: translate(-50%, -50%) scale(0.72); opacity: 0.72; }
    100% { transform: translate(-50%, -50%) scale(2.15); opacity: 0; }
}

@keyframes grow-line {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes drawVertical   { from { height: 0; } to { height: 130px; } }
@keyframes drawHorizontal { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes showText {
    /* phase 1: appear as thin horizontal line */
    0%   { opacity: 0; transform: translateY(-50%) scaleY(0.05); }
    30%  { opacity: 1; transform: translateY(-50%) scaleY(0.05); }
    /* phase 2: expand vertically to full tooltip */
    100% { opacity: 1; transform: translateY(-50%) scaleY(1);    }
}
/* button appears when dot reaches top: delay=0.1+0.28+0.65=1.03s */
@keyframes fadeInCenter {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ==========================================================================
   Mobile devices (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px),
(min-width: 769px) and (max-width: 1024px) and (orientation: portrait) and (pointer: coarse) {
    .nav-panel {
        width: 40%;
        height: 50px;
        bottom: 20px;
        top: auto;
        right: 0;
        border-radius: 25px 0 0 25px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        box-sizing: border-box;
        padding: 5px 8px 5px 5px;
        box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
        transform: none;
        animation-name: navPanelInMobile;
    }

    .nav-panel.nav-panel-ready {
        transform: none;
    }

    @media (prefers-reduced-motion: reduce) {
        .nav-panel,
        .nav-panel.nav-panel-ready {
            animation: none;
            transform: none;
        }
    }

    .nav-panel-button {
        width: 40px;
        height: 40px;
        --cta-pad: 4px;
        --cta-ring: 1px;
        --cta-rim: 1px;
        margin-left: 0;
    }

    .nav-panel-button i { font-size: 14px; }

    .center-wave-container { top: 55%; z-index: 10; }

    .social-links {
        top: 12px;
        left: 10px;
        transform: none;
        flex-direction: row;
    }

    .social-button { width: 25px; height: 25px; }
    .social-button i { font-size: 12px; }

    .home-back-btn {
        display: none !important;
    }
    body.main-exited .social-links {
        top: 12px;
        left: 10px;
        transform: none;
    }

    @media (max-width: 420px) {
        body.main-exited .social-links { left: 10px; }
    }

    .modal:not(.modal-ai) {
        top: auto;
        bottom: 0;
        left: 0;
        height: 94%;
        width: 100%;
        border-radius: 15px 15px 0 0;
        transform: translateY(100%);
        opacity: 0;
        display: none;
    }

    .modal:not(.modal-ai).show {
        transform: translateY(0);
        opacity: 1;
        display: block;
    }

    .modal:not(.modal-ai).hide {
        transform: translateY(100%);
        opacity: 0;
    }

    .modal:not(.modal-ai).modal-swap-in {
        transform: translateY(18px) scale(0.985);
        opacity: 0;
    }

    .modal:not(.modal-ai).modal-swap-in.show {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    .modal:not(.modal-ai).modal-swap-out.closing,
    .modal:not(.modal-ai).modal-swap-out.hide {
        transform: translateY(10px) scale(0.985);
        opacity: 0;
        filter: none;
    }

    .modal-content {
        padding: 48px 12px; /* tighter spacing for portrait/mobile */
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        padding-left: 12px;
        padding-right: 10px;
        max-height: calc(100% - 50px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex-grow: 1;
    }

    .modal-body::-webkit-scrollbar { width: 2px; }
    .modal-body::-webkit-scrollbar-button { display: none; height: 0; }
    .modal-body::-webkit-scrollbar-thumb {
        background: var(--scrollbar-color);
        border-radius: 99px;
    }
    .modal-body::-webkit-scrollbar-track {
        background: transparent;
        margin: 22px 0;
    }

    
    
    
    
    

    .home-container { top: 28%; }
    .home-card { padding: 5px 10px; }
    .home-name { margin-bottom: 8px; line-height: 0.92; }
    /* Портрет: оба слова почти на всю ширину экрана */
    .home-name-thin {
        font-size: clamp(22px, 7.4vw, 36px);
        letter-spacing: 0.14em;
    }
    .home-name-word {
        font-size: clamp(30px, 11.2vw, 48px);
        letter-spacing: 0.05em;
    }
    .home-label { font-size: 7.5px; margin-bottom: 14px; }
    .home-sub { font-size: 9.5px; margin-top: 12px; }
    #Typewriter_skills {
        font-size: 13px;
        padding: 0 10px;
        margin-top: 10px;
        max-width: min(36ch, calc(100vw - 48px));
    }

    .clue-resume { display: none; }

    

    /* Restore flex structure; simple stacking with no growth */
    
    
    
    
    

    
    
    
    
    

    /* Remove extra vertical gaps around gallery */
    
    
    

    .ai-assistant-container {
        left: 16px;
        right: auto;
        bottom: 20px;
        top: auto;
        transform: none;
        z-index: 16;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .ai-assistant-dock {
        left: auto;
        right: 16px;
        bottom: 82px;
        top: auto;
        z-index: 16;
    }

    .ai-assistant-text {
        display: block;
    }

    

    

    

    

    
    

    

    

    

    

    

    

    

    

    

    
    
    
    
    
    
    
    

    .line-containe_down { top: calc(55% + 67px); height: 110px; }
    .vertical_down { bottom: 0; top: auto; animation: drawVerticalMobile 0.32s linear 0.2s forwards; }
    .horizontal_down { top: 110px; width: 28px; transform: scaleX(0); transform-origin: right center; animation: drawHorizontal 0.14s linear 0.06s forwards; }
    .line-down-text { top: 110px; }
    .line-containe_down::after {
        left: 26px;
        top: 107px;
    }
    .line-containe_down.dot-run::after {
        animation-name: dotTravelPortrait;
    }

    

    

    

    

    

    
    
}

@media (orientation: portrait) {
    .center-wave-container,
    .center-button {
        top: 59%;
    }

    .line-containe_down {
        top: calc(59% + 67px);
    }
}

@media (max-width: 768px), (orientation: portrait) {
    .center-button {
        background: linear-gradient(150deg, #ffffff 0%, #f5f6f9 46%, #dde1e7 100%);
        box-shadow:
            8px 14px 32px rgba(140, 150, 164, 0.24),
            3px 6px 12px rgba(140, 150, 164, 0.1),
            -6px -8px 20px rgba(255, 255, 255, 0.95),
            inset 1px 1px 2px rgba(255, 255, 255, 0.55);
    }

    .center-button:hover,
    .center-button:focus,
    .center-button:focus-visible {
        box-shadow:
            8px 14px 32px rgba(140, 150, 164, 0.24),
            3px 6px 12px rgba(140, 150, 164, 0.1),
            -6px -8px 20px rgba(255, 255, 255, 0.95),
            inset 1px 1px 2px rgba(255, 255, 255, 0.55);
    }

    .center-button:active {
        background: linear-gradient(150deg, #e8eaee 0%, #eef0f3 100%);
        box-shadow:
            inset 8px 10px 16px rgba(150, 158, 170, 0.32),
            inset -5px -6px 12px rgba(255, 255, 255, 0.88);
    }

    .center-logo {
        background: linear-gradient(145deg, #ffffff, #eef0f3);
        border-color: rgba(220, 224, 230, 0.85);
        box-shadow:
            inset 3px 4px 8px rgba(155, 164, 176, 0.16),
            inset -2px -3px 6px rgba(255, 255, 255, 0.95);
    }
}

/* ==========================================================================
   Landscape orientation
   ========================================================================== */
@media (max-width: 1024px) and (orientation: landscape) and (pointer: coarse) {
    :root { --modal-right-gap: 31px; }

    .nav-panel {
        width: 28px !important;
        height: 182px !important;
        right: 10px !important;
        padding: 7px !important;
        top: 50% !important;
        bottom: auto !important;
        flex-direction: column !important;
        border-radius: 32px !important;
        animation-name: navPanelIn;
    }

    .nav-panel.nav-panel-ready {
        transform: translateY(-50%);
    }

    .nav-panel-button {
        width: 40px !important;
        height: 40px !important;
        --cta-pad: 4px;
        --cta-ring: 1px;
        --cta-rim: 1px;
        margin-left: 0 !important;
    }

    .home-back-btn {
        display: none !important;
    }

    .center-button {
        width: 110px !important;
        height: 110px !important;
        padding: 0 !important;
        background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark)) !important;
        border: none !important;
        box-shadow:
            8px 14px 32px rgba(140, 150, 164, 0.24),
            3px 6px 12px rgba(140, 150, 164, 0.1),
            -6px -8px 20px rgba(255, 255, 255, 0.95),
            inset 1px 1px 2px rgba(255, 255, 255, 0.55) !important;
    }

    .center-button:active {
        box-shadow: inset 10px 10px 20px var(--shadow-dark), inset -10px -10px 20px var(--shadow-light) !important;
        background: var(--gradient-dark) !important;
    }

    .center-button i { font-size: 18px !important; }
    .center-logo-mark { width: 34px; height: auto; }
    .center-logo-word { font-size: 13.5px; }

    .wave {
        width: 110px !important;
        height: 110px !important;
    }

    .line-containe_down { height: 110px !important; }
    .vertical_down {
        bottom: 0 !important; top: auto !important;
        animation: drawVerticalLandscape 0.32s linear 0.2s forwards !important;
    }
    .horizontal_down {
        top: 110px !important;
        width: 28px !important;
        transform: scaleX(0) !important;
        transform-origin: right center !important;
        animation: drawHorizontalLandscape 0.14s linear 0.06s forwards !important;
    }
    .line-down-text { top: 110px !important; }

    .social-links {
        left: 10px !important;
    }

    .social-button {
        width: 25px !important;
        height: 25px !important;
    }

    .social-button i {
        font-size: 12px !important;
    }

    .clue-resume {
        right: 38px !important;
    }

    .home-container {
        top: 50% !important;
        left: 5% !important;
        transform: translateY(-50%) !important;
    }

    .home-card { padding: 5px 10px; }
    .home-name { margin-bottom: 8px; line-height: 0.92; }
    .home-name-thin { font-size: clamp(22px, 5.0vw, 36px); letter-spacing: 0.14em; }
    .home-name-word { font-size: clamp(28px, 6.5vw, 48px); letter-spacing: 0.06em; }
    .home-label { font-size: 7px; margin-bottom: 12px; }
    .home-sub { font-size: 9px; margin-top: 10px; }
    #Typewriter_skills {
        font-size: 11.2px !important;
        margin-top: 10px;
        max-width: min(38ch, 46vw);
    }

    .ai-assistant-container {
        left: 62% !important;
    }

    .ai-assistant-dock {
        left: calc(100% - var(--nav-panel-right) - 44px) !important;
        top: calc(50% + (var(--nav-panel-height) / 2) + var(--ai-dock-below-nav)) !important;
        right: auto !important;
        bottom: auto !important;
    }

    .modal:not(.modal-ai) {
        top: 2% !important;
        right: 0 !important;
        height: 96% !important;
        width: calc(100% - 70px) !important;
        border-radius: 16.8px !important;
        transform: translateX(100%) !important;
        opacity: 0 !important;
    }

    .modal:not(.modal-ai).show {
        transform: translateX(-34px) !important;
        opacity: 1 !important;
    }

    .modal:not(.modal-ai).hide {
        transform: translateX(100%) !important;
        opacity: 0 !important;
    }

    .modal:not(.modal-ai).modal-swap-in {
        transform: translateX(-6px) scale(0.985) !important;
        opacity: 0 !important;
    }

    .modal:not(.modal-ai).modal-swap-in.show {
        transform: translateX(-34px) scale(1) !important;
        opacity: 1 !important;
    }

    .modal:not(.modal-ai).modal-swap-out.closing,
    .modal:not(.modal-ai).modal-swap-out.hide {
        transform: translateX(-40px) scale(0.985) !important;
        opacity: 0 !important;
        filter: none !important;
    }

    /* Reduce margins in modal windows */
    .modal-body {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    
    
    

    /* Timeline optimization in Resume */
    

    

    

    
}

/* ==========================================================================
   Additional animations for mobile
   ========================================================================== */
@keyframes drawVerticalMobile   { from { height: 0; } to { height: 110px; } }
@keyframes drawVerticalLandscape { from { height: 0; } to { height: 110px; } }
@keyframes drawHorizontalLandscape { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Project Details (minimalist style) */

/* Exit animations for home elements when body has .main-exited */

.home-container,
.center-wave-container,
.clue-resume,
.line-containe_down,
.title-clue-line,
.title-clue-label {
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                left 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                top 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.ai-assistant-container {
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

body.main-exited .home-container {
    opacity: 0;
    transform: translateY(-50%) translateX(-100px);
    pointer-events: none;
}

body.main-exited .center-wave-container,
body.main-exited .center-wave-container.center-ready {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    pointer-events: none;
}

body.main-exited .clue-resume {
    opacity: 0;
    transform: translateY(-50%) translateX(100px);
    pointer-events: none;
}

body.main-exited .line-containe_down {
    opacity: 0;
    transform: translate(-50%, 150px);
    pointer-events: none;
}

body.main-exited .title-clue-line,
body.main-exited .title-clue-label {
    pointer-events: none;
}

body.main-exited .ai-assistant-container {
    opacity: 0;
    pointer-events: none;
}

/* Center Grid Blocks */
.center-blocks-container {
    position: fixed;
    top: 50%;
    left: calc(50% - 15px);
    transform: translate(-50%, -50%);
    width: min(calc(100vw - 230px), 1080px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 52px;
    z-index: 6;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease;
    scrollbar-width: none;
    /* padding >= shadow blur + offset (18+6=24px) чтобы тени не обрезались overflow */
    padding: 30px 30px;
    box-sizing: border-box;
}

.center-blocks-container::-webkit-scrollbar {
    display: none;
}

body.main-exited .center-blocks-container {
    pointer-events: auto;
    opacity: 1;
}

body.story-about .center-blocks-container,
body.story-promo .center-blocks-container {
    pointer-events: none;
    opacity: 0.22;
    filter: blur(4px);
    transform: translate(-50%, -50%) scale(0.94);
}

body.contact-visible .center-blocks-container {
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    filter: none;
}

/* ── Package cards ─────────────────────────────────────────────── */
.center-block-card {
    --pkg-accent: #3d8ef0;
    background: #f1f3f6;
    border-radius: 28px;
    padding: 22px 18px;
    border: none;
    outline: none;
    filter: none;
    box-shadow:
        10px 12px 24px rgba(168, 176, 186, 0.42),
        -8px -8px 18px rgba(255, 255, 255, 0.92),
        inset 1px 1px 0 rgba(255, 255, 255, 0.75);
    transform: scale(0.82) translateY(50px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.5s ease,
                box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    overflow: visible;
    min-height: 480px;
    box-sizing: border-box;
}

/* featured card — same surface as the others, no top stripe */
.center-block-card.featured { border: none; outline: none; }

.center-block-card.featured::before {
    content: none;
}

body.main-exited .center-block-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

body.contact-visible .center-block-card {
    transform: scale(0.82) translateY(50px);
    opacity: 0;
    pointer-events: none;
}

body.main-exited.contact-visible .center-block-card:nth-child(1) { transition-delay: 0.35s; }
body.main-exited.contact-visible .center-block-card:nth-child(2) { transition-delay: 0.25s; }
body.main-exited.contact-visible .center-block-card:nth-child(3) { transition-delay: 0.15s; }
body.main-exited.contact-visible .center-block-card:nth-child(4) { transition-delay: 0.05s; }

body.main-exited .center-block-card:nth-child(1) { transition-delay: 0.05s; }
body.main-exited .center-block-card:nth-child(2) { transition-delay: 0.15s; }
body.main-exited .center-block-card:nth-child(3) { transition-delay: 0.25s; }
body.main-exited .center-block-card:nth-child(4) { transition-delay: 0.35s; }

body.main-exited:not(.contact-visible) .center-block-card:hover {
    transform: scale(1) translateY(-5px);
    filter: none;
    box-shadow:
        14px 16px 28px rgba(160, 168, 178, 0.46),
        -9px -9px 20px rgba(255, 255, 255, 0.96),
        inset 1px 1px 0 rgba(255, 255, 255, 0.85);
}

/* ── Raised bezel + inset well for the package photo ─ */
.pkg-circle-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 6px auto 16px;
    padding: 8px;
    box-sizing: border-box;
    border: none;
    background: #eef0f3;
    box-shadow:
        4px 5px 10px rgba(168, 176, 186, 0.32),
        -4px -5px 9px rgba(255, 255, 255, 0.94),
        inset 2px 3px 10px rgba(155, 164, 175, 0.16),
        inset -2px -3px 8px rgba(255, 255, 255, 0.65);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.pkg-circle-photo::before,
.pkg-circle-photo::after {
    content: none !important;
}

.center-block-card:hover .pkg-circle-photo {
    transform: none;
    box-shadow:
        4px 5px 10px rgba(168, 176, 186, 0.34),
        -4px -5px 9px rgba(255, 255, 255, 0.96),
        inset 2px 3px 12px rgba(145, 154, 165, 0.18),
        inset -2px -3px 8px rgba(255, 255, 255, 0.68);
}

.pkg-circle-photo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: #dfe3e8;
    box-shadow:
        inset 3px 4px 18px rgba(140, 150, 162, 0.22),
        inset -3px -4px 14px rgba(255, 255, 255, 0.38);
}

.pkg-circle-photo-inner img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    transform: scale(0.97);
    transform-origin: center;
}

.pkg-circle-photo-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    box-shadow:
        inset 2px 3px 20px rgba(130, 140, 152, 0.2),
        inset 0 0 24px rgba(130, 140, 152, 0.1),
        inset -3px -4px 16px rgba(255, 255, 255, 0.35);
}

.pkg-circle-photo-inner::before {
    content: none;
}

/* ── Card top row: icon + badge ────────────────────────────── */
.pkg-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.pkg-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1f3f6;
    box-shadow:
        5px 6px 12px rgba(168, 176, 186, 0.4),
        -4px -4px 10px rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: box-shadow 0.25s ease;
}

.center-block-card:hover .pkg-icon-wrap {
    transform: none;
    box-shadow:
        6px 7px 14px rgba(168, 176, 186, 0.44),
        -5px -5px 11px rgba(255, 255, 255, 1);
}

.pkg-icon-wrap i {
    font-size: 16px;
    color: var(--pkg-accent);
}

/* ── Badge ─────────────────────────────────────────────────── */
.package-badge {
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    border: none;
    background: #e8ebf0;
    box-shadow:
        inset 1px 1px 2px rgba(160, 168, 178, 0.16),
        inset -1px -1px 2px rgba(255, 255, 255, 0.55);
}

.package-badge.badge-lite {
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.08);
    border-color: rgba(185, 28, 28, 0.22);
}

.package-badge.badge-popular {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.3);
}

.package-badge.badge-pro {
    color: #0369a1;
    background: rgba(3, 105, 161, 0.08);
    border-color: rgba(3, 105, 161, 0.2);
}

.package-badge.badge-vip {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.22);
}

/* ── Title + tagline ───────────────────────────────────────── */
.pkg-title-block {
    margin-bottom: 12px;
}

.package-title {
    font-family: 'Raleway', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 5px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.pkg-tagline {
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    font-weight: 400;
    color: #8a9099;
    margin: 0;
    line-height: 1.45;
}

/* ── Price ─────────────────────────────────────────────────── */
.package-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.price-from {
    font-family: 'Raleway', sans-serif;
    font-size: 10px;
    color: #b4bcc6;
    font-weight: 200;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    line-height: 1;
    transform: translateY(-1px);
}

.package-price .price-val {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(24px, 2.1vw, 30px);
    font-weight: 100;
    letter-spacing: 0.08em;
    font-variant-numeric: lining-nums;
    font-feature-settings: "lnum" 1;
    line-height: 1;
    color: #3c4452;
    background: none;
    -webkit-text-fill-color: #3c4452;
    filter: none;
}

.price-cur {
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 200;
    font-variant-numeric: lining-nums;
    letter-spacing: 0.04em;
    color: #a0a8b2;
    line-height: 1;
}

/* ── Features list ─────────────────────────────────────────── */
.package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 14px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

.package-features li {
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    font-weight: 400;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0,0,0,0.045);
    line-height: 1.4;
}

.package-features li:last-child { border-bottom: none; }

.package-features li i {
    font-size: 10px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.package-features li.feat-yes { color: #374151; }
.package-features li.feat-no { color: #b0b8c4; }

.feat-orb {
    width: 6px;
    height: 6px;
    margin-top: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--pkg-accent, #10b981);
    box-shadow:
        1.5px 1.5px 3px rgba(168, 176, 186, 0.5),
        -1px -1px 2.5px rgba(255, 255, 255, 0.95);
}

.feat-no .feat-orb {
    background: #c8ced6;
    box-shadow:
        1.5px 1.5px 3px rgba(168, 176, 186, 0.35),
        -1px -1px 2.5px rgba(255, 255, 255, 0.9);
}

/* ── Meta chips (timeline + revisions) ─────────────────────── */
.pkg-meta-row {
    margin-bottom: 12px;
}

.pkg-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11.5px;
    font-weight: 400;
    color: rgba(107, 114, 128, 0.85);
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
    letter-spacing: 0.02em;
}

.pkg-chip i { font-size: 10px; opacity: 0.6; }

/* ── CTA: label + hairline + round convex button ───────────── */
.pkg-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}

.pkg-cta-label {
    font-family: 'Titillium Web', sans-serif;
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a919c;
    white-space: normal;
    max-width: 9.2em;
    line-height: 1.25;
    flex-shrink: 0;
}

.pkg-cta-line {
    flex: 1 1 auto;
    height: 1px;
    min-width: 18px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(150, 158, 170, 0.16) 28%,
        rgba(150, 158, 170, 0.34) 100%
    );
    border-radius: 1px;
    pointer-events: none;
}

.pkg-cta-well {
    --cta-ring: 3px;
    --cta-pad: 10px;
    --cta-rim: 5px;
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: var(--cta-pad);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    background: #f1f3f6;
    box-shadow:
        inset 5px 6px 12px rgba(155, 164, 176, 0.38),
        inset -4px -5px 10px rgba(255, 255, 255, 0.95);
}

/* Light volumetric ring around the button (card color, no accent stroke) */
.pkg-cta-well::before {
    content: '';
    position: absolute;
    inset: var(--cta-ring);
    padding: var(--cta-rim);
    border-radius: 50%;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 2;
    background: #f1f3f6;
    box-shadow:
        2px 3px 6px rgba(160, 168, 178, 0.32),
        -2px -3px 6px rgba(255, 255, 255, 1),
        inset 1px 1px 1px rgba(255, 255, 255, 0.92),
        inset -1px -1px 2px rgba(168, 176, 186, 0.28);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.package-btn {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    font-size: 14px;
    color: var(--pkg-accent, #6a7280);
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    box-shadow:
        4px 5px 8px var(--shadow-dark),
        -3px -4px 7px var(--shadow-light);
    transition: box-shadow 0.28s ease, transform 0.28s ease, color 0.28s ease;
}

.package-btn i {
    position: relative;
    z-index: 1;
    transform: translateX(1px);
    color: var(--pkg-accent, #6a7280);
    text-shadow:
        1px 1px 0.5px rgba(255, 255, 255, 0.95),
        -1px -1px 1px color-mix(in srgb, var(--pkg-accent) 55%, #2a3140);
}

.package-btn:hover {
    transform: translateY(-1px);
    color: var(--pkg-accent, #3a4250);
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    box-shadow:
        5px 6px 10px var(--shadow-dark),
        -3px -4px 8px var(--shadow-light);
}

.package-btn:active {
    transform: translateY(1px);
    background: var(--gradient-dark);
    box-shadow:
        inset 4px 5px 10px var(--shadow-dark),
        inset -3px -4px 8px var(--shadow-light);
}

.package-btn:focus-visible {
    outline: none;
    box-shadow:
        5px 6px 12px var(--shadow-dark),
        -4px -5px 11px var(--shadow-light),
        0 0 0 2px rgba(125, 140, 160, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    .package-btn { transition: none; }
    .package-btn:hover { transform: none; }
}

@property --pkg-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@keyframes pkgSpinBorder {
    to { --pkg-angle: 360deg; }
}

/* ══════════════════════════════════════════════════════════════
   CARD COLOR THEMES  — clean unified neumorphic (radio style)
   All cards share the same light-blue neumorphic background.
   Color identity only through accent top-line, icon & check color.
   ══════════════════════════════════════════════════════════════ */

/* All cards share same bg — no separate hover bg change to avoid outline */

/* ── Card 1: red icon / badge / hover outline ── */
.card-lite { --pkg-accent: #e5484d; }

.card-popular { --pkg-accent: #10b981; }

.card-pro { --pkg-accent: #3d8ef0; }

.card-vip { --pkg-accent: #f59e0b; }

.center-block-card::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    box-sizing: border-box;
    background: conic-gradient(
        from var(--pkg-angle, 0deg),
        transparent 0%,
        transparent 55%,
        var(--pkg-accent, #3d8ef0) 78%,
        transparent 92%
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
    body.main-exited:not(.contact-visible) .center-block-card:hover::after {
        opacity: 0.9;
        animation: pkgSpinBorder 2.8s linear infinite;
    }
}

/* ── Order form: tariff selector bar ──────────────────────── */
.order-tariff-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 16px;
    margin-bottom: 18px;
    border-radius: 22px;
    background: linear-gradient(145deg, #f6f7f9 0%, #e8ebef 100%);
    box-shadow:
        inset 2px 2px 5px rgba(148, 158, 172, 0.13),
        inset -2px -2px 5px rgba(255, 255, 255, 0.88),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    border: none;
    position: relative;
    z-index: 8;
    cursor: pointer;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.order-tariff-bar::before {
    content: none;
}

.order-tariff-bar:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 2px 2px 5px rgba(148, 158, 172, 0.15),
        inset -2px -2px 5px rgba(255, 255, 255, 0.92),
        inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.order-tariff-bar.odt-open,
.order-tariff-bar.odt-open:hover {
    transform: none;
    cursor: default;
    z-index: 20;
}

.order-tariff-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eef0f3;
    box-shadow:
        3px 4px 9px rgba(144, 153, 166, 0.2),
        -3px -3px 9px rgba(255, 255, 255, 0.82),
        inset 1px 1px 1px rgba(255, 255, 255, 0.68);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.order-tariff-icon-wrap i {
    font-size: 16px;
    color: var(--ico-color);
    transition: color 0.3s ease;
}

.order-tariff-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.order-tariff-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 9.5px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: #b8c4d0;
    line-height: 1;
}

.order-tariff-name {
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #1e2430;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-tariff-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.order-tariff-price {
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: #3c4452;
    white-space: nowrap;
}

.order-tariff-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #6a7480;
    background: #eef0f3;
    box-shadow:
        3px 4px 9px rgba(144, 153, 166, 0.16),
        -3px -3px 9px rgba(255, 255, 255, 0.78),
        inset 1px 1px 1px rgba(255, 255, 255, 0.62);
    border: none;
    border-radius: 14px;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.25s ease, box-shadow 0.25s ease;
}

.order-tariff-toggle:hover,
.order-tariff-bar.odt-open .order-tariff-toggle {
    color: #1e2430;
    box-shadow:
        inset 3px 3px 7px rgba(144, 153, 166, 0.18),
        inset -3px -3px 7px rgba(255, 255, 255, 0.78);
}

.odt-arrow {
    font-size: 9px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.order-tariff-bar.odt-open .odt-arrow { transform: rotate(180deg); }

.odt-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--bg-color);
    border-radius: 18px;
    border: none;
    box-shadow:
        6px 10px 22px rgba(150, 158, 170, 0.28),
        -4px -4px 12px rgba(255, 255, 255, 0.7);
    z-index: 30;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transform-origin: top center;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
}

.order-tariff-bar.odt-open .odt-dropdown {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    flex: 1 0 100%;
    margin-top: 4px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
}

.odt-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.18s ease;
    opacity: 0;
    transform: translateX(-10px);
}

.odt-item:last-child { border-bottom: none; }

.order-tariff-bar.odt-open .odt-item {
    opacity: 1;
    transform: translateX(0);
}

.order-tariff-bar.odt-open .odt-item:nth-child(1) { transition: background 0.18s, opacity 0.22s 0.04s ease, transform 0.28s 0.04s cubic-bezier(0.34,1.4,0.64,1); }
.order-tariff-bar.odt-open .odt-item:nth-child(2) { transition: background 0.18s, opacity 0.22s 0.10s ease, transform 0.28s 0.10s cubic-bezier(0.34,1.4,0.64,1); }
.order-tariff-bar.odt-open .odt-item:nth-child(3) { transition: background 0.18s, opacity 0.22s 0.16s ease, transform 0.28s 0.16s cubic-bezier(0.34,1.4,0.64,1); }
.order-tariff-bar.odt-open .odt-item:nth-child(4) { transition: background 0.18s, opacity 0.22s 0.22s ease, transform 0.28s 0.22s cubic-bezier(0.34,1.4,0.64,1); }

.odt-item:hover { background: rgba(0,0,0,0.03); }
.odt-item.odt-active { background: rgba(0,0,0,0.04); }

.odt-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-color);
    box-shadow:
        3px 3px 8px rgba(150, 158, 170, 0.28),
        -3px -3px 8px rgba(255, 255, 255, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.odt-item-icon i { font-size: 14px; }

.odt-item[data-value="Landing Page"]     .odt-item-icon i { color: #e5484d; }
.odt-item[data-value="Бизнес-сайт"]      .odt-item-icon i { color: #059669; }
.odt-item[data-value="Интернет-магазин"] .odt-item-icon i { color: #3d8ef0; }
.odt-item[data-value="Индивидуальный"]   .odt-item-icon i { color: #7c3aed; }

.odt-item-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.odt-item-name {
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #1e2430;
    line-height: 1.2;
}

.odt-item-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 300;
    color: #9aa6b0;
    line-height: 1.3;
}

.odt-item-price {
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #5a6272;
    white-space: nowrap;
    flex-shrink: 0;
}

.odt-item.odt-active .odt-item-price::after {
    content: ' ✓';
    color: #10b981;
}

.order-tariff-bar[data-tariff="Landing Page"]     .order-tariff-icon-wrap i { color: #e5484d; }
.order-tariff-bar[data-tariff="Бизнес-сайт"]      .order-tariff-icon-wrap i { color: #059669; }
.order-tariff-bar[data-tariff="Интернет-магазин"]  .order-tariff-icon-wrap i { color: #3d8ef0; }
.order-tariff-bar[data-tariff="Индивидуальный"]    .order-tariff-icon-wrap i { color: #7c3aed; }

/* ── Scroll contact header tweak ───────────────────────────── */
.scroll-contact-header {
    text-align: center;
    margin-bottom: 14px;
    padding-top: 0;
    opacity: 0;
    transform: translateY(14px);
}

.scroll-contact-eyebrow {
    margin: 0 0 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 8.5px;
    font-weight: 400;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: #c0c8d0;
}

.scroll-contact-header h3 {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: 400;
    line-height: 0.92;
}

.sc-title-thin {
    display: block;
    font-family: 'Raleway', sans-serif;
    font-weight: 200;
    font-size: clamp(15px, 1.8vw, 20px);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #a8b2bc;
    margin: 0;
}

.sc-title-main {
    display: block;
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: 0.01em;
    color: #2a3038;
    margin: 2px 0 0;
}

.scroll-contact-hint {
    margin: 8px 0 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: #8a96a2;
    letter-spacing: 0.02em;
}

/* Contact form shown on the next scroll step */
.scroll-contact-container,
.scroll-contact-container *,
.contact-details-modal,
.contact-details-modal * {
    box-sizing: border-box;
}

.scroll-contact-container {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(94vw, 700px);
    max-height: min(92vh, 700px);
    padding: 22px 18px 28px;
    z-index: 7;
    pointer-events: none;
    overflow: visible;
    max-height: none;
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.88);
    filter: blur(10px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.55s ease;
}

/* ── Modern scrollbar for textarea & contact panel ─────────── */
.scroll-contact-message textarea {
    scrollbar-width: thin;
    scrollbar-color: rgba(61, 90, 120, 0.18) transparent;
}

.scroll-contact-message textarea::-webkit-scrollbar {
    width: 4px;
}

.scroll-contact-message textarea::-webkit-scrollbar-track {
    background: transparent;
    margin: 12px 0;
}

.scroll-contact-message textarea::-webkit-scrollbar-thumb {
    background: rgba(61, 90, 120, 0.16);
    border-radius: 99px;
    transition: background 0.2s ease;
}

.scroll-contact-message textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(61, 90, 120, 0.36);
}

.scroll-contact-container {
    scrollbar-width: none;
}
.scroll-contact-container::-webkit-scrollbar {
    display: none;
}
/* ─────────────────────────────────────────────────────────── */

body.contact-visible,
body.contacts-hub-visible {
    overflow: hidden;
}

body.contact-visible .scroll-contact-container {
    pointer-events: auto;
    opacity: 0;
    transform: translate(-50%, -32%) scale(0.94);
    filter: blur(8px);
}

body.story-dir-up.contact-visible .scroll-contact-container {
    transform: translate(-50%, -68%) scale(0.94);
}

body.contact-visible.contact-emerged .scroll-contact-container {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
}

body.contact-visible.contact-exit-up .scroll-contact-container {
    opacity: 0 !important;
    transform: translate(-50%, -78%) scale(0.92) !important;
    filter: blur(10px) !important;
    pointer-events: none !important;
}

body.contact-visible.contact-exit-down .scroll-contact-container {
    opacity: 0 !important;
    transform: translate(-50%, -22%) scale(0.92) !important;
    filter: blur(10px) !important;
    pointer-events: none !important;
}

.scroll-contact-panel {
    width: 100%;
    padding: 0;
    position: relative;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.scroll-contact-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    transform: translateY(18px);
    width: 100%;
}

body.contact-visible.contact-emerged .scroll-contact-header {
    animation: contact-content-up 0.48s ease forwards;
    animation-delay: 0.5s;
}

body.contact-visible.contact-emerged .scroll-contact-form {
    animation: contact-content-up 0.5s ease forwards;
    animation-delay: 0.2s;
}

.scroll-contact-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 700;
}

.scroll-contact-message {
    --cta-ring: 1px;
    --cta-pad: 4px;
    --cta-rim: 0.5px;
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    box-sizing: border-box;
    padding: var(--cta-pad);
    border-radius: 24px;
    background: #f7f8fa;
    box-shadow:
        inset 1px 1px 3px rgba(155, 164, 176, 0.12),
        inset -1px -1px 3px rgba(155, 164, 176, 0.12);
}

.scroll-contact-message::before {
    content: '';
    position: absolute;
    inset: var(--cta-ring);
    padding: var(--cta-rim);
    border-radius: inherit;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    background: var(--bg-color);
    box-shadow:
        0 0 0.5px rgba(160, 168, 178, 0.22),
        0 0 0.5px rgba(255, 255, 255, 0.95),
        inset 0 0 0.5px rgba(255, 255, 255, 0.9),
        inset 0 0 0.5px rgba(150, 158, 170, 0.2);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    transition: opacity 0.45s ease;
}

body.contact-visible.contact-emerged .scroll-contact-message::before {
    opacity: 1;
    transition-delay: 0.28s;
}

.scroll-contact-message::after {
    content: '';
    position: absolute;
    inset: var(--cta-ring);
    padding: 0.5px;
    border-radius: inherit;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    background: conic-gradient(
        from var(--pkg-angle, 0deg),
        transparent 0%,
        transparent 68%,
        #3d8ef0 82%,
        transparent 90%
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    transition: opacity 0.4s ease;
}

.scroll-contact-message:hover::after,
.scroll-contact-message:focus-within::after {
    opacity: 0.95;
    animation: pkgSpinBorder 2.8s linear infinite;
}

.scroll-contact-message > span:not(.scroll-contact-actions):not(.brief-field-label) {
    display: none;
}

.brief-field-label {
    position: absolute;
    top: calc(var(--cta-pad) + 16px);
    left: calc(var(--cta-pad) + 22px);
    z-index: 1;
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #3b6fd4;
    pointer-events: none;
}

.scroll-contact-message textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: none;
    outline: none;
    display: block;
    border-radius: 20px;
    min-height: clamp(200px, 30vh, 280px);
    max-height: min(44vh, 320px);
    padding: 40px 124px 74px 22px;
    position: relative;
    z-index: 1;
    color: #2a3038;
    caret-color: #3b6fd4;
    background: #f8f9fb;
    box-shadow:
        inset 2px 2px 5px rgba(148, 158, 172, 0.16),
        inset -2px -2px 5px rgba(148, 158, 172, 0.16);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
    resize: none;
    overflow-y: auto;
    opacity: 0;
    transform: scaleX(0.18) scaleY(0.55);
    transform-origin: center center;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.scroll-contact-message textarea:focus {
    background: #f8f9fb;
    box-shadow:
        inset 2px 2px 5px rgba(148, 158, 172, 0.16),
        inset -2px -2px 5px rgba(148, 158, 172, 0.16);
}

.scroll-contact-message:focus-within .brief-field-label {
    color: #3b6fd4;
}

.scroll-contact-message textarea::placeholder {
    color: rgba(90, 102, 114, 0.42);
    font-weight: 400;
    opacity: 1;
}

.scroll-contact-message textarea::-webkit-input-placeholder {
    color: rgba(90, 102, 114, 0.42);
    font-weight: 400;
    opacity: 1;
}

body.contact-visible.contact-emerged .scroll-contact-message textarea {
    animation: contact-chat-open 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.12s;
}

.scroll-contact-message textarea.contact-field-empty {
    animation: contactFieldPulse 0.45s ease;
}

@keyframes contactFieldPulse {
    0%, 100% {
        box-shadow:
            inset 2px 2px 5px rgba(148, 158, 172, 0.16),
            inset -2px -2px 5px rgba(148, 158, 172, 0.16);
    }
    40% {
        box-shadow:
            inset 2px 2px 5px rgba(148, 158, 172, 0.16),
            inset -2px -2px 5px rgba(148, 158, 172, 0.16),
            0 0 0 2px rgba(176, 74, 74, 0.14);
    }
}

.contact-file-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 300;
    color: #7a8894;
}

.contact-file-name[hidden] { display: none !important; }

.scroll-contact-actions {
    position: absolute;
    right: calc(var(--cta-pad) + 12px);
    bottom: calc(var(--cta-pad) + 12px);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    z-index: 4;
    opacity: 0;
    transform: translateY(10px) scale(0.8);
    background: transparent;
    backdrop-filter: none;
    border: none;
    padding: 6px;
    border-radius: 30px;
    box-shadow: none;
}

body.contact-visible.contact-emerged .scroll-contact-actions {
    animation: contact-actions-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.48s;
}

.scroll-contact-actions .contact-file-button,
.scroll-contact-actions .contact-send-button {
    --cta-ring: 1px;
    --cta-rim: 1.25px;
    padding: var(--cta-pad);
    border: none;
    border-radius: 50%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: visible;
    color: var(--ico-color);
    background: var(--bg-color);
    box-shadow:
        inset 3px 4px 8px rgba(155, 164, 176, 0.26),
        inset -2px -3px 6px rgba(255, 255, 255, 0.92);
    transition: box-shadow 120ms ease, background 120ms ease, transform 120ms ease;
}

.scroll-contact-actions .contact-file-button {
    --cta-pad: 4px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    font-size: 14px;
}

.scroll-contact-actions .contact-send-button {
    --cta-pad: 4.5px;
    width: 54px;
    height: 54px;
    min-height: 54px;
    font-size: 20px;
}

.scroll-contact-actions .contact-action-ring {
    position: absolute;
    inset: var(--cta-ring);
    padding: var(--cta-rim);
    border-radius: 50%;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 2;
    background: var(--bg-color);
    box-shadow:
        1px 1px 2px rgba(160, 168, 178, 0.2),
        -1px -1px 2px rgba(255, 255, 255, 0.95),
        inset 0.5px 0.5px 0.5px rgba(255, 255, 255, 0.9),
        inset -0.5px -0.5px 0.5px rgba(150, 158, 170, 0.22);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.scroll-contact-actions .contact-action-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
    transition: box-shadow 120ms ease, transform 120ms ease;
    color: inherit;
}

.scroll-contact-actions .contact-action-face i {
    font-size: inherit;
    color: inherit;
}

.scroll-contact-actions .contact-send-button .contact-action-face i {
    transform: translate(-0.5px, 0.5px);
}

.scroll-contact-actions .contact-file-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .scroll-contact-actions .contact-file-button:hover,
    .scroll-contact-actions .contact-send-button:hover {
        color: var(--ico-color);
        transform: none;
        box-shadow:
            inset 3px 4px 8px rgba(155, 164, 176, 0.26),
            inset -2px -3px 6px rgba(255, 255, 255, 0.92);
    }
    .scroll-contact-actions .contact-file-button:hover .contact-action-face,
    .scroll-contact-actions .contact-send-button:hover .contact-action-face {
        box-shadow: none;
    }
}

.scroll-contact-actions .contact-file-button:active,
.scroll-contact-actions .contact-send-button:active {
    transform: none;
}

.scroll-contact-actions .contact-file-button:active .contact-action-face,
.scroll-contact-actions .contact-send-button:active .contact-action-face {
    box-shadow: none;
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
}

.scroll-contact-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(14px);
}

body.contact-visible.contact-emerged .scroll-contact-bottom {
    animation: contact-content-up 0.5s ease forwards;
    animation-delay: 0.55s;
}

.scroll-contact-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scroll-contact-links .scroll-contact-link {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--bg-color);
    color: var(--ico-color);
    font-size: 15px;
    box-shadow:
        4px 4px 10px rgba(150, 158, 170, 0.28),
        -4px -4px 10px rgba(255, 255, 255, 0.82);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.scroll-contact-links .scroll-contact-link:hover {
    transform: translateY(-3px);
    box-shadow:
        6px 8px 14px rgba(150, 158, 170, 0.30),
        -5px -5px 12px rgba(255, 255, 255, 0.9);
}

.scroll-contact-links .scroll-contact-link[data-url^="tel:"]:hover { color: #3dba55; }
.scroll-contact-links .scroll-contact-link[data-url*="wa.me"]:hover { color: #25d366; }
.scroll-contact-links .scroll-contact-link[data-url*="t.me"]:hover { color: #2a9fd6; }
.scroll-contact-links .scroll-contact-link[data-url^="mailto:"]:hover { color: #5a8fd6; }

.scroll-contact-links .scroll-contact-link:active {
    transform: translateY(0);
}

.scroll-ai-assistant-button {
    --cta-ring: 1px;
    --cta-pad: 4px;
    --cta-rim: 1.25px;
    margin: 0;
    border: none;
    position: relative;
    overflow: visible;
    background: var(--bg-color);
    color: var(--ico-color);
    display: flex;
    align-items: center;
    padding: var(--cta-pad);
    border-radius: 22px;
    font-family: 'Raleway', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.12em;
    cursor: pointer;
    box-shadow:
        inset 3px 4px 8px rgba(155, 164, 176, 0.26),
        inset -2px -3px 6px rgba(255, 255, 255, 0.92);
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    animation: none;
    flex-shrink: 0;
}

.scroll-ai-ring {
    position: absolute;
    inset: var(--cta-ring);
    padding: var(--cta-rim);
    border-radius: inherit;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 2;
    background: var(--bg-color);
    box-shadow:
        1px 1px 2px rgba(160, 168, 178, 0.2),
        -1px -1px 2px rgba(255, 255, 255, 0.95),
        inset 0.5px 0.5px 0.5px rgba(255, 255, 255, 0.9),
        inset -0.5px -0.5px 0.5px rgba(150, 158, 170, 0.22);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.scroll-ai-face {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    box-shadow:
        3px 4px 7px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.scroll-ai-assistant-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: inherit;
    background: none;
    box-shadow: none;
    width: auto;
    height: auto;
}

.scroll-ai-assistant-button:hover {
    color: var(--ico-color);
    transform: none;
}

@media (hover: hover) and (pointer: fine) {
    .scroll-ai-assistant-button:hover .scroll-ai-face {
        box-shadow: none;
    }
}

.scroll-ai-assistant-button:active {
    transform: translateY(0);
}

.scroll-ai-assistant-button:active .scroll-ai-face {
    box-shadow: none;
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
}

@keyframes ai-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.25);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(142, 68, 173, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(142, 68, 173, 0);
    }
}

@keyframes contact-center-grow {
    0%   { opacity: 0; transform: scale(0.72) translateY(24px); filter: blur(8px); }
    40%  { opacity: 1; filter: blur(0); }
    65%  { transform: scale(1.025) translateY(-4px); }
    82%  { transform: scale(0.988) translateY(2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

@keyframes contact-content-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes contact-chat-open {
    0% {
        opacity: 0;
        transform: scaleX(0.18) scaleY(0.55);
        border-radius: 50%;
    }
    62% {
        opacity: 1;
        transform: scaleX(1.03) scaleY(1);
        border-radius: 20px;
    }
    100% {
        opacity: 1;
        transform: scaleX(1) scaleY(1);
        border-radius: 20px;
    }
}

@keyframes contact-actions-pop {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.contact-details-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.contact-details-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.contact-details-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(220, 220, 220, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.contact-details-dialog {
    position: relative;
    width: min(100%, 420px);
    max-height: min(88vh, 680px);
    overflow: visible;
    box-sizing: border-box;
    padding: clamp(26px, 5vw, 34px) clamp(20px, 5vw, 28px) 28px;
    border-radius: 22px;
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
        0 28px 64px rgba(36, 42, 54, 0.12),
        0 2px 8px rgba(36, 42, 54, 0.04);
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.36s ease, transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-details-dialog::-webkit-scrollbar {
    width: 6px;
    height: 0px; /* Hide horizontal scrollbar track completely */
}

.contact-details-dialog::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
}

.contact-details-dialog::-webkit-scrollbar-track {
    background: transparent;
}

.contact-details-modal.active .contact-details-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.contact-details-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    color: #6a7280;
    background: transparent;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0;
    line-height: 0;
}

.contact-details-dialog h3 {
    margin: 0 48px 8px 0;
    color: var(--text-color);
    font-size: clamp(20px, 4vw, 24px);
    line-height: 1.2;
    font-weight: 700;
}

.contact-details-dialog > p {
    margin: 0 0 20px;
    color: rgba(47, 54, 64, 0.65);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.45;
}

.contact-details-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

.contact-details-form label,
.contact-details-form .contact-field,
.messenger-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: rgba(42, 45, 51, 0.58);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    width: 100%;
    box-sizing: border-box;
}

.messenger-field {
    display: none;
    position: relative;
}

.contact-details-status {
    margin: 0 0 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    min-height: 1.2em;
    text-transform: none;
    letter-spacing: 0;
}
.contact-details-status.is-error { color: #b04a4a; }
.contact-details-status.is-ok { color: #2f9a64; }

.contact-confirm-button {
    min-height: 50px;
    margin-top: 8px;
    border: none;
    border-radius: 14px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    color: #f7f7f8;
    background: #2a2d33;
    box-shadow: 0 10px 24px rgba(42, 45, 51, 0.18);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-confirm-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f7f7f8;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    font-size: 11px;
}

.contact-confirm-button:hover {
    background: #1f2227;
    box-shadow: 0 12px 28px rgba(42, 45, 51, 0.22);
    transform: translateY(-1px);
}

.contact-confirm-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(42, 45, 51, 0.16);
}

.contact-confirm-button:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.contact-details-form input[name="clientName"] {
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    outline: none;
    border-radius: 14px;
    padding: 0 16px;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 1px 2px rgba(36, 42, 54, 0.04);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.contact-details-form input[name="clientName"]:focus {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(61, 90, 120, 0.28);
    box-shadow: 0 0 0 4px rgba(61, 90, 120, 0.08);
}

.phone-field {
    position: relative;
}

.phone-input-shell {
    display: flex;
    align-items: stretch;
    min-height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 2px rgba(36, 42, 54, 0.04);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.phone-input-shell.is-focus {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(61, 90, 120, 0.28);
    box-shadow: 0 0 0 4px rgba(61, 90, 120, 0.08);
}

.phone-input-shell.is-invalid {
    border-color: rgba(176, 74, 74, 0.35);
    box-shadow: 0 0 0 4px rgba(176, 74, 74, 0.08);
}

.phone-country-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 5px 0 5px 5px;
    padding: 0 10px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: none;
    color: var(--text-color);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.phone-country-btn:hover,
.phone-field.is-open .phone-country-btn {
    background: #fff;
    box-shadow: none;
}

.phone-flag {
    font-size: 15px;
    line-height: 1;
}

.phone-dial {
    font-variant-numeric: tabular-nums;
}

.phone-country-btn i,
.messenger-select-btn > .fa-chevron-down {
    font-size: 9px;
    color: rgba(47, 54, 64, 0.4);
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.phone-field.is-open .phone-country-btn i,
.messenger-field.is-open .messenger-select-btn > .fa-chevron-down {
    transform: rotate(180deg);
}

.phone-input-shell input[name="clientPhone"] {
    flex: 1;
    width: auto;
    min-width: 0;
    min-height: 48px;
    padding: 0 14px 0 10px;
    border: none;
    background: transparent;
    box-shadow: none;
    font-size: 15px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    text-transform: none;
}

.phone-input-shell input[name="clientPhone"]:focus {
    box-shadow: none;
}

.phone-field-hint {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(47, 54, 64, 0.45);
    line-height: 1.35;
}

.phone-field-hint.is-error {
    color: #b04a4a;
}

.phone-country-list,
.messenger-select-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 12;
    margin: 0;
    padding: 6px;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    border-radius: 16px;
    background: rgba(245, 246, 248, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 40px rgba(36, 42, 54, 0.14);
}

.phone-country-list li,
.messenger-select-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 11px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-color);
    transition: background 0.15s ease;
}

.phone-country-list li:hover,
.messenger-select-list li:hover {
    background: rgba(255, 255, 255, 0.7);
}

.phone-country-list li.is-active,
.messenger-select-list li.is-active {
    background: #fff;
    box-shadow: 0 1px 2px rgba(36, 42, 54, 0.06);
}

.phone-country-list .phone-country-name {
    flex: 1;
}

.phone-country-list .phone-country-code {
    color: rgba(47, 54, 64, 0.4);
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
}

.messenger-select-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 1px 2px rgba(36, 42, 54, 0.04);
    color: var(--text-color);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.messenger-field.is-open .messenger-select-btn {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(61, 90, 120, 0.28);
    box-shadow: 0 0 0 4px rgba(61, 90, 120, 0.08);
}

.messenger-select-label {
    flex: 1;
}

.messenger-select-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
}

.messenger-select-icon.is-telegram { background: #2AABEE; }
.messenger-select-icon.is-whatsapp { background: #25D366; }
.messenger-select-icon.is-viber { background: #7360F2; }

.messenger-select-list li .messenger-select-icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
}

.messenger-select-check {
    margin-left: auto;
    color: rgba(42, 45, 51, 0.35);
    font-size: 11px;
    opacity: 0;
}

.messenger-select-list li.is-active .messenger-select-check {
    opacity: 1;
    color: #2a2d33;
}

.contact-choice-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: rgba(255, 255, 255, 0.32);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
}

.contact-choice-group label {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-transform: none;
    letter-spacing: 0;
}

.contact-choice-group input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.contact-choice-group span {
    min-height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(47, 54, 64, 0.5);
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.contact-choice-group input:checked + span {
    color: var(--text-color);
    background: #fff;
    box-shadow: 0 1px 3px rgba(36, 42, 54, 0.08);
}

/* Responsive adjustments for horizontal screens & mobile */
@media (max-height: 800px) and (min-width: 1025px) {
    .center-blocks-container {
        gap: 36px;
        width: min(calc(100vw - 210px), 1220px);
        max-height: calc(100vh - 20px);
        padding: 30px;
    }

    .center-block-card {
        min-height: 0;
        padding: 18px 16px;
    }

    .pkg-circle-photo { width: 100px; height: 100px; padding: 6px; margin-bottom: 14px; }
    .pkg-icon-wrap { width: 44px; height: 44px; border-radius: 50%; }
    .pkg-icon-wrap i { font-size: 17px; }
    .package-title { font-size: 17px; }
    .package-price .price-val { font-size: 24px; }
    .package-features li { font-size: 12px; padding: 5px 0; }
    .pkg-cta-well { width: 60px; height: 60px; --cta-pad: 9px; --cta-ring: 3px; --cta-rim: 4px; }
    .package-btn { font-size: 13px; }
    .pkg-cta-label { font-size: 7.5px; }
}

@media (max-height: 680px) and (min-width: 1025px) {
    .center-blocks-container {
        gap: 20px;
        width: min(calc(100vw - 200px), 1180px);
    }

    .center-block-card {
        min-height: 0;
        padding: 14px 12px;
    }

    .pkg-circle-photo { width: 88px; height: 88px; padding: 6px; margin-bottom: 10px; }

    .pkg-icon-wrap { width: 38px; height: 38px; border-radius: 50%; }
    .pkg-icon-wrap i { font-size: 15px; }
    .package-title { font-size: 15px; }
    .package-price .price-val { font-size: 22px; }
    .pkg-tagline { font-size: 11.5px; }
    .package-features li { font-size: 11.5px; gap: 6px; padding: 4px 0; }
    .pkg-chip { font-size: 10px; padding: 4px 8px; }
    .pkg-cta-well { width: 54px; height: 54px; --cta-pad: 8px; --cta-ring: 2px; --cta-rim: 4px; }
    .package-btn { font-size: 12px; }
}

@media (max-width: 1100px) and (min-width: 769px) {
    .center-blocks-container {
        width: min(calc(100vw - 160px), 920px);
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
        max-height: 82vh;
        overflow-y: auto;
        padding: 30px;
        left: 50%;
    }
    
    .center-block-card {
        min-height: 0;
    }
    
    .scroll-contact-container {
        max-height: 88vh;
        overflow-y: auto;
        padding: 16px 8px;
    }
}

@media (max-width: 768px) {
    .center-blocks-container {
        width: calc(100vw - 32px);
        left: 50%;
        grid-template-columns: 1fr;
        gap: 28px;
        max-height: 84vh;
        overflow-y: auto;
        padding: 30px 20px;
    }
    
    .center-block-card {
        min-height: auto;
        padding: 20px 16px;
    }

    .scroll-contact-container {
        top: 50%;
        width: min(calc(100vw - 20px), 580px);
        max-height: min(94vh, 760px);
        overflow-y: auto;
        padding: 8px 0 max(8px, env(safe-area-inset-bottom));
        scrollbar-width: none;
    }

    .scroll-contact-container::-webkit-scrollbar {
        display: none;
    }

    .scroll-contact-panel {
        padding: 14px 4px;
    }

    .order-tariff-bar {
        margin-bottom: 12px;
        box-shadow:
            inset 2px 2px 5px rgba(148, 158, 172, 0.13),
            inset -2px -2px 5px rgba(255, 255, 255, 0.88),
            inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    }

    .order-tariff-bar::before {
        content: none;
    }

    .scroll-contact-header {
        margin-bottom: 10px;
    }

    .scroll-contact-header h3 {
        font-size: clamp(22px, 7vw, 28px);
        line-height: 1.08;
    }

    .scroll-contact-header p {
        max-width: 32ch;
        margin: 0 auto;
        font-size: 13px;
    }

    .scroll-contact-actions {
        right: calc(var(--cta-pad) + 8px);
        bottom: calc(var(--cta-pad) + 8px);
        gap: 8px;
        padding: 4px;
    }

    .scroll-contact-actions .contact-file-button {
        width: 34px;
        height: 34px;
        min-height: 34px;
        font-size: 13px;
        --cta-pad: 4px;
    }

    .scroll-contact-actions .contact-send-button {
        width: 48px;
        height: 48px;
        min-height: 48px;
        font-size: 18px;
        --cta-pad: 4px;
    }

    .scroll-contact-message textarea {
        padding: 36px 108px 60px 16px;
        min-height: clamp(210px, 34vh, 320px);
        max-height: min(50vh, 380px);
        font-size: 14.5px;
        line-height: 1.45;
        border-radius: 18px;
    }

    .scroll-contact-message {
        border-radius: 22px;
    }

    .scroll-contact-links {
        gap: 12px;
        margin-top: 14px;
    }

    .scroll-contact-links .scroll-contact-link {
        width: 44px;
        height: 44px;
        font-size: 15px;
    }

    .contact-details-dialog {
        padding: 26px 20px;
    }
}

@media (max-width: 768px) and (orientation: portrait) {
    .scroll-contact-container {
        max-height: min(94vh, 840px);
    }

    .scroll-contact-message textarea {
        min-height: clamp(240px, 38vh, 360px);
        max-height: min(54vh, 420px);
    }
}

@media (max-width: 420px) {
    .scroll-contact-container {
        width: calc(100vw - 16px);
        max-height: min(94vh, 760px);
    }

    .scroll-contact-panel {
        padding: 10px 2px;
    }

    .scroll-contact-header {
        margin-bottom: 8px;
    }

    .scroll-contact-header h3 {
        font-size: 21px;
    }

    .scroll-contact-header p {
        font-size: 12px;
    }

    .scroll-contact-message textarea {
        min-height: clamp(200px, 34vh, 300px);
        max-height: min(50vh, 360px);
        padding: 34px 102px 58px 14px;
        border-radius: 16px;
    }

    .scroll-contact-message {
        border-radius: 20px;
    }

    .scroll-contact-actions .contact-file-button {
        width: 32px;
        height: 32px;
        min-height: 32px;
        font-size: 12px;
        --cta-pad: 3.5px;
    }

    .scroll-contact-actions .contact-send-button {
        width: 46px;
        height: 46px;
        min-height: 46px;
        font-size: 17px;
        --cta-pad: 4px;
    }

    .scroll-contact-actions {
        right: calc(var(--cta-pad) + 8px);
        bottom: calc(var(--cta-pad) + 8px);
        gap: 8px;
    }

    .scroll-contact-links {
        display: grid;
        grid-template-columns: repeat(4, 40px);
        justify-content: center;
        gap: 8px;
        margin-top: 12px;
    }

    .scroll-contact-links .scroll-contact-link {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .contact-details-modal {
        padding: 14px;
    }

    .contact-details-dialog {
        width: 100%;
        padding: 24px 18px;
    }
}

@media (max-width: 420px) and (orientation: portrait) {
    .scroll-contact-message textarea {
        min-height: clamp(230px, 38vh, 340px);
        max-height: min(54vh, 400px);
    }
}

@media (max-height: 640px) {
    .scroll-contact-header {
        margin-bottom: 8px;
    }

    .scroll-contact-header p {
        display: none;
    }

    .scroll-contact-message textarea {
        min-height: clamp(140px, 28vh, 190px);
        max-height: 42vh;
    }

    .scroll-contact-links {
        margin-top: 10px;
    }
}

@media (max-width: 380px) {
    .scroll-contact-container {
        width: calc(100vw - 12px);
    }

    .scroll-contact-panel {
        padding: 8px 0;
    }

    .scroll-contact-header {
        margin-bottom: 8px;
    }

    .scroll-contact-header h3 {
        font-size: 19px;
    }

    .scroll-contact-message textarea {
        min-height: clamp(190px, 32vh, 280px);
        max-height: min(50vh, 340px);
        padding: 32px 96px 56px 12px;
    }

    .scroll-contact-actions .contact-file-button {
        width: 30px;
        height: 30px;
        min-height: 30px;
        font-size: 11px;
        --cta-pad: 3.5px;
    }

    .scroll-contact-actions .contact-send-button {
        width: 44px;
        height: 44px;
        min-height: 44px;
        font-size: 16px;
        --cta-pad: 3.5px;
    }

    .scroll-contact-actions {
        gap: 6px;
    }

    .scroll-contact-links {
        grid-template-columns: repeat(4, 36px);
        gap: 8px;
        margin-top: 10px;
    }

    .scroll-contact-links .scroll-contact-link {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

@media (max-width: 380px) and (orientation: portrait) {
    .scroll-contact-message textarea {
        min-height: clamp(220px, 36vh, 320px);
        max-height: min(52vh, 380px);
    }
}

@media (max-height: 560px) {
    .scroll-contact-container {
        top: 52%;
        max-height: 94vh;
        overflow-y: auto;
    }

    .scroll-contact-header {
        margin-bottom: 6px;
    }

    .scroll-contact-header h3 {
        font-size: 18px;
    }

    .scroll-contact-message textarea {
        min-height: clamp(120px, 26vh, 170px);
        max-height: 38vh;
        padding: 30px 84px 44px 12px;
    }

    .scroll-contact-links {
        margin-top: 8px;
    }
}

/* ==========================================================================
   Contacts Hub — 4th full-screen view
   ========================================================================== */

/* Скрываем пакеты когда показываем хаб */
body.contacts-hub-visible .center-blocks-container {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.94);
    transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

body.contacts-hub-visible .scroll-contact-container {
    pointer-events: none;
}

/* ── Full-screen overlay ── */
.contacts-hub-section {
    position: fixed;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    pointer-events: none;
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

body.contacts-hub-visible .contacts-hub-section {
    opacity: 0;
    pointer-events: none;
    transform: translateY(48px);
}

body.story-dir-up.contacts-hub-visible .contacts-hub-section {
    transform: translateY(-48px);
}

body.contacts-hub-visible.contacts-hub-emerged .contacts-hub-section {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

body.hub-exit-up .contacts-hub-section {
    opacity: 0 !important;
    transform: translateY(-56px) !important;
    pointer-events: none !important;
}

body.hub-exit-down .contacts-hub-section {
    opacity: 0 !important;
    transform: translateY(56px) !important;
    pointer-events: none !important;
}

/* ── Inner container ── */
.contacts-hub-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0 32px;
    max-width: 760px;
    width: 100%;
}

.contacts-hub-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ico-color);
    margin: 0 0 clamp(28px, 5vh, 44px);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease 0.05s, transform 0.5s ease 0.05s;
}

body.contacts-hub-visible.contacts-hub-emerged .contacts-hub-eyebrow {
    opacity: 0.42;
    transform: translateY(0);
}

.contacts-hub-title {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-color);
    margin: 0 0 clamp(36px, 7vh, 60px);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease 0.1s, transform 0.55s ease 0.1s;
    letter-spacing: -0.5px;
}

body.contacts-hub-visible.contacts-hub-emerged .contacts-hub-title {
    opacity: 1;
    transform: translateY(0);
}

/* ── Одна строка: основные слева | разделитель | AI справа ── */
.contacts-hub-row {
    display: flex;
    align-items: center;
    gap: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.55s ease 0.2s;
}

body.contacts-hub-visible.contacts-hub-emerged .contacts-hub-row {
    opacity: 1;
    transform: translateY(0);
}

.chub-group {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.8vw, 24px);
}

.chub-divider {
    width: 1px;
    height: 44px;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(74, 82, 96, 0.16) 20%,
        rgba(74, 82, 96, 0.16) 80%,
        transparent
    );
    margin: 0 clamp(22px, 4.2vw, 40px);
    flex-shrink: 0;
}

/* ── Round convex button — quiet neumorphism ── */
.contacts-hub-section .contact-button,
.contacts-hub-section .chub-btn {
    background: var(--bg-color);
    border: none;
}

.contacts-hub-section .contact-button:hover,
.contacts-hub-section .chub-btn:hover {
    background: var(--bg-color);
}

.chub-btn {
    --chub-accent: #6b7585;
    width: clamp(50px, 5.8vw, 58px);
    height: clamp(50px, 5.8vw, 58px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px, 2.1vw, 19px);
    color: var(--chub-accent);
    box-shadow:
        2px 3px 6px rgba(170, 178, 190, 0.22),
        -2px -2px 5px rgba(255, 255, 255, 0.72);
    transition: box-shadow 0.32s ease, transform 0.32s ease, color 0.32s ease;
    position: relative;
    outline: none;
}

.chub-btn::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.32) 0%,
        rgba(255, 255, 255, 0) 48%
    );
    pointer-events: none;
    transition: background 0.32s ease;
}

.chub-btn i {
    position: relative;
    z-index: 1;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.chub-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        4px 6px 10px rgba(170, 178, 190, 0.26),
        -3px -3px 7px rgba(255, 255, 255, 0.88),
        inset 0 0 0 1px color-mix(in srgb, var(--chub-accent) 22%, transparent);
}

.chub-btn:hover::before {
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--chub-accent) 14%, #ffffff) 0%,
        rgba(255, 255, 255, 0) 52%
    );
}

.chub-btn:hover i {
    transform: translateY(-0.5px);
}

.chub-btn:active {
    transform: translateY(1px);
    box-shadow:
        inset 3px 3px 6px rgba(168, 176, 188, 0.28),
        inset -3px -3px 6px rgba(255, 255, 255, 0.78);
}

.chub-btn:focus-visible {
    box-shadow:
        2px 3px 6px rgba(170, 178, 190, 0.22),
        -2px -2px 5px rgba(255, 255, 255, 0.72),
        0 0 0 2px color-mix(in srgb, var(--chub-accent) 28%, transparent);
}

body.contacts-hub-visible.contacts-hub-emerged .chub-group-main .chub-btn,
body.contacts-hub-visible.contacts-hub-emerged .chub-group-ai .chub-btn,
body.contacts-hub-visible.contacts-hub-emerged .chub-ai-copy {
    animation: chubPop 0.45s ease both;
}

body.contacts-hub-visible.contacts-hub-emerged .chub-group-main .chub-btn:nth-child(1) { animation-delay: 0.12s; }
body.contacts-hub-visible.contacts-hub-emerged .chub-group-main .chub-btn:nth-child(2) { animation-delay: 0.16s; }
body.contacts-hub-visible.contacts-hub-emerged .chub-group-main .chub-btn:nth-child(3) { animation-delay: 0.20s; }
body.contacts-hub-visible.contacts-hub-emerged .chub-group-main .chub-btn:nth-child(4) { animation-delay: 0.24s; }
body.contacts-hub-visible.contacts-hub-emerged .chub-group-ai .chub-btn { animation-delay: 0.30s; }
body.contacts-hub-visible.contacts-hub-emerged .chub-ai-copy { animation-delay: 0.36s; }

@keyframes chubPop {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.chub-group-ai {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.chub-group-ai .chub-btn,
.contacts-hub-section .chub-ai {
    --cta-ring: 1px;
    --cta-pad: 4px;
    --cta-rim: 1.25px;
    width: 36px;
    height: 36px;
    padding: var(--cta-pad);
    box-sizing: border-box;
    border-radius: 50%;
    font-size: 12px;
    color: #6a7280;
    overflow: visible;
    background: var(--bg-color);
    box-shadow:
        inset 3px 4px 8px rgba(155, 164, 176, 0.26),
        inset -2px -3px 6px rgba(255, 255, 255, 0.92);
}

.contacts-hub-section .chub-ai .nav-btn-face {
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
    box-shadow:
        3px 4px 7px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
}

.contacts-hub-section .chub-ai::before {
    display: none;
}

.contacts-hub-section .chub-ai:hover {
    transform: translateY(-1px);
    color: #6a7280;
    background: var(--bg-color);
    box-shadow:
        inset 3px 4px 8px rgba(155, 164, 176, 0.26),
        inset -2px -3px 6px rgba(255, 255, 255, 0.92);
}

.contacts-hub-section .chub-ai:hover .nav-btn-face {
    box-shadow:
        4px 5px 8px var(--shadow-dark),
        -3px -4px 7px var(--shadow-light);
}

.contacts-hub-section .chub-ai:hover i {
    transform: none;
}

.contacts-hub-section .chub-ai:hover::before {
    background: none;
}

.contacts-hub-section .chub-ai:active {
    transform: translateY(1px);
    color: #6a7280;
    background: var(--bg-color);
    box-shadow:
        inset 3px 4px 8px rgba(155, 164, 176, 0.26),
        inset -2px -3px 6px rgba(255, 255, 255, 0.92);
}

.contacts-hub-section .chub-ai:active .nav-btn-face {
    box-shadow: none;
    background: linear-gradient(145deg, var(--gradient-light), var(--gradient-dark));
}

.contacts-hub-section .chub-ai:focus-visible {
    box-shadow:
        inset 3px 4px 8px rgba(155, 164, 176, 0.26),
        inset -2px -3px 6px rgba(255, 255, 255, 0.92),
        0 0 0 2px rgba(106, 114, 128, 0.28);
}

.chub-ai-copy {
    font-family: 'Titillium Web', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #6a7280;
    white-space: nowrap;
    pointer-events: none;
    line-height: 1;
    transition: color 0.32s ease;
}

.chub-group-ai:hover .chub-ai-copy {
    color: #6a7280;
}

.contacts-hub-section .chub-phone { --chub-accent: #3dba55; color: #3dba55; }
.contacts-hub-section .chub-wa    { --chub-accent: #25d366; color: #25d366; }
.contacts-hub-section .chub-tg    { --chub-accent: #2a9fd6; color: #2a9fd6; }
.contacts-hub-section .chub-mail  { --chub-accent: #5d6878; color: #5d6878; }
.contacts-hub-section .chub-ai    { --chub-accent: #6a7280; color: #6a7280; }

.contacts-hub-section .contact-button:hover { color: var(--chub-accent); }
.contacts-hub-section .chub-phone:hover { color: #3dba55; }
.contacts-hub-section .chub-wa:hover    { color: #25d366; }
.contacts-hub-section .chub-tg:hover    { color: #2a9fd6; }
.contacts-hub-section .chub-mail:hover  { color: #5d6878; }
.contacts-hub-section .chub-ai:hover    { color: #6a7280; }

@media (prefers-reduced-motion: reduce) {
    .chub-btn,
    .chub-ai-copy { transition: none; animation: none !important; }
    .chub-btn:hover,
    .chub-btn:hover i { transform: none; }
}

/* портретная ориентация / мобайл */
@media (max-width: 600px) or (orientation: portrait) {
    .contacts-hub-row {
        flex-direction: column;
        gap: clamp(22px, 5vw, 32px);
    }
    .chub-divider {
        width: 40px;
        height: 1px;
        margin: 0;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(74, 82, 96, 0.16) 20%,
            rgba(74, 82, 96, 0.16) 80%,
            transparent
        );
    }
    .chub-group {
        gap: clamp(14px, 4vw, 22px);
    }
}

/* адаптив (старый, оставляем для совместимости) */
@media (max-width: 480px) {
    .chub-btn { width: 48px; height: 48px; font-size: 16px; }
    .chub-group-ai .chub-btn,
    .contacts-hub-section .chub-ai {
        width: 32px;
        height: 32px;
        --cta-pad: 4px;
        border-radius: 50%;
        font-size: 11px;
    }
    .chub-ai-copy { font-size: 11px; }
    .chub-group { gap: 12px; }
}

/* Inline socials inside services — hidden everywhere except mobile services view */
.pkg-inline-socials {
    display: none;
}

@media (max-width: 768px),
(min-width: 769px) and (max-width: 1024px) and (orientation: portrait) and (pointer: coarse) {
    body.main-exited:not(.story-about):not(.story-promo):not(.contact-visible):not(.contacts-hub-visible) .pkg-inline-socials {
        display: flex;
        align-items: center;
        gap: 14px;
        grid-column: 1 / -1;
        width: max-content;
        margin: 0;
        padding: 4px 0 2px;
    }

    body.main-exited:not(.story-about):not(.story-promo):not(.contact-visible):not(.contacts-hub-visible) .social-links {
        visibility: hidden;
        pointer-events: none;
    }

    /* Services fill the screen so the page bg does not form a bottom/top bar.
       Nav panel stays as-is and simply overlays the cards. */
    body.main-exited:not(.story-about):not(.story-promo):not(.contact-visible):not(.contacts-hub-visible) .center-blocks-container {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-height: 100%;
        height: 100%;
        padding: 12px 16px 88px;
    }

    body:has(#modal-profile.show) .ai-assistant-dock,
    body:has(#modal-resume.show) .ai-assistant-dock,
    body:has(#modal-profile.closing) .ai-assistant-dock,
    body:has(#modal-resume.closing) .ai-assistant-dock,
    body:has(#modal-profile.show) .ai-assistant-container,
    body:has(#modal-resume.show) .ai-assistant-container,
    body:has(#modal-profile.closing) .ai-assistant-container,
    body:has(#modal-resume.closing) .ai-assistant-container {
        z-index: 8;
        pointer-events: none;
    }
}

/* About / Promotion: scroll starts below close, content fades out at the edge */
#modal-profile .modal-content,
#modal-resume .modal-content {
    --modal-fade: 36px;
    position: relative;
    padding: 36px 40px 16px 22px;
}

#modal-profile .modal-content::after,
#modal-resume .modal-content::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: calc(36px + var(--modal-fade));
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #ffffff 46%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    z-index: 1;
}

#modal-profile .close-button,
#modal-resume .close-button {
    z-index: 3;
}

#modal-profile .modal-body,
#modal-resume .modal-body {
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
}

@media (orientation: landscape) {
    #modal-profile .modal-content,
    #modal-resume .modal-content {
        padding-top: 32px;
        --modal-fade: 32px;
    }

    #modal-profile .modal-content::after,
    #modal-resume .modal-content::after {
        height: calc(32px + var(--modal-fade));
    }
}

@media (orientation: portrait) {
    #modal-profile .modal-content,
    #modal-resume .modal-content {
        padding: 52px 12px 16px;
        --modal-fade: 40px;
    }

    #modal-profile .modal-content::after,
    #modal-resume .modal-content::after {
        height: calc(52px + var(--modal-fade));
    }

    #modal-profile .modal-body,
    #modal-resume .modal-body {
        max-height: none;
    }

    #modal-profile .ac-wrap,
    #modal-resume .pr-wrap {
        padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px));
    }
}

/* ==========================================================================
   Order Form: Smartphone Landscape Optimization
   ========================================================================== */
@media (orientation: landscape) and (max-height: 540px) {
    .scroll-contact-container {
        top: 50%;
        width: min(calc(100vw - 32px), 560px);
        max-height: 100dvh;
        padding: 0;
        overflow-y: auto;
    }

    .scroll-contact-panel {
        padding: 0 2px;
    }

    /* Thinner, more compact tariff bar */
    .order-tariff-bar {
        min-height: 36px;
        padding: 7px 12px;
        margin-bottom: 4px;
        border-radius: 14px;
        gap: 8px;
    }

    .order-tariff-bar::before {
        content: none;
    }

    .order-tariff-icon-wrap {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .order-tariff-eyebrow {
        font-size: 7px;
        margin-bottom: 0;
        letter-spacing: 0.12em;
    }

    .order-tariff-name {
        font-size: 12px;
    }

    .order-tariff-price {
        font-size: 11px;
    }

    .order-tariff-toggle {
        padding: 4px 9px;
        font-size: 10px;
        border-radius: 8px;
    }

    .order-tariff-bar.odt-open .odt-item {
        padding: 6px 10px;
        gap: 8px;
    }

    .order-tariff-bar.odt-open .odt-item-icon {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .order-tariff-bar.odt-open .odt-item-name {
        font-size: 11px;
    }

    .order-tariff-bar.odt-open .odt-item-desc {
        font-size: 9px;
    }

    .order-tariff-bar.odt-open .odt-item-price {
        font-size: 10px;
    }

    /* Compact inline header */
    .scroll-contact-header {
        margin-bottom: 4px;
    }

    .scroll-contact-eyebrow {
        display: none;
    }

    .scroll-contact-header h3 {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 6px;
        margin: 0;
        line-height: 1;
    }

    .sc-title-thin {
        font-size: 11px;
        letter-spacing: 0.14em;
    }

    .sc-title-main {
        font-size: 15px;
        margin: 0;
    }

    .scroll-contact-hint {
        display: none;
    }

    /* Textarea & card */
    .scroll-contact-message textarea {
        min-height: clamp(184px, 58vh, 224px);
        max-height: 64vh;
        padding: 22px 92px 42px 14px;
        font-size: 13px;
        line-height: 1.35;
        border-radius: 14px;
    }

    .scroll-contact-message {
        border-radius: 18px;
    }

    .brief-field-label {
        top: calc(var(--cta-pad) + 5px);
        left: calc(var(--cta-pad) + 12px);
        font-size: 8px;
    }

    .scroll-contact-actions {
        right: calc(var(--cta-pad) + 6px);
        bottom: calc(var(--cta-pad) + 6px);
        gap: 6px;
        padding: 2px;
    }

    .scroll-contact-actions .contact-file-button {
        width: 28px;
        height: 28px;
        min-height: 28px;
        font-size: 11px;
        --cta-pad: 3px;
    }

    .scroll-contact-actions .contact-send-button {
        width: 38px;
        height: 38px;
        min-height: 38px;
        font-size: 14px;
        --cta-pad: 3.5px;
    }

    /* Compact bottom buttons: contacts & AI */
    .scroll-contact-bottom {
        margin-top: 4px;
        gap: 8px;
    }

    .scroll-contact-links {
        gap: 6px;
    }

    .scroll-contact-links .scroll-contact-link {
        width: 30px;
        height: 30px;
        min-height: 30px;
        font-size: 11.5px;
        box-shadow:
            2px 2px 5px rgba(150, 158, 170, 0.22),
            -2px -2px 5px rgba(255, 255, 255, 0.85);
    }

    .scroll-ai-assistant-button {
        --cta-pad: 2.5px;
        padding: var(--cta-pad);
        border-radius: 14px;
        font-size: 9.5px;
        letter-spacing: 0.08em;
    }

    .scroll-ai-face {
        height: 24px;
        padding: 0 7px;
        gap: 4px;
        border-radius: 12px;
    }

    .scroll-ai-assistant-icon {
        width: 15px;
        height: 15px;
        font-size: 8.5px;
    }
}

/* ==========================================================================
   Language Switcher
   ========================================================================== */
.lang-switcher {
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 35;
    display: inline-flex;
    align-items: center;
    background: var(--bg-color);
    padding: 2.5px;
    border-radius: 16px;
    box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
    gap: 2px;
    user-select: none;
    -webkit-user-select: none;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 25px;
    height: 20px;
    padding: 0 5.5px;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ico-color);
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
    cursor: pointer;
}

.lang-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.45);
}

.lang-btn:active {
    transform: scale(0.95);
}

.lang-btn.active {
    color: var(--text-color);
    font-weight: 700;
    background: var(--bg-color);
    box-shadow: inset 1.2px 1.2px 2.5px var(--shadow-dark), inset -1.2px -1.2px 2.5px var(--shadow-light);
    cursor: default;
    pointer-events: none;
}

.lang-btn:focus-visible {
    outline: 2px solid #0a84ff;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .lang-switcher {
        top: 12px;
        right: 12px;
        padding: 2px;
        border-radius: 13px;
        box-shadow: 1.5px 1.5px 4px var(--shadow-dark), -1.5px -1.5px 4px var(--shadow-light);
        gap: 1.5px;
    }
    .lang-btn {
        min-width: 22px;
        height: 18px;
        padding: 0 4.5px;
        border-radius: 9px;
        font-size: 8.5px;
    }
}
