/* ==========================================================================
   EKIT Projects — the pages this site adds.

   The three custom-kit pages are Main EKIT's, unchanged, and are styled by
   custom-kit.css exactly as they are on ekit.lk. This file covers only what is
   new here: the homepage, the six theme pages, guides, resources and contact.

   Built entirely from the tokens in variables.css. Radii stay on the --r-*
   scale (2-8px) — the brief asks for a professional platform, and the token
   scale is already square-leaning. Nothing here invents a radius or a colour.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero

   Same approach as the ekit.lk homepage panel: the text sits on its own dark
   brand gradient rather than on a section background, so contrast is a
   property of the markup and not of whatever an admin sets behind it.
   -------------------------------------------------------------------------- */
.pj-hero {
  background: var(--n-900);
  padding-block: var(--sp-5) calc(var(--section-y) * 0.7);
}

.pj-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: center;
  padding: clamp(1.25rem, .75rem + 2vw, 2.5rem);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #007578 0%, #00464a 60%, #002f31 100%);
  box-shadow: 0 14px 34px -18px rgba(0, 30, 31, .6);
  color: #fff;
}

.pj-hero__title {
  margin: var(--sp-4) 0 0;
  font-size: clamp(1.6rem, 1rem + 2vw, 2.4rem);
  font-weight: var(--fw-black);
  letter-spacing: -.03em;
  line-height: 1.12;
  color: #fff;
}

.pj-hero__title em {
  font-style: normal;
  color: var(--brand-200);
}

.pj-hero__text {
  margin-top: var(--sp-4);
  max-width: 54ch;
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: #b9d9da;
}

.pj-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.pj-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-6);
  margin: var(--sp-7) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: #a8cccd;
}

.pj-hero__facts li {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.pj-hero__facts svg { color: var(--brand-200); }

.pj-hero__card {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, rgba(30, 41, 59, .9), rgba(2, 6, 23, .8));
  padding: var(--sp-4);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .45);
}

.pj-hero__bar {
  display: flex;
  justify-content: space-between;
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-mono);
  color: #64748b;
}

.pj-hero__shot {
  height: clamp(180px, 28vh, 300px);
  margin-top: var(--sp-4);
  border-radius: var(--r-lg);
  background: url("../assets/images/custom-kit.jpg") center / cover no-repeat;
}

/* --------------------------------------------------------------------------
   2. How it works
   -------------------------------------------------------------------------- */
.pj-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.pj-step {
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  border-top: 3px solid var(--brand-600);
}

.pj-step__n {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
}

.pj-step h3 {
  margin: var(--sp-4) 0 var(--sp-2);
  font-size: var(--fs-md);
}

.pj-step p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
}

/* --------------------------------------------------------------------------
   3. Theme cards and the theme switcher
   -------------------------------------------------------------------------- */
.pj-themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}

.pj-theme {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}

.pj-theme:hover,
.pj-theme:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--brand-300);
}

@media (prefers-reduced-motion: reduce) {
  .pj-theme, .pj-theme:hover { transform: none; transition: none; }
}

.pj-theme__ic {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-600);
}

.pj-theme__title {
  display: block;
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
}

.pj-theme__blurb {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
}

.pj-theme__count {
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--text-subtle);
}

.pj-switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.pj-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-decoration: none;
}

.pj-chip:hover { border-color: var(--brand-300); color: var(--brand-700); }

.pj-chip.is-active {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

.pj-count { font-size: var(--fs-sm); color: var(--text-muted); }
.pj-count strong { color: var(--text-strong); font-size: var(--fs-lg); }

/* The level and sort controls belong side by side. Without the explicit
   widths the two selects inherit the shared .select's full-width behaviour
   inside a wrapping flex row and stack on top of each other, which reads as
   two unrelated filters rather than one toolbar. */
.pj-tools {
  gap: var(--sp-3);
  flex-wrap: nowrap;
  align-items: center;
}

.pj-tools .select {
  width: auto;
  min-width: 150px;
}

@media (max-width: 560px) {
  /* On a phone the toolbar gets its own full-width row under the count. */
  .pj-tools { flex-wrap: wrap; width: 100%; }
  .pj-tools .select { flex: 1 1 140px; min-width: 0; }
}
.pj-more { display: flex; justify-content: center; margin-top: var(--sp-8); }

/* --------------------------------------------------------------------------
   4. Options, guides and resources
   -------------------------------------------------------------------------- */
.pj-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-4);
}

