/* ==================================================
   GRIND2SHINE CLOUD
   Main Design System
   ================================================== */


/* --------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------- */

:root {
    color-scheme: dark;

    --bg-primary: #080c13;
    --bg-secondary: #0c121d;
    --bg-panel: rgba(17, 27, 43, 0.78);
    --bg-panel-hover: rgba(23, 38, 59, 0.92);

    --blue: #1677ff;
    --blue-bright: #3295ff;
    --cyan: #00d9ff;
    --cyan-soft: #75eaff;

    --text-primary: #f3f7ff;
    --text-secondary: #a1aec2;
    --text-muted: #65748b;

    --border: rgba(105, 155, 220, 0.17);
    --border-bright: rgba(0, 217, 255, 0.42);

    --shadow-blue: 0 0 35px rgba(22, 119, 255, 0.18);
    --shadow-cyan: 0 0 35px rgba(0, 217, 255, 0.13);

    --radius-small: 8px;
    --radius-medium: 14px;
    --radius-large: 22px;

    --container: 1200px;

    --transition: 250ms ease;
}


/* --------------------------------------------------
   2. GLOBAL RESET
   -------------------------------------------------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    min-height: 100vh;
    overflow-x: hidden;

    background: var(--bg-primary);
    color: var(--text-primary);

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.65;

    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--blue);
    color: white;
}


/* --------------------------------------------------
   3. BACKGROUND ATMOSPHERE
   -------------------------------------------------- */

.ambient-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(15, 52, 100, 0.22),
            transparent 55%
        ),
        var(--bg-primary);
}

.ambient-glow {
    position: absolute;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.13;
    animation: ambient-drift 18s ease-in-out infinite alternate;
}

.ambient-glow-one {
    top: -350px;
    left: -200px;
    background: var(--blue);
}

.ambient-glow-two {
    right: -300px;
    bottom: -350px;
    background: var(--cyan);
    animation-delay: -8s;
}

.ambient-grid {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(70, 130, 200, 0.055) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(70, 130, 200, 0.055) 1px,
            transparent 1px
        );

    background-size: 65px 65px;

    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 85%
    );
}

@keyframes ambient-drift {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(90px, 70px) scale(1.18);
    }
}


/* --------------------------------------------------
   4. SHARED CONTAINERS
   -------------------------------------------------- */

.header-container,
.footer-container,
.footer-bottom {
    width: min(var(--container), calc(100% - 48px));
    margin-inline: auto;
}

#main-content {
    min-height: 65vh;
}


/* --------------------------------------------------
   5. HEADER AND NAVIGATION
   -------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    width: 100%;

    background: rgba(7, 11, 18, 0.82);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.header-container {
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    width: 45px;
    height: 45px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border-bright);
    border-radius: 12px;

    background:
        linear-gradient(
            145deg,
            rgba(22, 119, 255, 0.25),
            rgba(0, 217, 255, 0.08)
        );

    color: var(--cyan);

    font-size: 15px;
    font-weight: 900;
    letter-spacing: -1px;

    box-shadow: var(--shadow-blue);
}

.brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-name strong {
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 850;
}

.brand-name small {
    margin-top: 4px;

    color: var(--cyan);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.1px;
}

.primary-navigation {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: color var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--cyan);
}

.nav-account {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 8px;
}

.nav-login {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.nav-login:hover {
    color: white;
}


/* --------------------------------------------------
   6. BUTTONS
   -------------------------------------------------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 13px 23px;

    border: 1px solid rgba(50, 149, 255, 0.65);
    border-radius: var(--radius-small);

    background:
        linear-gradient(
            110deg,
            #1266e9,
            #078fcb
        );

    color: white;

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;

    box-shadow: 0 8px 30px rgba(22, 119, 255, 0.22);

    cursor: pointer;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        filter var(--transition);
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(22, 119, 255, 0.38);
    filter: brightness(1.13);
}

.button:active {
    transform: translateY(-1px);
}

.button-small {
    padding: 10px 17px;
    font-size: 12px;
}

.button-outline {
    background: rgba(10, 25, 43, 0.55);
    border-color: var(--border-bright);
    box-shadow: none;
}

.button-outline:hover {
    background: rgba(0, 217, 255, 0.1);
}

.button-danger {
    background: linear-gradient(110deg, #a83242, #d14a4a);
    border-color: #e45b69;
}


/* --------------------------------------------------
   7. MOBILE NAVIGATION
   -------------------------------------------------- */

