/* Reusable pieces */

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.1s ease;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}
.btn:active {
  transform: translateY(0);
}
.btn--sm {
  min-height: 40px;
  padding: 0 var(--space-4);
  font-size: 0.95rem;
}
.btn--lg {
  min-height: 56px;
  padding: 0 var(--space-8);
  font-size: 1.05rem;
}
.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--mustard);
  color: var(--eye);
  box-shadow: 0 6px 0 -2px var(--rust);
}
.btn--primary:hover {
  box-shadow: 0 8px 0 -2px var(--rust);
}
.btn--primary:active {
  box-shadow: 0 4px 0 -2px var(--rust);
  transform: translateY(2px);
}
.btn--dark {
  background: var(--eye);
  color: var(--white);
}
.btn--dark:hover {
  background: var(--slate);
}
.btn--ghost {
  border-color: currentColor;
  color: inherit;
  background: transparent;
}
.btn--whatsapp {
  background: var(--whatsapp);
  color: #0b2e17;
}

.section--dark .btn--ghost,
.hero .btn--ghost {
  color: var(--color-on-dark);
}

.btn__arrow {
  transition: transform 0.15s ease;
}
.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* Small labels */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust-ink);
}

.kicker::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  border-top-left-radius: 100%;
}

.section--dark .kicker,
.hero .kicker {
  color: var(--mustard);
}

.tag {
  display: inline-block;
  padding: 2px var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--eye);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.tag--soon {
  background: var(--sand-deep);
  color: var(--eye);
}
.tag--mint {
  background: var(--mint);
  color: var(--eye);
}

.highlight {
  background: linear-gradient(
    transparent 62%,
    var(--mustard) 62%,
    var(--mustard) 92%,
    transparent 92%
  );
  padding-inline: 0.06em;
}

/* Feature glyphs: little compositions of the logo's quarter circles */

.glyph {
  width: 56px;
  height: 56px;
  flex: none;
}
.glyph--lg {
  width: 88px;
  height: 88px;
}

/* Cards */

.card-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  position: relative;
  padding: var(--space-8);
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card h3 {
  margin-top: var(--space-5);
}
.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}
.card p {
  color: var(--color-text-muted);
}

.card__link {
  color: var(--color-text);
  text-decoration: none;
}
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card--dark {
  background: var(--slate);
  border-color: transparent;
  color: var(--color-on-dark);
}
.card--dark p {
  color: var(--color-on-dark-muted);
}

/* Ticks */

.ticks {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.ticks li {
  position: relative;
  padding-left: 30px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 18px;
  height: 18px;
  background: var(--mint);
  border-radius: 0 100% 0 0;
}

.ticks li:nth-child(3n + 2)::before {
  background: var(--mustard);
  border-radius: 100% 0 0 0;
}
.ticks li:nth-child(3n)::before {
  background: var(--rust);
  border-radius: 0 0 100% 0;
}

/* Empty frames where screenshots and photos will go: the image replaces the frame's contents */

.shot {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  background: var(--sand);
  border: 2px dashed var(--sand-deep);
  overflow: hidden;
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* With its image: a solid frame, and screenshots keep their own shape (phones and photos keep the frame's) */
.shot--filled {
  border-style: solid;
  border-color: var(--color-border);
  background: var(--white);
}
.shot--filled:not(.shot--phone, .shot--tall) {
  aspect-ratio: auto;
}
.shot--filled:not(.shot--phone, .shot--tall) img {
  height: auto;
}
.shot--wide {
  aspect-ratio: 16 / 9;
}
.shot--square {
  aspect-ratio: 1;
}
.shot--tall {
  aspect-ratio: 4 / 5;
}
.shot--phone {
  aspect-ratio: 9 / 19;
  max-width: 300px;
  border-radius: 36px;
}
.section--dark .shot,
.hero .shot {
  background: rgb(255 255 255 / 0.06);
  border-color: rgb(255 255 255 / 0.18);
}

/* FAQ */

.faq {
  display: grid;
  gap: var(--space-3);
}

.faq__item {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.faq__item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq__item > summary::-webkit-details-marker {
  display: none;
}

.faq__item > summary::after {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  background: var(--mustard);
  border-radius: 100% 0 0 0;
  transition:
    transform 0.2s ease,
    border-radius 0.2s ease;
}

.faq__item[open] > summary::after {
  transform: rotate(180deg);
  background: var(--rust);
}
.faq__answer {
  padding: 0 var(--space-6) var(--space-6);
  color: var(--color-text-muted);
}
.faq__answer p:last-child {
  margin-bottom: 0;
}

/* Forms */

.form {
  display: grid;
  gap: var(--space-5);
}
.form__row {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 640px) {
  .form__row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}
.form > .btn {
  justify-self: start;
}
.field__label {
  font-weight: 600;
  font-size: 0.95rem;
}
.field__hint {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.field__input {
  width: 100%;
  min-height: 50px;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--color-text);
  font: inherit;
}

textarea.field__input {
  min-height: 140px;
  resize: vertical;
}
.field__input:focus {
  border-color: var(--slate);
  outline: none;
  box-shadow: 0 0 0 4px rgb(48 77 86 / 0.15);
}
.field__input[aria-invalid="true"] {
  border-color: var(--color-danger);
}
.field__error {
  color: var(--color-danger);
  font-size: var(--text-sm);
  font-weight: 600;
}

.check {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: 0.95rem;
}
.check input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--slate);
  flex: none;
}

/* The honeypot: hidden from people, filled in by bots */
.form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  border: 2px solid var(--color-danger);
  background: #fdecea;
  color: #7a1a12;
}

/* Ticker band */

.ticker {
  overflow: hidden;
  background: var(--mustard);
  color: var(--eye);
  border-block: 2px solid var(--eye);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
}

.ticker__group {
  display: flex;
  gap: var(--space-8);
  padding: var(--space-4) var(--space-4);
  margin: 0;
  list-style: none;
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.ticker__item::after {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--rust);
  border-radius: 100% 0 0 0;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* Long text: blog and legal pages */

.prose {
  font-size: var(--text-lg);
  line-height: 1.75;
}
.prose h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
}
.prose h3 {
  margin-top: var(--space-8);
}
.prose li {
  margin-bottom: var(--space-2);
}
.prose blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-5) var(--space-6);
  background: var(--sand);
  border-left: 6px solid var(--mustard);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-6);
  font-size: var(--text-base);
}
.prose th,
.prose td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--sand);
}
.placeholder {
  background: #fff3c4;
  padding: 0 0.2em;
  border-radius: 4px;
}

