/* Mobile Inventory homepage, framework-free port of the existing /hello page. */
:root {
  font-size: 81.25%;
  --text: #323232;
  --muted: #74777b;
  --surface: #fff;
  --surface-soft: #f8f9fa;
  --line: #e5e7eb;
  --primary: #6c5dd3;
  --green: #019b5f;
  --header-height: 105px;
  --shadow: 0 1.6rem 3rem rgb(0 0 0 / 10%);
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: Poppins, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body[data-theme='dark'] {
  --text: #ececf1;
  --muted: #a8a8b5;
  --surface: #1f2128;
  --surface-soft: #292c35;
  --line: #414450;
  --primary: #ab9fff;
  --shadow: 0 1.6rem 3rem rgb(0 0 0 / 20%);
  color-scheme: dark;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
a {
  color: var(--primary);
  text-underline-offset: 3px;
}
a:hover {
  color: #5543c7;
}
body[data-theme='dark'] a:hover {
  color: #c5bcff;
}
img,
svg {
  max-width: 100%;
}
button,
select,
input {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #a89cec;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h2 {
  font-size: 3rem;
  line-height: 1.2;
  font-weight: 600;
}
h3 {
  font-size: 1.7rem;
  line-height: 1.3;
  font-weight: 500;
}
[hidden] {
  display: none !important;
}
.sr-only,
.mi-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 500;
  padding: 12px 20px;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 10px;
}
.skip-link:focus {
  top: 12px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  border: 0;
  border-radius: 1rem;
  width: 3.4rem;
  height: 3.4rem;
  flex-shrink: 0;
}
.icon-button svg {
  width: 1.8rem;
  height: 1.8rem;
  fill: currentColor;
}
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100svh - var(--header-height) - 3rem);
  padding: 2rem 3rem;
  overflow: hidden;
}
.hero-art {
  position: relative;
  min-height: 540px;
  z-index: 1;
}
.hero-art img {
  position: absolute;
  top: 50%;
  inset-inline-start: 0;
  width: 85%;
  height: auto;
  transform: translate(5vw, -50%);
  object-fit: contain;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  max-width: 700px;
  width: 100%;
  padding: 3rem 1.2rem;
}
.hero-content h1 {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1.2;
  margin: 0 0 3rem;
  text-wrap: balance;
}
.hero-content h1 strong {
  font-weight: 700;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  color: #6c757d;
  font-size: 1rem;
  margin: 0 0 2rem;
}
.trust-badge img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.trust-badge strong {
  color: #495057;
}
body[data-theme='dark'] .trust-badge,
body[data-theme='dark'] .trust-badge strong {
  color: #d4d6df;
}
.hero-cta {
  display: inline-block;
  background: linear-gradient(135deg, #019b5f, #017a4c);
  color: white;
  text-decoration: none;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  font-size: 1.125rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgb(1 155 95 / 30%);
  transition: transform 0.2s, box-shadow 0.2s;
  margin: 0 0 1.5rem;
}
.hero-cta:hover {
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgb(1 155 95 / 40%);
}
.hero-or {
  font-size: 1.25rem;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 1.5rem;
}
.hero-discover {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 2rem;
}
.hero-discover a {
  color: #36abc9;
  text-decoration: none;
}
.hero-discover a:hover {
  text-decoration: underline;
}
.hero-drift {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  color: rgb(35 111 101 / 14%);
}
body[data-theme='dark'] .hero-drift {
  color: rgb(137 193 184 / 14%);
}
.drift {
  position: absolute;
  width: 38px;
  height: 38px;
  fill: currentColor;
  animation: drift-a 39s linear infinite;
}
.drift-1 {
  animation-delay: -2.7s;
  left: -5%;
  top: 18%;
}
.drift-2 {
  width: 34px;
  height: 34px;
  animation: drift-b 43s linear infinite -8.2s;
  left: 95%;
  top: 76%;
}
.drift-3 {
  width: 30px;
  height: 30px;
  animation: drift-c 35s linear infinite -10.9s;
  left: 22%;
  top: -8%;
}
.drift-4 {
  animation: drift-c 37s linear infinite reverse -15.5s;
  left: 78%;
  top: -8%;
}
.drift-5 {
  width: 30px;
  height: 30px;
  animation-delay: -18s;
  left: -5%;
  top: 64%;
}
.drift-6 {
  width: 28px;
  height: 28px;
  animation: drift-b 41s linear infinite -26.2s;
  left: 95%;
  top: 31%;
}
.drift-7 {
  width: 26px;
  height: 26px;
  animation: drift-c 36s linear infinite -27.4s;
  left: 72%;
  top: -8%;
}
.drift-8 {
  width: 32px;
  height: 32px;
  animation: drift-b 38s linear infinite -33.1s;
  left: 95%;
  top: 48%;
}
@keyframes drift-a {
  to {
    transform: translate(110vw, 35vh) rotate(46deg);
  }
}
@keyframes drift-b {
  to {
    transform: translate(-115vw, -35vh) rotate(-55deg);
  }
}
@keyframes drift-c {
  to {
    transform: translate(25vw, 115vh) rotate(44deg);
  }
}
#try_it,
.mi-content {
  margin-inline: 3rem;
}
#try_it {
  scroll-margin-top: calc(var(--header-height) + 2rem);
}
.mi-content-section {
  scroll-margin-top: calc(var(--header-height) + 2rem);
}
.site-footer {
  flex-wrap: wrap;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}
