/* ============================================
   Ottomate IT, LLC - Hacker Aesthetic Stylesheet
   No external fonts. No frameworks. Minimal attack surface.
   ============================================ */

:root {
    --bg: #0a0a0a;
    --bg-alt: #111;
    --fg: #00ff41;
    --fg-dim: #008f11;
    --fg-bright: #39ff14;
    --accent: #ff073a; /* neon red - alternate accent */
    --accent-dim: #a8001c;
    --accent-bright: #ff3355;
    --warning: #ffb000;
    --border: #00ff4133;
    --shadow: 0 0 8px #00ff4155;
}

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

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    font-family: "Courier New", Courier, "Lucida Console", monospace;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    overflow-x: hidden;
    text-shadow: 0 0 2px var(--fg-dim);
}

/* CRT scanline overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 65, 0.03) 0px,
        rgba(0, 255, 65, 0.03) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 9999;
}

/* Subtle vignette */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 60%,
        rgba(0, 0, 0, 0.6) 100%
    );
    pointer-events: none;
    z-index: 9998;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--border);
    transition:
        color 0.2s,
        text-shadow 0.2s;
}

a:hover,
a:focus {
    color: var(--fg-bright);
    text-shadow: 0 0 6px var(--fg-bright);
    outline: none;
}

/* ============== HEADER / NAV ============== */
header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 255, 65, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.brand {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--fg-bright);
    text-shadow: 0 0 6px var(--fg);
    border: none;
    white-space: nowrap;
}

.brand::before {
    content: "> ";
    color: var(--accent);
}

.brand .cursor {
    display: inline-block;
    width: 0.6em;
    background: var(--fg);
    animation: blink 1s steps(2) infinite;
    margin-left: 2px;
    color: transparent;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: var(--fg);
    border: none;
    padding: 0.4rem 0.6rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover,
nav a:focus,
nav a.active {
    background: rgba(0, 255, 65, 0.08);
    color: var(--fg-bright);
    text-shadow: 0 0 6px var(--fg-bright);
}

/* Dropdown menu (CSS only) */
.dropdown {
    position: relative;
}

.dropdown > a::after {
    content: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    min-width: 240px;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    box-shadow: 0 4px 20px rgba(0, 255, 65, 0.15);
    z-index: 200;
}

/* Invisible bridge so the mouse can travel from the trigger
   to the dropdown menu without losing the :hover state. */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

/* Keep the dropdown open while the cursor is over the trigger OR the menu. */
.dropdown:hover > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu,
.dropdown > .dropdown-menu:hover {
    display: block;
    animation: fadeDown 0.2s ease-out;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.dropdown-menu a::before {
    content: "$ ";
    color: var(--accent);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.menu-toggle:hover {
    background: rgba(0, 255, 65, 0.08);
}

/* ============== MAIN ============== */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

section {
    margin-bottom: 3rem;
    animation: fadeIn 0.8s ease-out both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1,
h2,
h3,
h4 {
    color: var(--fg-bright);
    text-shadow: 0 0 8px var(--fg);
    margin-bottom: 1rem;
    letter-spacing: 1px;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

h1::before {
    content: "# ";
    color: var(--fg-bright);
    text-shadow: 0 0 8px var(--fg);
}
h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
}
h2::before {
    content: "## ";
    color: var(--fg-bright);
    text-shadow: 0 0 8px var(--fg);
}
h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
}
h3::before {
    content: "### ";
    color: var(--fg-bright);
    text-shadow: 0 0 8px var(--fg);
}

p {
    margin-bottom: 1rem;
}

ul,
ol {
    margin: 1rem 0 1rem 1.5rem;
}

li {
    margin-bottom: 0.4rem;
}

ul li::marker {
    color: var(--accent);
    content: "▸ ";
}

/* ASCII art block
   display:block + text-align:left keeps character columns aligned.
   Inside .hero the flex parent (align-items:center) centers the block.
   JS dedents the content at runtime to strip any Prettier indentation.  */
.ascii {
    display: block;
    font-family: "Courier New", Courier, "Lucida Console", monospace;
    white-space: pre;
    color: var(--fg);
    text-shadow: 0 0 6px var(--fg-dim);
    font-size: 0.7rem;
    line-height: 1.1;
    text-align: left;       /* KEEP left — internal lines must never be re-centered */
    padding: 1rem 0;
    max-width: 100%;
    overflow-x: auto;
    animation: flicker 4s infinite;
}

@keyframes flicker {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.92;
    }
    52% {
        opacity: 1;
    }
}

.ascii-small {
    font-size: 0.55rem;
}

/* Hero
   Flexbox column + align-items:center gives true centering based on
   each child's actual rendered width — reliable regardless of whether
   the ASCII art is narrower or wider than the container.
   overflow-x:hidden stops wide art from widening the page on mobile.  */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    text-align: center;     /* keeps inline/text children centered */
    padding: 2rem 1rem;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0, 255, 65, 0.02), transparent);
    margin-bottom: 2rem;
}

