:root {
  --background: #edf7ff;
  --surface: #ffffff;
  --text: #202a35;
  --muted: #68737f;
  --line: #d8dee5;
  --accent: #376b9d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; display: grid; place-items: center; background-color: var(--background); background-image: linear-gradient(rgba(248,251,255,.16), rgba(248,251,255,.16)), url("../images/it-waves-background.png"); background-size: cover; background-position: center; background-attachment: fixed; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.shell { width: min(980px, calc(100% - 36px)); padding: 48px 0; }
.brand { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.brand h1 {
  font-family: "Segoe UI", sans-serif;
  font-weight: bold;
  background: linear-gradient(
    100deg,
    #173f68 20%,
    #2c78b8 45%,
    #72bce8 50%,
    #2c78b8 55%,
    #173f68 80%
  );
  background-size: 220% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  animation: logo-shimmer 5s linear infinite;
}
@keyframes logo-shimmer {
  to {
    background-position: -220% center;
  }
}

.logo { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 18px; color: #7b8793; font-size: .72rem; font-weight: 800; }
.languages { display: flex; gap: 4px; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.languages button { border: 0; padding: 7px 9px; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: .78rem; font-weight: 750; }
.languages button.active { background: var(--accent); color: white; }
.menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.menu-button { min-height: 174px; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; cursor: pointer; box-shadow: 0 4px 14px rgba(32,42,53,.045); transition: transform .18s, border-color .18s, box-shadow .18s; }
.menu-button:hover, .menu-button:focus-visible { transform: translateY(-3px); border-color: #9eb5ca; box-shadow: 0 10px 24px rgba(32,42,53,.09); outline: none; }
.menu-button:active { transform: translateY(-1px) scale(.985); }
.menu-entrance-enabled .menu-button { animation: menu-button-enter .58s cubic-bezier(.22, 1, .36, 1) backwards; }
.menu-entrance-enabled .menu-button:nth-child(1) { animation-delay: .08s; }
.menu-entrance-enabled .menu-button:nth-child(2) { animation-delay: .13s; }
.menu-entrance-enabled .menu-button:nth-child(3) { animation-delay: .18s; }
.menu-entrance-enabled .menu-button:nth-child(4) { animation-delay: .23s; }
.menu-entrance-enabled .menu-button:nth-child(5) { animation-delay: .28s; }
.menu-entrance-enabled .menu-button:nth-child(6) { animation-delay: .33s; }
.menu-entrance-enabled .menu-button:nth-child(7) { animation-delay: .38s; }
.menu-entrance-enabled .menu-button:nth-child(8) { animation-delay: .43s; }

@keyframes menu-button-enter {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: var(--accent); background: #e9eff5; }
.menu-button:nth-child(1) .icon { color: #7357b8; background: #eee9fa; }
.menu-button:nth-child(2) .icon { color: #268357; background: #e5f4eb; }
.menu-button:nth-child(3) .icon { color: #c46a22; background: #fff0e2; }
.menu-button:nth-child(4) .icon { color: #3f4852; background: #e7eaed; }
.menu-button:nth-child(5) .icon { color: #2688bd; background: #e3f4fc; }
.menu-button:nth-child(6) .icon { color: #c93636; background: #fbe7e7; }
.menu-button:nth-child(7) .icon { color: #326fbd; background: #e6effa; }
.menu-button:nth-child(8) .icon { color: #9a7300; background: #fff5c9; }
.menu-copy { display: grid; gap: 6px; margin-top: 20px; }
.menu-copy strong { font-size: 1rem; line-height: 1.2; }
.menu-copy small { color: var(--muted); font-size: .79rem; font-weight: 500; line-height: 1.45; }
svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 28px 80px rgba(20,32,45,.25); }
dialog::backdrop { background: rgba(24,32,41,.46); backdrop-filter: blur(3px); }
dialog[open]:not(.is-closing) { animation: dialog-enter .36s cubic-bezier(.22, 1, .36, 1) both; }
dialog[open]:not(.is-closing)::backdrop { animation: backdrop-enter .28s ease-out both; }
dialog.is-closing { animation: dialog-exit .2s cubic-bezier(.4, 0, 1, 1) both; }
dialog.is-closing::backdrop { animation: backdrop-exit .2s ease-in both; }

@keyframes dialog-enter {
  from { opacity: 0; transform: translateY(22px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dialog-exit {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(12px) scale(.975); }
}

@keyframes backdrop-enter {
  from { background: rgba(24,32,41,0); backdrop-filter: blur(0); }
  to { background: rgba(24,32,41,.46); backdrop-filter: blur(3px); }
}

@keyframes backdrop-exit {
  from { background: rgba(24,32,41,.46); backdrop-filter: blur(3px); }
  to { background: rgba(24,32,41,0); backdrop-filter: blur(0); }
}
.close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; color: var(--muted); font-size: 1.8rem; cursor: pointer; }
.dialog-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 12px; color: var(--accent); background: #e9eff5; }
dialog h2 { margin: 0 0 10px; font-size: 1.55rem; }
dialog p { margin: 0; color: var(--muted); line-height: 1.65; }
#contact-area { margin-top: 24px; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: .82rem; font-weight: 700; }
input, textarea { width: 100%; padding: 11px 12px; border: 1px solid #cbd4dd; border-radius: 9px; background: #fafbfc; color: var(--text); outline: none; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(55,107,157,.12); }
textarea { min-height: 115px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; }
.captcha-field { display: grid; gap: 7px; }
.captcha-field > label { font-size: .82rem; font-weight: 700; }
.captcha-question-row { display: flex; align-items: center; gap: 9px; }
#captcha-question { flex: 1; min-height: 42px; display: flex; align-items: center; padding: 9px 12px; border: 1px solid #cbd4dd; border-radius: 9px; background: #eef5fb; font-weight: 750; }
#captcha-refresh { width: 42px; height: 42px; border: 1px solid #cbd4dd; border-radius: 9px; background: white; color: var(--accent); cursor: pointer; font-size: 1.2rem; }
.send { min-height: 44px; border: 0; border-radius: 9px; background: var(--accent); color: white; font-weight: 750; cursor: pointer; }
@media (max-width: 760px) { .menu { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .shell { width: min(100% - 24px, 980px); padding: 28px 0; } .brand { gap: 12px; } .logo { width: 58px; height: 58px; border-radius: 14px; } .menu { grid-template-columns: 1fr; } .menu-button { min-height: 145px; } }
@media (max-width: 760px) { body { background-attachment: scroll; } }
@media (prefers-reduced-motion: reduce) {
  .menu-button { transition: none; }
  .menu-entrance-enabled .menu-button { animation: none; }
  dialog[open], dialog[open]::backdrop { animation-duration: .01ms !important; }
}
#dialog-body {
  white-space: pre-wrap;
}
#message-dialog {
  text-align: center;
  max-width: 380px;
}

#message-dialog-ok {
  width: 100%;
  margin-top: 20px;
}