.homepage-language-links {
  flex-basis: 100%;
  text-align: start;
}
.homepage-language-links summary {
  cursor: pointer;
  width: fit-content;
  padding-block: 0.5rem;
}
.homepage-language-links nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-block: 0.5rem;
}
.homepage-language-links a {
  padding-block: 0.25rem;
}
.homepage-language-links a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
}
.site-footer div {
  display: flex;
  gap: 2rem;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 80;
  box-shadow: 0 4px 15px rgb(0 0 0 / 15%);
  font-size: 1.8rem;
  border: 1px solid var(--line);
}
dialog {
  max-height: 90svh;
  max-width: calc(100vw - 2rem);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: rgb(10 12 20 / 74%);
  backdrop-filter: blur(4px);
}
html[dir='rtl'] .hero-art img {
  transform: translate(-5vw, -50%);
}
@media (min-width: 1800px) {
  .hero-content {
    justify-self: center;
  }
}
@media (max-width: 1199px) {
  .hero {
    padding-inline: 2rem;
  }
  .hero-content {
    padding-inline: 0.5rem;
  }
  .hero-content h1 {
    font-size: 2.7rem;
  }
  #try_it,
  .mi-content {
    margin-inline: 2rem;
  }
}
@media (max-width: 991px) {
  .hero {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 24px;
    min-height: 0;
    padding: 40px 28px 24px;
  }
  .hero-art {
    min-height: 0;
    width: min(100%, 300px);
    margin-inline: auto;
  }
  .hero-art img,
  html[dir='rtl'] .hero-art img {
    position: static;
    display: block;
    width: 100%;
    transform: none;
  }
  .hero-content {
    max-width: 560px;
    margin: auto;
    padding: 0;
  }
  .hero-content h1 {
    font-size: 2.6rem;
    margin-bottom: 1.5rem;
  }
  .trust-badge {
    margin-bottom: 1.5rem;
  }
  .hero-cta {
    margin-bottom: 1rem;
  }
  .hero-or {
    margin-bottom: 1rem;
  }
  .hero-discover {
    margin-bottom: 0;
    font-size: 1.2rem;
  }
  .hero-drift {
    display: none;
  }
}
@media (max-width: 767px) {
  :root {
    --header-height: 80px;
  }
  .hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
    padding: 24px 22px 20px;
  }
  .hero-art {
    width: 144px;
  }
  .hero-content {
    padding: 0;
  }
  .hero-content h1 {
    font-size: clamp(2.25rem, 7.5vw, 2.6rem);
    line-height: 1.22;
  }
  .trust-badge {
    font-size: 0.92rem;
    padding: 0;
    margin-bottom: 1.5rem;
  }
  .hero-discover {
    font-size: 1.2rem;
  }
  .hero-cta {
    font-size: 1.15rem;
    padding: 1.1rem 2.8rem;
  }
  #try_it,
  .mi-content {
    margin-inline: 1.4rem;
  }
  h2 {
    font-size: 2.4rem;
  }
  .site-footer {
    padding: 2rem 1.4rem;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .site-footer div {
    gap: 1.3rem;
  }
}
/* Keep the primary action near the top on short phone screens. */
@media (max-width: 767px) and (max-height: 600px) {
  .hero-art {
    display: none;
  }
}
@media (max-width: 374px) {
  .hero-content h1 {
    font-size: 2.3rem;
  }
  .hero {
    padding-inline: 1.4rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-drift {
    display: none;
  }
}
@media print {
  .hero,
  .mi-content,
  .site-footer,
  .back-to-top,
  .skip-link {
    display: none !important;
  }
  :root {
    font-size: 12px;
  }
  body {
    background: white;
    color: black;
  }
  #try_it {
    margin: 0;
  }
}

/* Match the app's compact floating desktop header and centered 1320px page. */
@media (min-width: 992px) {
  .hero {
    max-width: 1320px;
    margin: auto;
    padding: 19.5px 9.75px 0;
    min-height: calc(100svh - 104px - 26px);
  }
  .hero-content {
    padding: 2rem 9.75px;
  }
  .hero-content h1 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .hero-art img {
    width: 85%;
  }
  .trust-badge {
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
  }
  .hero-discover a {
    color: #4d69fa;
  }
  #try_it,
  .mi-content {
    max-width: 1300.5px;
    margin-inline: auto;
  }
  .site-footer {
    margin: 0 19.5px 13px;
    padding: 0.75rem 19.5px;
    border-radius: 13px;
    background: var(--surface);
    box-shadow: 0 0.8rem 3rem rgb(0 0 0 / 5%);
  }
}
@media (min-width: 992px) and (max-width: 1399px) {
  #try_it,
  .mi-content {
    margin-inline: 3rem;
  }
}

