:root {
  --bg: #eceef4;
  --light: #f8faff;
  --blue: #2b5dff;
  --dark: #121412;
  --muted: rgba(18, 20, 18, 0.48);
  --field: #eceef4;
  --shell-radius: 40px;
  --field-radius: 30px;
  --button-radius: 10px;
  --letter-spacing: -0.02em;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--dark);
  background: var(--bg);
  font-family: "Golos Text", Arial, sans-serif;
  font-weight: 500;
  letter-spacing: var(--letter-spacing);
  line-height: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  letter-spacing: inherit;
}

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: min(100% - 120px, 1720px);
  margin: 24px auto 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 20px;
}

.header-nav--right {
  justify-content: flex-end;
  gap: 24px;
}

.nav-link--active,
.mobile-menu__accent {
  color: var(--blue);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  font-size: 32px;
  text-transform: lowercase;
}

.logo img {
  display: block;
  max-width: 180px;
  max-height: 42px;
}

.logo span {
  display: none;
}

.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 22px;
  border-radius: var(--button-radius);
  background: var(--light);
  font-size: 24px;
  white-space: nowrap;
}

.burger {
  display: none;
  width: 52px;
  height: 45px;
  border: 0;
  border-radius: 10px;
  background: var(--light);
  cursor: pointer;
}

.burger span {
  display: block;
  width: 22px;
  height: 3px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--dark);
}

.burger.is-open {
  background: var(--blue);
}

.burger.is-open span {
  background: #fff;
}

.mobile-menu {
  display: none;
}

.converter-shell {
  width: min(100% - 120px, 1720px);
  min-height: calc(100vh - 112px);
  margin: 24px auto 60px;
  padding: 58px 40px 64px;
  border-radius: var(--shell-radius);
  background: var(--light);
}

.converter-card {
  width: min(100%, 820px);
  margin: 0 auto;
}

.desktop-title {
  margin: 0 0 30px;
  text-align: center;
  font-size: 44px;
  line-height: 0.92;
}
.desktop-subtitle {
  width: min(100%, 720px);
  margin: -16px auto 30px;
  color: var(--muted);
  text-align: center;
  font-size: 24px;
  line-height: 1;
}

.mobile-title {
  display: none;
}

.converter-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px 10px;
  align-items: end;
}

.field-label,
.units-fieldset legend {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 24px;
}

.field-label {
  grid-column: 1 / -1;
}

.amount-field {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 115px;
  border-radius: var(--field-radius);
  background: var(--field);
}

.amount-field input {
  width: auto;
  min-width: 1ch;
  max-width: 75%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--dark);
  font-size: 64px;
  text-align: center;
}

.amount-field input::placeholder {
  color: transparent;
  opacity: 0;
}

.amount-field input::-webkit-outer-spin-button,
.amount-field input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.currency {
  color: rgba(18, 20, 18, 0.24);
  font-size: 64px;
  pointer-events: none;
}

.amount-field:not(.has-value) .currency {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: 0;
  transform: translate(-50%, -50%);
}

.amount-field.has-value .currency {
  position: static;
  display: block;
  margin-left: 10px;
  transform: none;
}

.units-fieldset {
  grid-column: 1 / 5;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.units-fieldset legend {
  margin-bottom: 18px;
}

.units-row {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.unit-option {
  position: relative;
  flex: 0 0 98px;
}

.unit-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.unit-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 98px;
  height: 98px;
  border: 2px solid transparent;
  border-radius: 26px;
  background: var(--field);
  cursor: pointer;
}

.unit-option input:checked + .unit-button {
  border-color: var(--blue);
  background: var(--light);
}

.unit-button img,
.unit-emoji {
  width: 44px;
  height: 44px;
  object-fit: contain;
  font-size: 38px;
  line-height: 1;
}

.unit-button span:last-child {
  margin-top: 7px;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}

.convert-button {
  grid-column: 5 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 98px;
  padding: 0;
  border: 0;
  border-radius: var(--field-radius);
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

.convert-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  font-size: 25px;
  line-height: 1;
  transform: none;
  white-space: nowrap;
}

.result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  margin-top: 66px;
  padding: 34px;
  border-radius: var(--field-radius);
  overflow: hidden;
  background: var(--field);
  text-align: center;
}

.result-placeholder {
  margin: 0;
  color: var(--muted);
  font-size: 24px;
}

.result-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0;
  color: #000;
  font-size: 124px;
  line-height: 0.84;
}

