/* v15 Hardware stage: enlarged focus key on the left, live example on the right.
   Overrides teaser.css layout only under .hw-teaser; does not edit theme or Bootstrap. */

.hw-teaser {
  /* Fluid 3:4 hero. The height budget keeps the key, picker and arrow on
     one screen at 1440×900 and 1024×768. A floor stops short/landscape
     viewports crushing the mockup. Thumbs stay a fixed fraction of the hero. */
  --hw-hero-min: 13.5rem;
  --hw-hero-max: 25.5rem;
  --hw-hero-budget: calc((100svh - var(--topbar) - var(--hw-pt) - max(var(--hw-pb), 5.75rem) - 11.25rem) * 0.75);
  --hw-hero: clamp(var(--hw-hero-min), min(var(--hw-hero-budget), 42vw), var(--hw-hero-max));
  --hw-thumb: calc(var(--hw-hero) / 3.55);
  padding-bottom: max(var(--hw-pb), 5.75rem);
}

.hw-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(min(16.5rem, 100%), 1.1fr);
  gap: clamp(1.25rem, 3vw, 2.75rem);
  align-items: stretch;
  width: min(100%, var(--lv-container, 1550px));
}

.hw-stage__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  container-type: inline-size;
  container-name: hwleft;
}

.hw-stage__right {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.4vh, 1.1rem);
  min-width: 0;
  min-height: 0;
  padding-top: clamp(0.35rem, 3vh, 2.2rem);
  padding-bottom: 1.25rem;
  justify-content: flex-start;
}

/* The three keys stay in one group: the selected one is the hero, the others sit under it. */
.hw-teaser .hw-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.65rem 0.85rem;
  padding-top: calc(var(--hw-hero) * 0.06);
  width: 100%;
}

.hw-teaser .hw-dev {
  width: var(--hw-thumb);
  order: 2;
}

.hw-teaser .hw-dev.is-on {
  /* Take the full row so the two picker keys sit together under the hero,
     not one beside it (max-width used to let a thumb sneak onto the hero row). */
  width: 100%;
  flex: 0 0 100%;
  order: 1;
  max-width: none;
}
.hw-teaser .hw-dev.is-on .hw-dev__stage {
  /* Prefer the left column width (100cqi) so tall/narrow tablets can grow
     the key; the height budget and max still keep one-screen laptop fits. */
  width: clamp(var(--hw-hero-min), min(var(--hw-hero-budget), 100cqi), var(--hw-hero-max));
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}
.hw-teaser .hw-dev:not(.is-on) {
  width: calc(clamp(var(--hw-hero-min), min(var(--hw-hero-budget), 100cqi), var(--hw-hero-max)) / 3.55);
}
.hw-teaser .hw-dev img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Hero is already large; cancel the old 1.3× step so the overlay map stays 1:1 with the photo. */
.hw-teaser .hw-dev.is-on .hw-dev__stage { transform: none; }
.hw-teaser .hw-dev:not(.is-on) .hw-dev__stage { transform: none; }
.hw-teaser .hw-dev:not(.is-on) img { filter: brightness(0.5) saturate(0.6); }
.hw-teaser .hw-dev:not(.is-on) .hw-dev__name { font-size: 0.75rem; letter-spacing: 0.12em; }
.hw-teaser .hw-dev.is-on .hw-dev__name {
  /* The product title under the stage already names the key; tuck this label up
     into the unused mask space under the plug so the thumbs sit closer. */
  font-size: clamp(0.95rem, 0.8rem + 0.4vw, 1.25rem);
  margin-top: calc(var(--hw-hero) * -0.16);
  margin-bottom: 0.15rem;
}

/* Example is a demonstration of the key, not a page card. No outer widget chrome. */
.hw-example {
  min-width: 0;
  width: 100%;
  flex: none;
  color: #e8eeea;
  container-type: inline-size;
  container-name: hwex;
}

