/* ----------------------------------------------------------------------------
 * OEM Partner Portal Home — Studio Glass + Partner Brand Accent.
 *
 * Rides on tokens.css (production-stage backdrop, frosted glass, serif display
 * type, warm ink hierarchy) and derives a harmonious partner accent palette
 * from `--oem-accent` set on `<main class="oem-home">`.
 * Zero hex literals, zero local blur radii, zero override flags (enforced by
 * ui-system-guard.test.ts).
 * --------------------------------------------------------------------------*/

body.oem-home-page {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

body.oem-home-page > footer {
  margin-top: auto;
  border-top-color: var(--line);
  background: var(--glass-soft);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.oem-home,
.oem-home * {
  box-sizing: border-box;
}

.oem-home {
  --oem-accent: var(--accent);
  --oem-ink: color-mix(in srgb, var(--oem-accent) 72%, rgb(15 23 42));
  --oem-soft: color-mix(in srgb, var(--oem-accent) 11%, rgb(255 255 255));
  --oem-soft-border: color-mix(in srgb, var(--oem-accent) 26%, transparent);
  --oem-glow: color-mix(in srgb, var(--oem-accent) 20%, transparent);
  --oem-btn-end: color-mix(in srgb, var(--oem-accent) 80%, rgb(15 23 42));
  --oem-btn-shadow: 0 14px 32px -14px color-mix(in srgb, var(--oem-accent) 68%, transparent);

  position: relative;
  flex: 1;
  width: 100%;
  min-width: 320px;
  padding: 18px 0 clamp(56px, 7vw, 96px);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: clip;
}

.oem-wrap {
  width: min(1140px, 100% - 40px);
  margin-inline: auto;
}

/* ---- Floating Glass Pill Navbar ----------------------------------------- */
.oem-nav-wrap {
  position: sticky;
  top: 14px;
  z-index: 50;
  padding-inline: 20px;
}

.oem-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1140px, 100%);
  min-height: 58px;
  margin-inline: auto;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-pill);
  background: var(--glass-strong);
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.oem-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink-strong);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.oem-brand:hover {
  color: var(--oem-ink);
}

.oem-brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  box-shadow: var(--shadow-1);
}

.oem-brand__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.oem-brand__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oem-brand__tag {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.oem-nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}

.oem-nav__links a {
  text-decoration: none;
  transition: color 150ms ease;
}

.oem-nav__links a:hover {
  color: var(--oem-ink);
}

.oem-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.oem-nav__locale .locale-switcher {
  position: relative;
  padding: 0;
}

.oem-nav__locale .locale-switcher > summary {
  height: 36px;
  padding: 0 12px;
  border-color: var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 12px;
}

.oem-nav__locale .locale-switcher > summary:hover {
  border-color: var(--oem-soft-border);
}

.oem-nav__locale .locale-switcher > ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 148px;
  margin: 0;
  border-color: var(--line-light);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

/* ---- Buttons ------------------------------------------------------------ */
.oem-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color
    160ms ease, filter 160ms ease;
}

.oem-btn--lg {
  height: 46px;
  padding: 0 24px;
  font-size: 14px;
}

.oem-btn--primary {
  border-color: var(--oem-accent);
  background: linear-gradient(135deg, var(--oem-accent), var(--oem-btn-end));
  color: rgb(255 255 255);
  box-shadow: var(--oem-btn-shadow);
}

.oem-btn--primary:hover {
  color: rgb(255 255 255);
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -14px color-mix(in srgb, var(--oem-accent) 78%, transparent);
}

.oem-btn--ghost {
  border-color: var(--line-strong);
  background: var(--glass-strong);
  color: var(--ink-strong);
  box-shadow: var(--shadow-1);
}

.oem-btn--ghost:hover {
  border-color: var(--oem-soft-border);
  background: var(--surface-solid);
  color: var(--oem-ink);
  transform: translateY(-1px);
}

.oem-btn:focus-visible,
.oem-nav a:focus-visible {
  outline: 2px solid var(--oem-accent);
  outline-offset: 2px;
}

/* ---- Hero Section ------------------------------------------------------- */
.oem-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 60px);
  padding: clamp(44px, 6.5vw, 84px) 0 clamp(56px, 7vw, 96px);
}

.oem-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--oem-soft-border);
  border-radius: var(--radius-pill);
  background: var(--glass-strong);
  box-shadow: var(--shadow-1);
  color: var(--oem-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.oem-eyebrow__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--oem-accent);
  box-shadow: 0 0 0 4px var(--oem-soft);
}

.oem-hero__copy h1 {
  margin: 22px 0 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: clamp(34px, 4.3vw, 54px);
  font-weight: 600;
  line-height: 1.13;
  letter-spacing: -0.03em;
}

html[lang="en-US"] .oem-hero__copy h1 {
  font-size: clamp(32px, 3.6vw, 46px);
}

html[lang="ja-JP"] .oem-hero__copy h1,
html[lang="ko-KR"] .oem-hero__copy h1 {
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.2;
}

.oem-hero__lead {
  max-width: 540px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.78;
}

.oem-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.oem-hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.oem-hero__pills span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.oem-hero__pills i {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--oem-accent);
}

/* ---- Right Hero: Frosted Studio Workspace Preview ----------------------- */
.oem-stage {
  position: relative;
}

.oem-stage__glow {
  position: absolute;
  inset: -18px -18px -24px;
  z-index: 0;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 65% 24%, var(--oem-glow), transparent 64%);
  pointer-events: none;
}

