@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:wght@400;500&display=swap');

:root {
    --bg: #F3F4F6;
    --border: #D1D5DB;
    --card: #F8FAFC;
    --text: #0a0a0a;
    --main-1: #C02222;
    --main-2: #EF7F1A;
    --main-3: #FFD500;
}

/*
Breakpoints:
- sm: 40rem
- md: 48rem
- lg: 64rem
- xl: 80rem
*/

html {
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: "IBM Plex Serif", serif;
    font-weight: 400;
    font-style: normal;
}

.container {
    box-sizing: border-box;
    padding-inline: 1rem;
    width: 100%;
    max-width: 40rem;
    margin-inline: auto;
}

@media (min-width: 64rem) {
    .container {
        max-width: 64rem;
    }
}

a.button {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 3rem;
    width: max-content;
    background-color: var(--card);
    color: var(--text);
    text-decoration: none;
    padding-inline: 1rem;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

a.button:hover {
    background-color: color-mix(in srgb, var(--bg) 50%, var(--card) 50%);
}

a.button svg {
    position: relative;
    top: 1px;
}

.guidelines {
    position: relative;
}

.guidelines::before {
    content: '';
    position: absolute;
    inset: -0.5rem 0;
    pointer-events: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.guidelines::after {
    content: '';
    position: absolute;
    inset: 0 -0.5rem;
    pointer-events: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

body > header {
    box-sizing: border-box;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    height: 6rem;
    padding-block: 1rem;
}

body > header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
}

body > header .logo {
    height: 4rem;
}

body > header nav ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

body > header nav a {
    padding: 0.5rem;
    color: var(--text);
    text-decoration: none;
}

body > header nav a:hover {
    text-decoration: underline;
}

body > header > .container > nav {
    display: none;
}

@media (min-width: 64rem) {
    body > header > .container > nav {
        display: flex;
    }
}

body > header .actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body > header a#lang {
    color: var(--text);
    text-decoration: none;
}

body > header a#lang,
button[commandfor='mobile-menu'] {
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--border);
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "IBM Plex Serif", serif;
    font-weight: 500;
    font-style: normal;
    background-color: var(--card);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

body > header a#lang:hover,
button[commandfor='mobile-menu']:hover {
    background-color: color-mix(in srgb, var(--bg) 50%, var(--card) 50%);
}

#mobile-menu {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: 60vw;
  height: 100vh;
  max-height: none;
  border: none;
  padding: 2rem;
  transform: translateX(100%);
  transition:
    transform 250ms ease,
    display 250ms allow-discrete,
    overlay 250ms allow-discrete;
}

@media (min-width: 64rem) {
    #mobile-menu,
    button[commandfor='mobile-menu'] {
        display: none;
    }
}

#mobile-menu:open {
  transform: translateX(0);
}

@starting-style {
  #mobile-menu:open {
    transform: translateX(100%);
  }
}

#mobile-menu::backdrop {
  background: rgb(0 0 0 / 0);
  transition:
    background 250ms ease,
    display 250ms allow-discrete,
    overlay 250ms allow-discrete;
}

#mobile-menu:open::backdrop {
  background: rgb(0 0 0 / 0.5);
  backdrop-filter: blur(0.25rem);
}

@starting-style {
  #mobile-menu:open::backdrop {
    background: rgb(0 0 0 / 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #mobile-menu,
  #mobile-menu::backdrop {
    transition: none;
  }
}

#mobile-menu nav ul {
    margin-top: 2rem;
    font-size: 1.25rem;
    flex-direction: column;
    align-items: start;
}

.cover {
    padding-block: 4rem;
    background-image:
        linear-gradient(to bottom, transparent 0%, var(--bg) 100%),
        radial-gradient(color-mix(in srgb, var(--border) 50%, transparent 50%) 2px, transparent 2px);
    background-size: 
        100% 100%,
        1.25rem 1.25rem;
}

.cover .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cover .container h1, 
.cover .container p {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1rem;
}

.cover h1 {
    font-size: 2.25rem;
    font-weight: 500;
}

.cover p {
    text-wrap: balance;
    font-size: 1.125rem;
}

.cover a.button {
    margin-top: 1rem;
    margin-inline: auto;
}

@media (min-width: 48rem) {
  .cover h1 {
    font-size: 4rem;
    }

    .cover p {
        font-size: 1.5rem;
    }
}

main {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-block: 2rem;
}

section.service {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 2rem;
    grid-template-areas:
        "header"
        "img"
        "text";
}

@media (min-width: 64rem) {
    section.service {
        grid-template-columns: repeat(2, calc(50% - 1rem));
        grid-template-areas:
            "header img"
            "text img";
    }

    section.service:nth-child(even) {
        grid-template-areas:
            "img header"
            "img text";
    }
}

section.service header {
    grid-area: header;
    margin-bottom: 1rem;
}

section.service header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 500;
}

@media (min-width: 48rem) {
    section.service header h2 {
        font-size: 2.5rem;
    }
}

section.service header .divider {
    margin-top: 0.25rem;
    display: flex;
    gap: 0.25rem;
}

section.service header .divider > div {
    height: 0.25rem;
    border-radius: 0.125rem;
}


section.service header .divider .red {
    width: 4rem;
    background-color: var(--main-1);
}

section.service header .divider .orange {
    width: 3rem;
    background-color: var(--main-2);
}

section.service header .divider .yellow {
    width: 2rem;
    background-color: var(--main-3);
}

section.service img {
    width: 100%;
    grid-area: img;
}

section.service .text {
    grid-area: text;
}

section.service .text p {
    margin-top: 0;
    margin-bottom: 2rem;
}

section#contact {
    display: flex;
    flex-direction: column;
    align-items: center;
}

section#contact h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 500;
}

@media (min-width: 48rem) {
    section#contact h2 {
        font-size: 2.5rem;
    }
}
section#contact h2,
section#contact p {
    text-align: center;
}

section#contact .contact-info {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 48rem) {
    section#contact .contact-info {
        flex-direction: row;
    }
}

section#contact .contact-info a.info {
    box-sizing: border-box;
    height: 3rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding-inline: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
}

section#contact .contact-info a.info:hover {
    background-color: color-mix(in srgb, var(--bg) 50%, var(--card) 50%);
}

section#contact .map {
    margin-block: 2rem;
    aspect-ratio: 16/9;
    width: 100%;
}

section#contact .map iframe {
    border: none;
    aspect-ratio: 16/9;
    width: 100%;
}
