:root {
  --bg: #050505;
  --surface: #111111;
  --line: #242424;
  --line-strong: #3d3d3d;
  --text: #ffffff;
  --muted: #8c8c8c;
  --gap: 14px;
  --radius: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-display: "Cal Sans", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}


body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 24px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 65%);
  pointer-events: none;
}

body::before {
  top: -25vmax;
  left: -15vmax;
  animation: drift-a 26s ease-in-out infinite alternate;
}

body::after {
  right: -20vmax;
  bottom: -30vmax;
  animation: drift-b 32s ease-in-out infinite alternate;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.header__logo {
  animation: fade-in 0.9s var(--ease) both;
}

.header__logo img {
  display: block;
  height: 70px;
  width: auto;
}

.nav {
  display: flex;
  gap: 6px;
}

.nav__item {
  position: relative;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
  animation: drop-in 0.7s var(--ease) backwards;
}

.nav__item:nth-child(1) { animation-delay: 0.3s; }
.nav__item:nth-child(2) { animation-delay: 0.38s; }
.nav__item:nth-child(3) { animation-delay: 0.46s; }
.nav__item:nth-child(4) { animation-delay: 0.54s; }
.nav__item:nth-child(5) { animation-delay: 0.62s; }

.nav__item:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.nav__item:active {
  transform: scale(0.96);
}

.board {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  grid-template-rows: repeat(8, minmax(52px, 1fr));
  gap: var(--gap);
  min-height: 520px;
  perspective: 1200px;
}

.tile {
  --x: 50%;
  --y: 50%;
  --rx: 0deg;
  --ry: 0deg;
  --scale: 1;
  --delay: 0s;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(360px circle at var(--x) var(--y), rgba(255, 255, 255, 0.08), transparent 65%),
    var(--surface);
  text-align: left;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--scale));
  transition: transform 0.35s var(--ease), border-color 0.3s;
  animation:
    settle 0.9s var(--ease) var(--delay) backwards,
    float 9s ease-in-out calc(var(--delay) + 0.9s) infinite;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.09) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}

.tile:hover,
.tile.is-linked {
  --scale: 1.012;
  border-color: var(--line-strong);
}

.tile:hover::after,
.tile.is-linked::after {
  transform: translateX(120%);
  transition: transform 0.9s var(--ease);
}

.tile:active {
  --scale: 0.985;
}

.tile__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  transition: transform 0.45s var(--ease);
}

.tile__text {
  max-width: 26ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  transition: transform 0.45s var(--ease), color 0.3s;
}

.tile:hover .tile__title,
.tile.is-linked .tile__title {
  transform: translateY(-4px);
}

.tile:hover .tile__text,
.tile.is-linked .tile__text {
  transform: translateY(-2px);
  color: #b5b5b5;
}

.tile__shape {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  transition: transform 0.5s var(--ease), border-color 0.3s;
}

.tile__shape--circle {
  border-radius: 50%;
  animation: bob 7s ease-in-out infinite alternate;
}

.tile__shape--square {
  animation: turn 24s linear infinite;
}

.tile:hover .tile__shape,
.tile.is-linked .tile__shape {
  border-color: var(--text);
  transform: translate(-8px, 8px) scale(1.15);
}

.tile--reviews { grid-column: 1; grid-row: 1 / 4; --delay: 0.1s; }
.tile--work    { grid-column: 1; grid-row: 4 / 9; --delay: 0.4s; }
.tile--order   { grid-column: 2; grid-row: 1 / 9; --delay: 0.25s; }
.tile--about   { grid-column: 3; grid-row: 1 / 4; --delay: 0.35s; }
.tile--pricing { grid-column: 3; grid-row: 4 / 9; --delay: 0.5s; }

.tile--order {
  padding: 40px;
}

.tile--order .tile__title {
  font-size: clamp(38px, 4.6vw, 72px);
}

.tile--order .tile__text {
  max-width: 30ch;
  font-size: 16px;
}

.tile--order .tile__shape {
  top: 36px;
  right: 36px;
  width: 72px;
  height: 72px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  animation: fade-in 1s var(--ease) 0.9s backwards;
}

.footer__mail {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
}

.footer__mail:hover {
  color: var(--text);
}

.footer__logo {
  display: block;
  height: 30px;
  width: auto;
  transition: transform 0.6s var(--ease);
}

.footer__logo:hover {
  transform: rotate(-8deg) scale(1.08);
}

