/* ==========================================================================
   NORTHLINE BUILD CO. — Elevation Stylesheet
   Award-tier aesthetic enhancement: serif typography, diagonal stripe motif,
   enriched color depth, refined interactions, signature visual language
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ENHANCED COLOR TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Enrich the palette with deeper, richer tones */
  --accent-green-deep: #2A4A2A;
  --accent-green-rich: #4A7A4A;
  --accent-green-muted: #5A7A5A;

  /* Add shadow and elevation scale */
  --shadow-reveal: 0 8px 24px rgba(26, 26, 26, 0.12), 0 2px 6px rgba(26, 26, 26, 0.06);
  --shadow-hover: 0 12px 40px rgba(26, 26, 26, 0.15), 0 4px 10px rgba(26, 26, 26, 0.08);
  --shadow-card-lift: 0 20px 60px rgba(26, 26, 26, 0.16), 0 6px 16px rgba(26, 26, 26, 0.1);

  /* Premium motion easings */
  --ease-magnetic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --------------------------------------------------------------------------
   2. SERIF DISPLAY TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Make h1 even more commanding with serif */
h1 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* h2 gains serif authority */
h2 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Editorial italic accent — wrap key words in <em> and style them */
h1 em, h2 em, .display em {
  font-style: italic;
  color: var(--color-accent);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   3. HERO SIGNATURE MOVE
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
}

/* Diagonal sage-green stripe overlay — 30-40deg, subtle opacity */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    35deg,
    transparent 0%,
    transparent 15%,
    var(--accent-green) 20%,
    var(--accent-green) 22%,
    transparent 27%,
    transparent 100%
  );
  opacity: 0.12;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: multiply;
}

/* Hero content staggered entrance animation */
.hero__label {
  animation: slideInUp 700ms var(--ease-premium) forwards;
  opacity: 0;
}

.hero h1 {
  animation: slideInUp 700ms var(--ease-premium) 100ms forwards;
  opacity: 0;
}

.hero__text {
  animation: slideInUp 700ms var(--ease-premium) 200ms forwards;
  opacity: 0;
}

.hero .btn-group {
  animation: slideInUp 700ms var(--ease-premium) 300ms forwards;
  opacity: 0;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   4. FILM GRAIN OVERLAY
   -------------------------------------------------------------------------- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" result="noise" seed="2"/></filter><rect width="200" height="200" fill="%23000" filter="url(%23noise)" opacity="0.04"/></svg>');
  background-repeat: repeat;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
}

/* --------------------------------------------------------------------------
   5. SECTION DIVIDERS & REFINEMENT
   -------------------------------------------------------------------------- */
.section {
  position: relative;
}

/* Top hairline in accent green for premium rhythm */
.section--alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-green) 10%,
    var(--accent-green) 90%,
    transparent
  );
  opacity: 0.3;
}

/* Footer top hairline */
.footer {
  border-top: 1px solid var(--accent-green);
  border-top-opacity: 0.2;
}

/* --------------------------------------------------------------------------
   6. PROJECT CARD HOVER SIGNATURE
   -------------------------------------------------------------------------- */
.project-card {
  position: relative;
  transition: all var(--duration-base) var(--ease-smooth);
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-green);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--duration-base) var(--ease-premium);
  z-index: 10;
  pointer-events: none;
}

.project-card:hover {
  box-shadow: var(--shadow-card-lift);
  transform: translateY(-8px);
}

.project-card:hover::before {
  transform: scaleY(1);
}

/* Subtle image grade lift on hover */
.project-card__image {
  transition: filter var(--duration-base) var(--ease-smooth);
}

.project-card:hover .project-card__image {
  filter: saturate(1.08) contrast(1.04);
}

/* --------------------------------------------------------------------------
   7. SERVICE CARD REFINEMENT
   -------------------------------------------------------------------------- */
.service-card {
  transition: all var(--duration-base) var(--ease-smooth);
  border-left: 3px solid transparent;
}

.service-card:hover {
  border-left-color: var(--accent-green);
  box-shadow: var(--shadow-hover);
}

.service-card__number {
  color: var(--accent-green);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  transition: color var(--duration-base) var(--ease-smooth);
}

.service-card:hover .service-card__number {
  color: var(--accent-green-deep);
}