/* Breadcrumbs */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--sand-deep);
}
.breadcrumbs a {
  color: inherit;
}

/* Flash message under the header */
.flash {
  padding-top: var(--space-4);
}

.shot__note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.section--dark .shot__note,
.hero .shot__note,
.bento__item--slate .shot__note,
.bento__item--rust .shot__note {
  color: rgb(255 255 255 / 0.6);
}

/* Chips: in-page jump links */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.chip {
  padding: var(--space-2) var(--space-4);
  border: 2px solid var(--eye);
  border-radius: var(--radius-pill);
  color: var(--eye);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.chip:hover {
  background: var(--eye);
  color: var(--white);
}

/* Product switch, in the bar above the header: a pill per product, small and light on dark. The mark is each
   product's quarter circle; Tuka Hotel's pill isn't a link until it's out. */

.product-switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.product-switch__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 32px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.product-switch__link:hover {
  color: var(--color-on-dark);
  background: rgb(255 255 255 / 0.08);
}
.product-switch__link[aria-current="true"] {
  background: var(--cream);
  color: var(--eye);
}

.product-switch__mark {
  width: 12px;
  height: 12px;
  flex: none;
}
.product-switch__mark--vet {
  background: var(--mustard);
  border-radius: 100% 0 0 0;
}
.product-switch__mark--colonias {
  background: var(--mint);
  border-radius: 0 100% 0 0;
}

.product-switch__mark--hotel {
  background: var(--sage);
  border-radius: 0 0 0 100%;
}

.product-switch__mark--medida {
  background: var(--rust);
  border-radius: 0 0 100% 0;
}

/* Tuka Hotel: not out yet, so quieter until it's the current one */
.product-switch__link--soon:not([aria-current="true"]) {
  opacity: 0.75;
}
.product-switch__link[aria-current="true"] .product-switch__soon {
  background: var(--sand-deep);
}
.product-switch__soon {
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.12);
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-switch__short {
  display: none;
}

@media (max-width: 559px) {
  .product-switch--bar .product-switch__long {
    display: none;
  }
  /* Keeps the bar on one line: the faded pill still says it isn't out yet, and screen readers still get "Pronto" */
  .product-switch--bar .product-switch__soon {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .product-switch--bar .product-switch__short {
    display: inline;
  }
}

/* On phones the bar holds "← Tuka" and three pills on one line: tighter pills, and no marks on the narrowest */
@media (max-width: 559px) {
  .product-switch--bar { gap: 0; flex-wrap: nowrap; }
  .product-switch--bar .product-switch__link { padding-inline: var(--space-2); gap: var(--space-1); }
}
@media (max-width: 419px) {
  .product-switch--bar .product-switch__mark { display: none; }
}

/* Four pills on the narrowest phones: slightly smaller type and gaps keep them on one line at 375px; below that,
   the pills scroll sideways instead of widening the page */
@media (max-width: 419px) {
  .product-bar { font-size: 0.8125rem; }
  .product-bar__inner { gap: var(--space-2); }
  .product-bar__home { padding-right: var(--space-2); }
  .product-switch--bar { min-width: 0; overflow-x: auto; scrollbar-width: none; }
}

/* With four products the long labels only fit on wide screens: below that, the short ones ("Pronto" stays above
   phone width) */
@media (max-width: 1199px) {
  .product-switch--bar .product-switch__long { display: none; }
  .product-switch--bar .product-switch__short { display: inline; }
}
