/* ============================================================
   OMNI DYNE CORPORATION — STYLE MANIFEST
   ============================================================ */

/* === Font === */
@font-face {
    font-family: 'Spac3';
    src: url('../fonts/Spac3.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* === Custom Properties === */
:root {
    --od-orange:        #FD9651;
    --od-orange-dim:    #924F22;
    --od-orange-glow:   rgba(253, 150, 81, 0.5);
    --od-green:         #39FF14;
    --od-green-dim:     #1a7a0a;
    --od-green-glow:    rgba(57, 255, 20, 0.5);
    --od-red:           #FF3131;
    --od-black:         #0a0a0a;
    --od-dark:          #1a1a1a;
    --od-gray:          #2a2a2a;
    --od-gray-light:    #505050;
    --od-white:         #e0e0e0;
    --od-text:          var(--od-orange);
    --od-bg:            var(--od-black);
    --od-border:        var(--od-orange);
    --od-accent:        var(--od-orange);
    --od-accent-dim:    var(--od-orange-dim);
    --od-accent-glow:   var(--od-orange-glow);

    --font-brand:       'Spac3', "Lucida Console", monospace;
    --font-mono:        "Lucida Console", "Courier New", monospace;
    --section-width:    min(90%, 1200px);
    --aug-clip-sm:      8px;
    --aug-clip-md:      15px;
    --aug-clip-lg:      20px;
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-mono);
    color: var(--od-orange);
    background-color: var(--od-black);
    background-image: url('../images/circuitboard_bg.png');
    background-size: 300px;
    background-repeat: repeat;
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scan line overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

a {
    color: var(--od-orange);
    text-decoration: underline;
}

a:hover {
    color: var(--od-white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

label {
    font-weight: 400;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

/* === Typography === */
h1 {
    font-size: 3.5rem;
    line-height: 1;
    letter-spacing: 0.05em;
}

h2 {
    font-size: 1.4rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

.text-orange { color: var(--od-orange); }
.text-green  { color: var(--od-green); }
.text-red    { color: var(--od-red); }
.text-dim    { color: var(--od-gray-light); }

/* === Animations === */
.blink {
    animation: blinker 1s step-end infinite;
    font-family: var(--font-mono);
}

.blink--green {
    animation: blinker-green 1s step-end infinite;
}

@keyframes blinker {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes blinker-green {
    0%, 49% { opacity: 1; color: var(--od-green); }
    50%, 100% { opacity: 0; }
}

.flash {
    animation: flasher 3.2s ease-in-out infinite;
    text-decoration: none;
}

.flash--green {
    animation: flasher-green 3.2s ease-in-out infinite;
}

@keyframes flasher {
    0%, 100% { color: var(--od-orange); }
    50% { color: var(--od-orange-dim); }
}

@keyframes flasher-green {
    0%, 100% { color: var(--od-green); }
    50% { color: var(--od-green-dim); }
}


@keyframes flicker {
    0%, 91%, 93%, 95%, 97%, 100% { opacity: 1; }
    92% { opacity: 0.8; }
    94% { opacity: 0.9; }
    96% { opacity: 0.7; }
}

@keyframes glitch-flash {
    0%   { opacity: 0; }
    5%   { opacity: 1; background: var(--od-green); }
    10%  { opacity: 0; }
    15%  { opacity: 1; background: var(--od-orange); }
    20%  { opacity: 0; }
    30%  { opacity: 1; background: var(--od-green); }
    35%  { opacity: 0; }
    50%  { opacity: 1; background: #fff; }
    55%  { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Layout === */
.section {
    width: var(--section-width);
    margin: 0 auto;
    padding: 3rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section__header {
    background-color: var(--od-dark);
    padding: 0.8rem 1.5rem;
    font-family: var(--font-brand);
    margin-bottom: 1.5rem;
    --aug-tl: var(--aug-clip-sm);
    --aug-tr: var(--aug-clip-sm);
    --aug-br: var(--aug-clip-sm);
    --aug-bl: var(--aug-clip-sm);
    --aug-border-all: 2px;
    --aug-border-bg: var(--od-orange);
}

.section__header--green {
    --aug-border-bg: var(--od-green);
}

.section__header--green h2 {
    color: var(--od-green);
}

.section__body {
    background-color: rgba(0, 0, 0, 0.85);
    padding: 2rem;
    --aug-tl: var(--aug-clip-md);
    --aug-tr: var(--aug-clip-sm);
    --aug-br: var(--aug-clip-sm);
    --aug-bl: var(--aug-clip-md);
    --aug-border-all: 2px;
    --aug-border-bg: var(--od-gray);
}

.section__subtitle {
    color: var(--od-orange);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    background-color: rgba(0, 0, 0, 0.7);
    display: inline-block;
    padding: 0.3rem 0.8rem;
}

.section__subtitle--green {
    color: var(--od-green);
}

/* === Hero === */
#hero {
    text-align: center;
    padding: 2rem 0 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.hero__eye-container {
    width: 62vw;
    max-width: 580px;
    aspect-ratio: 1.8 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    --aug-tl: var(--aug-clip-md);
    --aug-t: var(--aug-clip-sm);
    --aug-tr: var(--aug-clip-sm);
    --aug-br: var(--aug-clip-md);
    --aug-bl: var(--aug-clip-sm);
    --aug-border-all: 4px;
    --aug-border-bg: var(--od-orange);
    box-shadow: 0 0 25px rgba(253, 150, 81, 0.35), 0 0 50px rgba(253, 150, 81, 0.12);
}

.hero__eye {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.15);
    filter: drop-shadow(0 0 20px var(--od-accent-glow));
}

.hero__title {
    background-color: var(--od-black);
    padding: 1.5rem 2rem;
    font-family: var(--font-brand);
    --aug-tl: var(--aug-clip-md);
    --aug-t: var(--aug-clip-sm);
    --aug-tr: var(--aug-clip-sm);
    --aug-br: var(--aug-clip-md);
    --aug-bl: var(--aug-clip-sm);
    --aug-border-all: 3px;
    --aug-border-bg: var(--od-gray);
}

.hero__title h1 {
    text-align: left;
    padding-left: 1.5rem;
}

.hero__title .dash {
    font-family: monospace;
}

.hero__tagline {
    font-size: 0.8rem;
    color: var(--od-orange-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.hero__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 1rem;
    max-width: 800px;
}

/* === Buttons === */
.nav-btn {
    border: none;
    padding: 0;
    background-color: var(--od-gray);
    cursor: pointer;
    font-family: var(--font-mono);
    --aug-tl: var(--aug-clip-sm);
    --aug-tr: var(--aug-clip-sm);
    --aug-br: var(--aug-clip-sm);
    --aug-bl: var(--aug-clip-sm);
    --aug-border-all: 1px;
    --aug-border-bg: var(--od-orange-dim);
    transition: transform 0.1s ease;
}

.nav-btn__face {
    display: block;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--od-orange);
    background-color: var(--od-gray-light);
    transform: translateY(-3px);
    transition: transform 0.1s ease, background-color 0.15s ease;
    --aug-tl: var(--aug-clip-sm);
    --aug-tr: var(--aug-clip-sm);
    --aug-br: var(--aug-clip-sm);
    --aug-bl: var(--aug-clip-sm);
}

.nav-btn:hover .nav-btn__face {
    transform: translateY(-5px);
    background-color: #5a5a5a;
}

.nav-btn:active .nav-btn__face {
    transform: translateY(-1px);
}

/* Green button variants */
.nav-btn--green {
    --aug-border-bg: var(--od-green-dim);
}

.nav-btn__face--green {
    color: var(--od-green);
}

.nav-btn--login {
    --aug-border-bg: var(--od-gray-light);
}

/* === Product Cards === */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.product-card {
    background-color: rgba(0, 0, 0, 0.85);
    overflow: hidden;
    --aug-tl: var(--aug-clip-md);
    --aug-tr: var(--aug-clip-sm);
    --aug-br: var(--aug-clip-sm);
    --aug-bl: var(--aug-clip-sm);
    --aug-border-all: 2px;
    --aug-border-bg: var(--od-gray);
    transition: transform 0.2s ease;
}

.product-card:hover {
    transform: scale(1.02);
}

.product-card--classified {
    --aug-border-bg: var(--od-green-dim);
}

.product-card--classified:hover {
    --aug-border-bg: var(--od-green);
}

.product-card__gallery {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background-color: var(--od-black);
}

.product-card__gallery a {
    display: block;
    width: 100%;
    height: 100%;
}

.product-card__gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card__gallery a:hover img {
    transform: scale(1.05);
}

.product-card__gallery .gallery-extra {
    display: none;
}

.product-card__placeholder {
    aspect-ratio: 4/3;
    background-color: var(--od-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    --aug-border-all: 1px;
    --aug-border-bg: var(--od-gray);
}

.product-card__placeholder-text {
    color: var(--od-gray-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.product-card__info {
    padding: 1rem 1.2rem;
}

.product-card__name {
    font-family: var(--font-brand);
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.product-card__name--green {
    color: var(--od-green);
}

.product-card__model {
    font-size: 0.7rem;
    color: var(--od-gray-light);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.product-card__desc {
    font-size: 0.8rem;
    color: var(--od-orange-dim);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.product-card__desc--green {
    color: var(--od-green-dim);
}

.product-card__status {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.2rem 0.6rem;
    border: 1px solid;
}

.product-card__status--available {
    color: var(--od-green);
    border-color: var(--od-green-dim);
}

.product-card__status--sold {
    color: var(--od-red);
    border-color: #7a1a1a;
}

.product-card__status--classified {
    color: var(--od-orange);
    border-color: var(--od-orange-dim);
    animation: flasher 3.2s ease-in-out infinite;
}

/* === Personnel Cards === */
.personnel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.personnel-card {
    background-color: rgba(0, 0, 0, 0.85);
    --aug-border-all: 2px;
    --aug-border-bg: var(--od-gray);
    --aug-tl: var(--aug-clip-md);
    --aug-tr: var(--aug-clip-sm);
    --aug-br: var(--aug-clip-md);
    --aug-bl: var(--aug-clip-sm);
}

.personnel-card--od15 {
    --aug-border-bg: var(--od-orange-dim);
}

.personnel-card--switch {
    --aug-border-bg: var(--od-green-dim);
}

.personnel-card--m1l0 {
    --aug-border-bg: #7a1a1a;
}

.personnel-card__photo {
    padding: 1rem;
}

.personnel-card__placeholder {
    aspect-ratio: 1;
    background-color: var(--od-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    --aug-border-all: 1px;
    --aug-border-bg: var(--od-gray);
    --aug-tl: var(--aug-clip-sm);
    --aug-tr: var(--aug-clip-sm);
    --aug-br: var(--aug-clip-sm);
    --aug-bl: var(--aug-clip-sm);
}

.personnel-card__logo {
    width: 60%;
    opacity: 0.3;
}

.personnel-card__info {
    padding: 0 1.5rem 1.5rem;
}

.personnel-card--od15 .personnel-card__info h3 {
    color: var(--od-orange);
}

.personnel-card--switch .personnel-card__info h3 {
    color: var(--od-green);
}

.personnel-card--m1l0 .personnel-card__info h3 {
    color: var(--od-red);
}

.personnel-card__title {
    font-size: 0.75rem;
    color: var(--od-gray-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.personnel-card__bio {
    font-size: 0.8rem;
    color: var(--od-orange-dim);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.personnel-card__clearance,
.personnel-card__faction {
    font-size: 0.7rem;
    color: var(--od-gray-light);
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

/* === Contact Form === */
.contact-wrapper {
    background-color: rgba(0, 0, 0, 0.85);
    padding: 2rem;
    --aug-tl: var(--aug-clip-md);
    --aug-tr: var(--aug-clip-sm);
    --aug-br: var(--aug-clip-sm);
    --aug-bl: var(--aug-clip-md);
    --aug-border-all: 2px;
    --aug-border-bg: var(--od-gray);
}

.contact-email {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-field {
    margin-bottom: 1rem;
}

.form-field--hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--od-orange);
    background-color: var(--od-gray);
    border: 1px solid var(--od-orange-dim);
    outline: none;
    --aug-tl: 5px;
    --aug-br: 5px;
    --aug-border-all: 1px;
    --aug-border-bg: var(--od-orange-dim);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--od-orange);
    --aug-border-bg: var(--od-orange);
    box-shadow: 0 0 10px var(--od-orange-glow);
}

.form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.form-status {
    margin-top: 1rem;
    font-size: 0.85rem;
    min-height: 1.5em;
}

.form-status--success {
    color: var(--od-green);
}

.form-status--error {
    color: var(--od-red);
}

/* === Terminal === */
.terminal {
    background-color: rgba(0, 0, 0, 0.95);
    --aug-tl: var(--aug-clip-md);
    --aug-tr: var(--aug-clip-md);
    --aug-br: var(--aug-clip-md);
    --aug-bl: var(--aug-clip-md);
    --aug-border-all: 2px;
    --aug-border-bg: var(--od-green-dim);
    animation: flicker 5s infinite;
}

.terminal__screen {
    padding: 1.5rem;
    min-height: 250px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

.terminal__output {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.terminal__output p {
    color: var(--od-green);
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

.terminal__output .text-orange {
    color: var(--od-orange);
}

.terminal__output .text-red {
    color: var(--od-red);
}

.terminal__input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal__prompt {
    color: var(--od-green);
    font-size: 0.8rem;
    white-space: nowrap;
    font-weight: bold;
}

.terminal__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--od-green);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    caret-color: var(--od-green);
}

/* === Back Room === */
.backroom {
    display: none;
    min-height: 100vh;
}

.backroom.active {
    display: block;
}

.backroom__header {
    text-align: center;
    padding: 2rem 0 1rem;
}

.backroom__banner {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 1.5rem 3rem;
    --aug-tl: var(--aug-clip-md);
    --aug-tr: var(--aug-clip-md);
    --aug-br: var(--aug-clip-md);
    --aug-bl: var(--aug-clip-md);
    --aug-border-all: 2px;
    --aug-border-bg: var(--od-green);
}

.backroom__banner h2 {
    color: var(--od-green);
    font-size: 1.4rem;
    font-family: var(--font-brand);
}

.backroom__classification {
    color: var(--od-green-dim);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    margin-top: 0.5rem;
}

.backroom__nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
}

.backroom__exit-container {
    text-align: center;
    padding: 3rem 0;
}

/* Glitch transition overlay */
.glitch-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
}

.glitch-overlay.active {
    display: block;
    animation: glitch-flash 1.2s ease-out forwards;
}

/* Back room theme overrides */
.theme-backroom {
    background-image: url('../images/circuitboard_green_bg.png');
    background-size: 400px;
}

.theme-backroom::after {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 40, 0, 0.04) 2px,
        rgba(0, 40, 0, 0.04) 4px
    );
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--od-gray);
    background-color: rgba(0, 0, 0, 0.9);
}

.footer__logo {
    width: 50px;
    margin: 0 auto 1rem;
    opacity: 0.5;
    border-radius: 50%;
    background-color: var(--od-black);
}

.footer__content p {
    font-size: 0.75rem;
    color: var(--od-orange-dim);
    margin-bottom: 0.5rem;
}

.footer__legal {
    font-size: 0.65rem !important;
    color: var(--od-gray-light) !important;
}

.footer__neo-link {
    color: var(--od-orange-dim);
    font-size: 0.7rem;
}

.footer__neo-link:hover {
    color: var(--od-orange);
}

/* === Responsive === */

/* Tablet */
@media (min-width: 600px) {
    :root {
        --section-width: min(80%, 1200px);
    }

    h1 {
        font-size: 5rem;
    }

    .hero__eye-container {
        width: 60vw;
        max-width: 550px;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .personnel-card {
        display: grid;
        grid-template-columns: 200px 1fr;
    }
}

/* Desktop */
@media (min-width: 960px) {
    :root {
        --section-width: min(70%, 1200px);
        --aug-clip-sm: 10px;
        --aug-clip-md: 18px;
        --aug-clip-lg: 25px;
    }

    h1 {
        font-size: 5.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .personnel-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .personnel-card {
        display: block;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .section {
        opacity: 1;
        transform: none;
    }
}