/* Searchable language control. The native select remains as an integration fallback. */
.language-control.language-enhanced {
  padding: 0;
  background: transparent;
  flex-shrink: 0;
}
.language-control.language-enhanced #language-selector {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  max-width: 1px;
  padding: 0;
  margin: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}
.language-control .hello-language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 3.4rem;
  max-width: 170px;
  padding: 0 0.85rem;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.language-control .hello-language-trigger:hover {
  background: var(--line);
}
.language-control .hello-language-trigger[aria-expanded='true'] {
  background: var(--surface-soft);
  border-color: #c5c7cc;
}
.language-control .hello-language-trigger:focus-visible,
.hello-language-popover button:focus-visible {
  outline: 2px solid #a1a5af;
  outline-offset: 3px;
}
.language-control #hello-language-current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 105px;
}
.language-control .hello-language-trigger > svg:first-child {
  width: 1.55rem;
  height: 1.55rem;
  flex-shrink: 0;
  fill: currentColor;
}
.language-control .hello-language-trigger .hello-language-chevron {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: none;
  color: var(--muted);
  transition: transform 0.15s;
}
.language-control .hello-language-trigger[aria-expanded='true'] .hello-language-chevron {
  transform: rotate(180deg);
}
.hello-language-popover {
  position: fixed;
  z-index: 240;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
  width: min(320px, calc(100vw - 24px));
  max-height: min(420px, calc(100svh - 100px));
  padding: 12px 8px 8px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgb(20 23 32 / 16%);
  font-family: Poppins, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
}
.hello-language-popover .hello-language-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 6px 9px;
  font-size: 0.9rem;
  font-weight: 600;
}
.hello-language-popover .hello-language-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.hello-language-popover .hello-language-close:hover {
  background: var(--surface-soft);
}
.hello-language-popover .hello-language-search-wrap {
  position: relative;
  flex-shrink: 0;
  margin: 0 5px 8px;
}
.hello-language-popover .hello-language-search-wrap > svg {
  position: absolute;
  inset-inline-start: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.hello-language-popover #hello-language-search {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  padding-inline-start: 35px;
  border: 1px solid #d4d6dc;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  outline: none;
}
.hello-language-popover #hello-language-search:focus {
  border-color: #989da8;
  box-shadow: 0 0 0 2px rgb(128 134 149 / 12%);
  outline: none;
}
.hello-language-popover #hello-language-search::placeholder {
  color: var(--muted);
  opacity: 1;
}
.hello-language-popover .hello-language-options {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  list-style: none;
  padding: 0 3px;
  margin: 0;
}
.hello-language-popover .hello-language-options [role='option'] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 53px;
  padding: 9px 11px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}
.hello-language-popover .hello-language-options [role='option']:hover,
.hello-language-popover .hello-language-options .is-keyboard-active {
  background: var(--surface-soft);
}
.hello-language-popover .hello-language-options [aria-selected='true'] {
  background: #f1f3f5;
}
.hello-language-popover .hello-language-option-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.hello-language-popover .hello-language-native-name {
  font-size: 1.02rem;
  font-weight: 500;
  unicode-bidi: isolate;
}
.hello-language-popover .hello-language-english-name {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  unicode-bidi: isolate;
}
.hello-language-popover .hello-language-check {
  font-size: 1.25rem;
  color: #3d6850;
  min-width: 17px;
  font-weight: 600;
}
.hello-language-popover .hello-language-empty {
  margin: 0;
  padding: 22px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
body[data-theme='dark'] .hello-language-popover .hello-language-options [aria-selected='true'] {
  background: #343841;
}
body[data-theme='dark'] .hello-language-popover .hello-language-check {
  color: #a8d3b7;
}
body[data-theme='dark'] .hello-language-popover #hello-language-search {
  border-color: #535864;
}
body[data-theme='dark'] .language-control .hello-language-trigger[aria-expanded='true'] {
  border-color: #646977;
}
@media (max-width: 767px) {
  .language-control .hello-language-trigger {
    height: 3.25rem;
    max-width: 142px;
    padding-inline: 0.7rem;
    gap: 0.45rem;
  }
  .language-control #hello-language-current {
    max-width: 85px;
  }
  .hello-language-popover .hello-language-options [role='option'] {
    min-height: 55px;
  }
}
@media (max-width: 359px) {
  .language-control .hello-language-trigger {
    max-width: 124px;
    padding-inline: 0.55rem;
    gap: 0.35rem;
  }
  .language-control #hello-language-current {
    max-width: 69px;
  }
  .language-control .hello-language-trigger > svg:first-child {
    width: 1.3rem;
    height: 1.3rem;
  }
}

/* Let longer translated app links use two lines without moving the menu button. */