.oem-stage__card {
  position: relative;
  z-index: 1;
  padding: 20px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-xl);
  background: var(--glass-strong);
  box-shadow: var(--shadow-3);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.oem-stage__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.oem-stage__dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.oem-stage__dots span {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
}

.oem-stage__title {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oem-stage__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--oem-soft-border);
  border-radius: var(--radius-pill);
  background: var(--oem-soft);
  color: var(--oem-ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.oem-stage__badge i {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--success);
}

.oem-stage__pipeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.oem-pipe-node {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow-1);
}

.oem-pipe-node__num {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--oem-soft);
  color: var(--oem-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.oem-pipe-node strong {
  display: block;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 600;
}

.oem-pipe-node span {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.oem-stage__preview {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgb(29 24 27) 0%, rgb(20 17 20) 100%);
  color: rgb(245 241 236);
}

.oem-shot-box,
.oem-wave-box {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.oem-shot-box__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
}

.oem-shot-box__status {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(21, 128, 61, 0.25);
  color: rgb(134 239 172);
  font-family: var(--font-sans);
  font-weight: 600;
}

.oem-shot-box__title {
  margin-top: 9px;
  font-size: 13px;
  font-weight: 600;
  color: rgb(255 255 255);
}

.oem-shot-box__meta {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}

.oem-wave-box__label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.oem-wave-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 3px;
  height: 30px;
  margin-top: 10px;
}

.oem-wave-bars span {
  display: block;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.24);
}

.oem-wave-bars span.is-active {
  background: var(--oem-accent);
}

.oem-wave-bars .h-1 {
  height: 35%;
}
.oem-wave-bars .h-2 {
  height: 60%;
}
.oem-wave-bars .h-3 {
  height: 48%;
}
.oem-wave-bars .h-4 {
  height: 92%;
}
.oem-wave-bars .h-5 {
  height: 78%;
}
.oem-wave-bars .h-6 {
  height: 100%;
}
.oem-wave-bars .h-7 {
  height: 66%;
}
.oem-wave-bars .h-8 {
  height: 84%;
}
.oem-wave-bars .h-9 {
  height: 52%;
}
.oem-wave-bars .h-10 {
  height: 72%;
}
.oem-wave-bars .h-11 {
  height: 42%;
}
.oem-wave-bars .h-12 {
  height: 58%;
}

.oem-wave-box__foot {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.oem-stage__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.oem-stage__metrics > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.oem-stage__metrics strong {
  display: block;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 700;
}

.oem-stage__metrics span {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 11px;
}

/* ---- Sections & Bento Grid ---------------------------------------------- */
.oem-section {
  padding-top: clamp(48px, 6vw, 84px);
}

.oem-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.oem-section__index {
  margin-bottom: 8px;
  color: var(--oem-ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.oem-section__head h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: clamp(25px, 3.1vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.oem-section__head p {
  max-width: 410px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.oem-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.oem-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.oem-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.oem-card--wide {
  grid-column: span 7;
}

.oem-card--narrow {
  grid-column: span 5;
}

.oem-card--dark {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(155deg, rgb(29 24 27) 0%, rgb(20 17 20) 100%);
  color: rgb(245 241 236);
}

.oem-card__icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--oem-soft-border);
  border-radius: var(--radius);
  background: var(--oem-soft);
  color: var(--oem-ink);
}

.oem-card--dark .oem-card__icon {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgb(255 255 255);
}

.oem-card h3 {
  margin: 14px 0 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.oem-card--dark h3 {
  color: rgb(255 255 255);
}

.oem-card p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.7;
}

.oem-card--dark p {
  color: rgba(255, 255, 255, 0.72);
}

.oem-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.oem-chips span {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}

.oem-card--dark .oem-chips span {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
}

.oem-flow-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-strong);
}

.oem-flow-strip .oem-arrow {
  color: var(--oem-ink);
  font-family: var(--font-mono);
}

/* ---- Final CTA Banner --------------------------------------------------- */
.oem-cta-wrap {
  padding-top: clamp(48px, 6vw, 84px);
}

.oem-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 56px) 24px;
  border: 1px solid var(--oem-soft-border);
  border-radius: var(--radius-xl);
  background: linear-gradient(
    145deg,
    var(--glass-strong),
    color-mix(in srgb, var(--oem-soft) 65%, var(--surface-solid))
  );
  box-shadow: var(--shadow-2);
  text-align: center;
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.oem-cta__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 600;
}

.oem-cta h2 {
  max-width: 680px;
  margin: 16px auto 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.oem-cta p {
  max-width: 520px;
  margin: 12px auto 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
}

.oem-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 960px) {
  .oem-nav__links {
    display: none;
  }

  .oem-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .oem-section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .oem-card--wide,
  .oem-card--narrow {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .oem-nav-wrap {
    padding-inline: 12px;
  }

  .oem-wrap {
    width: min(1140px, 100% - 24px);
  }

  .oem-nav {
    padding: 7px 8px 7px 12px;
    gap: 8px;
  }

  .oem-brand__tag,
  .oem-nav__trial {
    display: none;
  }

  .oem-stage__pipeline,
  .oem-stage__preview,
  .oem-stage__metrics {
    grid-template-columns: 1fr;
  }

  .oem-hero__actions .oem-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oem-btn,
  .oem-card,
  .oem-nav__links a {
    transition: none;
  }

  .oem-btn:hover,
  .oem-card:hover {
    transform: none;
  }
}