.pj-opt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.pj-opt__ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-600);
}

.pj-opt h3 { margin: 0; font-size: var(--fs-base); }
.pj-opt p { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--text-muted); }

.pj-opt__price {
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  color: var(--brand-700);
  white-space: nowrap;
}

.pj-guide-grid,
.pj-res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-5);
}

.pj-guide,
.pj-res {
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  border-top: 3px solid var(--brand-600);
}

.pj-guide__ic,
.pj-res__ic {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-600);
}

.pj-guide h2,
.pj-res h3 { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-md); }
.pj-guide p,
.pj-res p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-base); }

.pj-guide__price,
.pj-res__price {
  display: inline-block;
  margin-top: var(--sp-4);
  font-weight: var(--fw-bold);
  color: var(--brand-700);
}

.pj-note { font-size: var(--fs-xs); color: var(--text-subtle); }

.pj-downloads {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-6);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-left: 3px solid var(--brand-600);
  border-radius: var(--r-lg);
}

.pj-downloads__ic {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  background: var(--n-0);
  border: 1px solid var(--brand-200);
  color: var(--brand-600);
}

.pj-downloads h2 { margin: 0; font-size: var(--fs-lg); color: var(--brand-900); }
.pj-downloads p { margin: var(--sp-2) 0 0; font-size: var(--fs-sm); color: var(--brand-800); }

/* --------------------------------------------------------------------------
   5. Contact
   -------------------------------------------------------------------------- */
.pj-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  align-items: start;
}

.pj-detail {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border-soft);
}

.pj-detail:last-child { border-bottom: 0; }

.pj-detail__ic {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-600);
}

.pj-detail small {
  display: block;
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-mono);
  color: var(--text-subtle);
}

.pj-detail strong { display: block; font-size: var(--fs-base); color: var(--text-strong); }

.pj-links { list-style: none; margin: 0; padding: 0; }
.pj-links li { border-bottom: 1px solid var(--border-soft); }
.pj-links li:last-child { border-bottom: 0; }

.pj-links a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  font-size: var(--fs-sm);
  color: var(--text);
  text-decoration: none;
}

.pj-links a:hover { color: var(--brand-700); }
.pj-links svg { color: var(--brand-600); }

/* --------------------------------------------------------------------------
   6. CTA band
   -------------------------------------------------------------------------- */
.pj-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-6);
  align-items: center;
  padding: var(--sp-8);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #007578 0%, #00464a 100%);
  color: #fff;
}

.pj-cta h2 { margin: 0; font-size: var(--fs-xl); color: #fff; }
.pj-cta p { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); color: #b9d9da; max-width: 62ch; }
.pj-cta__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.pj-cta .btn--ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.pj-cta .btn--ghost:hover { background: rgba(255, 255, 255, .2); color: #fff; }

/* --------------------------------------------------------------------------
   7. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .pj-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pj-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .pj-hero__inner,
  .pj-contact,
  .pj-cta { grid-template-columns: minmax(0, 1fr); }
  .pj-cta { text-align: left; }
}

@media (max-width: 760px) {
  /* The hero's picture is a second screenful before the visitor reaches a
     single action, so it goes on a phone. Nothing else about the hero moves. */
  .pj-hero__card { display: none; }
}

@media (max-width: 620px) {
  .pj-themes,
  .pj-steps { grid-template-columns: minmax(0, 1fr); }
  .pj-opt { grid-template-columns: auto minmax(0, 1fr); }
  .pj-opt__price { grid-column: 2; }
  .pj-downloads { grid-template-columns: auto minmax(0, 1fr); }
  .pj-downloads .btn { grid-column: 1 / -1; }
}
