/* ============================================================
   Public page patterns
   ============================================================

   The production half of what used to be wwwroot/prometheon-preview.css.

   That file was named for the /design-preview route, but most of what the
   landing page and /it-suppliers render resolved against it, so it had become
   production styling with a misleading name. The two halves are separated here
   by what a live browser observed: every rule below was seen matching on / or
   /it-suppliers. The rules that only ever matched on /design-preview stayed
   behind, and that file is now loaded by the preview page alone.

   Rules keep their original source order, and this file is linked in the slot
   prometheon-preview.css used to occupy, so the cascade for production pages is
   unchanged.

   The dp- prefix is left alone. It reads as design-preview and no longer
   describes what these rules are, but renaming classes used across two
   production pages is a large diff with no behavioural benefit; it belongs with
   extracting real components, not with this move. Tokens moved separately, to
   styles/foundations/tokens.css.
   ============================================================ */

/* ── Base ──────────────────────────────────────────────── */

.dp-page {
  background: var(--dp-bg);
  font-family: var(--dp-font);
  color: var(--dp-text);
  font-size: var(--ds-text-14);
  line-height: 1.6;
  min-height: 100vh;
}

.dp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Hero ──────────────────────────────────────────────── */

.dp-hero {
  background: var(--prometheon-hero-gradient);
  color: var(--ds-text-inverse);
  padding: 50px 0 80px;
  margin-top: 0;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.dp-hero__title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 600px;
  margin: 0 0 16px;
}

.dp-hero__sub {
  font-size: 17px;
  opacity: 0.88;
  max-width: 520px;
  margin: 0 0 36px;
}

.dp-hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Hero Two-Column Layout ────────────────────────────── */

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  position: relative;
}

.hero-content {
  max-width: 520px;
  position: relative;
  z-index: 2;
}

.hero-visual {
  position: absolute;
  right: -160px;
  top: 54%;
  transform: translateY(-50%);
  width: 80%;
  max-width: 960px;
  z-index: 1;
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  max-width: none;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 45%, black 50%, transparent 90%);
  mask-image: radial-gradient(ellipse 80% 75% at 50% 45%, black 50%, transparent 90%);
}

@media (max-width: 1000px) {
  .hero-container {
      flex-direction: column;
      text-align: center;
    }

  .dp-hero__actions {
      justify-content: center;
    }

  .hero-visual {
      display: none;
    }
}

/* ── Section ───────────────────────────────────────────── */

.dp-section {
  padding: 64px 0;
}

/* ── Live on Prometheon ────────────────────────────────── */

.dp-section.dp-live {
  background: var(--ds-surface);
}

.dp-live__title {
  text-align: center;
  font-size: var(--ds-text-28);
  font-weight: 700;
  color: var(--dp-text);
  margin: 0 0 32px;
}

.dp-live__outer {
  background: var(--dp-surface);
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-radius-lg);
  padding: 28px;
  box-shadow: var(--dp-shadow);
}

/* minmax(0, 1fr) rather than 1fr: a bare 1fr means minmax(auto, 1fr), whose auto
   minimum is the track's content-based minimum, so a single unbreakable string in a
   card grows the track past the container and takes the whole page wide with it. */

.dp-live__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.dp-live-card {
  background: var(--dp-surface);
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  /* Overrides the grid item's automatic (content-based) minimum size, which is what
     the track's auto minimum resolves against. Belongs here as well as on the track
     so the card stays contained under any column definition, mobile's included. */
  min-width: 0;
}

.dp-live-card__title {
  font-size: var(--ds-text-15);
  font-weight: 700;
  color: var(--dp-text);
  margin: 0 0 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--dp-border);
}

.dp-live-rfq__list {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dp-live-rfq__item {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--dp-border);
}

.dp-live-rfq__item:last-child {
  border-bottom: none;
}

.dp-live-rfq__title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

/* RFQ title is user-supplied. min-width:0 lets this flex item shrink below its
   content, and overflow-wrap:anywhere is the part that actually lowers the
   min-content size so an unbroken token cannot widen the card. word-break is the
   legacy fallback for Safari < 15.4, which does not know "anywhere". Deliberately
   not word-break:break-all, which would split ordinary words too. */