@keyframes settle {
  from {
    opacity: 0;
    translate: 0 32px;
    filter: blur(6px);
  }
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

@keyframes bob {
  from { translate: 0 0; }
  to { translate: -4px 8px; }
}

@keyframes turn {
  to { rotate: 90deg; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes drop-in {
  from {
    opacity: 0;
    translate: 0 -12px;
  }
}

@keyframes drift-a {
  to { translate: 18vmax 12vmax; }
}

@keyframes drift-b {
  to { translate: -16vmax -10vmax; }
}

@media (max-width: 960px) {
  .nav {
    display: none;
  }

  .board {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-auto-rows: auto;
  }

  .tile--order   { grid-column: 1 / 3; grid-row: 1; min-height: 300px; }
  .tile--reviews { grid-column: 1; grid-row: 2; }
  .tile--about   { grid-column: 2; grid-row: 2; }
  .tile--work    { grid-column: 1; grid-row: 3; }
  .tile--pricing { grid-column: 2; grid-row: 3; }

  .tile {
    min-height: 180px;
  }
}

@media (max-width: 560px) {
  body {
    padding: 0 16px;
  }

  .header {
    padding: 16px 0;
  }

  .header__logo img {
    height: 46px;
  }

  .board {
    display: flex;
    flex-direction: column;
    flex: none;
    gap: 10px;
  }

  .tile {
    flex: none;
    min-height: 150px;
    padding: 22px;
  }

  .tile--order {
    order: -1;
    min-height: 300px;
    padding: 26px;
  }

  .tile__title {
    font-size: 28px;
  }

  .tile--order .tile__title {
    font-size: 44px;
  }

  .tile__shape {
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
  }

  .tile--order .tile__shape {
    top: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
  }

  .footer {
    padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (hover: none) {
  .tile:hover {
    --scale: 1;
    border-color: var(--line);
  }

  .tile:hover::after {
    transform: translateX(-120%);
    transition: none;
  }

  .tile:hover .tile__title,
  .tile:hover .tile__text,
  .tile:hover .tile__shape {
    transform: none;
  }

  .tile:hover .tile__text {
    color: var(--muted);
  }

  .tile:hover .tile__shape {
    border-color: var(--line-strong);
  }

  .tile:active {
    --scale: 0.985;
  }
}

body:has(.modal[open]) {
  overflow: hidden;
}

.modal {
  width: min(680px, calc(100vw - 32px));
  max-height: 86vh;
  max-height: 86dvh;
  padding: 0;
  margin: auto;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #0d0d0d;
  color: var(--text);
  overflow: hidden;
  animation: modal-in 0.45s var(--ease);
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  animation: fade-in 0.35s ease;
}

.modal.is-closing {
  animation: modal-out 0.2s ease forwards;
}

.modal.is-closing::backdrop {
  animation: fade-out 0.2s ease forwards;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 8px;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.modal__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: none;
  transition: transform 0.4s var(--ease), border-color 0.25s, background 0.25s;
}

.modal__close:hover {
  transform: rotate(90deg);
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.modal__body {
  padding: 12px 28px 28px;
  overflow-y: auto;
  min-height: 0;
}

.modal__note {
  padding: 24px 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal__text {
  display: grid;
  gap: 16px;
  max-width: 56ch;
  line-height: 1.7;
  color: #c4c4c4;
}

.loader {
  width: 28px;
  height: 28px;
  margin: 48px auto;
  border: 1px solid var(--text);
  animation: turn 3s linear infinite;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s, transform 0.3s var(--ease);
}

a.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
}

.card__text {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.card__price {
  font-family: var(--font-display);
  font-size: 26px;
}

.card__link {
  width: fit-content;
  font-size: 14px;
  color: var(--muted);
  text-underline-offset: 4px;
  transition: color 0.2s;
}

.card__link:hover {
  color: var(--text);
}

.form {
  display: grid;
  gap: 24px;
}

.field {
  display: grid;
  gap: 10px;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice__item {
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.choice__item:hover {
  color: var(--text);
  border-color: var(--text);
}

.choice__item:active {
  transform: scale(0.96);
}

.choice__item[aria-checked="true"] {
  background: var(--text);
  border-color: var(--text);
  color: #000;
}

.input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #080808;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  resize: none;
  transition: border-color 0.2s;
}

.input::placeholder {
  color: #5c5c5c;
}

.input:focus {
  outline: none;
  border-color: var(--text);
}

.form__trap {
  position: absolute;
  left: -9999px;
}

.form__submit {
  padding: 16px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  color: #000;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.form__submit:hover {
  transform: translateY(-2px);
}

.form__submit:active {
  transform: scale(0.98);
}

.form__submit:disabled {
  opacity: 0.6;
  transform: none;
  cursor: default;
}

.form__hint {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.form__error {
  font-size: 14px;
  color: #ff8f8f;
}

.form__error:empty {
  display: none;
}

.success {
  display: grid;
  gap: 12px;
  padding: 24px 0 8px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    translate: 0 24px;
    scale: 0.97;
  }
}

@keyframes modal-out {
  to {
    opacity: 0;
    translate: 0 12px;
    scale: 0.98;
  }
}

@keyframes fade-out {
  to { opacity: 0; }
}

@media (max-width: 560px) {
  .modal {
    width: calc(100vw - 20px);
    max-height: 90dvh;
    border-radius: 20px;
  }

  .modal__head {
    padding: 20px 20px 4px;
  }

  .modal__title {
    font-size: 26px;
  }

  .modal__body {
    padding: 12px 20px 22px;
  }
}

.modal__body {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.modal__body::-webkit-scrollbar {
  width: 8px;
}

.modal__body::-webkit-scrollbar-track {
  margin: 8px 0;
  background: transparent;
}

.modal__body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 0.2s;
}

.modal__body::-webkit-scrollbar-thumb:hover {
  background: #6a6a6a;
}