.mobile-menu-toggle {
    display: none;

    width: 43px;
    height: 43px;

    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;

    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);

    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: var(--cyan);
}


/* --------------------------------------------------
   8. TYPOGRAPHY
   -------------------------------------------------- */

h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    line-height: 1.15;
}

h1 {
    font-size: clamp(38px, 6vw, 76px);
    font-weight: 900;
    letter-spacing: -3px;
}

h2 {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 850;
    letter-spacing: -1.5px;
}

h3 {
    font-size: 21px;
    font-weight: 750;
}

p {
    color: var(--text-secondary);
}

.text-gradient {
    background: linear-gradient(
        100deg,
        #ffffff 5%,
        #58c6ff 55%,
        #00e0ff 100%
    );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: var(--cyan);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 45px;
}

.section-heading p {
    max-width: 620px;
    margin-top: 17px;
    font-size: 16px;
}


/* --------------------------------------------------
   9. GLASS PANELS
   -------------------------------------------------- */

.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.glass-panel:hover {
    border-color: rgba(0, 217, 255, 0.32);
}


/* --------------------------------------------------
   10. HERO SECTIONS
   -------------------------------------------------- */

.hero {
    position: relative;
    min-height: 680px;

    display: flex;
    align-items: center;

    padding: 110px 24px;

    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 2;

    width: min(var(--container), 100%);
    margin-inline: auto;
}

.hero-content {
    max-width: 780px;
}

.hero h1 {
    margin-top: 24px;
    max-width: 850px;
}

.hero-description {
    max-width: 610px;
    margin-top: 25px;

    font-size: 18px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 35px;
}

.hero-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-visual img,
.hero-visual video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(8, 12, 19, 0.98) 0%,
            rgba(8, 12, 19, 0.78) 48%,
            rgba(8, 12, 19, 0.25) 100%
        ),
        linear-gradient(
            0deg,
            var(--bg-primary),
            transparent 45%
        );
}


/* --------------------------------------------------
   11. CONTENT SECTIONS
   -------------------------------------------------- */

.section {
    width: min(var(--container), calc(100% - 48px));
    margin-inline: auto;
    padding-block: 100px;
}

.section-dark {
    background: rgba(10, 17, 29, 0.6);
}

.section-divider {
    width: 100%;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 217, 255, 0.3),
        transparent
    );
}


/* --------------------------------------------------
   12. SERVICE CARDS
   -------------------------------------------------- */

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.service-card {
    position: relative;
    min-height: 260px;

    padding: 30px;

    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    overflow: hidden;

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition);
}

.service-card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 2px;

    background: linear-gradient(
        90deg,
        var(--blue),
        var(--cyan),
        transparent
    );

    opacity: 0.7;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-bright);
    background: var(--bg-panel-hover);
}

.service-icon {
    width: 52px;
    height: 52px;

    display: grid;
    place-items: center;

    margin-bottom: 25px;

    color: var(--cyan);
    background: rgba(22, 119, 255, 0.12);
    border: 1px solid var(--border-bright);
    border-radius: 13px;

    font-size: 22px;
}

.service-card h3 {
    margin-bottom: 13px;
}

.service-card p {
    font-size: 14px;
    line-height: 1.8;
}

.service-card a {
    display: inline-block;
    margin-top: 22px;

    color: var(--cyan);
    font-size: 13px;
    font-weight: 750;
}


/* --------------------------------------------------
   13. FORMS AND INPUTS
   -------------------------------------------------- */

.form-container {
    width: min(480px, calc(100% - 40px));
    margin: 80px auto;
    padding: 40px;
}

.form-heading {
    margin-bottom: 30px;
    text-align: center;
}

.form-heading h1 {
    font-size: 34px;
    letter-spacing: -1px;
}

.form-heading p {
    margin-top: 12px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 21px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;

    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 750;
}

.form-control {
    width: 100%;
    min-height: 48px;

    padding: 12px 15px;

    color: white;
    background: rgba(4, 10, 19, 0.8);

    border: 1px solid var(--border);
    border-radius: var(--radius-small);

    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.form-control:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-submit {
    width: 100%;
    margin-top: 8px;
}

.form-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 13px;
}

