/* iprop.store visual layer, modelled on the Infinite Props website
   (../infinite-props/website/src/styles/site.css): one dark theme, the same
   design tokens, sticky translucent header, yellow accent, hero gradient,
   tiles, pills, buttons and footer. Store-specific parts (forms, tables,
   carts, panels) follow the same tokens. */

:root {
  color-scheme: dark;
  --bg: #161a1f;
  --bg-deep: #13161a;
  --surface: #1d232a;
  --surface-2: #222b33;
  --line: #2c3946;
  --line-strong: #3f5970;
  --text: #edf0f2;
  --text-dim: #9fb2c4;
  --text-mute: #7d93a8;
  --accent: #f5d90a;
  --accent-ink: #1c1500;
  --accent-soft: rgba(245, 217, 10, 0.12);
  --code-bg: #101317;
  --danger: #ffb86b;
  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 3.5rem;
  --gutter: 1rem;
  --container: 72rem;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --hero-gradient: linear-gradient(to top left, #4cddff, #3b9aca 10%, #2d6ca5 20%, #2a5291 27%, #283d81 35%, #222654 50%, #1e1635 63%, #0c0010 93%, #000);
}

@media (min-width: 40rem) { :root { --gutter: 1.5rem; } }
@media (min-width: 64rem) { :root { --gutter: 2rem; } }

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main {
  flex: 1;
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  padding-block: 2rem 4rem;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

code, kbd, pre { font-family: var(--font-mono); }
pre {
  padding: 1rem 1.15rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: #d5dbe2;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
}
h2 {
  margin: 2.25rem 0 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
}
h3 { margin: 1.6rem 0 0.6rem; font-size: 1.12rem; font-weight: 600; }
p { margin: 0.8rem 0; }
ul, ol { padding-left: 1.3rem; }
li { margin: 0.3rem 0; }
li::marker { color: var(--text-mute); }
small { color: var(--text-dim); }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

/* ---- the logo ------------------------------------------------------------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
}
.logo__mark {
  width: 2.1rem;
  height: auto;
  fill: var(--accent);
  shape-rendering: crispEdges;
}
.logo__type {
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.logo__type b { font-weight: 700; }

/* ---- the header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  color: #fff;
  background: rgba(19, 22, 26, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}
.site-header .logo { margin-right: auto; }

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a, .site-nav button {
  position: relative;
  padding: 0 0.75rem;
  line-height: var(--header-h);
  color: #fff;
  background: none;
  border: 0;
  font-size: 0.92rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.85rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a:hover, .site-nav button:hover { color: var(--accent); }

.nav-toggle, .nav-backdrop { display: none; }

@media (max-width: 63.99rem) {
  .js .nav-toggle {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 1.6rem;
    height: 1.15rem;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .js .nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(0.51rem) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-0.51rem) rotate(-45deg); }

  .js .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: min(17rem, 85vw);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: calc(var(--header-h) + 1rem) 1.25rem 1.5rem;
    background: var(--bg-deep);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
    overflow-y: auto;
  }
  .js .site-nav a, .js .site-nav button { line-height: 3rem; padding: 0 0.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.06); text-align: left; width: 100%; }
  .js .site-nav a::after { display: none; }
  .nav-open .site-header {
    background: var(--bg-deep);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nav-open .site-nav { transform: none; visibility: visible; }
  .nav-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
  }
  .nav-open { overflow: hidden; }

  html:not(.js) .site-header { height: auto; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: 0.5rem; }
  html:not(.js) .site-nav { width: 100%; overflow-x: auto; }
  html:not(.js) .site-nav a, html:not(.js) .site-nav button { line-height: 2.5rem; }
}

/* ---- buttons --------------------------------------------------------------- */

.buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }

button, .button, .btn, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.3rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: transparent;
  font: 600 0.82rem/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
button:hover, .button:hover, .btn:hover, input[type="submit"]:hover { border-color: var(--accent); color: var(--accent); }
button:active, .button:active, .btn:active { transform: translateY(1px); }
.btn--primary, button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover, button.primary:hover { background: #ffe94d; border-color: #ffe94d; color: var(--accent-ink); }
form.inline { display: inline; }
form.inline button { min-height: 2.2rem; padding: 0 0.9rem; }

.pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 0.68rem/1.6 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---- the home hero ------------------------------------------------------------ */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  margin-top: 1.5rem;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 2.5rem);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  text-align: center;
  color: #fff;
  background-image: var(--hero-gradient);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 70%);
}
.hero__mark {
  width: clamp(6rem, 13vw, 9.5rem);
  margin: 0 auto 1.6rem;
  fill: var(--accent);
  shape-rendering: crispEdges;
  filter: drop-shadow(0 0 22px rgba(245, 217, 10, 0.35));
}
.hero__title {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.hero__title b { font-weight: 700; }
.hero__accent { font-weight: 700; color: var(--accent); }
.hero__tagline {
  max-width: 36rem;
  margin: 1.1rem auto 0;
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}
.hero__meta {
  margin: 1.4rem 0 0;
  font: 0.8rem/1.5 var(--font-mono);
  color: rgba(255, 255, 255, 0.6);
}
.hero .buttons { justify-content: center; margin-top: 2rem; }

/* ---- the numbers under the hero ------------------------------------------------- */

.stats {
  margin-inline: calc(50% - 50vw);
  padding-inline: max(var(--gutter), calc(50vw - var(--container) / 2));
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--bg-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
}
@media (min-width: 56rem) { .stats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}
.stat__value {
  color: #fff;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 300;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat__label { color: var(--text-dim); font-size: 0.88rem; line-height: 1.45; }

/* ---- sections ----------------------------------------------------------------- */

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font: 600 0.75rem/1.4 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lead {
  margin: 0;
  max-width: 44rem;
  color: var(--text-dim);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  line-height: 1.7;
}

/* ---- asset tiles (catalog, similar, library) ----------------------------------- */

.tiles {
  display: grid;
  gap: 1rem;
  margin-block: 1.25rem 2rem;
}
@media (min-width: 40rem) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.25s ease;
}
.tile:hover, .tile:focus-within { border-color: var(--line-strong); }
.tile__stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  padding: 1.4rem 1rem 1rem;
  background-color: var(--surface);
  background-image:
    linear-gradient(45deg, var(--surface-2) 25%, transparent 25%),
    linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--surface-2) 75%),
    linear-gradient(-45deg, transparent 75%, var(--surface-2) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  text-align: center;
}
.tile__glyph {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(245, 217, 10, 0.35);
}
.tile__file {
  position: absolute;
  top: 0.6rem;
  left: 0.7rem;
  right: 0.7rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--text-mute);
  font: 0.72rem/1.4 var(--font-mono);
  pointer-events: none;
}
.tile__body { display: flex; flex-direction: column; gap: 0.45rem; flex: 1; padding: 0.9rem 1rem 1rem; }
.tile__name { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
.tile__name a { color: var(--text); text-decoration: none; }
.tile__name a:hover { color: var(--accent); }
.tile__desc { margin: 0; color: var(--text-dim); font-size: 0.92rem; line-height: 1.55; }
.tile__meta { margin-top: auto; color: var(--text-mute); font: 0.78rem/1.5 var(--font-mono); }
.tile__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.6rem 0.6rem 1rem;
  border-top: 1px solid var(--line);
  background: rgba(19, 22, 26, 0.35);
}
.tile__price { font-size: 1rem; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.tile__price.free { color: var(--accent); }

/* ---- cards and panels ------------------------------------------------------------ */

.card {
  padding: 1.25rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.card h3 { margin-top: 0; }

.notice {
  margin: 1rem 0;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
  color: var(--text);
}
.notice.error, p.error { border-left-color: var(--danger); color: var(--danger); }

/* ---- forms ------------------------------------------------------------------------ */

label { display: inline-block; margin: 0.35rem 0.6rem 0.35rem 0; color: var(--text-dim); font-size: 0.95rem; }
input, select, textarea {
  min-height: 2.5rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: 0.95rem var(--font-sans);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 5rem; vertical-align: top; }
input[type="checkbox"], input[type="radio"] { min-height: auto; accent-color: var(--accent); }
fieldset {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
legend { padding: 0 0.4rem; color: var(--text); font-weight: 600; }

/* ---- definition lists and tables ---------------------------------------------------- */

dl {
  display: grid;
  grid-template-columns: minmax(9rem, auto) 1fr;
  gap: 0.35rem 1.25rem;
  margin: 1rem 0 1.5rem;
}
dt { color: var(--text-mute); font-size: 0.9rem; }
dd { margin: 0; color: var(--text); }

table {
  width: 100%;
  margin: 1rem 0 2rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
td { background: rgba(19, 22, 26, 0.25); }
tr:hover td { background: var(--surface); }

/* ---- the page title band for inner pages --------------------------------------------- */

.page-head {
  position: relative;
  isolation: isolate;
  margin-inline: calc(50% - 50vw);
  padding: clamp(2.5rem, 6vw, 4rem) max(var(--gutter), calc(50vw - var(--container) / 2)) clamp(2rem, 5vw, 3rem);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(to top left, #2a5291 0%, #283d81 18%, #222654 42%, #1e1635 70%, #13161a 100%);
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 75%);
  mask-image: linear-gradient(to left, #000, transparent 75%);
}
.page-head h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); }
.page-head p { max-width: 42rem; margin: 0.8rem 0 0; color: rgba(255, 255, 255, 0.8); font-size: 1.08rem; font-weight: 300; }

/* ---- the footer ------------------------------------------------------------------------ */

.site-footer {
  padding: 3.5rem 0 1.75rem;
  background: var(--bg-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-size: 0.92rem;
}
.site-footer__grid { display: grid; gap: 2.25rem 2rem; }
@media (min-width: 40rem) { .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .site-footer__brand { grid-column: 1 / -1; } }
@media (min-width: 64rem) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .site-footer__brand { grid-column: auto; } }
.site-footer__brand p { max-width: 20rem; margin: 0.9rem 0 0; line-height: 1.6; }
.site-footer h2 {
  margin: 0 0 0.9rem;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-footer ul { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.site-footer a:not(.logo) { color: var(--text-dim); text-decoration: none; }
.site-footer a:not(.logo):hover { color: #fff; text-decoration: underline; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 2.75rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.85rem;
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom .logo__type { font-size: 1rem; color: #fff; }

/* ---- code and long-form ------------------------------------------------------------------ */

code {
  padding: 0.12em 0.38em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-size: 0.86em;
}
pre code { padding: 0; border: 0; background: none; }

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


/* ---- the category strip under the header (store) ------------------------------ */

.category-strip {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--bg-deep);
}
.category-strip__inner {
  display: flex;
  gap: 0.25rem;
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  padding-block: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-strip__inner::-webkit-scrollbar { display: none; }
.category-strip a {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.88rem;
  white-space: nowrap;
  text-decoration: none;
}
.category-strip a:hover { background: var(--accent-soft); color: var(--accent); }
.category-strip a:first-child { color: var(--text); font-weight: 600; }

/* ---- the catalog filter panel (store) ------------------------------------------ */

.filter-panel {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
@media (min-width: 64rem) {
  .filter-panel { grid-template-columns: 2fr 1fr 1fr 1fr auto; align-items: end; }
}
.filter-panel input, .filter-panel select { width: 100%; background: var(--bg-deep); }
