/* Fonts */

@font-face {
  font-family: 'Kia Signature';
  src: url('font/KiaSignatureLight.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kia Signature';
  src: url('font/KiaSignatureRegular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kia Signature';
  src: url('font/KiaSignatureBold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Base */

:root {
  --ink: #05141f;
  --muted: #939598;
  --line: #c7c8ca;
  --panel: rgba(241, 241, 242, .5);
  --white: #fff;
  --focus: #0066cc;
  --motion: .18s;
  --press: .12s;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  font-family: 'Kia Signature', Arial, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  padding: 0;
  border: 0;
  appearance: none;
  font: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

button,
.admin__model,
.admin__block {
  touch-action: manipulation;
}

[data-admin-hold] {
  user-select: none;
  touch-action: manipulation;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

button:focus-visible,
.admin__toggle:focus-visible {
  outline: .1875rem solid var(--focus);
  outline-offset: .25rem;
}

.header,
.app {
  padding-right: calc(2.34375rem + env(safe-area-inset-right));
  padding-left: calc(2.34375rem + env(safe-area-inset-left));
}

[hidden] {
  display: none !important;
}

/* Header */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: calc(2.34375rem + env(safe-area-inset-top));
}

.header__logo {
  display: block;
}

.header__lang {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header__btn,
.subtabs__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  font-size: .9375rem;
  font-weight: 300;
  white-space: nowrap;
  color: var(--muted);
}

.header__btn[aria-pressed='true'],
.subtabs__btn[aria-selected='true'] {
  font-weight: 300;
  color: var(--ink);
  text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
}

.header__btn[aria-pressed='true']::after {
  position: absolute;
  bottom: .3125rem;
  left: 50%;
  width: .9375rem;
  height: .0625rem;
  background: var(--ink);
  content: '';
  transform: translateX(-50%);
}

/* Admin */

.admin {
  display: flex;
  gap: 2.5rem;
  padding-top: 2.46875rem;
  padding-bottom: calc(2.34375rem + env(safe-area-inset-bottom));
}

.admin__models,
.admin__blocks {
  flex: 1;
  min-width: 0;
}

.admin__name,
.admin__block {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  padding: .46875rem 1.5625rem;
  border: .03125rem solid var(--line);
  font-size: .8125rem;
  font-weight: 700;
  background: var(--white);
}

.admin__model+.admin__model,
.admin__block+.admin__block {
  margin-top: .3125rem;
}

/* Admin — Models */

.admin__models {
  display: flex;
  flex-direction: column;
  gap: 1.71875rem;
}

.admin__group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.admin__legend {
  display: block;
  width: 100%;
  padding-bottom: .9375rem;
  font-size: .8125rem;
  font-weight: 300;
}

.admin__model {
  display: block;
  cursor: pointer;
}

.admin__check {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.admin__name {
  gap: .5rem;
  transition:
    color var(--motion) ease,
    border-color var(--motion) ease,
    background-color var(--motion) ease;
}

.admin__check:checked+.admin__name {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

.admin__check:focus-visible+.admin__name {
  outline: .1875rem solid var(--focus);
  outline-offset: .25rem;
}

/* Admin — Blocks */

.admin__blocks {
  position: relative;
  padding-top: 1.71875rem;
  isolation: isolate;
}

.admin__blocks::before {
  position: absolute;
  inset: 0 -1.25rem -1.25rem;
  z-index: -1;
  background: var(--panel);
  content: '';
}

.admin__block {
  justify-content: space-between;
  cursor: pointer;
}

.admin__toggle {
  order: 2;
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0 0 0 .5rem;
  border: .0625rem solid var(--line);
  border-radius: 50%;
  appearance: none;
  background-color: var(--white);
  background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22%3E%3Cline x1=%2214.879%22 y1=%228.03033%22 x2=%229.92922%22 y2=%2212.9801%22 stroke=%22white%22 stroke-width=%221.5%22/%3E%3Cline x1=%226.03033%22 y1=%227.96967%22 x2=%2210.273%22 y2=%2212.2123%22 stroke=%22white%22 stroke-width=%221.5%22/%3E%3C/svg%3E');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.25rem;
  transition:
    border-color var(--motion) ease,
    background-color var(--motion) ease;
}

.admin__toggle:checked {
  border-color: var(--ink);
  background-color: var(--ink);
}

.admin__launch {
  width: 100%;
  margin-top: 3.578125rem;
  padding: 1.078125rem 1.5rem 1.046875rem;
  font-size: .8125rem;
  font-weight: 700;
  text-align: center;
  color: var(--white);
  background: var(--ink);
  transition:
    opacity var(--press) ease,
    transform var(--press) ease;
}

.admin__launch:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.admin__launch:not(:disabled):active {
  opacity: .85;
  transform: scale(.99);
}

.admin__status {
  margin-top: 1.25rem;
}

.admin__status-line {
  margin: 0;
  font-size: .75rem;
  line-height: 1.5;
  color: var(--muted);
}

.admin__status-line+.admin__status-line {
  margin-top: .2rem;
}

/* Access */

.access {
  width: min(22rem, calc(100vw - 3rem));
  margin: auto;
  padding: 1.875rem;
  border: 0;
  color: var(--ink);
  background: var(--white);
}

.access::backdrop {
  background: rgba(5, 20, 31, .6);
}

.access__form {
  display: grid;
  gap: 1.25rem;
}

.access__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.access__label {
  font-size: .8125rem;
  font-weight: 300;
}

.access__input {
  width: 100%;
  padding: .875rem 1rem;
  border: .03125rem solid var(--line);
  border-radius: 0;
  appearance: none;
  font: inherit;
  font-size: 1.25rem;
  color: var(--ink);
  background: var(--white);
}

.access__input:focus {
  border-color: var(--ink);
}

.access__actions {
  display: flex;
  justify-content: flex-end;
  gap: .625rem;
}

.access__btn {
  padding: .875rem 1.25rem;
  border: .03125rem solid var(--line);
  font-size: .8125rem;
  font-weight: 700;
  background: var(--white);
}

.access__btn--primary {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

/* Intro */

.intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr auto;
  padding:
    calc(2.34375rem + env(safe-area-inset-top)) calc(2.34375rem + env(safe-area-inset-right)) calc(2.34375rem + env(safe-area-inset-bottom)) calc(2.34375rem + env(safe-area-inset-left));
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.intro__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro> :not(.intro__img) {
  position: relative;
  z-index: 2;
}

.intro__title {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 3.125rem;
  font-weight: 700;
  line-height: 1.25;
}

.intro__price {
  grid-column: 1 / -1;
  margin: .3125rem 0 0;
  font-size: 1.71875rem;
  animation: stage-fade 10s cubic-bezier(.6, 0, .4, 1) 5s infinite normal both;
}

.intro__claim {
  margin: 0;
  animation: stage-fade 10s cubic-bezier(.6, 0, .4, 1) calc(0s) infinite normal both;
}

@keyframes stage-fade {
  0.001% {
    opacity: 0;
    transform: translateY(5px)
  }

  5% {
    opacity: 1;
    transform: translateY(0)
  }

  45% {
    opacity: 1
  }

  50% {
    opacity: 0
  }

  100% {
    opacity: 0
  }
}

.intro__logo {
  grid-column: 1;
  grid-row: 4;
  justify-self: start;
  display: block;
}

.intro__start {
  grid-column: 2;
  grid-row: 4;
  display: inline-flex;
  align-items: center;
  gap: 1.83125rem;
  justify-self: end;
  font-size: 1.71875rem;
  font-weight: 700;
}

.intro__start::after {
  flex: none;
  width: .875rem;
  height: 1.4375rem;
  background: url('img/arrow.svg') center / contain no-repeat;
  content: '';
  animation: intro-start-nudge 1.2s ease-in-out infinite;

}

@keyframes intro-start-nudge {

  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(.375rem);
  }
}

/* Kiosk */

.app,
.kiosk,
.detail {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.kiosk {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-x pan-y;
}

.kiosk img {
  -webkit-user-drag: none;
}

/* Detail */

.detail {
  padding-top: 2.1875rem;
  padding-bottom: calc(2.34375rem + env(safe-area-inset-bottom));
}



.detail__title {
  margin: 0;
  font-size: 1.71875rem;
  font-weight: 700;
}

.detail__price-container {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: .625rem 0 1.875rem;
}

.detail__price {
  font-size: 1.25rem;
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
}

.intro__claim-price-container {
  display: grid;
  align-items: baseline;
  isolation: isolate;
  font-size: 1.71875rem;
  grid-column: 1 / span 2;
}

.intro__claim-price-container>* {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  opacity: 0;
}

.intro__claim[hidden] + .intro__price {
  opacity: 1;
  animation: none;
}

/* Legal terms */

.legal-terms {
  display: flex;
}

.legal-terms-popover {
  box-sizing: border-box;
  width: min(36rem, calc(100vw - 3rem));
  max-height: calc(100dvh - 3rem);
/*   max-height: min(32rem, calc(100dvh - 3rem)); */
  margin: auto;
  padding: 1.5rem 1.75rem;
  border: 0;
  overflow: auto;
  font-size: .875rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--white);
}

.legal-terms-popover::backdrop {
  background: rgba(5, 20, 31, .6);
}

.legal-terms-popover h2 {
  margin: 0 0 .75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.legal-terms-popover [data-ui="price-disclaimer"] p,
.legal-terms-popover [data-ui="price-disclaimer"] ul {
  margin: 0 0 .75rem;
}

.legal-terms-popover [data-ui="price-disclaimer"] :last-child {
  margin-bottom: 0;
}

/* Tabs */

.tabs {
  display: flex;
  gap: .4rem;
  margin-bottom: 3.125rem;
  overflow-x: auto;
}

.tabs__btn {
  flex: 1 0 auto;
  padding: 1.0625rem 1.3125rem;
  border: .03125rem solid var(--line);
  font-size: .8125rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  background: var(--white);
  transition:
    color var(--motion) ease,
    border-color var(--motion) ease,
    background-color var(--motion) ease;
}

.tabs__btn[aria-selected='true'] {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

.detail__trim {
  margin: 0 0 1.875rem;
  font-size: 1.25rem;
  font-weight: 300;
}

/* Subtabs */

.subtabs {
  display: flex;
  align-items: center;
  gap: 1.09375rem;
  margin-bottom: 1.875rem;
  overflow-x: auto;
  position: relative;
  z-index: 55;
}

.subtabs__btn {
  flex: none;
  transition: color var(--motion) ease;
}

[data-block='finishes'] .subtabs__btn--caption {
  gap: .5rem;
}

[data-block='finishes'] .subtabs__btn--caption .subtabs__label {
  font-size: .8125rem;
  font-weight: 700;
  line-height: normal;
}

[data-block='finishes'] .subtabs__btn--caption .subtabs__caption {
  font-size: .9375rem;
  font-weight: 300;
  line-height: normal;
}

.subtabs__btn::after {
  position: absolute;
  right: 0;
  bottom: .3125rem;
  left: 0;
  height: .0625rem;
  background: var(--ink);
  content: '';
  opacity: 0;
  transform: scaleX(0);
  transition:
    opacity var(--motion) ease,
    transform var(--motion) ease;
}

.subtabs__btn[aria-selected='true']::after {
  opacity: 1;
  transform: scaleX(1);
}

.subtabs__panel {
  width: 100%;
}

/* Content */

.content {
  display: grid;
  gap: .625rem 2.5rem;
}

.content--columns-1 {
  grid-template-columns: minmax(0, 1fr);
}

.content--columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content__item {
  min-width: 0;
  margin: 0;
}

.content--specs .content__item {
  display: grid;
  /*  grid-template-columns: minmax(0, 1fr) auto; */
  grid-template-columns: 1.5fr 1fr;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: .59375rem;
}

.content__label,
.content__value,
.content--list .content__item {
  font-size: .8125rem;
  line-height: normal;
}

.content__label {
  font-weight: 300;
}

.content__value {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.content--list .content__item {
  padding-bottom: .59375rem;
}

.content--specs .content__item:not(:last-child),
.content--list .content__item:not(:last-child) {
  border-bottom: .03125rem solid var(--line);
}

.content--content {
  grid-template-columns: minmax(0, 1fr);
}

.content--content .content__item {
  max-width: 48rem;
  font-size: .9375rem;
  line-height: 1.6;
}

.content__item--strong {
  font-weight: 700;
}

.content__item--text {
  line-height: 1.6;
}

.content__item--title {
  grid-column: 1 / -1;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Vehicle price */

#panel-vehicle {
  margin-bottom: 2.5rem;
  overflow-y: auto;
  max-height: 28vh;
}

.vehicle-price {
  position: fixed;
  bottom: 0;
  width: 100%;
  margin-top: auto;
  margin-right: calc(-2.34375rem - env(safe-area-inset-right));
  /* margin-bottom: calc(-2.34375rem - env(safe-area-inset-bottom)); */
  margin-left: calc(-2.34375rem - env(safe-area-inset-left));
  padding:
    2.0625rem calc(2.34375rem + env(safe-area-inset-right)) calc(2.34375rem + env(safe-area-inset-bottom)) calc(2.34375rem + env(safe-area-inset-left));
  color: var(--white);
  background: var(--ink);
}

.vehicle-price__details {
  /* display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem; */
  display: flex;
  gap: 2.5rem;
}

.vehicle-price__details>* {
  flex: 1;
}

.vehicle-price__group {
  min-width: 0;
}

.vehicle-price__title {
  margin: 0 0 1.21875rem;
  font-size: .8125rem;
  font-weight: 700;
}

.vehicle-price__list,
.vehicle-price__summary {
  display: grid;
}

.vehicle-price__list {
  gap: .4375rem;
  margin: 0;
}

.vehicle-price__summary {
  gap: .59375rem;
  margin: 3.125rem 0 0;
}

.vehicle-price__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 300;
}

.vehicle-price__label,
.vehicle-price__value {
  margin: 0;
}

.vehicle-price__value {
  text-align: right;
  white-space: nowrap;
}

.vehicle-price__item--total {
  font-size: 1.25rem;
}

/* Finishes */

.finish {
  overflow-x: clip;
  position: relative;
  bottom: 5rem;
}

.finish__img {
  display: block;
  width: 100%;
  height: 23.75rem;
  object-fit: contain;
  object-position: center;
  transform: scale(1.2);
  transform-origin: center;
}

.finish__img--changing {
  animation: finish-image-in var(--motion) ease;
}

.finish__ml {
  font-size: 0.875rem;
  color: var(--muted);
  display: block;
  text-align: center;
  font-style: italic;
  position: relative;
}

.finish__name {
  margin: 0;
  padding-top: 2.5rem;
  padding-bottom: 1.875rem;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: normal;
}

.finish__colors {
  display: flex;
  flex-wrap: wrap;
  gap: .78125rem;
}

.finish__color {
  position: relative;
  display: grid;
  flex: 0 0 6.65625rem;
  place-items: center;
  width: 6.65625rem;
  height: 3.125rem;
  border: .03125rem solid var(--line);
  overflow: hidden;
  transition:
    border-color var(--motion) ease,
    opacity var(--press) ease,
    transform var(--press) ease;
}

.finish__color[aria-pressed='true'] {
  border-color: var(--ink);
}

.finish__color[aria-pressed='true']::after {
  position: absolute;
  top: .125rem;
  right: .125rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background-color: var(--ink);
  background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22%3E%3Cline x1=%2214.879%22 y1=%228.03033%22 x2=%229.92922%22 y2=%2212.9801%22 stroke=%22white%22 stroke-width=%221.5%22/%3E%3Cline x1=%226.03033%22 y1=%227.96967%22 x2=%2210.273%22 y2=%2212.2123%22 stroke=%22white%22 stroke-width=%221.5%22/%3E%3C/svg%3E');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.25rem;
  content: '';
}

.finish__color:active {
  opacity: .85;
  transform: scale(.99);
}

.finish__swatch {
  display: block;
  width: 6.65625rem;
  height: 3.125rem;
  object-fit: cover;
  object-position: center;
}

@keyframes finish-image-in {
  from {
    opacity: .85;
  }

  to {
    opacity: 1;
  }
}

/* Services */

.service__img {
  display: block;
  width: 100%;
  height: 23.78125rem;
  object-fit: cover;
}

.service__body {
  display: flex;
  gap: 1.34375rem;
  padding-top: 2.5rem;
}

.service__title,
.service__text {
  margin: 0;
}

.service__title {
  flex: 0 0 13.75rem;
  font-size: 1.5625rem;
  font-weight: 700;
  line-height: normal;
}

.service__text {
  flex: 1;
  min-width: 0;
  font-size: .8125rem;
  font-weight: 300;
  line-height: normal;
}

/* Energy */

.energy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4625rem;
}

.energy__btn {
  flex: 0 1 auto;
  min-width: 0;
  border: .03125rem solid var(--line);
  transition:
    opacity var(--press) ease,
    transform var(--press) ease;
}

.energy__btn:active {
  opacity: .85;
  transform: scale(.99);
}

.energy__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 32.5rem;
  object-fit: contain;
}

.energy-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding:
    calc(2.5rem + env(safe-area-inset-top)) calc(2.5rem + env(safe-area-inset-right)) calc(2.5rem + env(safe-area-inset-bottom)) calc(2.5rem + env(safe-area-inset-left));
  border: 0;
  overflow: hidden;
  background: rgba(5, 20, 31, .94);
}

.energy-dialog[open] {
  display: grid;
  place-items: center;
}

.energy-dialog::backdrop {
  background: transparent;
}

.energy-dialog__close {
  position: absolute;
  top: calc(1.25rem + env(safe-area-inset-top));
  right: calc(1.25rem + env(safe-area-inset-right));
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--white);
  opacity: .8;
  transition:
    opacity var(--motion) ease,
    transform var(--press) ease;
}

.energy-dialog__close::before,
.energy-dialog__close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.375rem;
  height: .0625rem;
  background: currentColor;
  content: '';
}

.energy-dialog__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.energy-dialog__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.energy-dialog__close:active {
  opacity: 1;
  transform: scale(.92);
}

.energy-dialog__img {
  display: block;
  max-width: 80vw;
  max-height: 80dvh;
  object-fit: contain;
}

/* Responsive */

@media (min-width: 50.0625rem) {
  .content--specs.content--columns-2 .content__item:nth-last-child(2) {
    border-bottom: 0;
  }
}

@media (max-width: 50rem) {
  .content--columns-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Motion */

@media (prefers-reduced-motion: reduce) {

  .admin__name,
  .admin__toggle,
  .admin__launch,
  .tabs__btn,
  .subtabs__btn,
  .subtabs__btn::after,
  .finish__color,
  .energy__btn,
  .energy-dialog__close {
    transition: none;
  }

  .finish__img--changing {
    animation: none;
  }
}
