/*
 * Shared stylesheet for the public marketing pages (start page first).
 *
 * Everything is scoped under .ps and prefixed ps- so it cannot collide with landing/style.css or
 * Bootstrap, which are still loaded for the header and footer. Colours are the Egrannar brand
 * palette written out on purpose: this is the company's own site, not a per-association theme, so
 * the per-BRF theme variables do not apply here.
 */

.ps {
  --ps-green: #2d8653;
  --ps-green-dark: #1e3d2d;
  --ps-green-light: #e6f2ea;
  --ps-text: #111827;
  --ps-text-2: #4b5563;
  --ps-grey-bg: #f3f2f1;
  --ps-border: #e5e7eb;
  --ps-serif: 'Merriweather', Georgia, serif;
  --ps-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  font-family: var(--ps-sans);
  color: var(--ps-text);
  line-height: 1.6;
  /* The site header is position: fixed, so the page starts below it. */
  padding-top: 72px;
}

.ps *,
.ps *::before,
.ps *::after {
  box-sizing: border-box;
}

.ps h1,
.ps h2,
.ps h3,
.ps p,
.ps ul,
.ps ol,
.ps blockquote,
.ps figure {
  margin: 0;
  padding: 0;
}

.ps ul,
.ps ol {
  list-style: none;
}

/* ---- Layout ---- */

.ps-section {
  padding: 96px 0;
  background: #ffffff;
}

.ps-bg-grey {
  background: var(--ps-grey-bg);
}

.ps-bg-green {
  background: var(--ps-green-light);
}

.ps-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.ps-stack {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.ps-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  gap: 48px;
  align-items: center;
}

/* For rows where one column is much taller than the other: centring then leaves the short column
   floating halfway down, so both start at the top instead. */
.ps-grid-2.ps-grid-top {
  align-items: start;
}

.ps-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 24px;
}

.ps-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  gap: 24px;
}

/* ---- Type ---- */

.ps .ps-eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ps-green);
  font-weight: 600;
  margin-bottom: 12px;
}

.ps h1.ps-h1 {
  font-family: var(--ps-serif);
  font-size: 48px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--ps-green-dark);
}

.ps h2.ps-h2 {
  font-family: var(--ps-serif);
  font-size: 38px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ps-green-dark);
}

.ps h3.ps-h3 {
  font-family: var(--ps-serif);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ps-green-dark);
}

.ps .ps-lead {
  font-size: 18px;
  color: var(--ps-text-2);
}

.ps .ps-text {
  font-size: 17px;
  color: var(--ps-text-2);
}

.ps .ps-small {
  font-size: 14px;
  color: var(--ps-text-2);
}

.ps .ps-nowrap {
  white-space: nowrap;
}

/* ---- Buttons ---- */

.ps .ps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--ps-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.ps .ps-btn-primary {
  background: var(--ps-green);
  border-color: var(--ps-green);
  color: #ffffff;
}

.ps .ps-btn-secondary {
  background: #ffffff;
  border-color: #d1d5db;
  color: var(--ps-green-dark);
}

.ps .ps-btn-on-dark-primary {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--ps-green-dark);
}

.ps .ps-btn-on-dark-secondary {
  background: transparent;
  border-color: #ffffff;
  color: #ffffff;
}

.ps .ps-btn:hover,
.ps .ps-btn:focus-visible {
  filter: brightness(0.94);
}

.ps .ps-btn:focus-visible,
.ps .ps-link:focus-visible {
  outline: 3px solid var(--ps-green-dark);
  outline-offset: 2px;
}

.ps-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.ps .ps-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ps-green);
  text-decoration: none;
}

/* Header: Logga in is an edge button next to the primary one. Scoped by the class set in index-heading.php. */
.ps-nav-login.btn {
  color: var(--color-on-surface, #111827);
  border-color: #d1d5db;
}

/* ---- Check lists ---- */

.ps .ps-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 15px;
  color: var(--ps-text-2);
}

.ps .ps-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ps .ps-checklist .ps-check {
  flex: none;
  margin-top: 3px;
  color: var(--ps-green);
}

.ps .ps-checklist-col {
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ps-text);
}

/* ---- Hero ---- */

.ps-hero {
  padding: 40px 0 96px;
}

.ps-hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ps-hero-text .ps-eyebrow {
  margin-bottom: 0;
}

.ps-hero-mockup {
  position: relative;
  padding: 0 0 48px 24px;
}

.ps-hero-caption {
  margin-top: 12px;
}

/* ---- Mockup parts (drawn in HTML/CSS, no screenshots) ---- */

.ps-browser {
  background: #ffffff;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.ps-browser-bar {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--ps-border);
}

.ps-dots {
  display: flex;
  gap: 6px;
}

.ps-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d1d5db;
}

.ps-url {
  flex: 1;
  min-width: 0;
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: var(--ps-grey-bg);
  border-radius: 6px;
  font-size: 12px;
  color: var(--ps-text-2);
}

.ps-hero-site {
  height: 440px;
}