.dp-live-rfq__name {
  font-size: var(--ds-text-14);
  font-weight: 600;
  color: var(--dp-text);
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dp-live-rfq__date {
  font-size: var(--ds-text-12);
  color: var(--dp-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.dp-live-rfq__date--urgent {
  color: #b45309;
  font-weight: 600;
}

/* Category and location come straight from the record and are joined without spaces
   in places, so they need the same treatment as the title. Block-level, so no
   min-width is involved - the wrapping properties are what matter here. */

.dp-live-rfq__sub {
  font-size: var(--ds-text-12);
  color: var(--dp-text-muted);
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dp-live-rfq__empty {
  font-size: var(--ds-text-13);
  color: var(--dp-text-muted);
  padding: 20px 0;
  text-align: center;
  flex: 1;
}

.dp-live-company__list {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dp-live-company__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--dp-border);
}

.dp-live-company__item:last-child {
  border-bottom: none;
}

.dp-live-company__avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--dp-primary);
  color: var(--ds-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ds-text-13);
  font-weight: 700;
  flex-shrink: 0;
}

/* min-width:0 is load-bearing: without it this flex item refuses to shrink below its
   content and the long industry string in __desc pushes the row - and the card - wide. */

.dp-live-company__info {
  flex: 1;
  min-width: 0;
}

.dp-live-company__name-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

/* Company name is user-supplied and has no truncation by design, so it has to wrap
   safely. Same reasoning as .dp-live-rfq__name above. */

.dp-live-company__name {
  font-size: var(--ds-text-14);
  font-weight: 600;
  color: var(--dp-text);
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Industry + location. The existing design truncates this to one ellipsised line and
   that is kept: overflow:hidden clips it to the width __info was given, so the raw
   comma-joined industry list from the record cannot widen anything. The wrapping
   properties are inert while white-space:nowrap stands and exist so that removing the
   truncation later degrades into safe wrapping rather than back into page overflow. */

.dp-live-company__desc {
  font-size: var(--ds-text-12);
  color: var(--dp-text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dp-live-company__date {
  font-size: var(--ds-text-12);
  color: var(--dp-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.dp-live-company__avatar--logo {
  background: var(--ds-surface);
  border: 1px solid var(--dp-border);
}

.dp-live-company__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  border-radius: 9px;
  box-sizing: border-box;
}

.dp-live-card__link {
  display: inline-block;
  margin-top: 16px;
  font-size: var(--ds-text-13);
  font-weight: 600;
  color: var(--dp-primary);
  text-decoration: none;
}

.dp-live-card__link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .dp-live__grid { grid-template-columns: minmax(0, 1fr); }

  .dp-live__outer { padding: 16px; }
}

@media (max-width: 640px) {
  .dp-container { padding: 0 1.25rem; }

  .dp-hero__title { font-size: var(--ds-text-28); }

  .dp-section { padding: 48px 0; }
}

/* ── Buttons ───────────────────────────────────────────── */

.dp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--dp-radius-sm);
  font-size: var(--ds-text-14);
  font-weight: 500;
  font-family: var(--dp-font);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dp-btn--primary {
  background: var(--dp-primary);
  color: var(--ds-text-inverse);
  border-color: var(--dp-primary);
}

.dp-btn--primary:hover {
  background: var(--dp-primary-dark);
  border-color: var(--dp-primary-dark);
}

.dp-btn--secondary {
  background: var(--dp-surface);
  color: var(--dp-text);
  border-color: var(--dp-border);
}

.dp-btn--secondary:hover {
  background: var(--dp-surface-alt);
  border-color: #C0C2C5;
}

.dp-btn--outline {
  background: transparent;
  color: var(--dp-primary);
  border-color: var(--dp-primary);
}

.dp-btn--outline:hover {
  background: var(--ds-blue-50);
}

.dp-btn--lg { padding: 12px 24px; font-size: var(--ds-text-15); }

.dp-btn--hero {
  background: var(--ds-surface);
  color: var(--dp-primary);
  border-color: transparent;
  font-weight: 600;
}

.dp-btn--hero:hover { background: #f0f7ff; }

.dp-btn--hero-outline {
  background: transparent;
  color: var(--ds-text-inverse);
  border-color: rgba(255,255,255,0.6);
}

.dp-btn--hero-outline:hover { background: rgba(255,255,255,0.1); }

/* ── Landing Section Backgrounds ──────────────────────── */

.prometheon-enterprise {
  background: #f7f9fc;
  border-top: 1px solid var(--dp-border);
  border-bottom: 1px solid var(--dp-border);
}

.prometheon-trusted {
  background: var(--ds-surface);
}

/* ── How It Works ─────────────────────────────────────── */

.dp-hiw {
  background: var(--dp-surface-alt);
  border-top: 1px solid var(--dp-border);
  border-bottom: 1px solid var(--dp-border);
}

.dp-hiw__title {
  font-size: var(--ds-text-28);
  font-weight: 700;
  text-align: center;
  color: var(--dp-text);
  margin: 0 0 48px;
}

.dp-hiw__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.dp-hiw__step {
  text-align: center;
  position: relative;
}

.dp-hiw__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dp-primary);
  color: var(--ds-text-inverse);
  font-size: var(--ds-text-18);
  font-weight: 700;
  margin-bottom: 20px;
}

.dp-hiw__step-title {
  font-size: var(--ds-text-18);
  font-weight: 700;
  color: var(--dp-text);
  margin: 0 0 12px;
}

.dp-hiw__desc {
  font-size: var(--ds-text-15);
  line-height: 1.65;
  color: var(--dp-text-secondary);
  margin: 0;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

/* Connecting line between steps */

.dp-hiw__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 22px;
  right: -20px;
  width: calc(100% - 120px);
  height: 2px;
  background: var(--dp-border);
  transform: translateX(100%);
}

@media (max-width: 768px) {
  .dp-hiw__grid {
      grid-template-columns: 1fr;
      gap: 36px;
    }

  .dp-hiw__step:not(:last-child)::after {
      display: none;
    }
}

/* ── Feature Showcase (alternating rows) ──────────────── */

.dp-features {
  background: var(--ds-surface);
}

.dp-feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--dp-border);
}

