/*
Theme Name: VAIC Theme
Theme URI: https://vaic.at
Author: VAIC
Author URI: https://vaic.at
Description: A sophisticated WordPress theme for VAIC featuring animated hero sections with video-inside-text effects using SVG masking.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vaic-theme
Tags: full-width-template, custom-background, custom-menu
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    /* Colors */
    --vaic-black: #000000;
    --vaic-white: #ffffff;
    --vaic-gray-light: #f5f5f5;
    --vaic-gray: #888888;
    --vaic-gray-dark: #333333;

    /* Typography */
    --vaic-font-logo: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --vaic-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --vaic-font-serif: Georgia, 'Times New Roman', serif;

    /* Sizes */
    --vaic-logo-size: 14px;
    --vaic-nav-size: 14px;
    --vaic-quote-size: 32px;
    --vaic-quote-author-size: 14px;
    --vaic-hero-letter-size: 52vw;

    /* Spacing */
    --vaic-spacing-sm: 1rem;
    --vaic-spacing-md: 2rem;
    --vaic-spacing-lg: 4rem;

    /* Transitions */
    --vaic-transition-fast: 0.2s ease;
    --vaic-transition-medium: 0.5s ease;
    --vaic-transition-slow: 1s ease;

    /* Z-indexes */
    --vaic-z-background: 1;
    --vaic-z-letters: 10;
    --vaic-z-quote: 20;
    --vaic-z-navigation: 100;
}

/* ==========================================================================
   Base Reset
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--vaic-font-body);
    background-color: var(--vaic-black);
    color: var(--vaic-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--vaic-transition-fast);
}

a:hover {
    opacity: 0.7;
}

ul, ol {
    list-style: none;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.2;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.vaic-hero {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--vaic-black);
    overflow: hidden;
    z-index: var(--vaic-z-background);
}

/* Background Media Canvas */
.vaic-hero__background {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: var(--vaic-z-background);
}

.vaic-hero__background-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--vaic-transition-slow);
}

.vaic-hero__background-media.is-active {
    opacity: 1;
}

/* ==========================================================================
   Quote Section
   ========================================================================== */

.vaic-quote {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: var(--vaic-z-quote);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: var(--vaic-spacing-md);
    /* Left-aligned text, centered container */
    text-align: left;
}

.vaic-quote__text {
    font-family: var(--vaic-font-body);
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 400;
    line-height: 1.4;
    color: var(--vaic-white);
    margin-bottom: 1.5rem;
}

.vaic-quote__author {
    font-family: var(--vaic-font-body);
    font-size: var(--vaic-quote-author-size);
    font-weight: 300;
    color: var(--vaic-gray);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.vaic-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--vaic-z-navigation);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--vaic-spacing-md);
}

/* Adjust header for WordPress admin bar */
.admin-bar .vaic-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .vaic-header {
        top: 46px;
    }
}

.vaic-logo {
    font-family: var(--vaic-font-logo);
    font-size: var(--vaic-logo-size);
    font-weight: 400;
    color: var(--vaic-white);
    letter-spacing: 0.02em;
}

.vaic-nav {
    display: flex;
    gap: var(--vaic-spacing-md);
}

.vaic-nav__item {
    font-family: var(--vaic-font-body);
    font-size: var(--vaic-nav-size);
    font-weight: 400;
    color: var(--vaic-white);
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Letter Containers
   ========================================================================== */

.vaic-letters {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--vaic-z-letters);
    opacity: 0;
    pointer-events: none;
}

.vaic-letters__wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

/* Base letter styles - additional styles in hero.css */
.vaic-letter {
    position: relative;
    display: inline-block;
    font-family: var(--vaic-font-logo);
    font-size: var(--vaic-hero-letter-size);
    font-weight: 600;
    line-height: 1;
    color: var(--vaic-white);
    /* Isolation for mix-blend-mode to work correctly */
    isolation: isolate;
    /* Reduce spacing between letters */
    margin-right: -0.18em;
}

.vaic-letter:last-child {
    margin-right: 0;
}

/* Make the "i" letter container wider */
/* Note: The actual transform is controlled by hero.css with !important
   to handle the animation states (scale 0.95 -> 1 with scaleX(2)) */
.vaic-letter[data-letter="i"] {
    transform: scaleX(2);
}

/* Fix V-A kerning - pull A closer to V */
.vaic-letter[data-letter="v"] {
    margin-right: -0.25em;
}

/* Letter text visible by default */
.vaic-letter__text {
    position: relative;
    z-index: 3;
    color: var(--vaic-white);
}

/* Letter States */
.vaic-letter.is-visible {
    opacity: 1;
}

/* ==========================================================================
   SVG Masks (hidden, used for clipping)
   ========================================================================== */

.vaic-svg-masks {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ==========================================================================
   Maintenance Mode
   ========================================================================== */

.vaic-maintenance {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--vaic-black);
    z-index: 9999;
}

.vaic-maintenance__content {
    text-align: center;
    padding: var(--vaic-spacing-md);
}

.vaic-maintenance__title {
    font-family: var(--vaic-font-logo);
    font-size: 14px;
    font-weight: 400;
    color: var(--vaic-white);
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --vaic-hero-letter-size: 22vw;
        --vaic-quote-size: 24px;
        --vaic-spacing-md: 1.5rem;
    }

    .vaic-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .vaic-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .vaic-quote {
        max-width: 90%;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --vaic-hero-letter-size: 18vw;
    }

    .vaic-nav {
        gap: 0.75rem;
    }

    .vaic-nav__item {
        font-size: 12px;
    }
}