.hw-example__panel {
  box-sizing: border-box;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.hw-example__stage { min-height: 0; }

.hw-demo {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.hw-demo__cap {
  margin: 0 0 0.35rem;
  font: 500 0.72rem/1.2 Inter, "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a9a93;
}
.hw-demo__key,
.hw-demo__screen { min-width: 0; }

/* Device-bezel close-up: a nearly square magnified 0.91" screen, not a wide card. */
.hw-demo__key {
  width: min(100%, clamp(10rem, 52cqi, 19rem));
  max-width: 100%;
  position: relative;
}
/* The connector line was for the split "On your screen" layout. The right-hand
   slot is now a single enlarged view of the key, so the line is not drawn. */
.hw-demo__key::before { display: none; }
.hw-bezel {
  box-sizing: border-box;
  padding: 0.8rem;
  background: #141c19;
  border: 1px solid #2a332f;
  border-radius: 8px;
}
.hw-bezel__glass {
  background: #050907;
  border-radius: 5px;
  overflow: hidden;
  aspect-ratio: 1 / 0.96;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 0 1px rgba(127, 207, 162, 0.06);
}
@media (min-width: 768px) {
  .hw-demo.is-split {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    gap: clamp(0.55rem, 1.6cqi, 1rem) clamp(0.7rem, 2cqi, 1.15rem);
    align-items: start;
  }
  .hw-demo.is-split .hw-demo__key {
    width: clamp(8.25rem, 38cqi, 15.5rem);
    max-width: 100%;
  }
  .hw-demo.is-split .hw-bezel { padding: clamp(0.4rem, 1.6cqi, 0.7rem); height: auto; }
  .hw-demo.is-split .hw-bezel__glass {
    aspect-ratio: 1 / 0.96;
    height: auto;
    width: 100%;
    min-height: 0;
  }
}

/* Plain browser frame: three identical gunmetal dots, no brand colours or name. */
.hw-browser {
  box-sizing: border-box;
  border: 1px solid #2c3833;
  border-radius: 4px;
  background: #111a17;
  overflow: hidden;
}
.hw-browser__bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.7rem;
  border-bottom: 1px solid #2a332f;
  background: #0d1411;
}
.hw-browser__dots {
  display: flex;
  gap: 0.28rem;
  flex: none;
}
.hw-browser__dots i {
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #5a6a63;
}
.hw-browser__url {
  min-width: 0;
  font: 500 0.78rem/1.2 Inter, "Segoe UI", sans-serif;
  color: #8a9a93;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hw-browser__body { padding: 0.85rem 0.95rem 0.9rem; }

/* One shared on-screen frame for HID, OLED and FIDO-LV so the slot does not jump. */
.hw-demo__screen {
  width: 100%;
  max-width: 100%;
}
.hw-teaser .hw-browser {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: clamp(14.25rem, 44cqi, 16.75rem);
  min-height: clamp(14.25rem, 44cqi, 16.75rem);
}
.hw-teaser .hw-browser__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hw-teaser .hw-login,
.hw-teaser .hw-fido {
  flex: 1 1 auto;
  justify-content: center;
}

.hw-login,
.hw-fido,
.hw-recentex {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hw-login__kicker,
.hw-fido__origin {
  margin: 0;
  font: 500 0.82rem/1.3 Inter, "Segoe UI", sans-serif;
  color: #8a9a93;
}

.hw-login__title,
.hw-fido__title {
  margin: 0;
  font: 650 1.15rem/1.25 Manrope, Inter, "Segoe UI", sans-serif;
  letter-spacing: -0.015em;
  color: #f5f7f6;
}

.hw-login__label {
  margin: 0.15rem 0 0;
  font: 500 0.8rem/1.3 Inter, "Segoe UI", sans-serif;
  color: #b7c2bb;
}

.hw-login__field {
  display: flex;
  align-items: center;
  min-height: 2.55rem;
  padding: 0.4rem 0.75rem;
  border-radius: 3px;
  border: 1px solid #2a3d34;
  background: #0a100e;
  font: 600 1.15rem/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: #f5f7f6;
}

.hw-login__field.is-done { border-color: rgba(127, 207, 162, 0.55); }

.hw-caret {
  display: inline-block;
  width: 0.08em;
  height: 1.05em;
  margin-left: 0.06em;
  background: #7fcfa2;
  vertical-align: -0.12em;
  animation: hw-caret 1s steps(1) infinite;
}
.hw-caret[hidden] { display: none !important; }
@keyframes hw-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hw-ex__status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.25rem;
  margin: 0.15rem 0 0;
  font: 500 0.88rem/1.3 Inter, "Segoe UI", sans-serif;
  color: #8a9a93;
}
.hw-ex__status.is-ok { color: #c9ecd9; }
.hw-ex__status.is-ok::after {
  content: "";
  display: inline-block;
  width: 0.34em;
  height: 0.62em;
  margin-left: 0.22em;
  border-right: 0.12em solid currentColor;
  border-bottom: 0.12em solid currentColor;
  transform: rotate(45deg);
  vertical-align: 0.02em;
}

.hw-ex__led {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #1a2a22;
  box-shadow: inset 0 0 0 1px #2a3d34;
  flex: none;
}
.hw-ex__led.is-on {
  background: #7fcfa2;
  box-shadow: 0 0 6px 1px rgba(127, 207, 162, 0.65);
}
.hw-ex__led.is-blink {
  background: #7fcfa2;
  box-shadow: 0 0 6px 1px rgba(127, 207, 162, 0.65);
  animation: hw-ledblink 0.7s ease-in-out infinite;
}

.hw-fido__box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.15rem;
  padding: 0.75rem 0.8rem;
  border-radius: 4px;
  border: 1px solid #2a3d34;
  background: #0a100e;
}
.hw-fido__glyph {
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
  color: #7fcfa2;
}
.hw-fido__msg {
  margin: 0;
  font: 500 0.9rem/1.4 Inter, "Segoe UI", sans-serif;
  color: #b7c2bb;
}

/* OLED Recent close-up, same ramp and rows as the device, at a readable size. */
.hw-recentex {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.7rem 0.75rem 0.65rem;
  height: 100%;
  min-height: 0;
}
.hw-recentex.is-dark .hw-recentex__inner { opacity: 0; }
.hw-recentex__inner { opacity: 1; transition: opacity 280ms ease; }

/* On-key code close-up, same type as the 0.91" overlay, at a readable size. */
.hw-codeex {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: 0.35rem;
  height: 100%;
  min-height: 0;
  padding: 0.85rem 0.8rem 0.8rem;
  box-sizing: border-box;
}
.hw-codeex__site {
  margin: 0;
  width: 100%;
  font: 600 0.92rem/1.2 Manrope, Inter, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  color: #7fcfa2;
  text-align: center;
}
.hw-codeex__digits {
  margin: 0;
  font: 650 clamp(1.25rem, 9cqi, 1.7rem)/1 Manrope, Inter, "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: #c9ecd9;
}
.hw-codeex__bar {
  width: 100%;
  height: 0.28rem;
  margin-top: 0.15rem;
  background: rgba(127, 207, 162, 0.18);
  border-radius: 1px;
  overflow: hidden;
}
.hw-codeex__barfill {
  display: block;
  height: 100%;
  background: #7fcfa2;
  transition: width 1s linear;
}
.hw-recentex__head {
  margin: 0 0 0.45rem;
  font: 600 0.82rem/1 Manrope, Inter, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  color: #7fcfa2;
}
.hw-recentex__list {
  height: clamp(5.4rem, 38cqi, 7.5rem);
  overflow: hidden;
  container-type: size;
}
.hw-recentex__track { display: block; transition: transform 220ms ease; }
.hw-recentex__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  height: clamp(1.85rem, 12.5cqi, 2.45rem);
  margin: 0;
  padding: 0 0.45rem;
  box-sizing: border-box;
  font: 600 clamp(0.82rem, 5.4cqi, 1.02rem)/1 Manrope, Inter, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  color: #7fcfa2;
  white-space: nowrap;
  overflow: hidden;
  border-radius: 3px;
}
.hw-recentex__row .hw-recentex__name { color: rgba(127, 207, 162, 0.72); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hw-recentex__row.is-hi { background: rgba(127, 207, 162, 0.18); }
.hw-recentex__row.is-hi .hw-recentex__name { color: #c9ecd9; }
.hw-recentex__when {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0;
  font-size: 0.92rem;
}
.hw-recentex__when.age-1 { color: #7fcfa2; }
.hw-recentex__when.age-2 { color: #a8c99a; }
.hw-recentex__when.age-3 { color: #c6c48c; }
.hw-recentex__when.age-4 { color: #d6b97e; }
.hw-recentex__when.age-5 { color: #d9a872; }
.hw-recentex__when.age-6 { color: #c99568; }


/* LED and status sit inside the same bezel/glass as the OLED projection,
   so the enlarged frame does not change size between keys. No outer glow. */
.hw-bezel__glass > .hw-proj,
.hw-proj {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.hw-proj__led {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #1a2a22;
  box-shadow: inset 0 0 0 1px #2a3d34;
  flex: none;
}
.hw-proj__led.is-on {
  background: #7fcfa2;
  box-shadow: inset 0 0 0 1px #5aa67a;
}
.hw-proj__led.is-blink {
  background: #7fcfa2;
  box-shadow: inset 0 0 0 1px #5aa67a;
  animation: hw-ledblink 0.7s ease-in-out infinite;
}
.hw-proj__msg {
  margin: 0;
  font: 500 0.95rem/1.3 Inter, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  color: #c9d2cd;
}
/* Keep definition paragraphs from leaving a single word on the last line. */
.hw-teaser .hw-info__lead,
.hw-teaser .hw-info__body p {
  text-wrap: pretty;
}

/* Product copy sits under the example, left-aligned in the right column. */
.hw-teaser .hw-info {
  display: grid;
  width: 100%;
  text-align: left;
  margin-top: auto;
}
.hw-teaser .hw-info__panel {
  text-align: left;
}
.hw-teaser .hw-info__title {
  font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.7rem);
  line-height: 1.25;
  margin: 0;
}
.hw-teaser .hw-info__sub {
  font-size: clamp(0.95rem, 0.88rem + 0.2vw, 1.15rem);
  line-height: 1.45;
  margin-top: 0.35em;
}
.hw-teaser .hw-info__lead {
  margin-top: 0.8em;
  font-size: clamp(0.95rem, 0.9rem + 0.18vw, 1.12rem);
  line-height: 1.45;
}
.hw-teaser .hw-info__body {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85em;
  margin-top: 0.85em;
  text-align: left;
}
.hw-teaser .hw-info__body p {
  margin: 0;
  font-size: clamp(0.9rem, 0.84rem + 0.16vw, 1.05rem);
  line-height: 1.65;
}
@media (max-width: 767.98px) {
  .hw-teaser {
    --hw-hero-min: 14.5rem;
    --hw-hero-max: 20.5rem;
    --hw-hero: clamp(14.5rem, min(78vw, 42svh), 20.5rem);
    --hw-thumb: calc(var(--hw-hero) / 3.55);
    padding-bottom: max(var(--hw-pb), 5.25rem);
  }
  .hw-stage {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
  .hw-stage__left { order: 1; }
  .hw-stage__right { order: 2; padding-top: 0.15rem; gap: 0.95rem; min-height: 0; }
  .hw-teaser .hw-dev.is-on .hw-dev__stage { width: var(--hw-hero); }
  .hw-teaser .hw-dev:not(.is-on) { width: var(--hw-thumb); }
  .hw-demo__key::before { display: none; }
  .hw-demo__key { width: min(100%, clamp(12rem, 78cqi, 17.5rem)); }
  .hw-teaser .hw-info__title { font-size: clamp(1.2rem, 5.4vw, 1.55rem); }
}

/* Tighter type on short laptop screens so the slide does not overflow.
   Sizes stay on the same clamp scale — no hard rem jumps. */
@media (max-height: 820px) and (min-width: 768px) {
  /* Keep 5.75rem arrow reserve; trim right-column padding so looser type still fits 1024×768. */
  .hw-stage__right { padding-top: 0.35rem; padding-bottom: 0.1rem; gap: 0.45rem; }
  .hw-demo { gap: 0.55rem; }
  .hw-browser__body { padding: 0.65rem 0.75rem 0.7rem; }
  .hw-login__field { min-height: 2.2rem; }
  .hw-teaser .hw-info__title { font-size: clamp(1.15rem, 1rem + 0.4vw, 1.45rem); }
  .hw-teaser .hw-info__sub { margin-top: 0.3em; }
  .hw-teaser .hw-info__lead { margin-top: 0.7em; line-height: 1.45; }
  .hw-teaser .hw-info__body { margin-top: 0.75em; gap: 0.75em; }
  .hw-teaser .hw-info__body p { font-size: 0.9rem; line-height: 1.6; }
}

/* Short landscape (e.g. 844×390): a 3:4 hero cannot share one screen with
   the example, copy and arrow. Keep mockups readable and let the section scroll. */
@media (max-height: 520px) and (min-width: 700px) {
  .hw-teaser {
    --hw-hero-min: 11.75rem;
    --hw-hero-max: 16rem;
    --hw-hero-budget: 16rem;
    --hw-hero: clamp(11.75rem, 26vw, 16rem);
    --hw-thumb: calc(var(--hw-hero) / 3.55);
    min-height: 0;
    padding-bottom: 5rem;
  }
  .hw-stage__right { min-height: 0; padding-top: 0.15rem; gap: 0.45rem; }
  .hw-teaser .hw-dev.is-on .hw-dev__stage {
    width: clamp(11.75rem, min(16rem, 100cqi), 16rem);
  }
}
