/* DEVICES CATALOG — DATA DRIVEN */
.devices-hero {
  width: min(100% - 64px, 1440px);
  margin: 0 auto;
  padding: clamp(38px, 3.2vw, 52px) 0 24px;
}
.devices-hero .s-tag { justify-content: flex-start; }
.devices-hero .s-h { max-width: 920px; margin-bottom: 0; font-family: var(--font-display); font-size: clamp(44px, 4vw, 62px); font-weight: 700; line-height: var(--leading-tight); letter-spacing: -.05em; }

.catalog-grid {
  width: min(100% - 64px, 1440px);
  margin: 0 auto;
  padding: 0 0 100px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dev-card {
  --catalog-image-scale: 1;
  min-width: 0;
  min-height: 530px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 260px 1fr;
  overflow: hidden;
  scroll-margin-top: 120px;
  border: 1px solid var(--border-primary);
  border-radius: 18px;
  background: var(--bg-secondary);
}
.dev-card--atlas,
.dev-card--omny,
.dev-card--sleek { --catalog-image-scale: 1; }
.dev-card-visual {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 48%, var(--device-accent-glow), transparent 44%);
}
.dev-card-visual::before {
  content: '';
  position: absolute;
  width: 190px;
  aspect-ratio: 1;
  border: 1px solid var(--device-accent-border);
  border-radius: 50%;
}
.dev-card-visual picture { display: contents; }
.dev-card-img {
  position: relative;
  z-index: 1;
  width: auto;
  height: 230px;
  max-width: 82%;
  object-fit: contain;
  transform: scale(var(--catalog-image-scale));
  filter: drop-shadow(0 26px 34px rgba(0,0,0,.5));
  transition: transform .45s var(--ease-out);
}
.dev-card--sleek .dev-card-visual::before { display:none; }
.dev-card--sleek .dev-card-img { width:auto!important; height:220px!important; max-width:48%!important; max-height:220px; object-fit:contain; filter:drop-shadow(0 24px 30px rgba(0,0,0,.48)); }
.dev-card:hover { border-color: var(--device-accent-border); }
.dev-card:hover .dev-card-img { transform: translateY(-8px) scale(var(--catalog-image-scale)); }
.dev-card-body { min-width: 0; padding: 24px 26px 28px; display: flex; flex-direction: column; }
.dev-card-series { color: var(--device-accent); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.dev-card-name { margin: 0; font-family: var(--font-body); font-size: clamp(28px, 2.2vw, 36px); font-weight: 600; line-height: 1.05; letter-spacing: -.035em; }
.dev-card-tagline { max-width: 36ch; min-height: 2.9em; margin-top: 10px; color: var(--text-soft); font-size: 14px; line-height: 1.5; }
.dev-card-facts { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.dev-card-facts span { min-height: 30px; padding: 0 11px; display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-secondary); font-size: 9px; letter-spacing: .025em; }
.dev-card-actions { margin-top: auto; padding-top: 20px; }
.dev-card-cta { min-height: 42px; padding: 0 20px; display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--text-primary); border-radius: 999px; color: var(--text-primary); font-size: 9px; letter-spacing: .14em; text-decoration: none; text-transform: uppercase; transition: background .25s ease, color .25s ease, border-color .25s ease; }
.dev-card-cta::after { content: '→'; }
.dev-card-cta:hover { color: var(--text-dark); background: var(--text-primary); border-color: var(--device-accent); }
.dev-card-coming { min-height: 44px; display: inline-flex; align-items: center; color: var(--text-secondary); font-size: 12px; letter-spacing: .06em; }
.catalog-error { margin: 0 auto 100px; color: #ffb4ab; text-align: center; }

@media (max-width: 1180px) {
  .devices-hero,
  .catalog-grid { width: calc(100% - 56px); }
  .dev-card { min-height: 520px; grid-template-rows: 244px 1fr; }
  .dev-card-visual::before { width: 178px; }
  .dev-card-img { height: 216px; }
  .dev-card-body { padding: 26px 24px 28px; }
}

@media (min-width: 701px) and (max-width: 920px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .dev-card,
  .dev-card:nth-child(even) { min-height: 360px; grid-template-columns: .86fr 1.14fr; grid-template-rows: 1fr; }
  .dev-card:nth-child(even) .dev-card-visual { order: 2; }
  .dev-card-img { height: 300px; }
  .dev-card-body { padding: 38px; justify-content: center; }
  .dev-card-tagline { min-height: 0; }
}

@media (min-width: 921px) and (max-height: 850px) {
  .devices-hero { padding: 24px 0 20px; }
  .devices-hero .s-h { margin-bottom: 8px; font-size: clamp(42px, 3.6vw, 54px); }
  .dev-card { min-height: 460px; grid-template-rows: 210px 1fr; }
  .dev-card-visual::before { width: 158px; }
  .dev-card-img { height: 188px; }
  .dev-card-body { padding: 20px 24px 24px; }
  .dev-card-name { font-size: 28px; }
  .dev-card-tagline { min-height: 2.7em; margin-top: 8px; font-size: 13px; }
  .dev-card-facts { margin-top: 13px; gap: 6px; }
  .dev-card-facts span { min-height: 27px; padding-inline: 9px; font-size: 8px; }
  .dev-card-actions { padding-top: 15px; }
  .dev-card-cta { min-height: 38px; }
}

@media (max-width: 700px) {
  .devices-hero,
  .catalog-grid { width: calc(100% - 40px); }
  .devices-hero { padding: 88px 0 52px; }
  .devices-hero .s-h { font-size: clamp(40px, 11vw, 54px); }
  .catalog-grid { grid-template-columns: 1fr; gap: 18px; padding-bottom: 90px; }
  .dev-card,
  .dev-card:nth-child(even) { min-height: 0; grid-template-columns: 1fr; }
  .dev-card { grid-template-rows: auto auto; border-radius: 14px; }
  .dev-card:nth-child(even) .dev-card-visual { order: 0; }
  .dev-card-visual { height: clamp(270px, 76vw, 320px); min-height: 0; }
  .dev-card-visual::before {
    width: clamp(118px, 36vw, 150px);
    height: 78%;
    aspect-ratio: auto;
    border-radius: 999px;
  }
  .dev-card-visual picture { display: block; width: 100%; height: 100%; }
  .dev-card-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; }
  .dev-card--atlas { --catalog-image-scale: .9; }
  .dev-card--omny { --catalog-image-scale: 1.05; }
  .dev-card--sleek { --catalog-image-scale: 1.02; }
  .dev-card--sleek .dev-card-img {
    inset: 50% auto auto 50%;
    width: auto!important;
    height: 84%!important;
    max-width: 68%!important;
    max-height: none;
    transform: translate(-50%,-50%) scale(var(--catalog-image-scale));
  }
  .dev-card--sleek:hover .dev-card-img { transform: translate(-50%,calc(-50% - 8px)) scale(var(--catalog-image-scale)); }
  .dev-card-body { padding: 34px 26px 38px; }
  .dev-card-name { font-size: 30px; }
  .dev-card-tagline { font-size: 16px; }
  .dev-card-facts { margin-top: 28px; }
  .dev-card-actions { margin-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .dev-card-img { transition: none; }
  .dev-card:hover .dev-card-img { transform: scale(var(--catalog-image-scale)); }
}
