/* Home page (templates/site/home.html) */

/* ---------- hero ---------- */
.hh { padding: 84px 0 112px; }
.hh-in { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 56px; align-items: center; }
.hh h1 { font-size: clamp(38px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.03em; }
.hh-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #e3eeff;
  font: 500 14px/1.3 var(--font-head);
}
.hh-badge i, .hd-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5ee0a8;
  animation: pulse-badge 2.2s ease-out infinite;
}
@keyframes pulse-badge {
  0% { box-shadow: 0 0 0 0 rgba(94, 224, 168, 0.6); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(94, 224, 168, 0); }
}
.hh-lead { max-width: 52ch; margin-top: 22px; color: rgba(255, 255, 255, 0.85); font-size: clamp(17px, 1.6vw, 19.5px); line-height: 1.7; }
.hh-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; }
.hh-chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font: 500 14px/1 var(--font-head);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.hh-chips a:hover { color: #fff; background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.32); }
.hh-chips .tile { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.hh-chips .tile .ic { width: 15px; height: 15px; }

/* ---------- live reading of this device ---------- */
.hd {
  padding: 22px;
  border-radius: 24px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 44px 90px -34px rgba(2, 16, 38, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.hd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 4px 6px 18px; border-bottom: 1px solid var(--line); }
.hd-head h2 { font-size: 19px; font-weight: 600; line-height: 1.3; }
.hd-head p { margin-top: 4px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.hd-live {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--pass) 13%, transparent);
  color: var(--pass);
  font: 600 12.5px/1.5 var(--font-head);
}
.hd-rows { display: grid; gap: 2px; margin: 10px 0 16px; padding: 0; list-style: none; }
.hd-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 8px;
  align-items: center;
  gap: 14px;
  padding: 9px 10px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s;
}
.hd-row:hover { color: inherit; background: var(--blue-soft); }
.hd-row .tile { width: 36px; height: 36px; border-radius: 11px; }
.hd-row .tile .ic { width: 19px; height: 19px; }
.hd-k { color: var(--muted); font-size: 15.5px; }
.hd-v { color: var(--ink); font: 600 15.5px/1.35 var(--font-head); font-variant-numeric: tabular-nums; text-align: end; }
.hd-v kbd {
  display: inline-block;
  min-width: 30px;
  padding: 1px 9px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  border-bottom-width: 3px;
  background: var(--bg-alt);
  color: var(--ink);
  font: 600 14px/1.5 var(--font-head);
  text-align: center;
}
.hd-v kbd.is-new { animation: key-in 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes key-in { from { transform: translateY(3px) scale(0.85); } }
.hd-row.is-idle .hd-v { color: var(--muted-2); font-weight: 400; font-family: var(--font); }
/* while a value is being read: a soft moving bar */
.hd-row.is-wait .hd-v::before {
  content: "";
  display: inline-block;
  width: 84px;
  height: 10px;
  border-radius: 6px;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--line) 0%, var(--line-2) 50%, var(--line) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
html:not(.js) .hd-row.is-wait .hd-v::before { display: none; }
html:not(.js) .hd-row .hd-v::after { content: "Open the test"; color: var(--blue); font-weight: 500; }
.hd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: background-color 0.3s, box-shadow 0.3s; }
.hd-row.is-ok .hd-dot { background: var(--pass); box-shadow: 0 0 0 4px color-mix(in oklab, var(--pass) 18%, transparent); }
.hd-row.is-idle .hd-dot { background: var(--muted-2); }
.hd-row.is-ok .hd-v { animation: value-in 0.35s ease-out; }
@keyframes value-in { from { opacity: 0; transform: translateX(6px); } }
.hd-all { width: 100%; }

/* ---------- every test ---------- */
.hm-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -18px 0 34px; }
.hm-filter button {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--text);
  font: 500 14.5px/1 var(--font-head);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.hm-filter button:hover { border-color: var(--blue-line); color: var(--blue); }