.form-footer a {
    color: var(--cyan);
    font-weight: 700;
}


/* --------------------------------------------------
   14. ALERT MESSAGES
   -------------------------------------------------- */

.alert {
    padding: 14px 17px;
    margin-bottom: 22px;

    border: 1px solid var(--border);
    border-radius: var(--radius-small);

    font-size: 13px;
}

.alert-error {
    color: #ffb4bc;
    background: rgba(190, 42, 65, 0.12);
    border-color: rgba(255, 95, 115, 0.35);
}

.alert-success {
    color: #8df4c1;
    background: rgba(20, 160, 100, 0.12);
    border-color: rgba(80, 230, 160, 0.3);
}


/* --------------------------------------------------
   15. DASHBOARD COMPONENTS
   -------------------------------------------------- */

.dashboard-layout {
    width: min(var(--container), calc(100% - 48px));
    margin: 55px auto;
}

.dashboard-header {
    margin-bottom: 35px;
}

.dashboard-header p {
    margin-top: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-card {
    padding: 25px;
}

.dashboard-card h3 {
    margin-bottom: 10px;
}

.dashboard-stat {
    color: var(--cyan);
    font-size: 34px;
    font-weight: 850;
}


/* --------------------------------------------------
   16. FOOTER
   -------------------------------------------------- */

.site-footer {
    margin-top: 70px;
    padding-top: 75px;

    background: rgba(5, 9, 15, 0.85);
    border-top: 1px solid var(--border);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.4fr 1fr;
    gap: 45px;
    padding-bottom: 65px;
}

.footer-brand p {
    max-width: 300px;
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.9;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.footer-column h3 {
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 1px;
}

.footer-column a {
    color: var(--text-muted);
    font-size: 12px;
    transition: color var(--transition);
}

.footer-column a:hover {
    color: var(--cyan);
}

.footer-bottom {
    min-height: 75px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border-top: 1px solid var(--border);
}

.footer-bottom p {
    font-size: 11px;
}

.footer-tagline {
    color: var(--cyan);
    font-size: 10px !important;
    font-weight: 800;
    letter-spacing: 1.5px;
}


/* --------------------------------------------------
   17. ANIMATION UTILITIES
   -------------------------------------------------- */

.fade-in {
    animation: fade-in 900ms ease both;
}

.slide-up {
    animation: slide-up 800ms ease both;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --------------------------------------------------
   18. ACCESSIBILITY
   -------------------------------------------------- */

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 15px;
    z-index: 200;

    padding: 12px 18px;

    background: var(--blue);
    color: white;
}

.skip-link:focus {
    top: 15px;
}

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


/* --------------------------------------------------
   19. TABLETS
   -------------------------------------------------- */

@media (max-width: 950px) {

    .primary-navigation {
        gap: 16px;
    }

    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* --------------------------------------------------
   20. MOBILE
   -------------------------------------------------- */

@media (max-width: 720px) {

    .header-container,
    .footer-container,
    .footer-bottom {
        width: calc(100% - 36px);
    }

    .header-container {
        min-height: 72px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .primary-navigation {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;

        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;

        padding: 15px 20px 25px;

        background: rgba(7, 11, 18, 0.98);
        border-bottom: 1px solid var(--border);
    }

    .primary-navigation.is-open {
        display: flex;
    }

    .nav-link {
        padding: 13px 5px;
        border-bottom: 1px solid var(--border);
    }

    .nav-account {
        flex-direction: column;
        align-items: stretch;
        margin: 15px 0 0;
        gap: 15px;
    }

    .nav-login {
        padding: 8px 0;
    }

    .nav-account .button {
        width: 100%;
    }

    .hero {
        min-height: 590px;
        padding: 90px 20px;
    }

    .hero-description {
        font-size: 15px;
    }

    .section {
        width: calc(100% - 36px);
        padding-block: 70px;
    }

    .service-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        margin: 50px auto;
        padding: 27px 22px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 35px 20px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding-block: 20px;
    }
}


/* --------------------------------------------------
   21. SMALL PHONES
   -------------------------------------------------- */

@media (max-width: 420px) {

    .brand-name strong {
        font-size: 12px;
    }

    .brand-name small {
        font-size: 8px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: auto;
    }
}