.dp-feature-row:last-child {
  border-bottom: none;
}

/* Reversed row: image on left, text on right */

.dp-feature-row--reversed .dp-feature-text {
  order: 2;
}

.dp-feature-row--reversed .dp-feature-image {
  order: 1;
}

.dp-feature-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--dp-text);
  margin: 0 0 16px;
  line-height: 1.3;
}

.dp-feature-desc {
  font-size: var(--ds-text-16);
  line-height: 1.7;
  color: var(--dp-text-secondary);
  margin: 0;
}

/* When real images are added, use this class instead */

.dp-feature-image img {
  width: 100%;
  height: auto;
  border-radius: var(--dp-radius-lg);
  box-shadow: var(--dp-shadow-md);
}

@media (max-width: 768px) {
  .dp-feature-row {
      grid-template-columns: 1fr;
      gap: 32px;
      padding: 40px 0;
    }

  .dp-feature-row--reversed .dp-feature-text {
      order: 1;
    }

  .dp-feature-row--reversed .dp-feature-image {
      order: 2;
    }

  .dp-feature-title {
      font-size: var(--ds-text-22);
    }
}

/* ── Public shell ──────────────────────────────────────── */
/* Shared by PrometheonLayout's header, PrometheonFooter and the public pages, all of
   which render under PrometheonLayout. These came from that layout's style block,
   which was mounted on every public page; the header-only rules went to
   Components/Layout/PrometheonLayout.razor.css. */

.prometheon-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.prometheon-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.prometheon-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.prometheon-brand-name {
    font-family: 'Nexa Heavy', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.prometheon-brand-subtitle {
    font-size: var(--ds-text-12);
    opacity: 0.8;
}

.prometheon-elioplus-link {
    color: inherit;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 1;
}

.prometheon-elioplus-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .prometheon-container {
        padding: 0 1.25rem;
    }
}

/* Public page header. Byte-identical copies of these lived in Companies.razor.css and
   Tenders.razor.css; this is the single copy. Each page keeps its own responsive
   overrides, which are NOT identical - Companies also shrinks --sm and the description
   below 768px, Tenders does not. */

.prometheon-page-header {
    margin-bottom: 0;
}

.prometheon-page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--pp-heading);
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.prometheon-page-title--sm {
    font-size: var(--ds-text-28);
}

.prometheon-page-description {
    font-size: 0.975rem;
    color: var(--ds-text-secondary);
    margin: 0 0 0.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.prometheon-page-subtitle {
    font-size: 0.8rem;
    color: #4a5171;
    margin: 0;
    font-weight: 400;
}

.prometheon-page-subtitle--right {
    text-align: right;
}