.hm-filter button[aria-pressed="true"] { border-color: transparent; background: var(--grad); color: #fff; }

.hm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.hm-card { display: flex; flex-direction: column; align-items: flex-start; padding: 24px 22px 22px; }
.hm-card .tile { width: 50px; height: 50px; margin-bottom: 18px; border-radius: 15px; }
.hm-card .tile .ic { width: 26px; height: 26px; }
.hm-card-title { color: var(--ink); font: 600 17.5px/1.3 var(--font-head); }
a.hm-card:hover .hm-card-title { color: var(--blue); }
.hm-card-desc {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.hm-kind {
  margin-top: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--kind, #47c6e8) 14%, transparent);
  color: color-mix(in oklab, var(--kind, #47c6e8) 70%, var(--ink));
  font: 600 12px/1.6 var(--font-head);
}
.hm-card-desc + .hm-kind { margin-top: 14px; }
/* Test Everything: the large blue card */
.hm-feature {
  position: relative;
  isolation: isolate;
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 34px;
  overflow: hidden;
  border: 0;
  background: var(--grad-hero);
  color: #fff;
}
.hm-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(380px 260px at 85% 0%, rgba(120, 190, 255, 0.35), transparent 70%),
    url("../../assets/circuit.svg") center / 360px repeat;
}
a.hm-feature:hover { color: #fff; box-shadow: var(--shadow-lift); }
.hm-feature > .tile { width: 64px; height: 64px; border-radius: 19px; }
.hm-feature > .hm-f-logo { background: none; box-shadow: none; }
.hm-f-logo img { width: 64px; height: 64px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35)); }
.hm-feature > .tile .ic { width: 34px; height: 34px; }
.hm-f-title { margin-top: 26px; color: #fff; font: 700 clamp(26px, 2.6vw, 32px)/1.15 var(--font-head); letter-spacing: -0.015em; }
.hm-f-desc { max-width: 34ch; margin-top: 10px; color: rgba(255, 255, 255, 0.85); font-size: 17px; line-height: 1.6; }
.hm-f-tiles { display: flex; margin-top: auto; padding-top: 30px; }
.hm-f-tiles .tile { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 0 0 3px #11477f, inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.hm-f-tiles .tile + .tile { margin-inline-start: -8px; }
.hm-f-tiles .tile .ic { width: 21px; height: 21px; }
.hm-f-go { margin-top: 24px; pointer-events: none; }
a.hm-feature:hover .hm-f-go { transform: translateY(-2px); }
/* the wide strip version (3 x 1): logo, text, then the icons and the button */
.hm-feature.is-wide {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo title tiles" "logo desc go";
  align-items: center;
  column-gap: 28px;
  padding: 30px 34px;
}
.hm-feature.is-wide > .tile { grid-area: logo; }
.hm-feature.is-wide .hm-f-title { grid-area: title; align-self: end; margin-top: 0; }
.hm-feature.is-wide .hm-f-desc { grid-area: desc; align-self: start; max-width: 46ch; }
.hm-feature.is-wide .hm-f-tiles { grid-area: tiles; align-self: end; justify-self: end; padding-top: 0; }
.hm-feature.is-wide .hm-f-go { grid-area: go; align-self: start; justify-self: end; margin-top: 16px; }
.hm-noscript { text-align: center; }

/* ---------- why ---------- */
.hm-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.hm-why li { padding: 34px 30px 32px; }
.hm-why h3 { margin-top: 24px; font-size: 19.5px; font-weight: 600; line-height: 1.3; }
.hm-why p { margin-top: 10px; color: var(--text); }

/* ---------- questions ---------- */
.hm-faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px 72px; align-items: start; }
.hm-faq .sec-head { margin-bottom: 0; }
.hm-faq .sec-head .btn { margin-top: 30px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .hm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .hh { padding: 64px 0 88px; }
  .hh-in { grid-template-columns: 1fr; gap: 48px; }
  .hd { max-width: 560px; }
  .hm-why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-faq { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .hm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .hm-feature { grid-row: auto; padding: 28px 24px; }
  .hm-card { padding: 20px 18px; }
  .hm-why { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
  .hh { padding: 48px 0 72px; }
  .hh-badge { font-size: 13px; }
  .hd { padding: 16px; border-radius: 20px; }
  .hd-row { gap: 12px; padding: 9px 6px; }
  .hd-head p { display: none; }
  .hm-grid { gap: 10px; }
  .hm-card { padding: 16px 14px; border-radius: var(--r-md); }
  .hm-card .tile { width: 42px; height: 42px; margin-bottom: 12px; border-radius: 13px; }
  .hm-card .tile .ic { width: 22px; height: 22px; }
  .hm-card-title { font-size: 15.5px; }
  .hm-card-desc { font-size: 13.5px; -webkit-line-clamp: 3; line-clamp: 3; }
  .hm-why { gap: 12px; }
  .hm-why li { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 18px; padding: 22px 20px; }
  .hm-why .ic-circle { grid-row: span 2; width: 52px; height: 52px; }
  .hm-why .ic-circle svg { width: 24px; height: 24px; }
  .hm-why h3 { margin-top: 2px; font-size: 18px; }
  .hm-why p { margin-top: 4px; font-size: 15.5px; line-height: 1.6; }
}
