/* CSS Reset by Josh Comeau https://www.joshwcomeau.com/css/custom-css-reset/ */

/*
    1. Use a more-intuitive box-sizing model.
*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

/*
  2. Remove default margin
*/
* {
    margin: 0;
}

/*
  3. Allow percentage-based heights in the application
*/
html,
body {
    height: 100%;
}

/*
  Typographic tweaks!
  4. Add accessible line-height
  5. Improve text rendering
*/
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/*
  6. Improve media defaults
*/
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/*
  7. Remove built-in form typography styles
*/
input,
button,
textarea,
select {
    font: inherit;
}

/*
  8. Avoid text overflows
*/
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* Base */

:root {
    --color-white: #ffffff;
    --color-black: #000000;

    --color-gray-50: #f7f7f7;
    --color-gray-100: #e8e8e8;
    --color-gray-200: #d1d1d1;
    --color-gray-300: #bcbcbc;
    --color-gray-400: #a3a3a3;
    --color-gray-500: #8f8f8f;
    --color-gray-600: #737373;
    --color-gray-700: #595959;
    --color-gray-800: #424242;
    --color-gray-900: #292929;
    --color-gray-950: #1c1c1c;

    --color-blue: #0071BC;
    --color-blue-hover: #003366;

    --color-success-bg: #e7f9ed;
    --color-success-text: #166534;
    --color-success-link: #15803d;

    --color-error-bg: #f2dede;
    --color-error-text: #bb2d3b;

    --border-radius-base: 1.875rem;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-gray-700);
}

a {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.1s ease;
}

a:hover {
    color: var(--color-blue-hover);
    text-decoration: underline;
}

:focus-visible {
    outline: none;
    border-color: transparent !important;
    box-shadow: 0 0 0 4px hsl(201deg 100% 36% / 40%);
}

/* Structure */

.grid {
    height: 100%;
    overflow: auto;
}

@media (min-width: 768px) {
    .grid {
        display: grid;
        grid-template-columns: 5fr 7fr;
        grid-template-rows: unset;
    }
}

.grid-col {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px;
}

@media (min-width: 768px) {
    .grid-col {
        padding: 48px 4vw;
    }
}

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    margin-top: 48px;
    width: 100%;
    text-align: center;
}

.page-content {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

footer {
    width: 100%;
    margin-top: 48px;
    font-size: 12px;
    letter-spacing: 0.025em;
    text-align: center;
}

/* Banner */

.banner {
    display: none;
}

@media (min-width: 768px) {
    .banner {
        display: initial;
    }
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomIn 1.5s ease forwards;
}

.banner-content {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: white;
}

.banner-title {
    margin-top: 48px;
    font-weight: 700;
    font-size: max(3.2vw, 32px);
    line-height: 1.35;
    animation: fadeIn 1.5s ease;
}

@media (min-width: 768px) {
    .banner-title {
        margin-top: 96px;
        line-height: 1.2;
    }
}

.banner-text {
    max-width: 480px;
    margin-top: 24px;
    font-size: 16px;
    letter-spacing: 0.025em;
    animation: fadeIn 1.5s ease;
}

@media (min-width: 768px) {
    .banner-text {
        margin-top: 32px;
        font-size: 20px;
    }
}

.banner-footer {
    margin-top: auto;
}

.banner-footer-text {
    margin-top: 96px;
    font-size: 14px;
    letter-spacing: 0.025em;
}

.banner-footer-link,
.banner-footer-link:hover {
    color: white;
}

@keyframes zoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.025);
    }
}

@keyframes fadeIn {
    0% {
        transform: translateY(-32px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Logo */

.logo {
    max-width: 160px;
}

.logo-mobile {
    margin: 0 auto;
}

@media (min-width: 768px) {
    .logo-mobile {
        display: none;
    }
}

/* Page */

.page {
    overflow-y: auto;
}

.page-title {
    font-size: 24px;
    line-height: 1.2;
    color: var(--color-gray-800);
}

@media (min-width: 768px) {
    .page-title {
        font-size: 32px;
    }
}

.page-text {
    margin-top: 16px;
    font-size: 16px;
}

/* Search */

.search-form {
    margin-top: 48px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
}

.search-input,
.search-submit {
    display: block;
    width: 100%;
}

.search-input {
    padding: 13.5px 15px;
    padding-left: 48px;
    border: 1px solid var(--color-gray-300);
    border-radius: 5px;
    font-size: 16px;
}

@media (min-width: 768px) {
    .search-input {
        font-size: 18px;
    }
}

.search-input::placeholder {
    color: var(--color-gray-700);
}

.icon-search {
    position: absolute;
    width: 24px;
    height: 24px;
    margin: 12px;
}

.search-submit,
.client-btn {
    margin-top: 16px;
    padding: .75rem 1.5rem;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: white;
    background: var(--color-gray-800);
    cursor: pointer;
    transition: all 0.1s ease;
    border-radius: var(--border-radius-base);
}

@media (min-width: 768px) {
    .search-submit {
        font-size: 16px;
    }
}

.search-submit:hover,
.client-btn:hover {
    border-color: var(--color-gray-800);
    background: var(--color-gray-100);
    color: var(--color-gray-800);
    text-decoration: none;
}

.search-help {
    max-width: 320px;
    margin: 32px auto 0;
    font-size: 14px;
}

/* Search results */

.search-results {
    margin-top: 32px;
    font-size: 13px;
    text-align: left;
}

.search-results.error {
    padding: 20px;
    color: var(--color-error-text);
    background: var(--color-error-bg);
}

.search-results-header .icon {
    position: relative;
    top: 0.25em;
    display: inline-block;
    margin-right: 2px;
}

.search-results-title {
    display: inline;
    font-weight: 600;
    font-size: 14px;
    color: inherit;
}

@media (min-width: 768px) {
    .search-results-title {
        font-size: 16px;
    }
}

.search-results-body {
    margin-top: 4px;
}

.search-results-body ul {
    padding: 0;
    list-style: none;
}

.search-results-body a {
    font-size: 14px;
}

@media (min-width: 768px) {
    .search-results-body a {
        font-size: 16px;
    }
}

/* External link icon */

.icon-external-link {
    width: 12px;
    height: 12px;
    position: relative;
    top: 0.1em;
    display: inline;
}

/* Visually hidden */

.visually-hidden {
    position: absolute;
    display: inline-block;
    overflow: hidden;
    clip: rect(0 0 0 0);
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
}

/* Client not found */

.client-btn {
    margin-top: 0;
    display: inline-block;
}

@media (min-width: 768px) {
    .font-size-title {
        font-size: 24px;
    }
}

.font-size-text {
    font-size: 14px;
}

.align-text {
    text-align: left;
}
