/* ----- Google Font ----- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* ----- Bootstrap Icon ----- */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css");

/* ----- Font Setting ----- */
body {
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
}

input, select, option, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* ----- Global Reset ----- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

/* ----- Color Palette ----- */
:root {
    --main: #F1F0EC; /* Cloud Dancer TPG */
    --accent: #547DB9; /* Regatta TPG */
    --dark: rgb(40 40 40);
    --light: rgb(250 250 250);
}

body {
    background-color: var(--main);
    color: var(--dark);
}

/* ----- Body ----- */
body {
    margin: 0;
    padding: 0 32px;
}

body.hidden {
    overflow: hidden;
}

/* ----- Heading & Paragraph ----- */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 8px;
}

p {
    margin: 0 0 16px;

    text-align: justify;
    line-height: 1.5;
}

/* ----- List ----- */
ul, ol {
    margin: 0;
    padding-left: 0;
    list-style-position: inside;
}

li {
    line-height: 2;
}

/* ---- Link ----- */
a {
    text-decoration: none;
}

/* ----- Navigation ----- */
nav {
    margin: 16px 0;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-branding {
    padding: 16px 0;

    display: inline-flex;
    align-items: center;
}

.logo {
    display: inline-block;
    width: 24px;
    margin-right: 4px;
}

.branding {
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--accent);
}

@media (width < 1200px) {
    .link { display: none; }
}

.link {
    padding: 16px 0;

    font-weight: 500;
    color: var(--accent);
}

.link span {
    position: relative;
}

.link span::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;

    position: absolute;
    bottom: -4px; left: 0;
}

.link:hover span::before {
    width: 100%;
}

/* ----- Navigation Mobile ----- */
@media (width >= 1200px) {
    .navigation-mobile-open { display: none; }
}

.navigation-mobile-open {
    font-size: 1.75rem;
    color: var(--accent);
}

@media (width < 576px) {
    .navigation-mobile { width: 85vw; }
}

@media (width >= 576px) {
    .navigation-mobile { width: 60vw;}
}

@media (width >= 768px) {
    .navigation-mobile { width: 50vw; }
}

@media (width >= 992px) {
    .navigation-mobile { width: 33vw; }
}

.navigation-mobile {
    height: 100vh;
    padding: 96px 32px;
    background-color: var(--main);
    transition: right 0.3s ease-in-out;

    position: fixed; z-index: 20;
    top: 0; right: -85vw;
}

.navigation-mobile.active {
    right: 0;
}

.navigation-mobile-close {
    font-size: 1.75rem;
    color: var(--accent);

    position: absolute;
    top: 32px; right: 32px;
}

.logo-branding-mobile {
    margin-bottom: 16px;

    text-align: center;
}

.logo-mobile {
    display: inline-block;
    width: 40px;
    margin-bottom: 4px;
}

.branding-mobile {
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--accent);
}

hr {
    margin-bottom: 32px;
    border: none;
    border-top: 2px solid var(--accent);
}

.navigation-mobile > a {
    display: block;
    margin-bottom: 32px;

    font-weight: 500;
    color: var(--accent);
}

.navigation-mobile-overlay {
    width: 100vw;
    height: 100vh;
    background-color: rgb(0 0 0 / 33%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;

    position: fixed; z-index: 10;
    top: 0; left: -100vw;
}

.navigation-mobile-overlay.active {
    opacity: 1;
    left: 0;
}

/* ----- Main ----- */
main {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: flex-start;
}

/* ----- Title ----- */
.title {
    margin-bottom: 16px;

    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
}

/* ----- Form & Result ----- */
@media (width < 768px) {
    form, .result { width: 100%; }
}

@media (width >= 768px) {
    form { width: calc(60% - 32px); }

    .result { width: 40%; }
}

form, .result {
    margin-bottom: 32px;
    border-radius: 32px;
    padding: 16px;
    background-color: var(--light);
}

/* ----- Label ----- */
label {
    display: block;
    margin-bottom: 8px;

    font-weight: 500;
}

/* ----- Input, Select ----- */
input[type=number], select {
    display: block;
    width: 100%;
    margin-bottom: 16px;
    outline: none;
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 8px;
    background-color: white;
    transition: box-shadow 0.3s ease;
}

select {
    cursor: pointer;
}

input[type=number]:focus, select:focus {
    box-shadow: 0 0 6px var(--accent);
}

/* ----- Button ----- */
button[type="submit"] {
    outline: none;
    border: none;
    border-radius: 32px;
    padding: 16px;
    background-color: var(--accent);
    transition: box-shadow 0.3s ease;
    cursor: pointer;

    font-weight: 500;
    color: var(--light);
}

button[type="submit"]:focus,
button[type="submit"]:hover {
    box-shadow: 0 0 6px var(--accent);
}

/* ----- Footer ----- */
footer {
    margin: 0 -32px;
    padding: 32px;
    background-color: var(--dark);

    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
}

@media (width < 576px) {
    footer > * {
        width: 100%;
        margin-bottom: 16px;
    }

    footer > *:last-child {
        margin-bottom: 0;
    }
}

footer > * {
    color: var(--light);
}