/**
 * OneFit Projects — /projects/ hub + domain pages
 * Scoped classes; safe alongside contentTemplate.
 */

/* -------------------------------------------------------------------------- */
/* Hub landing (/projects/)                                                    */
/* -------------------------------------------------------------------------- */

.projects-hub {
  --ph-ink: #0c1222;
  --ph-muted: #5c6578;
  --ph-line: rgba(12, 18, 34, 0.08);
  --ph-brand: #0d9488;
  --ph-brand-deep: #0f766e;
  --ph-surface: #ffffff;
  --ph-paper: #f4f6f9;
  --ph-accent: #3fa783;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ph-ink);
  background: var(--ph-paper);
}

.projects-hub h1,
.projects-hub h2,
.projects-hub h3 {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.ph-hero {
  position: relative;
  padding: clamp(2.75rem, 7vw, 4.5rem) clamp(1.25rem, 4vw, 2rem) clamp(2rem, 5vw, 3rem);
  overflow: hidden;
  background:
    radial-gradient(1000px 520px at 90% -5%, rgba(13, 148, 136, 0.11), transparent 55%),
    radial-gradient(800px 420px at 0% 100%, rgba(63, 167, 131, 0.09), transparent 50%),
    linear-gradient(180deg, #fbfcfe 0%, #eef2f7 100%);
}

.ph-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--ph-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ph-line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.4;
  pointer-events: none;
  mask-image: linear-gradient(180deg, black 45%, transparent 100%);
}

.ph-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.ph-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ph-brand-deep);
  margin-bottom: 0.85rem;
}

.ph-eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: linear-gradient(90deg, var(--ph-accent), var(--ph-brand));
  border-radius: 2px;
}

.ph-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  color: var(--ph-ink);
}

.ph-lead {
  font-size: clamp(1rem, 1.25vw, 1.0625rem);
  line-height: 1.75;
  color: var(--ph-muted);
  margin: 0 auto;
  max-width: 640px;
}

.ph-intro {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem) clamp(2rem, 5vw, 2.75rem);
}

.ph-intro-card {
  background: var(--ph-surface);
  border: 1px solid rgba(12, 18, 34, 0.07);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: 0 18px 40px -28px rgba(12, 18, 34, 0.25);
}

.ph-intro-card p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ph-muted);
}

.ph-intro-card p:last-child {
  margin-bottom: 0;
}

.ph-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.ph-pill-list li {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.09);
  color: var(--ph-brand-deep);
}

.ph-section-title {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.ph-section-title h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.ph-section-title p {
  margin: 0;
  font-size: 1rem;
  color: var(--ph-muted);
  line-height: 1.6;
}

.ph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem) clamp(2.5rem, 6vw, 3.5rem);
}

.ph-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 1.35rem 1.35rem 1.25rem;
  background: var(--ph-surface);
  border: 1px solid rgba(12, 18, 34, 0.07);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.ph-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px -24px rgba(12, 18, 34, 0.22);
  border-color: rgba(13, 148, 136, 0.28);
}

.ph-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(63, 167, 131, 0.15));
  color: var(--ph-brand-deep);
  margin-bottom: 0.85rem;
}

.ph-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.ph-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ph-muted);
  flex: 1;
}

.ph-card-cta {
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ph-brand);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ph-card:hover .ph-card-cta {
  color: var(--ph-brand-deep);
}

.ph-cta {
  margin: 0 clamp(1.25rem, 4vw, 2rem) clamp(3rem, 7vw, 4rem);
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ph-brand-deep) 0%, #115e59 50%, #134e4a 100%);
  color: #ecfdf5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 24px 48px -22px rgba(15, 118, 110, 0.42);
}

.ph-cta h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.ph-cta p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 460px;
  line-height: 1.55;
}

.ph-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ph-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ph-cta .ph-btn-primary {
  background: #fff;
  color: var(--ph-brand-deep);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.ph-cta .ph-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.ph-cta .ph-btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.ph-cta .ph-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 640px) {
  .ph-cta {
    flex-direction: column;
    text-align: center;
  }
  .ph-cta p {
    max-width: none;
  }
  .ph-cta-actions {
    justify-content: center;
  }
}

/* -------------------------------------------------------------------------- */
/* Domain article pages (sidebar + content)                                    */
/* -------------------------------------------------------------------------- */

.proj-page-article {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #0c1222;
  padding-bottom: 1.5rem;
}

.proj-page-article > h1 {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid rgba(13, 148, 136, 0.35);
  color: #0c1222;
}

.proj-page-article > p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #3d4656;
  margin: 0 0 1rem;
}

.proj-page-article .proj-lead {
  font-size: 1.05rem;
  color: #5c6578;
  margin-bottom: 0.5rem;
}

.proj-page-article .proj-lead p {
  margin: 0 0 1rem;
}

.proj-list {
  margin: 1rem 0 1.5rem;
  padding-left: 1.25rem;
  color: #3d4656;
}

.proj-list li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  padding-left: 0.25rem;
}

.proj-list li strong {
  color: #0f766e;
}

.proj-nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid rgba(12, 18, 34, 0.08);
  border-radius: 14px;
  clear: both;
}

.proj-nav-bar a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.proj-nav-prev {
  color: #475569;
  background: #fff;
  border: 1px solid rgba(12, 18, 34, 0.1);
}

.proj-nav-prev:hover {
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

.proj-nav-next {
  color: #fff;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #3fa783 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
}

.proj-nav-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.38);
  color: #fff;
}

.proj-nav-placeholder {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 520px) {
  .proj-nav-bar {
    flex-direction: column;
  }
  .proj-nav-bar a {
    width: 100%;
    justify-content: center;
  }
  .proj-nav-placeholder {
    display: none;
  }
}
