/* Landing: three keys, character-select style (owner t1306u–t1323u). Inside the owner's container (max 1550px), never wider. */
.hw-teaser {
  --hw-pt: clamp(0.75rem, 3vh, 3rem);
  --hw-pb: clamp(1.5rem, 5vh, 4.5rem);
  --hw-gap: clamp(1rem, 3.5vh, 3rem);
  /* base (dimmed) device frame width; the selected one steps forward to 1.3x */
  /* v10: also capped so the row, incl. the 1.3x selected key, stays inside the owner's 1550px container */
  --hw-w: min(calc((100svh - var(--topbar) - var(--hw-pt) - 26rem - 3vw) / 1.8), 27vw, 36rem, calc((var(--lv-container, 1550px) - 1.5rem) / 3.46));
  --hw-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--hw-gap);
  padding: calc(var(--topbar) + var(--hw-pt)) clamp(0.75rem, 3vw, 6rem) var(--hw-pb);
  /* v9 (t1379u): no own backdrop, so the site's circuit background runs through page 1, Hardware and Get in touch
     without a seam. The soft glow behind the keys is the ::before below. */
  background: none;
  overflow-x: clip;
  overflow-y: visible;
}

/* Section heading: same style as the home contact heading. */
.hw-teaser__title { margin: 0; font-size: clamp(1.8rem, 2.6vw, 2.4rem); letter-spacing: -0.02em; text-align: center; }

/* The row: three keys standing side by side. */
.hw-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: calc(var(--hw-w) * 0.08);
  padding-top: calc(var(--hw-w) * 0.42);
  width: 100%;
}
.hw-dev {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  width: var(--hw-w);
  margin: 0;
  padding: 0 0 0.25rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: 1;
}
.hw-dev.is-on { z-index: 2; }
.hw-dev:focus-visible { outline: none; }
.hw-dev:focus-visible .hw-dev__name { outline: 2px solid #7fcfa2; outline-offset: 6px; border-radius: 2px; }
.hw-dev__stage {
  position: relative;
  display: block;
  width: 100%;
  perspective: 900px;
  transform-origin: 50% 100%;
  transform: scale(1);
  transition: transform 0.5s var(--hw-ease);
}
/* soft mint floor light under each key */
.hw-dev__stage::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 14.5%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(127, 207, 162, 0.5) 0%, rgba(127, 207, 162, 0.12) 45%, rgba(127, 207, 162, 0) 72%);
  opacity: 0.12;
  transition: opacity 0.5s var(--hw-ease);
  pointer-events: none;
  z-index: -1;
}
.hw-dev__float { display: block; transform-style: preserve-3d; }
.hw-dev picture { display: block; }
.hw-dev img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0.45) saturate(0.55);
  transition: filter 0.5s var(--hw-ease);
  -webkit-mask-image: radial-gradient(ellipse 42% 52% at 50% 48%, #000 50%, rgba(0,0,0,0.55) 72%, transparent 96%);
  mask-image: radial-gradient(ellipse 42% 52% at 50% 48%, #000 50%, rgba(0,0,0,0.55) 72%, transparent 96%);
}
.hw-dev__name {
  margin-top: clamp(0.5rem, 1.4vh, 1.1rem);
  font: 600 clamp(0.85rem, 0.75rem + 0.4vw, 1.5rem)/1.2 Inter, "Segoe UI", sans-serif;
  letter-spacing: 0.16em;
  color: #7f8c86;
  white-space: nowrap;
  transition: color 0.5s var(--hw-ease), transform 0.5s var(--hw-ease);
}
/* Selected: steps forward, lights up, idles. */
.hw-dev.is-on .hw-dev__stage { transform: scale(1.3); }
.hw-dev.is-on img { filter: none; }
.hw-dev.is-on .hw-dev__stage::after { opacity: 1; }
.hw-dev.is-on .hw-dev__name { color: #e2e9e5; }
.hw-dev.is-on .hw-dev__float { animation: hw-idle 6s ease-in-out 0.5s infinite; }
@keyframes hw-idle {
  0%, 100% { transform: translateY(0) rotateY(0deg); }
  25% { transform: translateY(-1.6%) rotateY(4deg); }
  50% { transform: translateY(-0.4%) rotateY(0deg); }
  75% { transform: translateY(-1.6%) rotateY(-4deg); }
}

/* Product info for the selected key, beneath the row. All panels share one cell so the height never jumps. */
.hw-info {
  display: grid;
  width: min(100%, 72rem);
}
.hw-info__panel {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--hw-ease), transform 0.45s var(--hw-ease), visibility 0s linear 0.45s;
  text-align: center;
}
.hw-info__panel.is-on {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--hw-ease) 0.1s, transform 0.5s var(--hw-ease) 0.1s, visibility 0s;
}
.hw-info__title {
  margin: 0;
  font: 650 clamp(1.35rem, 1.05rem + 0.9vw, 2.4rem)/1.2 Manrope, Inter, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  color: #f5f7f6;
  text-shadow: none;
}
.hw-info__sub {
  margin: 0.2rem 0 0;
  font: italic 500 clamp(1rem, 0.92rem + 0.3vw, 1.4rem)/1.35 Manrope, Inter, "Segoe UI", sans-serif;
  color: #7fcfa2;
}
.hw-info__lead {
  margin: clamp(0.6rem, 1.2vh, 1rem) 0 0;
  font: 600 clamp(1.02rem, 0.95rem + 0.3vw, 1.4rem)/1.4 Inter, "Segoe UI", sans-serif;
  color: #e2e9e5;
}
.hw-info__lead strong { font-weight: 650; }
.hw-info__body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 3rem);
  margin-top: clamp(0.75rem, 1.8vh, 1.4rem);
  text-align: left;
}
.hw-info__body p {
  margin: 0;
  font: 400 clamp(0.95rem, 0.88rem + 0.22vw, 1.25rem)/1.55 Inter, "Segoe UI", sans-serif;
  color: #c9d2cd;
  text-wrap: pretty;
}
.hw-info .tm { color: inherit; text-shadow: none; }
@media (max-width: 899.98px) {
  .hw-info { width: min(100%, 36rem); }
  .hw-info__body { grid-template-columns: minmax(0, 1fr); gap: 0.7rem; }
}
@media (max-width: 767.98px) {
  /* Phones: keys overlap a little (their edges are faded) so each can be bigger. */
  .hw-teaser { --hw-w: min(33vw, calc((100svh - var(--topbar)) * 0.3), calc((100vw - 1.5rem) / 3.26)); }
  .hw-row { gap: 0; padding-top: calc(var(--hw-w) * 0.38); }
  .hw-dev { margin-inline: calc(var(--hw-w) * -0.02); }
  .hw-dev__name { font-size: 0.8rem; letter-spacing: 0.12em; }
}

