:root {
  --pink: #F0A9A8;
  --navy: #283F7F;
  --beige: #EDCDAC;
  --yellow: #FCA200;
  --brown: #D88037;
  --wine: #602513;
  --blue: #475FFC;
  --green: #545416;
  --gray: #8B8695;
  --off-white: #EEEEEE;

  --page-max: 1280px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 18px 45px rgba(10, 24, 65, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--off-white);
  background:
    radial-gradient(circle at 50% -20%, rgba(71, 95, 252, 0.22), transparent 38%),
    radial-gradient(circle at 10% 95%, rgba(240, 169, 168, 0.10), transparent 24%),
    var(--navy);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.directory {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: 42px 28px 56px;
}

.directory::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(125deg, rgba(10, 27, 70, 0.42), transparent 42%),
    linear-gradient(180deg, rgba(8, 26, 68, 0.24), rgba(9, 26, 66, 0.40));
  pointer-events: none;
}

.directory__watermark {
  position: absolute;
  z-index: -1;
  top: 18px;
  right: -70px;
  width: clamp(260px, 30vw, 480px);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
}

.directory__watermark img {
  width: 100%;
  filter: grayscale(1) brightness(3.4);
}

.hero,
.platforms {
  width: min(100%, var(--page-max));
  margin-inline: auto;
}

.hero {
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  user-select: none;
}