/* --------------------------------------------------------------------------
   8. PROCESS STEP SIGNATURE
   -------------------------------------------------------------------------- */
.process-step {
  transition: all var(--duration-base) var(--ease-smooth);
}

.process-step__number {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-rich));
  color: var(--off-white);
  font-weight: 700;
  transition: all var(--duration-base) var(--ease-magnetic);
}

.process-step:hover .process-step__number {
  transform: scale(1.08);
  box-shadow: var(--shadow-reveal);
}

/* Numbered accent mark as stripe */
.process-step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-green);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--duration-base) var(--ease-premium);
}

.process-step:hover::before {
  transform: scaleY(1);
}

/* --------------------------------------------------------------------------
   9. MAGNETIC PRIMARY CTA (pointer-fine only)
   -------------------------------------------------------------------------- */
@media (pointer: fine) {
  .btn--primary-light,
  .btn--primary {
    position: relative;
    overflow: hidden;
  }

  .btn--primary-light::before,
  .btn--primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s var(--ease-smooth), height 0.6s var(--ease-smooth);
    pointer-events: none;
  }

  .btn--primary-light:hover::before,
  .btn--primary:hover::before {
    width: 300px;
    height: 300px;
  }

  /* Magnetic follow on hover */
  .btn--primary-light,
  .btn--primary {
    transition: transform var(--duration-base) var(--ease-magnetic), box-shadow var(--duration-base) var(--ease-smooth);
  }

  .btn--primary-light:hover,
  .btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
  }

  .btn--primary-light:active,
  .btn--primary:active {
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   10. STAGGERED REVEAL ENHANCEMENT
   -------------------------------------------------------------------------- */
/* Data-stagger hook for additional staggering */
[data-stagger] > .reveal {
  opacity: 0;
  transform: translateY(16px);
}

/* Nth-child delayed reveals riding existing observer */
.stagger > .reveal:nth-child(n) {
  opacity: 0;
  transform: translateY(16px);
}

/* Ensure stagger children inherit the transition */
.stagger > .reveal {
  transition: opacity var(--duration-reveal) var(--ease-premium),
              transform var(--duration-reveal) var(--ease-premium);
}

/* Parallax scroll effect on large images (subtle, clamped) */
[data-parallax] {
  transition: transform 0.1s linear;
  transform-origin: center;
}

/* --------------------------------------------------------------------------
   11. BUTTON & LINK REFINEMENT
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  transition: all var(--duration-base) var(--ease-smooth);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.btn--outline:hover,
.btn--outline-light:hover {
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-reveal);
}

/* Subtle press state */
.btn:active {
  transform: scale(0.98);
}

/* Footer links subtle hover */
.footer__link {
  position: relative;
  transition: color var(--duration-base) var(--ease-smooth);
}

.footer__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--duration-base) var(--ease-smooth);
}

.footer__link:hover {
  color: var(--color-accent);
}

.footer__link:hover::after {
  width: 100%;
}

/* --------------------------------------------------------------------------
   12. CARD DEPTH & SHADOW REFINEMENT
   -------------------------------------------------------------------------- */
.testimonial {
  transition: all var(--duration-base) var(--ease-smooth);
  border-left: 2px solid transparent;
}

.testimonial:hover {
  border-left-color: var(--accent-green);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   13. ACCESSIBILITY & REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  h1, h2, h3 {
    animation: none;
    opacity: 1;
  }

  .hero__label,
  .hero h1,
  .hero__text,
  .hero .btn-group {
    animation: none;
    opacity: 1;
  }

  [data-parallax],
  .btn--primary-light,
  .btn--primary,
  .project-card,
  .service-card,
  .process-step,
  .testimonial {
    transition: none;
    transform: none;
  }

  .btn--primary-light::before,
  .btn--primary::before,
  .project-card::before,
  .process-step::before {
    display: none;
  }

  body::before {
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   14. RESPONSIVE TUNING
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  h1, h2 {
    font-family: 'Playfair Display', 'Georgia', serif;
  }

  /* Slightly reduce grain on mobile */
  body::before {
    opacity: 0.02;
  }

  /* Simplify magnetic hover on touch devices */
  @media (pointer: coarse) {
    .btn--primary-light::before,
    .btn--primary::before {
      display: none;
    }

    .btn--primary-light,
    .btn--primary {
      transition: none;
    }
  }
}
