/**
 * ============================================================
 * Author:    DARK-MASTER
 * Studio:    DARK DIGITAL STUDIO
 * Site:      dark-digital-studio.com
 * Email:     Service.Dark.Digital.studio@gmail.com
 * WhatsApp:  +905378664534
 * Telegram:  https://t.me/DARK_Digital_Studio
 * GitHub:    github.com/DARK-MASTER-0
 *
 * Copyright (c) 2018-2026 Dark Digital Studio. All Rights Reserved.
 * Unauthorized copying, distribution, or use of this software,
 * in whole or in part, is strictly prohibited without prior
 * written permission from the author.
 * ============================================================
 */
/* ========================================================================
   Buttons, Toggles & Micro Components
   ======================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 18px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    -webkit-border-radius: 18px;
    -moz-border-radius: 18px;
    -ms-border-radius: 18px;
    -o-border-radius: 18px;
}

/* Base Gradient Layer (z-index: -2) */
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    transition: opacity 0.3s ease;
}

/* Hover Gradient Layer (z-index: -1) */
.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary {
    color: var(--color-on-primary);
    background: transparent;
    box-shadow: 0 8px 24px -8px rgba(13, 125, 220, 0.45),
                0 2px 8px -2px rgba(13, 125, 220, 0.2);
}

.btn-primary::before {
    background: linear-gradient(135deg, #0b6ec5 0%, #0d8bf0 40%, #38a3f8 70%, #5ec2ff 100%);
}

.btn-primary::after {
    background: linear-gradient(135deg, #0952a5 0%, #0b73d1 35%, #1a94f5 65%, #42b0ff 100%);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    transform: translateY(-3px);
    color: var(--color-on-primary);
    box-shadow: 0 14px 36px -10px rgba(13, 125, 220, 0.55),
                0 4px 12px -2px rgba(13, 125, 220, 0.25);
}

.btn-primary:hover::after,
.btn-primary:focus-visible::after {
    opacity: 1;
}

.btn-outline {
    color: #00aaff;
    border: 1.5px solid rgba(13, 125, 220, 0.35);
    background: rgba(13, 125, 220, 0.04);
}

.btn-outline::before {
    background: rgba(13, 125, 220, 0.06);
}

.btn-outline::after {
    background: linear-gradient(135deg, #0b6ec5 0%, #0d8bf0 50%, #38a3f8 100%);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    border-color: transparent;
    color: var(--color-on-primary);
    box-shadow: 0 10px 28px -12px rgba(13, 125, 220, 0.45);
}

.btn-outline:hover::after,
.btn-outline:focus-visible::after {
    opacity: 1;
}

.btn-soft {
    border: 1px solid rgba(13, 125, 220, 0.14);
    background: transparent;
    color: var(--color-text);
}

.btn-soft::before {
    background: rgba(13, 125, 220, 0.08); /* Base background */
}

.btn-soft::after {
    background: rgba(13, 125, 220, 0.15); /* Hover background */
}

.btn-soft:hover,
.btn-soft:focus-visible {
    border-color: rgba(13, 125, 220, 0.25);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-soft:hover::after,
.btn-soft:focus-visible::after {
    opacity: 1;
}

.theme-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: linear-gradient(135deg, rgba(13, 125, 220, 0.14), rgba(111, 199, 255, 0.16));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease;
    stroke: var(--color-text);
    fill: none;
    -webkit-transition: transform 0.3s ease, opacity 0.3s ease;
    -moz-transition: transform 0.3s ease, opacity 0.3s ease;
    -ms-transition: transform 0.3s ease, opacity 0.3s ease;
    -o-transition: transform 0.3s ease, opacity 0.3s ease;
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: translateY(0);
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: translateY(10px);
}

.theme-toggle.is-dark .sun-icon {
    opacity: 0;
    transform: translateY(-10px);
}

.theme-toggle.is-dark .moon-icon {
    opacity: 1;
    transform: translateY(0);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-weight: 600;
    position: relative;
}

.link-arrow::after {
    content: "→";
    transition: transform 0.3s ease;
}

.link-arrow:hover::after {
    transform: translateX(4px);
}

/* ========================================================================
   Typewriter Hero Treatment
   ======================================================================== */
.typewriter {
    display: inline-block;
    padding-right: 6px;
    border-right: .15em solid var(--color-primary);
    color: var(--color-text);
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
    overflow: hidden;
    animation: blink-caret 1.75s step-end infinite;
    animation-play-state: paused;
}

.typewriter.typewriter-complete {
    border-right-color: transparent;
    animation: none;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .typewriter {
        background: radial-gradient(circle at 0% 51%, rgb(1, 48, 92), rgba(0, 79, 153, 0) 67%),
            radial-gradient(circle at 100% 0%, rgba(2, 121, 212, 0.7), rgba(2, 121, 212, 0) 50%),
            linear-gradient(to bottom right, rgb(0, 143, 199), rgb(63, 183, 253));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
}

body.page-ready .typewriter {
    animation-play-state: running;
    animation-delay: 1.35s;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--color-primary); }
}

@keyframes caretBlink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: currentColor; }
}