.brand__symbol {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.brand__name {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  line-height: 1;
  white-space: nowrap;
}

.brand__ecosystem {
  font-family: inherit;
  font-size: clamp(2.25rem, 4vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--pink);
}

.brand__miitt {
  font-family: inherit;
  font-size: clamp(2.25rem, 4vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}

h1 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(2rem, 4.5vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #fff;
}

.hero__subtitle {
  margin: 12px auto 24px;
  max-width: 620px;
  color: rgba(238, 238, 238, 0.86);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.55;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 710px);
  height: 56px;
  margin: 0 auto;
  border: 1px solid rgba(238, 238, 238, 0.20);
  border-radius: 18px;
  background: rgba(16, 39, 94, 0.54);
  box-shadow: 0 14px 40px rgba(7, 20, 51, 0.18);
  backdrop-filter: blur(10px);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.search:focus-within {
  border-color: rgba(240, 169, 168, 0.72);
  background: rgba(18, 42, 99, 0.78);
  box-shadow: 0 0 0 4px rgba(240, 169, 168, 0.10), 0 16px 42px rgba(7, 20, 51, 0.25);
}

.search__icon {
  width: 23px;
  height: 23px;
  margin-left: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: rgba(238, 238, 238, 0.86);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 16px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 1rem;
}

.search input::placeholder {
  color: rgba(238, 238, 238, 0.64);
}

.search input::-webkit-search-cancel-button {
  filter: invert(1);
  opacity: 0.5;
}

.search__shortcut {
  margin-right: 14px;
  padding: 5px 8px;
  border: 1px solid rgba(238, 238, 238, 0.20);
  border-radius: 8px;
  color: rgba(238, 238, 238, 0.66);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.platforms {
  margin-top: 28px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.platform-card {
  --accent: var(--off-white);
  position: relative;
  display: grid;
  grid-template-rows: 126px auto 44px;
  justify-items: center;
  min-height: 318px;
  padding: 22px 24px 18px;
  overflow: hidden;
  border: 1px solid rgba(238, 238, 238, 0.18);
  border-radius: var(--radius-lg);
  color: inherit;
  text-align: center;
  text-decoration: none;
  background:
    linear-gradient(145deg, rgba(238, 238, 238, 0.085), rgba(238, 238, 238, 0.025));
  box-shadow: 0 10px 30px rgba(7, 20, 51, 0.14);
  backdrop-filter: blur(8px);
  transform: translateY(0);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.platform-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent);
  opacity: 0.9;
}

.platform-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -74px;
  bottom: -84px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  filter: blur(1px);
  transition: opacity 180ms ease;
}

.platform-card:hover,
.platform-card:focus-visible {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(238, 238, 238, 0.3));
  background: linear-gradient(145deg, rgba(238, 238, 238, 0.12), rgba(238, 238, 238, 0.04));
  box-shadow: var(--shadow);
}

.platform-card:hover::after,
.platform-card:focus-visible::after {
  opacity: 0.07;
}

.platform-card:focus-visible {
  outline: 3px solid rgba(238, 238, 238, 0.92);
  outline-offset: 3px;
}

.platform-card[hidden] {
  display: none;
}

.platform-card--documentos { --accent: var(--yellow); }
.platform-card--validador { --accent: var(--gray); }
.platform-card--qbo { --accent: #2ca01c; }
.platform-card--blog { --accent: var(--pink); }
.platform-card--ensigner { --accent: #6f91b9; }
.platform-card--web { --accent: var(--blue); }

.platform-card__logo-box {
  display: grid;
  place-items: center;
  width: 100%;
  height: 126px;
}

.platform-card__logo {
  width: auto;
  max-width: 165px;
  height: auto;
  max-height: 114px;
  object-fit: contain;
  filter: drop-shadow(0 7px 14px rgba(5, 15, 42, 0.18));
  transition: transform 180ms ease;
}

.platform-card__logo--qbo {
  max-width: 108px;
  max-height: 108px;
}

.platform-card__logo--symbol {
  max-width: 90px;
  max-height: 105px;
}

.platform-card:hover .platform-card__logo,
.platform-card:focus-visible .platform-card__logo {
  transform: scale(1.035);
}

.platform-card__content h2 {
  margin: 2px 0 8px;
  color: #fff;
  font-size: 1.34rem;
  letter-spacing: -0.018em;
}

.platform-card__content p {
  margin: 0 auto;
  max-width: 300px;
  color: rgba(238, 238, 238, 0.84);
  font-size: 0.96rem;
  line-height: 1.45;
}

.platform-card__action {
  align-self: end;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.platform-card__action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-card:hover .platform-card__action,
.platform-card:focus-visible .platform-card__action {
  background: var(--accent);
  color: #fff;
  transform: translateX(2px);
}

.empty-state {
  width: min(100%, 640px);
  margin: 44px auto 0;
  padding: 18px 22px;
  border: 1px solid rgba(238, 238, 238, 0.15);
  border-radius: var(--radius-md);
  color: rgba(238, 238, 238, 0.82);
  text-align: center;
  background: rgba(16, 39, 94, 0.42);
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  max-width: min(90vw, 520px);
  padding: 12px 16px;
  border: 1px solid rgba(238, 238, 238, 0.22);
  border-radius: 12px;
  color: #fff;
  text-align: center;
  background: rgba(20, 35, 74, 0.96);
  box-shadow: 0 14px 40px rgba(7, 20, 51, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .directory {
    padding-inline: 22px;
  }

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

@media (max-width: 650px) {
  .directory {
    padding: 28px 16px 38px;
  }

  .directory__watermark {
    top: 130px;
    right: -120px;
    width: 320px;
  }

  .brand {
    gap: 12px;
    margin-bottom: 18px;
  }

  .brand__symbol {
    width: 50px;
    height: 60px;
  }

  .brand__name {
    font-size: 3.8rem;
  }

  .hero__subtitle {
    margin-top: 10px;
    margin-bottom: 20px;
  }

  .search {
    height: 54px;
    border-radius: 15px;
  }

  .search__shortcut {
    display: none;
  }

  .platforms {
    margin-top: 20px;
  }

  .platform-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .platform-card {
    grid-template-columns: 104px 1fr 40px;
    grid-template-rows: 1fr;
    align-items: center;
    justify-items: start;
    min-height: 150px;
    padding: 18px 16px;
    text-align: left;
  }

  .platform-card__logo-box {
    width: 94px;
    height: 100px;
  }

  .platform-card__logo {
    max-width: 96px;
    max-height: 88px;
  }

  .platform-card__logo--qbo {
    max-width: 78px;
    max-height: 78px;
  }

  .platform-card__logo--symbol {
    max-width: 66px;
    max-height: 80px;
  }

  .platform-card__content {
    min-width: 0;
    padding: 0 10px 0 2px;
  }

  .platform-card__content h2 {
    margin: 0 0 5px;
    font-size: 1.08rem;
  }

  .platform-card__content p {
    max-width: none;
    font-size: 0.86rem;
    line-height: 1.4;
  }

  .platform-card__action {
    align-self: center;
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 420px) {
  .platform-card {
    grid-template-columns: 82px 1fr 36px;
    min-height: 138px;
    padding-inline: 13px;
  }

  .platform-card__logo-box {
    width: 72px;
    height: 90px;
  }

  .platform-card__logo {
    max-width: 76px;
    max-height: 72px;
  }

  .platform-card__logo--qbo {
    max-width: 62px;
    max-height: 62px;
  }

  .platform-card__logo--symbol {
    max-width: 52px;
    max-height: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 520px) {
  .brand {
    gap: 10px;
  }

  .brand__symbol {
    width: 56px;
    height: 56px;
  }

  .brand__name {
    gap: 7px;
  }

  .brand__ecosystem,
  .brand__miitt {
    font-size: 2rem;
  }
}
