/* =====================================================
   NORTHTEK · Signature Surfaces
   ----------------------------------------------------
   "Member card" testimonial design + decorative
   homepage backgrounds. Modeled after the loyalty
   programs membership card aesthetic.
   ===================================================== */

/* ---- Member card (testimonials) ---- */
.member-card {
  position: relative;
  border-radius: 1rem;
  background: linear-gradient(135deg, #0d2538 0%, #0b1120 50%, #0a2a1f 100%);
  box-shadow:
    0 25px 50px -25px rgba(0, 212, 255, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s ease;
}

.member-card::before {
  /* Gradient border ring via mask trick */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(0, 212, 255, 0.55),
    rgba(16, 185, 129, 0.40),
    rgba(155, 107, 255, 0.35));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.member-card::after {
  /* Subtle aurora glow that animates on hover */
  content: '';
  position: absolute;
  inset: -50% -10% auto auto;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 35px 60px -25px rgba(0, 212, 255, 0.30),
    0 0 0 1px rgba(0, 212, 255, 0.25) inset;
}

.member-card:hover::after {
  opacity: 1;
}

.member-card > * { position: relative; z-index: 2; }

/* Logo plate — neutral container so any logo color reads correctly.
   Tall enough that logos remain legible without forcing per-card overrides. */
.member-logo-plate {
  position: relative;
  height: 8.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.18);
  overflow: hidden;
}

.member-logo-plate img {
  max-height: 100%;
  max-width: 95%;
  object-fit: contain;
  display: block;
}

/* Card chip detail in the footer of each card */
.member-chip {
  width: 2.25rem;
  height: 1.75rem;
  flex-shrink: 0;
}

/* ---- Aurora wash background for the testimonials section ---- */
.testimonials-aurora-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.testimonials-aurora-bg::before,
.testimonials-aurora-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.testimonials-aurora-bg::before {
  top: -10%;
  left: 10%;
  width: 30rem;
  height: 30rem;
  background: rgba(0, 212, 255, 0.10);
}
.testimonials-aurora-bg::after {
  bottom: -10%;
  right: 10%;
  width: 28rem;
  height: 28rem;
  background: rgba(16, 185, 129, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .member-card { transition: none; }
  .member-card:hover { transform: none; }
}

/* =====================================================
   ARTICLE TYPOGRAPHY (blog + labs posts)
   ----------------------------------------------------
   Editorial reading layout — generous line-height,
   constrained measure, hierarchical headings.
   ===================================================== */

.blog-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #C9D1D9; /* north-100 — main body text in dark mode */
}

@media (min-width: 768px) {
  .blog-article {
    padding: 0 2rem;
    font-size: 1.125rem;
  }
}

html:not(.dark) .blog-article { color: #1f2937; }

.blog-article p {
  margin: 0 0 1.5rem;
}

/* Drop-cap on the very first paragraph after the meta line — adds editorial polish */
.blog-article > p:first-of-type::first-letter,
.blog-article > .blog-meta + p::first-letter {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-weight: 900;
  font-size: 3.4rem;
  line-height: 0.9;
  float: left;
  padding: 0.4rem 0.75rem 0 0;
  color: #00D4FF;
}

.blog-article h2 {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #F0F6FC;
  margin: 3rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
  .blog-article h2 {
    font-size: 2.125rem;
    margin-top: 3.5rem;
  }
}

html:not(.dark) .blog-article h2 {
  color: #0d1117;
  border-top-color: rgba(0, 0, 0, 0.06);
}

.blog-article h3 {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #F0F6FC;
  margin: 2rem 0 0.75rem;
}

@media (min-width: 768px) {
  .blog-article h3 { font-size: 1.4rem; }
}

html:not(.dark) .blog-article h3 { color: #1f2937; }

.blog-article h2 + p,
.blog-article h3 + p {
  margin-top: 0.25rem;
}

.blog-article ul,
.blog-article ol {
  margin: 0 0 1.75rem;
  padding-left: 0;
  list-style: none;
}

.blog-article li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
}

.blog-article ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #00D4FF;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.blog-article ol {
  counter-reset: article-list;
}

.blog-article ol > li {
  counter-increment: article-list;
  padding-left: 2.25rem;
}

.blog-article ol > li::before {
  content: counter(article-list, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #00D4FF;
  letter-spacing: 0.05em;
  padding-top: 0.3em;
}

.blog-article strong {
  color: #F0F6FC;
  font-weight: 700;
}

html:not(.dark) .blog-article strong { color: #0d1117; }

.blog-article em {
  color: #00D4FF;
  font-style: italic;
}

.blog-article a {
  color: #00D4FF;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 212, 255, 0.4);
  transition: border-color 0.2s ease;
}

.blog-article a:hover {
  border-bottom-color: #00D4FF;
}

.blog-article blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid #00D4FF;
  background: rgba(0, 212, 255, 0.05);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #C9D1D9;
}

html:not(.dark) .blog-article blockquote {
  background: rgba(0, 212, 255, 0.06);
  color: #374151;
}

.blog-article code {
  background: rgba(0, 212, 255, 0.10);
  border: 1px solid rgba(0, 212, 255, 0.20);
  border-radius: 0.25rem;
  padding: 0.1em 0.4em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  color: #00D4FF;
}

/* Article meta line — date, read time, author */
.blog-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8B949E;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 0;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

html:not(.dark) .blog-meta {
  border-color: rgba(0, 0, 0, 0.08);
  color: #6b7280;
}

/* In-article CTA box at the end */
.blog-article .blog-cta {
  margin: 4rem 0 1rem;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, #0d2538 0%, #0b1120 50%, #0a2a1f 100%);
  border-radius: 1rem;
  border: 1px solid rgba(0, 212, 255, 0.25);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-article .blog-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.blog-article .blog-cta h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #F0F6FC;
  margin: 0 0 0.75rem;
  border: 0;
  padding: 0;
  position: relative;
}

.blog-article .blog-cta p {
  font-size: 1rem;
  color: #C9D1D9;
  margin: 0 0 1.75rem;
  position: relative;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #00D4FF;
  color: #0B1120;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.95rem 1.75rem;
  border-radius: 0.5rem;
  text-decoration: none !important;
  border: 0 !important;
  min-height: 48px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  position: relative;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* =====================================================
   MOBILE TIGHTENING — across all signature surfaces
   ===================================================== */

@media (max-width: 639px) {
  /* Member testimonial cards: reduce padding for narrow screens */
  .member-card { padding: 1.5rem !important; border-radius: 0.875rem; }
  .member-logo-plate {
    height: 6.5rem;
    border-radius: 0.625rem;
    padding: 0.5rem;
  }
  .member-card blockquote {
    font-size: 0.9375rem !important;
    line-height: 1.65 !important;
  }
  .member-chip { width: 1.875rem; height: 1.5rem; }

  /* Testimonials section aurora wash — smaller blur radius for mobile perf */
  .testimonials-aurora-bg::before,
  .testimonials-aurora-bg::after {
    filter: blur(60px);
    width: 18rem;
    height: 18rem;
  }

  /* Blog article body: tighter padding, smaller drop-cap */
  .blog-article {
    font-size: 1rem;
    line-height: 1.7;
    padding: 0 1rem;
  }
  .blog-article > p:first-of-type::first-letter,
  .blog-article > .blog-meta + p::first-letter {
    font-size: 2.5rem;
    padding: 0.35rem 0.55rem 0 0;
  }
  .blog-article h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
  }
  .blog-article h3 { font-size: 1.15rem; }
  .blog-article ul,
  .blog-article ol { margin-bottom: 1.5rem; }
  .blog-article li { padding-left: 1.5rem; margin-bottom: 0.625rem; }
  .blog-article ol > li { padding-left: 2rem; }

  /* Blog article CTA box: reduce padding so it doesn't dominate the screen */
  .blog-article .blog-cta {
    margin: 3rem 0 0.5rem;
    padding: 1.75rem 1.25rem;
    border-radius: 0.875rem;
  }
  .blog-article .blog-cta h3 { font-size: 1.25rem; }
  .blog-article .blog-cta p { font-size: 0.9375rem; }

  /* CTA button on mobile — full-width for easier tap */
  .btn-primary {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  /* Blog meta line — wrap nicely on narrow screens */
  .blog-meta {
    font-size: 0.6875rem;
    gap: 0.625rem;
    padding: 0.875rem 0;
    margin-bottom: 2rem;
  }
}

/* Reduce article side-padding even further on tiny phones (320-359px) */
@media (max-width: 359px) {
  .blog-article { padding: 0 0.75rem; }
  .blog-article > p:first-of-type::first-letter { font-size: 2.2rem; }
}