.ps-hero-site-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ps-hero-site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.ps-hero-site-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ps-green-dark);
}

.ps-hero-site-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--ps-text-2);
  font-weight: 500;
}

.ps-hero-photo {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.ps-hero-news {
  /* The floating overview card covers the left 60% of the frame, so the news rows sit to its right. */
  padding-left: 62%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.ps-float-card {
  position: absolute;
  left: 0;
  bottom: 24px;
  width: 60%;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.ps-float-card .ps-eyebrow {
  margin: 0;
}

.ps-float-title {
  font-size: 17px;
  font-weight: 700;
}

.ps-float-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 14px;
  color: var(--ps-text-2);
}

.ps-badge {
  flex: none;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ps-green-light);
  color: var(--ps-green-dark);
}

.ps-badge-active {
  background: #fff4e5;
  color: #7a4a00;
}

.ps-badge-closed {
  background: var(--ps-grey-bg);
  color: var(--ps-text-2);
}

.ps-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.ps-card-title {
  font-size: 18px;
  font-weight: 700;
}

.ps-card-small {
  padding: 20px 24px;
  gap: 6px;
}

.ps-card-small .ps-card-title {
  font-size: 16px;
}

.ps-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ps-row-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--ps-border);
  border-radius: 8px;
}

.ps-row-item strong {
  font-size: 16px;
  font-weight: 600;
}

.ps-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--ps-text-2);
}

.ps-lines {
  display: flex;
  flex-direction: column;
}

.ps-lines li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--ps-border);
  font-size: 14px;
}

.ps-lines li > span:first-child {
  font-weight: 600;
  min-width: 0;
}

.ps-lines-stacked li {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.ps-lines-stacked li span + span {
  font-weight: 400;
  color: var(--ps-text-2);
}

.ps-table {
  width: 100%;
  border-collapse: collapse;
}

.ps-table th {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ps-text-2);
  text-align: left;
}

.ps-table td {
  padding: 10px 8px;
  border-top: 1px solid var(--ps-border);
  font-size: 14px;
}

.ps-table td:first-child {
  font-weight: 600;
}

.ps-table tr.ps-row-pending {
  background: var(--ps-green-light);
}

.ps-table tr.ps-row-pending td {
  color: var(--ps-green-dark);
}

/* ---- Three jobs ---- */

.ps-job {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  gap: 48px;
  align-items: center;
}

.ps-job-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ps-jobs {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* ---- Definition ---- */

.ps-definition {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ps-definition p {
  font-size: 18px;
  color: var(--ps-text-2);
}

/* ---- Four questions ---- */

.ps-qcard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px;
  background: #ffffff;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
}

/* ---- Steps ---- */

.ps-steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ps-steps li {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.ps-step-no {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--ps-green);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-step-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ps-photo {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 12px;
}

/* ---- Association cards and quotes ---- */

.ps-assoc {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ps-assoc-frame {
  height: 200px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.ps-assoc-bar {
  flex: none;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-bottom: 1px solid var(--ps-border);
}

.ps-assoc-bar span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d1d5db;
}

.ps-assoc-top {
  flex: none;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.ps-assoc-logo {
  height: 22px;
  width: auto;
  border-radius: 4px;
}

.ps-assoc-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.ps-assoc-body i {
  display: block;
  flex: none;
  height: 8px;
  background: var(--ps-border);
  border-radius: 4px;
}

.ps-assoc-hero {
  flex: none;
  width: 100%;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}

.ps-assoc-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ps-assoc-name {
  font-size: 17px;
  font-weight: 600;
}

.ps-assoc-city {
  font-size: 15px;
  color: var(--ps-text-2);
}

.ps-quote {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ps-quote blockquote {
  font-family: var(--ps-serif);
  font-size: 18px;
  line-height: 1.6;
  font-style: italic;
  color: var(--ps-green-dark);
}

.ps-quote figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ps-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--ps-green);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-quote-who {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ps-text-2);
}

.ps-quote-who strong {
  color: var(--ps-text);
  font-weight: 600;
}

/* ---- Included ---- */

.ps-included h3 {
  margin-bottom: 16px;
}

/* ---- Pricing ---- */

/* Price slider (publicRenderPriceSlider). The price is the focal point, so the amount is much larger
   than the unit next to it. */
.ps-price-slider-price {
  margin: 4px 0 8px;
  color: var(--ps-text-2);
  font-size: 18px;
}

.ps-price-slider-price span:first-child {
  color: var(--ps-green-dark);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
}

.ps-price-slider input[type="range"] {
  /* Block, not inline: an inline input leaves a text-descender gap under it that would add dead space above the row. */
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--ps-green);
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

/* Custom track and thumb because the default thumb is too small to drag on a phone and the track is
   barely visible on a white surface. Thumb is 28px. */
.ps-price-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: var(--ps-border);
  border-radius: 999px;
}

.ps-price-slider input[type="range"]::-moz-range-track {
  height: 8px;
  background: var(--ps-border);
  border-radius: 999px;
}

.ps-price-slider input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -10px;
  border: 0;
  background: var(--ps-green);
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
}

.ps-price-slider input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 0;
  background: var(--ps-green);
  border-radius: 999px;
}