/* Reset ascii inside hero — flex parent handles horizontal centering */
.hero .ascii {
    display: block;
    margin: 0;
    align-self: center;
}

.hero h1 {
    border: none;
    font-size: 2.2rem;
    width: 100%;
    text-align: center;
}

.hero .tagline {
    font-size: 1.05rem;
    color: var(--accent);
    margin: 1rem 0;
}

.hero .typed::after {
    content: "_";
    animation: blink 1s steps(2) infinite;
    color: var(--fg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--fg);
    color: var(--fg-bright);
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin: 0.5rem 0.25rem;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: inset 0 0 0 0 var(--fg);
}

.btn:hover,
.btn:focus {
    background: var(--fg);
    color: var(--bg);
    text-shadow: none;
    box-shadow: 0 0 16px var(--fg);
    outline: none;
}

.btn-primary {
    border-color: var(--fg-bright);
    color: var(--bg);
    background: var(--fg);
}

.btn-primary:hover {
    background: var(--fg-bright);
    box-shadow: 0 0 24px var(--fg-bright);
}

/* Service grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.card {
    border: 1px solid var(--border);
    padding: 1.25rem;
    background: var(--bg-alt);
    transition: all 0.25s;
    position: relative;
}

.card::before {
    content: "[ + ]";
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    color: var(--fg-dim);
    font-size: 0.8rem;
}

.card:hover {
    border-color: var(--fg);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card h3 {
    margin-top: 0;
}
.card h3::before {
    content: "";
}

/* Code-block style content */
.terminal {
    background: #000;
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    overflow-x: auto;
    box-shadow: var(--shadow);
}

.terminal::before {
    content: "● ● ●";
    display: block;
    color: var(--fg-dim);
    margin-bottom: 0.5rem;
    letter-spacing: 4px;
}

.terminal .prompt {
    color: var(--accent);
}

/* Forms */
form {
    border: 1px solid var(--border);
    padding: 1.5rem;
    background: var(--bg-alt);
    max-width: 640px;
    margin: 1.5rem auto;
}

label {
    display: block;
    margin: 1rem 0 0.4rem;
    color: var(--fg-bright);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

label::before {
    content: "> ";
    color: var(--accent);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    background: #000;
    color: var(--fg);
    border: 1px solid var(--border);
    padding: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--fg);
    box-shadow: 0 0 8px var(--fg-dim);
}

textarea {
    resize: vertical;
    min-height: 140px;
}

input[type="submit"],
button[type="submit"] {
    margin-top: 1.25rem;
    width: 100%;
}

.cf-turnstile {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

/* Stats / highlight strip */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    text-align: center;
    margin: 2rem 0;
}

.stat {
    border: 1px solid var(--border);
    padding: 1.25rem 0.75rem;
}

