/* vars */
:root {
    color-scheme: light dark;

    /* common */
    --link-primary-color: #129bd8;

    /* dark theme */
    --bg-primary-color: #030305;
    --bg-secondary-color: #000080;

    --text-primary-color: #f8fbff;
    --text-secondary-color: #e2eefd;

    --button-primary-color: black;

    --error-primary-color: #ea4f15;

    --border-primary-color: #6f6f6f;
}

:root.light {
    /* light theme */
    --bg-primary-color: #f8fbff;
    --bg-secondary-color: #e2eefd;

    --text-primary-color: #000080;
    --text-secondary-color: #030305;

    --button-primary-color: white;

    --error-primary-color: #991b1b;

    --border-primary-color: #375271c2;
}

/* General */

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

html {
    font-size: 16px;
    font-family: Helvetica, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
}

@media(max-width: 1024px) {
    html {
        background-image: linear-gradient(to right, var(--bg-secondary-color), var(--bg-primary-color));
    }
}

body {
    min-height: 100vh;
    color: var(--text-secondary-color);
    background: radial-gradient(circle at 30% 30%,
            var(--bg-primary-color),
            var(--bg-secondary-color));
}



/* header section footer */

header,
section,
footer {
    margin: auto;
    padding: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    padding-bottom: 1rem;
    padding-top: 1rem;
    overflow: auto;
}

@media (max-width: 1024px) {

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        text-align: center;
    }
}

h1 {
    margin: 0 1rem;
    text-align: center;
    text-transform: uppercase;
    color: var(--bg-primary-color);
    background-color: var(--text-secondary-color);
}

h2 {
    font-size: 1.6rem;
    color: var(--text-secondary-color);
}

h3 {
    font-size: 1.5rem;
    color: var(--text-primary-color);
}

h4 {
    font-size: 1.4rem;
    color: var(--text-secondary-color);
}

h5 {
    font-size: 1.3rem;
    color: var(--text-primary-color);
}

h5 {
    font-size: 1.2rem;
    color: var(--text-primary-color);
}

p {
    font-size: 1rem;
    line-height: 1.5em;
    margin: 1rem 0rem;
}

@media (max-width: 1024px) {
    h1 {
        margin: 0;
    }
}

a {
    cursor: pointer;
    display: inline-block;
    padding: 0.5rem 0rem;
    color: var(--link-primary-color);
}

svg {
    display: block;
    margin: auto;
    transition: fill 0.3s ease;
    max-width: 100%;
}

.container {
    width: 100%;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* Form */

.login-form-container {
    max-width: 25rem;
    margin: 4rem auto;
    padding: 2rem;
    background-color: var(--bg-primary-color);
    border-radius: 0.5rem;
    border: 1px solid var(--border-primary-color);
}

@media (max-width: 1024px) {
    .login-form-container {
        margin: 1rem auto;
        padding: 1rem;
    }
}

.login-title {
    margin: 1rem;
    text-align: center;
    color: var(--text-primary-color);
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-secondary-color);
}

.input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    background-color: #fff;
    color: #111;
}

.input:focus {
    outline: none;
    border-color: #888;
}

.submit-btn {
    width: 100%;
    padding: 0.65rem;
    font-size: 1rem;
    font-weight: 500;
    background-color: #222;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}

.submit-btn:hover:not(:disabled) {
    background-color: #000;
}

.submit-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.login-error {
    margin-bottom: 1rem;
    color: red;
    font-size: 0.85rem;
    text-align: center;
}


/* SVG */

svg {
    fill: var(--text-primary-color);
}

svg:hover {
    fill: var(--text-secondary-color);
}

div.big-logo {
    margin: auto;
    padding: 10rem;
}

.big-logo svg {
    width: 60rem;
}

@media (max-width: 1024px) {
    div.big-logo {
        margin: auto;
        padding: 1rem;
    }

    .big-logo svg {
        width: 15rem;
    }
}

.logo svg {
    width: 15rem;
    margin: auto;
    cursor: pointer;
}

.theme svg {
    width: 2rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .logo svg {
        width: 10rem;
        margin: auto;
        cursor: pointer;
    }

    .theme svg {
        width: 2rem;
        cursor: pointer;
    }
}


.wave svg {
    position: absolute;
    top: 0;
    /* or bottom: 0 for footer waves */
    left: 0;
    width: 100%;
    height: auto;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.2;
}

@media (max-width: 1024px) {
    .wave svg {
        z-index: 0;
    }
}

path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: draw-wave 4s ease-out forwards;
}

@keyframes draw-wave {
    to {
        stroke-dashoffset: 0;
    }
}


/* Lang/Theme */

.settings {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    text-align: center;
}

.home .settings {
    justify-content: space-between;
}

.settings div {
    padding: 0.5rem;
}

.lang {
    cursor: pointer;
}

/* Header */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    border-bottom: groove;
    border-bottom-width: thin;
    border-color: var(--border-primary-color);
}

header.home {
    display: block;
}

/* Footer */

footer {
    text-align: center;
    border-top: groove;
    border-top-width: thin;
    border-color: var(--border-primary-color);
}

section {
    text-align: center;
}


/* home page */

section.home .one {
    padding: 1rem;
}

section.home h2 {
    font-size: 2rem;
}

section.home nav {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    text-align: center;
}

section.home nav .app {
    margin: 1rem;
    flex: 1 1 0;
    align-self: stretch;
    background-color: var(--bg-secondary-color);
    border: thin solid var(--border-primary-color);
    border-color: var(--text-primary-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

section.home nav .app.one-market a {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--text-secondary-color);
}

section.home nav .app a {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
}

section.home nav .app.one-insight:hover,
section.home nav .app.one-audience:hover {
    background-color: var(--bg-primary-color);
    border-color: var(--border-primary-color);
    box-shadow: 0 0 1rem rgba(0, 200, 255, 0.1);
}

@media (max-width: 1024px) {
    section.home nav {
        display: block;
    }
}


section.home .one h3 {
    padding-bottom: 0;
}

/* ONE app page */

section.one-app h2 {
    text-align: center;
    font-size: 2.5em;
    font-weight: bold;
    opacity: 0;
    transform: translateX(-30px);
    animation: fade-in-left 1.2s ease-out forwards;
    animation-delay: 0.4s;
}

@keyframes fade-in-left {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 1024px) {
    section.one-app h2 {
        font-size: 1.6em;
    }
}