/* One row under the track: left end value, the field unit, right end value. A 1fr/auto/1fr grid keeps
   the unit centred under the track midpoint even though the two end labels have different widths.
   The 28px range input already leaves empty space under the 8px track, so only 4px is added: just
   enough that the thumb never touches the row. */
.ps-price-slider-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 4px;
  color: var(--ps-text-2);
  font-size: 14px;
}

/* End labels are pinned to the track ends and top-aligned so they read as scale marks right under
   the track, not as items centred on the taller middle box. */
.ps-price-slider-row > span:first-child {
  justify-self: start;
  align-self: start;
}

.ps-price-slider-row > span:last-child {
  justify-self: end;
  align-self: start;
}

/* Field and the word form one unit sharing a text baseline, so the larger digits and the word read
   as one line. */
.ps-price-slider-count {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ps-text);
  font-size: 18px;
  font-weight: 400;
}

/* A text input instead of type=number: the number spinner reserves room on the right and pushes the
   digits off centre. The box hugs the digits: width is three digits plus about 8px of air (zero side
   padding, so four typed digits still fit), height comes from a tight line-height. */
.ps-price-slider-count input {
  width: calc(3ch + 8px + 2px);
  padding: 2px 0;
  line-height: 1.2;
  font-size: 24px;
  /* --ps-text-2, not the faint --ps-border: the field must read as something you can type in. */
  border: 1px solid var(--ps-text-2);
  border-radius: 6px;
  color: inherit;
  font-family: inherit;
  font-weight: 700;
  text-align: center;
}

.ps-price-slider-count input:focus {
  border-color: var(--ps-green);
  outline: 2px solid var(--ps-green);
  outline-offset: 1px;
}

/* Label is for screen readers only; the word next to the field is the visible one. */
.ps-price-slider-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- FAQ ---- */

.ps-faq-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  gap: 32px 48px;
}

.ps-faq-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ps-faq-item h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ps-text);
}

.ps-faq-item p {
  font-size: 16px;
  color: var(--ps-text-2);
}

/* ---- Closing ---- */

.ps-closing {
  background: var(--ps-green-dark);
  color: #ffffff;
}

.ps-closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.ps .ps-closing h2.ps-h2 {
  color: #ffffff;
}

.ps .ps-closing p {
  font-size: 18px;
  color: #d6e9dc;
}

.ps-closing .ps-btn-row {
  justify-content: center;
}

/* ---- Template parts for sub pages ---- */

.ps-breadcrumbs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 40px 0;
  font-size: 14px;
}

.ps-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--ps-text-2);
}

.ps-breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
}

.ps-breadcrumbs a {
  /* Touch target: the line box (about 22px) plus 2 x 14px padding is about 50px.
     The negative margin cancels the padding, so the layout of the page does not move. */
  display: inline-block;
  padding: 14px 0;
  margin: -14px 0;
  color: var(--ps-green);
  text-decoration: none;
}

/* ---- Small screens ---- */

@media (max-width: 767px) {
  .ps {
    padding-top: 64px;
  }

  .ps-section {
    padding: 56px 0;
  }

  .ps-hero {
    padding: 24px 0 56px;
  }

  .ps-container,
  .ps-breadcrumbs {
    padding-left: 20px;
    padding-right: 20px;
  }

  .ps h1.ps-h1 {
    font-size: 32px;
  }

  .ps h2.ps-h2 {
    font-size: 28px;
  }

  .ps-stack,
  .ps-grid-2,
  .ps-job {
    gap: 32px;
  }

  .ps-jobs {
    gap: 48px;
  }

  .ps-qcard {
    padding: 24px;
  }

  .ps-photo {
    height: 260px;
  }

  .ps-hero-mockup {
    padding-left: 12px;
  }

  .ps-hero-site {
    height: 400px;
  }

  .ps-hero-news {
    padding-left: 0;
  }

  .ps-float-card {
    width: 82%;
  }

  .ps-btn-row .ps-btn {
    flex: 1 1 100%;
  }

  .ps-card {
    padding: 18px;
  }
}

/*
 * Active item in the site header: plain green text, as on the approved design, instead of the
 * filled green block that landing/style.css draws. landing/style.css is shared with the old pages
 * and carries a hard-coded ?v= cache key, so it is overridden here, where only the new design
 * loads it (after style.css, same specificity, so it wins by order).
 * The header sits outside .ps, so the --ps-* variables are not available; the brand green is
 * written out. Padding and margin are reset so the menu row does not shift. Only .nav-link is
 * touched: the mobile menu uses .mobile-link, which has no active state.
 */
.nav-link.active {
  background-color: transparent;
  color: #2d8653;
  font-weight: 600;
  padding: 0;
  margin: 0;
}
