/*
 * IDRO — public.css  (Phase 4 additive layer)
 * Loaded after style.css. Only adds what style.css doesn't already cover:
 * skip-link, product detail, responsive fixes, accessibility, nav open state.
 */

/* ── Skip Link ──────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: .5rem 1rem;
  background: var(--brand);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  border-radius: 0 0 .375rem .375rem;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ── Screen-reader only ─────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Focus rings ────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb { margin-bottom: 1.5rem; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .5rem;
  list-style: none;
  padding: 0; margin: 0;
  font-size: .8125rem;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 500; }

/* ── Product Hero ───────────────────────────────────────────────────────── */
.product-hero {
  padding: calc(var(--nav-height, 72px) + 3rem) 0 3rem;
  background: var(--bg);
}
.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 768px) {
  .product-hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .product-hero-grid {
    grid-template-columns: 3fr 2fr;
  }
}

.product-badge {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 2rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--badge-color, var(--accent)) 12%, transparent);
  color: var(--badge-color, var(--accent));
  border: 1px solid color-mix(in srgb, var(--badge-color, var(--accent)) 30%, transparent);
  margin-bottom: .75rem;
}

.product-series-label {
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin: 0 0 .375rem;
}
.product-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 .75rem;
  color: var(--ink);
}
.product-tagline {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 .75rem;
}
.product-description {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 1.5rem;
}

/* Key specs chips */
.product-key-specs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  padding: 0; margin: 0 0 1.75rem;
}
.spec-chip {
  display: flex;
  flex-direction: column;
  padding: .5rem .875rem;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: .5rem;
  min-width: 80px;
}
.spec-label {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
}
.spec-value {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
}

.product-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
}

.product-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  padding: 1.5rem;
}
.product-hero-visual svg {
  max-width: 100%;
  height: auto;
}

/* ── Features ───────────────────────────────────────────────────────────── */
.product-features { background: var(--bg); }
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  list-style: none;
  padding: 0; margin: 0;
}
@media (min-width: 600px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  padding: .875rem 1rem;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: .625rem;
  font-size: .9rem;
  color: var(--ink);
  line-height: 1.5;
}
.feature-icon { flex-shrink: 0; margin-top: .1em; }

/* ── Full Specs Table ───────────────────────────────────────────────────── */
.product-specs { }
.specs-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: .75rem;
  border: 1px solid var(--border, #e2e8f0);
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.specs-table thead {
  background: var(--brand);
  color: #fff;
}
.specs-table th {
  padding: .75rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.specs-table td {
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  color: var(--ink);
  vertical-align: top;
}
.specs-table tr:last-child td { border-bottom: none; }
.specs-table td:first-child {
  font-weight: 600;
  color: var(--text-muted);
  width: 40%;
}
.specs-table tbody tr:nth-child(even) {
  background: var(--surface, #f8fafc);
}

/* ── Use Cases ──────────────────────────────────────────────────────────── */
.product-use-cases { }
.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .625rem;
  list-style: none;
  padding: 0; margin: 0;
}
@media (min-width: 600px) {
  .use-cases-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .use-cases-grid { grid-template-columns: repeat(3, 1fr); }
}
.use-case-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1rem;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: .5rem;
  font-size: .875rem;
  color: var(--ink);
}
.use-case-icon { flex-shrink: 0; }

/* ── Tags ───────────────────────────────────────────────────────────────── */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-bottom: 2.5rem;
}
.product-tag {
  padding: .25rem .75rem;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 2rem;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── Related Products ───────────────────────────────────────────────────── */
.related-products { }
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}
.related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: .75rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  transition: box-shadow .2s, transform .2s;
}
.related-card:hover, .related-card:focus-visible {
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.related-card-visual {
  background: var(--surface, #f8fafc);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.related-card-body { padding: 1rem 1.25rem; }
.related-card-category {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin: 0 0 .25rem;
}
.related-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 .25rem;
}
.related-card-tagline {
  font-size: .8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── CTA Strip ──────────────────────────────────────────────────────────── */
.cta-strip {
  background: var(--brand);
  color: #fff;
}
.cta-strip-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .cta-strip-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.cta-strip-title {
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 700;
  margin: 0 0 .375rem;
  color: #fff;
}
.cta-strip-sub {
  font-size: .9375rem;
  color: rgba(255,255,255,.75);
  margin: 0;
}
.cta-strip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  flex-shrink: 0;
}
.btn-ghost {
  padding: .625rem 1.25rem;
  border: 1.5px solid rgba(255,255,255,.5);
  color: #fff;
  background: transparent;
  border-radius: .375rem;
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  transition: background .2s, border-color .2s;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  background: rgba(255,255,255,.12);
  border-color: #fff;
}

/* ── Nav open state ─────────────────────────────────────────────────────── */
.nav-links.is-open {
  display: flex !important;
  flex-direction: column;
}

/* ── Responsive section padding ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .product-hero {
    padding-top: calc(var(--nav-height, 64px) + 2rem);
    padding-bottom: 2rem;
  }
  .section { padding-top: 3rem; padding-bottom: 3rem; }
  .product-hero-ctas { flex-direction: column; }
  .product-hero-ctas .btn { width: 100%; text-align: center; justify-content: center; }
}

/* ── 404 fallback ────────────────────────────────────────────────────────── */
.page-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}
.page-404 h1 { font-size: 5rem; font-weight: 900; color: var(--brand); margin: 0; }
.page-404 p { color: var(--text-muted); margin: .75rem 0 1.5rem; font-size: 1.0625rem; }

/* ── Phase 5: contact form validation ───────────────────────────────────── */
.field-error {
  display: block;
  font-size: .8125rem;
  color: #ff5c5c;
  margin-top: .25rem;
  min-height: 1.1em;
}
.input-error {
  border-color: #ff5c5c !important;
  box-shadow: 0 0 0 2px rgba(255,92,92,.25);
}
#form-success { display: flex; align-items: center; gap: .625rem; }
#form-error   { display: flex; align-items: flex-start; }

