/* ProTech products page redesign — agent 11.
   Page-scoped presentation only. Loaded after main.css on products.html.
   Shared token names per DESIGN-CONTRACT.md; integration unifies values.
   Motion uses transform + opacity ONLY. No external requests. */

:root {
  --navy: #0b1220;
  --teal: #20c9c0;
  --blue: #0e5bd6;
  --ink: #1f2a37;
  --muted: #52616f;
  --paper: #f7f9fb;
  --line: #dde4ea;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(11, 18, 32, .08);
  --shadow-md: 0 12px 28px rgba(11, 18, 32, .14);
  --shadow-lg: 0 24px 48px rgba(11, 18, 32, .18);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --dur-fast: .18s;
  --dur-normal: .45s;
  --dur-slow: .7s;
  --teal-dark: #0c6b66;
  --tint: #e6f6f4;
  --tint-blue: #eaf1fe;
  --boundary-bg: #f1f5f9;
}

/* ---------- Reveal (JS-gated: no .js class means fully visible) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-normal) var(--ease-out),
              transform var(--dur-normal) var(--ease-out);
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Gentle stagger inside the offer grids; hover/focus resets the delay so
   hover motion is never sluggish. */
.js .offer-grid .offer-card:nth-child(3n+2) { transition-delay: .07s; }
.js .offer-grid .offer-card:nth-child(3n+3) { transition-delay: .14s; }
.offer-card:hover,
.offer-card:focus-within { transition-delay: 0s; }

/* ---------- Hero decoration (abstract geometry, reserved space) ---------- */
.hero-redesign { position: relative; overflow: hidden; }
.hero-art {
  position: absolute;
  right: -40px;
  top: 50%;
  width: 520px;
  max-width: 46vw;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--teal);
  opacity: .9;
}
.hero-redesign .wrap { position: relative; }
@media (max-width: 900px) { .hero-art { display: none; } }

/* ---------- Section titles ---------- */
.section-title { position: relative; padding-bottom: 14px; }
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--teal);
  transform: scaleX(1);
  transform-origin: left center;
}

/* ---------- Reading guide + journey divider ---------- */
.reading-guide { border-left: 4px solid var(--blue); }
.journey-mark {
  display: block;
  width: min(560px, 100%);
  margin: 6px auto 28px;
  color: var(--teal-dark);
  opacity: .8;
}

/* ---------- Offer grids (scannable catalogue) ---------- */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 1023px) {
  .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .offer-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

/* ---------- Offer cards ---------- */
.offer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-out);
}
.offer-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--teal));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-normal) var(--ease-out);
}
.offer-card:hover,
.offer-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.offer-card:hover::before,
.offer-card:focus-within::before { transform: scaleX(1); }

.offer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.offer-tag {
  background: var(--tint);
  color: var(--navy);
  border: 0;
  font-weight: 700;
}
.offer-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--teal-dark);
  transition: transform var(--dur-fast) var(--ease-out);
}
.offer-icon svg { width: 27px; height: 27px; }
.offer-card:hover .offer-icon,
.offer-card:focus-within .offer-icon { transform: scale(1.08) rotate(-3deg); }

/* Group B: quieter treatment keeps the "supporting, separate" hierarchy. */
.offer-card-b .offer-icon {
  background: var(--paper);
  color: var(--navy);
}
.offer-card-b::before { background: var(--line); }
.offer-card-b { border-style: solid; }

.offer-card h3 {
  margin-top: 18px;
  font-size: 1.28rem;
  line-height: 1.3;
  color: var(--ink);
}
.offer-outcome {
  margin-top: 14px;
  padding: 13px 14px;
  background: var(--tint);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
}
.offer-detail { margin-top: 13px; color: var(--ink); line-height: 1.6; }
.offer-detail strong { color: var(--ink); }
.offer-boundary {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--boundary-bg);
  border-radius: var(--radius-sm);
  color: var(--ink);
  line-height: 1.6;
}
.offer-cta { margin-top: auto; padding-top: 22px; }
.offer-card .btn { transition: transform var(--dur-fast) var(--ease-out); }
.offer-card .btn:hover,
.offer-card .btn:focus-visible { transform: translateY(-1px); }

/* Group B cards carry no tag: the icon sits on its own row. */
.offer-card-b > .offer-icon { margin-bottom: 2px; }
.offer-card-b h3 { margin-top: 14px; }

/* ---------- Related links + closing panel ---------- */
.related-links {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.cta-panel {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  padding: 36px;
}
.offer-cta-text { margin-top: auto; padding-top: 6px; }
.cta-panel h2 { color: #fff; }
.cta-panel p { color: rgba(255, 255, 255, .88); }
.cta-panel .small { color: rgba(255, 255, 255, .78); }
.cta-panel::before { background: var(--teal); transform: scaleX(1); }

/* ---------- Focus visibility ---------- */
.offer-card a:focus-visible,
.cta-panel a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.cta-panel a:focus-visible { outline-color: var(--teal); }

/* ---------- Reduced motion: everything fully visible, no motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .offer-grid .offer-card:nth-child(3n+2),
  .js .offer-grid .offer-card:nth-child(3n+3) {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0s;
  }
  .offer-card,
  .offer-card::before,
  .offer-icon,
  .offer-card .btn { transition: none; }
  .offer-card:hover,
  .offer-card:focus-within { transform: none; }
  .offer-card:hover .offer-icon,
  .offer-card:focus-within .offer-icon { transform: none; }
}