.result-icon {
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.result-emoji {
  font-size: 94px;
  line-height: 1;
}

.result-text {
  width: min(100%, 600px);
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

@media (max-width: 900px) {
  :root {
    --shell-radius: 20px;
    --field-radius: 16px;
  }

  body {
    overflow-x: hidden;
    
  }

  .site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 40px);
  max-width: 430px;
  margin-top: 28px;
  }

  .header-nav,
  .desktop-title,
  .desktop-subtitle {
 display: none !important;
}
  .header-nav--right {
    display: none;
  }

  .logo {
    justify-content: center;
    min-width: auto;
    font-size: 20px;
  }

  .logo img {
    max-width: 94px;
    max-height: 26px;
  }

  .burger {
    position: absolute;
    right: 0;
    display: block;
    
  }

  .mobile-menu {
    position: absolute;
    top: 82px;
    left: 50%;
    z-index: 8;
    display: flex;
    flex-direction: column;
    gap: 26px;
    width: calc(100% - 40px);
    max-width: none;
    padding: 28px 32px 32px;
    border-radius: 16px;
    background: var(--light);
    font-size: 24px;
    transform: translateX(-50%) translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
  }

  .mobile-menu.is-open {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu__accent {
    margin-top: 20px;
  }

  .mobile-menu__accent + .mobile-menu__accent {
    margin-top: 0;
  }

  .converter-shell {
    width: calc(100% - 40px);
    max-width: 430px;
    min-height: auto;
    margin-top: 40px;
    padding: 0;
    background: transparent;
  }

  .converter-card {
    position: relative;
    width: 100%;
    padding: 0 0 20px;
    overflow: visible;
  }

  .mobile-title {
    display: block;
    margin: 0 0 16px;
    text-align: center;
  }

  .mobile-title h1 {
    margin: 0 0 5px;
    color: var(--blue);
    font-size: 24px;
    line-height: 1;
  }

.mobile-description {
  width: 340px;
  max-width: 100%;
  margin: 0 auto;
  color: var(--dark);
  font-size: 16px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.mobile-subtitle {
  width: 320px;
  max-width: 100%;
  margin: 16px auto 0;
  color: var(--muted) !important;
  font-size: 16px;
  line-height: 1.05;
  text-align: center;
}

  .converter-form {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 20px;
    border-radius: var(--shell-radius);
    overflow: hidden;
    background: var(--light);
  }

  .field-label {
    display: none;
  }

  .amount-field {
    height: 94px;
    width: 100%;
    overflow: hidden;
  }

  .amount-field input {
    max-width: calc(100% - 90px);
    font-size: 52px;
  }

  .currency {
    flex-shrink: 0;
    font-size: 52px;
  }

  .amount-field.has-value .currency {
    margin-left: 10px;
  }

  .units-fieldset {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .units-fieldset legend {
    margin-bottom: 10px;
    font-size: 18px;
  }

  .units-row {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 4px;
    scrollbar-width: none;
  }

  .units-row::-webkit-scrollbar {
    display: none;
  }

  .unit-option {
    flex: 0 0 76px;
  }

  .unit-button {
    width: 76px;
    height: 76px;
    border-radius: 16px;
  }

  .unit-button img,
  .unit-emoji {
    width: 36px;
    height: 36px;
    font-size: 30px;
  }

  .unit-button span:last-child {
    max-width: 68px;
    margin-top: 5px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .convert-button {
    width: 100%;
    height: 57px;
    border-radius: 28px;
  }

  .convert-arrow {
  font-size: 25px;
  transform: none;
  }

  .result-card {
    width: 100%;
    min-height: 200px;
    margin: 20px 0 0;
    padding: 28px 20px;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--field);
  }

  .result-placeholder {
    font-size: 18px;
  }

  .result-value {
    gap: 8px;
    font-size: 72px;
  }

  .result-icon {
    width: 72px;
    height: 72px;
  }

  .result-emoji {
    font-size: 62px;
  }

  .result-text {
    margin-top: 12px;
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .site-header,
  .converter-shell {
    width: calc(100% - 32px);
  }

  .mobile-menu {
    width: calc(100% - 32px);
  }

  .amount-field input {
    max-width: calc(100% - 76px);
    font-size: 46px;
  }

  .currency {
    font-size: 46px;
  }
}
@media (max-width: 900px) {
  .mobile-title p:first-of-type {
    width: 340px !important;
    max-width: 100% !important;
    margin: 10px auto !important;
    color: var(--dark) !important;
    font-size: 16px !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .mobile-title .mobile-subtitle {
    width: 320px !important;
    max-width: 100% !important;
    margin: 14px auto 0 !important;
    color: var(--muted) !important;
    font-size: 16px !important;
    line-height: 1.05 !important;
    text-align: center !important;
  }
}

@media (max-width: 380px) {
  .mobile-title p:first-of-type {
    font-size: 15px !important;
  }
}

/* Contacts page */
.small-button--active {
  color: var(--blue);
}

.contacts-shell {
  width: min(100% - 120px, 1720px);
  min-height: calc(100vh - 112px);
  margin: 24px auto 60px;
  padding: 88px 40px 110px;
  border-radius: var(--shell-radius);
  background: var(--light);
}

.contacts-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 820px);
  min-height: 470px;
  margin: 0 auto;
  text-align: center;
}

.contacts-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 260px;
  height: 260px;
  margin: 0 auto 30px;
}

.contacts-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.contacts-visual__fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  border-radius: 34px;
  background: var(--field);
  font-size: 86px;
}

.contacts-title {
  margin: 0 0 20px;
  color: var(--dark);
  font-size: 44px;
  line-height: 0.98;
  text-align: center;
}

.contacts-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 540px);
}

.contact-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 22px;
  border-radius: var(--button-radius);
  background: var(--blue);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .contacts-shell {
    width: calc(100% - 40px);
    max-width: 430px;
    min-height: auto;
    margin-top: 40px;
    padding: 48px 20px 56px;
    border-radius: var(--shell-radius);
    background: var(--light);
  }

  .contacts-card {
    min-height: 520px;
  }

  .contacts-visual {
    width: 190px;
    height: 190px;
    margin-bottom: 34px;
  }

  .contacts-visual__fallback {
    width: 140px;
    height: 140px;
    border-radius: 24px;
    font-size: 64px;
  }

  .contacts-title {
    width: min(100%, 330px);
    margin-bottom: 22px;
    font-size: 32px;
    line-height: 0.98;
  }

  .contacts-buttons {
    grid-template-columns: 1fr;
    gap: 10px;
    width: min(100%, 310px);
  }

  .contact-button {
    min-height: 52px;
    border-radius: 28px;
    font-size: 22px;
  }
}

@media (max-width: 380px) {
  .contacts-shell {
    width: calc(100% - 32px);
    padding-right: 16px;
    padding-left: 16px;
  }

  .contacts-title {
    font-size: 30px;
  }
}