.stat strong {
    display: block;
    font-size: 1.8rem;
    color: var(--fg-bright);
    text-shadow: 0 0 8px var(--fg);
}

/* ============== SECURITY BANNER ============== */
.security-banner {
    max-width: 1100px;
    margin: 4rem auto 1.5rem;
    padding: 0 1.25rem;
    animation: fadeIn 0.8s ease-out both;
}

.security-banner .terminal {
    margin: 0;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 7, 58, 0.25);
}

.security-banner .terminal::before {
    color: var(--accent-dim);
}

.security-banner .prompt {
    color: var(--accent);
}

.security-banner .ip-label,
.security-banner .vpn-label {
    color: var(--fg-bright);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.security-banner #visitor-ip,
.security-banner #vpn-status {
    color: var(--accent);
    font-weight: bold;
    text-shadow: 0 0 6px var(--accent-dim);
}

.security-banner #vpn-status.safe {
    color: var(--fg-bright);
    text-shadow: 0 0 6px var(--fg-dim);
}

.security-banner #vpn-status.alert {
    color: var(--accent-bright);
    text-shadow: 0 0 8px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.security-banner .note {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--fg-dim);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 2rem 1.25rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--fg-dim);
    background: var(--bg);
}

footer .ascii {
    font-size: 0.55rem;
    color: var(--fg-dim);
    text-align: center;
    white-space: normal;
}

footer a {
    color: var(--fg);
}

/* Form status messages */
.form-status {
    padding: 0.75rem 1rem;
    margin-top: 1.25rem;
    border: 1px solid var(--border);
    font-size: 0.88rem;
    font-family: "Courier New", Courier, "Lucida Console", monospace;
}
.form-status--success {
    border-color: var(--fg);
    color: var(--fg);
}
.form-status--error {
    border-color: var(--accent);
    color: var(--accent);
}
.form-status--info {
    border-color: var(--fg-dim);
    color: var(--fg-dim);
}

/* Utility */
.center {
    text-align: center;
}
.muted {
    color: var(--fg-dim);
}
.kw {
    color: var(--accent);
}

/* SEO-friendly visually hidden text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 820px) {
    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-top: 1rem;
        gap: 0;
        border-top: 1px solid var(--border);
        padding-top: 0.5rem;
    }

    nav ul.open {
        display: flex;
    }

    nav li {
        width: 100%;
    }
    nav a {
        display: block;
        padding: 0.75rem 0.5rem;
    }

    .dropdown-menu {
        position: static;
        border: none;
        border-left: 2px solid var(--border);
        margin-left: 1rem;
        box-shadow: none;
        background: transparent;
        display: none;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown > a::after {
        content: none;
    }
    .dropdown.open > a::after {
        content: none;
    }

    h1 {
        font-size: 1.5rem;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .ascii {
        font-size: 0.5rem;
    }
    .ascii-small {
        font-size: 0.42rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    main {
        padding: 1.25rem 1rem;
    }
    .ascii {
        font-size: 0.4rem;
    }
    /* Hero stays flex on mobile — overflow-x:hidden on .hero clips the art.
       align-self:flex-start stops the art from stretching to full width. */
    .hero {
        padding: 1.5rem 0.5rem;
    }
    .hero .ascii {
        align-self: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .hero h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 360px) {
    .ascii {
        font-size: 0.3rem;
    }
}

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

/* === TYPING ANIMATION FOR HERO H1 + TAGLINE ===
   JS (main.js) drives character-by-character reveal.
   .typer-cursor is injected by JS and reuses @keyframes blink.
   min-height on h1 reserves layout space before text appears.    */

.hero h1 {
    min-height: 1.4em;
}

.hero .tagline {
    min-height: 1.2em;
}

.typer-cursor {
    display: inline-block;
    width: 0.5em;
    height: 0.85em;
    background: var(--fg-bright);
    box-shadow: 0 0 5px var(--fg);
    color: transparent;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.7s step-end infinite;
}
