/* AIVISIONS WebApp — переписан 1:1 в стилистике aivisions.ru
   Тёмный сайт: фон серый, текст белый+серебристый, акцент lime.
   Шрифты: Inter (текст), JetBrains Mono (заголовки/брекеты — близко к FeatureMono сайта).
*/

/* Google Fonts (Inter, JetBrains Mono) подключены через <link> в index.html
   для параллельной загрузки. Тут только локальный @font-face FeatureMono. */

/* FeatureMono-Regular — тот же шрифт что использует aivisions.ru
   (файлы взяты с tildacdn, к которому ссылается основной сайт) */
@font-face {
    font-family: 'FeatureMono-Regular';
    src: url('/webapp/assets/fonts/FeatureMono-Regular.woff2') format('woff2'),
         url('/webapp/assets/fonts/FeatureMono-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* ── Lime акцент ── */
    --color-accent: #EFFC56;
    --color-accent-soft: rgba(239, 252, 86, 0.18);
    --color-accent-hover: #DCE93F;

    /* ── Тёмные тона (с aivisions.ru — точные значения) ── */
    --color-bg: #2E2E2E;          /* основной фон body */
    --color-bg-darker: #1D1D1D;   /* самые тёмные блоки */
    --color-bg-darkest: #112126;  /* footer / hero overlay */
    --color-bg-section: #4B4B4B;  /* контентная плашка-секция */
    --color-bg-elevated: #383838; /* приподнятая карточка на фоне body */

    /* ── Текст ── */
    --color-text: #FFFFFF;             /* primary white */
    --color-text-2: #ECECEC;           /* softer white */
    --color-text-3: #C8C8C8;           /* серебристый — «сепия» */
    --color-text-muted: #989797;       /* приглушённый */
    --color-text-dim: #6D6D6D;

    /* ── Borders ── */
    --color-border: rgba(236, 236, 236, 0.12);
    --color-border-strong: rgba(236, 236, 236, 0.28);
    --color-border-accent: var(--color-accent);

    /* ── Декоративные градиенты (lime → grey) ── */
    --grad-lime-grey: linear-gradient(135deg, #EFFC56 0%, #4B4B4B 65%);
    --grad-lime-soft: linear-gradient(180deg, rgba(239, 252, 86, 0.18) 0%, rgba(75, 75, 75, 0.0) 100%);
    --grad-dark-vignette: radial-gradient(ellipse at top, #4B4B4B 0%, #2E2E2E 70%, #1D1D1D 100%);

    /* ── Типографика ── */
    --font-headline: 'FeatureMono-Regular', 'JetBrains Mono', 'Courier New', monospace;
    --font-text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --font-mono: 'FeatureMono-Regular', 'JetBrains Mono', monospace;

    /* ── Spacing ── */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;

    /* ── Скругления ── */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* ── Переходы ── */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

*::selection,
*::-webkit-selection,
*::-moz-selection {
    background: var(--color-accent-soft);
    color: inherit;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-text);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

body *,
body *::before,
body *::after {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Глобальный film-grain noise overlay — деликатный, с бежево-розовым тоном
   (как на aivisions.ru). Filter sepia+hue-rotate перекрашивает gif из ч/б
   в тёплый розово-бежевый. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: url('/webapp/assets/noise.gif');
    background-size: 220px 220px;
    background-repeat: repeat;
    mix-blend-mode: overlay;
    opacity: 0.06;
    filter: sepia(0.7) hue-rotate(-18deg) saturate(1.4);
    pointer-events: none;
    z-index: 9999;
}

/* ─── Заголовки — JetBrains Mono uppercase в духе FeatureMono ─── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
    font-weight: 500;
    line-height: 1.05;
    color: var(--color-text);
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

h1 { font-size: 2.5rem; line-height: 1.0; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.8125rem; letter-spacing: 0.05em; }

p {
    margin-bottom: 1rem;
    color: var(--color-text-2);
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    border-bottom: 1px solid var(--color-border-strong);
}

a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* ─── Утилитарные акценты ─── */
.accent { color: var(--color-accent) !important; }
.silver { color: var(--color-text-3); }
.muted  { color: var(--color-text-muted); }

/* Bracket-подписи [...] — стилистика aivisions.ru
   Использовать на .bracket или достаточно подписать класс к подписи.
*/
.bracket {
    display: inline-block;
    font-family: var(--font-headline);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-3);
}
.bracket::before { content: '[\00a0'; color: var(--color-accent); }
.bracket::after  { content: '\00a0]'; color: var(--color-accent); }

/* Lime → серый градиент-плашка для акцентных блоков */
.grad-lime {
    background: var(--grad-lime-grey);
    color: var(--color-bg-darker);
}

.container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.text-center { text-align: center; }

/* ─── Адаптив для типографики ─── */
@media (max-width: 768px) {
    html { font-size: 15px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.125rem; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }
    h3 { font-size: 1.0625rem; }
}

/* ─── Селектируемость / тапы ─── */
.tab-button,
.logo,
.footer a,
.bento-title,
.bento-overlay h3 {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

button,
.tab-button,
.legal-link,
.video-modal button,
.custom-video-player,
video {
    -webkit-tap-highlight-color: transparent !important;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.custom-video-player * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

.no-select,
.no-select * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.cta-link,
.cta-link *,
.bento-item,
.bento-item *,
.review-card,
.review-card *,
.review-video-preview-wrapper,
.review-video-preview-wrapper *,
.custom-video-player,
.custom-video-player *,
.video-controls,
.video-controls *,
.video-play-btn,
.video-play-btn *,
.video-fullscreen-btn,
.video-fullscreen-btn *,
.video-progress-bar,
.video-progress-bar *,
.video-modal-close,
.video-modal-close * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.cta-link .cta-icon,
.cta-link .cta-label {
    display: inline-block;
    pointer-events: none;
}

button:focus,
.tab-button:focus,
.legal-link:focus,
.video-modal button:focus,
video:focus {
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    button:focus-visible,
    .tab-button:focus-visible,
    .legal-link:focus-visible,
    .video-modal button:focus-visible {
        outline: 2px solid var(--color-accent);
        outline-offset: 2px;
    }
}

.cta-link {
    -webkit-tap-highlight-color: transparent !important;
    outline: none;
    touch-action: manipulation;
}

.cta-link:focus,
.cta-link:active { outline: none; }

img {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.bento-item,
.review-card,
.contact-card { -webkit-user-drag: none; }