.hw-teaser.hw-js:not(.is-in) .hw-teaser__title,
.hw-teaser.hw-js:not(.is-in) .hw-dev,
.hw-teaser.hw-js:not(.is-in) .hw-info { opacity: 0; }
/* Hardware reveals as it arrives on screen: heading, then the keys left to right, then the info. */
.hw-teaser.is-in .hw-teaser__title { animation: hw-teaser-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hw-teaser.is-in .hw-dev { animation: hw-teaser-in 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both; }
.hw-teaser.is-in .hw-dev:nth-child(2) { animation-delay: 0.38s; }
.hw-teaser.is-in .hw-dev:nth-child(3) { animation-delay: 0.56s; }
.hw-teaser.is-in .hw-info { animation: hw-teaser-in 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both; }
@keyframes hw-teaser-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Selected-key demos (from the hardware carousel): status LED, buttons lit from inside on press, OLED screen.
   Overlays live in the same box as the render, so they scale, float and tilt with it. Hidden unless the key is selected. */
.hw-dev__float { position: relative; }
.hw-fx { position: absolute; inset: 0; pointer-events: none; }
.hw-fx__led, .hw-fx__btn, .hw-fx__screen { position: absolute; transform: translate(-50%, -50%); }
.hw-fx__led {
  border-radius: 50%;
  background: #7fcfa2;
  opacity: 0;
  box-shadow: 0 0 4px 1px rgba(127, 207, 162, 0.85), 0 0 12px 4px rgba(127, 207, 162, 0.45);
}
.hw-dev.is-on .hw-fx__led.is-on { opacity: 1; }
.hw-dev.is-on .hw-fx__led.is-blink { opacity: 1; animation: hw-ledblink 0.7s ease-in-out infinite; }
@keyframes hw-ledblink { 0%, 100% { opacity: 1; } 50% { opacity: 0.22; } }
.hw-fx__btn {
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 90ms ease, background 90ms ease, box-shadow 90ms ease, opacity 90ms ease;
}
.hw-fx__btn--pad { border-radius: 22% / 28%; }
.hw-dev.is-on .hw-fx__btn.is-press {
  opacity: 1;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(127, 207, 162, 0.85), inset 0 0 10px 2px rgba(127, 207, 162, 0.35);
  transform: translate(-50%, -50%) scale(0.95);
}
.hw-dev.is-on .hw-fx__btn--pad.is-press { transform: translate(-50%, -50%) scale(0.93); }
.hw-fx__screen {
  transform: none;
  background: #050907;
  overflow: hidden;
  color: #7fcfa2;
  container-type: size;
  box-shadow: inset 0 0 0 1px rgba(127, 207, 162, 0.06);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.hw-dev.is-on .hw-fx--oled.is-live .hw-fx__screen { opacity: 1; }
.hw-fx__inner { position: absolute; inset: 6% 6.5% 7%; opacity: 1; transition: opacity 280ms ease; }
.hw-fx__screen.is-dark .hw-fx__inner { opacity: 0; }
.hw-fx__list, .hw-fx__code { display: none; height: 100%; overflow: hidden; }
.hw-fx__screen.is-list .hw-fx__list { display: block; container-type: size; }
.hw-fx__screen.is-code .hw-fx__code { display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; }
.hw-fx__track { display: block; transition: transform 220ms ease; }
.hw-fx__row {
  display: flex;
  align-items: center;
  height: 33.333cqh;
  margin: 0;
  padding: 0 4%;
  box-sizing: border-box;
  font: 600 12.5cqw/1 Inter, "Segoe UI", sans-serif;
  letter-spacing: 0;
  color: #7fcfa2;
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  border-radius: 8% / 18%;
}
.hw-fx__row.is-hi { opacity: 1; color: #c9ecd9; background: rgba(127, 207, 162, 0.18); }
.hw-fx__site, .hw-fx__digits, .hw-fx__secs { display: block; width: 100%; white-space: nowrap; }
.hw-fx__site { font: 600 11.5cqw/1.2 Inter, "Segoe UI", sans-serif; letter-spacing: 0; color: #7fcfa2; overflow: hidden; text-overflow: clip; }
.hw-fx__digits { font: 600 21.5cqw/1 Inter, "Segoe UI", sans-serif; letter-spacing: 0; color: #c9ecd9; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.hw-fx__secs { font: 600 11.5cqw/1.2 Inter, "Segoe UI", sans-serif; letter-spacing: 0; color: #7fcfa2; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
/* Overlay map: measured from the image pixels (lineup/detect.py, Hough + radial groove refine), % of the 3:4 image box. */
.hw-fx--hid .hw-fx__pwr { left: 50.252%; top: 27.435%; width: 9.421%; height: 7.072%; }
.hw-fx--hid .hw-fx__enter { left: 50.14%; top: 48.887%; width: 13.456%; height: 10.101%; }
.hw-fx--hid .hw-fx__led { left: 50.194%; top: 17.628%; width: 1.053%; height: 0.79%; }
.hw-fx--fido .hw-fx__pwr { left: 50.028%; top: 27.435%; width: 9.48%; height: 7.116%; }
.hw-fx--fido .hw-fx__enter { left: 49.636%; top: 48.762%; width: 13.619%; height: 10.223%; }
.hw-fx--fido .hw-fx__led { left: 50.133%; top: 17.612%; width: 1.171%; height: 0.879%; }
.hw-fx--oled .hw-fx__enter { left: 50.643%; top: 48.258%; width: 11.818%; height: 8.871%; }
.hw-fx--oled .hw-fx__pwr { left: 50.755%; top: 57.83%; width: 8.77%; height: 6.583%; }
.hw-fx--oled .hw-fx__up { left: 42.114%; top: 42.233%; width: 8.949%; height: 5.374%; }
.hw-fx--oled .hw-fx__dn { left: 59.06%; top: 42.233%; width: 9.06%; height: 5.29%; }
.hw-fx--oled .hw-fx__screen { left: 38.255%; top: 17.758%; width: 24.497%; height: 20.277%; border-radius: 8.676% / 7.867%; }

/* v9 (t1379u, t1380u)
   - Hardware has no visible title; the keys move up into that space (the h2 stays for screen readers).
   - Same side margins as the owner's container (container-xl, max 1550px) at every width.
   - Full screen: page 1 (already 100dvh), Hardware and Get in touch are each at least one screen tall.
   - One soft glow behind the keys that starts inside page 1 and fades out into Get in touch: no hard edges. */
.hw-teaser {
  padding-inline: max(0.75rem, calc((100% - var(--lv-container, 1550px)) / 2 + 0.75rem));
  padding-bottom: clamp(5.5rem, 4.6rem + 2.4vw, 7.5rem);
}
.hw-teaser::before {
  content: "";
  position: absolute;
  inset: -42svh 0 -34svh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 52% 34% at 50% 46%, rgba(150, 186, 168, 0.20) 0%, rgba(150, 186, 168, 0.07) 48%, rgba(150, 186, 168, 0) 78%),
    radial-gradient(ellipse 80% 46% at 50% 50%, rgba(127, 207, 162, 0.05) 0%, rgba(127, 207, 162, 0) 72%);
}
.home-contact {
  box-sizing: border-box;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* v11 (owner t1382u/t1385u/t1388u): page 1 keeps live's header exactly (fixed, solid). Once Hardware reaches the header,
   the header's band turns transparent so the glow is not cut off; it returns when scrolling back to page 1. Landing only. */
.topbar { transition: background-color 0.45s ease; }
.topbar.is-clear { background-color: transparent; }
@media (prefers-reduced-motion: reduce) { .topbar { transition: none; } }
