/* ============================================================
   HERO NEW — Incline Agency
   ============================================================ */

.hero-new {
  background: #0B1113;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 72px) clamp(8vh, 12vh, 15vh);
  position: relative;
  overflow: hidden;
}

/* Subtle background dot grid */
.hero-new::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Faint glow blob top-right */
.hero-new::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Bottom vignette — fades into next section */
.hero-vignette {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: clamp(80px, 14vh, 160px);
  background: linear-gradient(to bottom, transparent 0%, rgba(11,17,19,0.60) 60%, #0B1113 100%);
  pointer-events: none;
  z-index: 2;
}

.hero-new-inner {
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr minmax(0, 42vw);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ---- Left: Text column ---- */
.hero-new-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;  /* prevent grid blowout */
}

/* Eyebrow pill */
.hero-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 14px;
  align-self: flex-start;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.60);
  flex-shrink: 0;
  animation: hero-dot-pulse 2.4s ease-in-out infinite;
}

@keyframes hero-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* H1 */
.hero-new-h1 {
  font-family: var(--font-main);
  font-size: clamp(2.2rem, 4.2vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.04;
  color: #ffffff;
  margin: 0 0 16px;
  overflow-wrap: break-word;
  text-shadow:
    0 0 60px rgba(255,255,255,0.06),
    0 1px 0 rgba(255,255,255,0.12);
}


/* Subhead */
.hero-new-subhead {
  font-family: var(--font-main);
  font-size: clamp(0.95rem, 1.3vw, 1.08rem);
  font-weight: 500;
  color: #CFE8FF;
  line-height: 1.55;
  margin: 0 0 12px;
  max-width: 560px;
}

/* Lead */
.hero-new-lead {
  font-family: var(--font-main);
  font-size: clamp(0.88rem, 1vw, 0.96rem);
  color: #9AA6AE;
  line-height: 1.65;
  margin: 0 0 18px;
  max-width: 540px;
}

/* CTAs */
.hero-new-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 50px;
  padding: 11px 26px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(.2,.9,.2,1), box-shadow 160ms cubic-bezier(.2,.9,.2,1), background 160ms ease;
  letter-spacing: -0.01em;
  border: none;
}

.hero-btn--primary {
  background: #ffffff;
  color: #0B1113;
}

.hero-btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.90);
}

.hero-btn--primary:focus-visible {
  outline: 2px solid rgba(255,255,255,0.5);
  outline-offset: 3px;
}

.hero-btn--secondary {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.18);
}

.hero-btn--secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  border-color: rgba(255,255,255,0.32);
  color: #ffffff;
}

.hero-btn--secondary:focus-visible {
  outline: 2px solid rgba(255,255,255,0.5);
  outline-offset: 3px;
}

/* ---- Mobile-only visual card ---- */
.hero-mobile-card {
  display: none; /* hidden on desktop */
}

@media (max-width: 600px) {
  .hero-mobile-card {
    display: flex;
    align-items: stretch;
    background: #0D1A1D;
    border: 1px solid rgba(255,255,255,0.08);
    border-top: 1px solid rgba(39,201,63,0.28);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow:
      0 0 0 1px rgba(39,201,63,0.06),
      0 0 24px rgba(39,201,63,0.06),
      0 8px 24px rgba(0,0,0,0.40);
  }

  .hmc-terminal {
    flex: 1;
    padding: 13px 14px 13px;
    border-right: 1px solid rgba(255,255,255,0.05);
    min-width: 0;
  }

  .hmc-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
  }

  .hmc-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .hmc-line {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.45;
  }

  .hmc-dim { color: rgba(255,255,255,0.30); }

  .hmc-prompt {
    color: #27c93f;
    margin-right: 5px;
  }

  .hmc-scores {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 16px;
    gap: 8px;
    background: rgba(39,201,63,0.03);
  }

  .hmc-score {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .hmc-arc {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
  }

  .hmc-num {
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 800;
    color: #27c93f;
    line-height: 1;
    min-width: 26px;
    letter-spacing: -0.02em;
  }

  .hmc-sub {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.56rem;
    color: rgba(255,255,255,0.32);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
}

/* Metric chips */
.hero-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hero-metric-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 9px;
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
  font-family: var(--font-main);
  text-align: left;
}

.hero-metric-chip:hover,
.hero-metric-chip:focus-visible {
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.05);
  outline: none;
}

.hero-metric-chip:focus-visible {
  outline: 2px solid rgba(255,255,255,0.5);
  outline-offset: 2px;
}

.hero-metric-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero-metric-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9AA6AE;
}

.hero-metrics-note {
  font-family: var(--font-main);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.36);
  margin: 0;
  font-style: italic;
}

/* ---- Right: Tile collage ---- */
.hero-new-tiles {
  position: relative;
  height: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 8px;
  align-content: start;
  min-width: 0;  /* prevent grid blowout */
}

/* Base tile style */
.hero-tile {
  background: #0F181A;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: box-shadow 200ms ease;
}

/* Terminal tile — full width top row */
.hero-tile--terminal {
  grid-column: 1 / -1;
}

/* Lighthouse + analytics in second row */
.hero-tile--lighthouse {
  grid-column: 1;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, transform 160ms ease;
}
.hero-tile--lighthouse:hover {
  border-color: rgba(255,255,255,0.16);
  background: #111d1f;
  box-shadow: 0 4px 20px rgba(39,201,63,0.07);
  transform: translateY(-1px);
}
.hero-tile--lighthouse:active {
  transform: translateY(0);
}
.hero-tile--analytics  { grid-column: 2; }

/* Palette + code in third row */
.hero-tile--palette { grid-column: 1; }
.hero-tile--code    { grid-column: 2; }

/* Window bar (terminal / code) */
.htile-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.htile-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.htile-dot.r { background: #ff5f57; }
.htile-dot.y { background: #ffbd2e; }
.htile-dot.g { background: #28c840; }

.htile-filename {
  margin-left: 8px;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.30);
  font-family: 'SFMono-Regular', Consolas, monospace;
}

/* Terminal lines */
.htile-terminal-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.htile-line {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.80);
  line-height: 1.4;
}

.htile-dim { color: rgba(255,255,255,0.36); }

.htile-prompt {
  color: #27c93f;
  margin-right: 6px;
}

.htile-cursor {
  display: inline-block;
  animation: hero-blink 0.9s step-end infinite;
  color: #CFE8FF;
}

@keyframes hero-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Tile label */
.htile-label {
  font-family: var(--font-main);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.40);
  margin-bottom: 10px;
}

/* Lighthouse score row */
.htile-score-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-around;
}

.htile-score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}

.htile-arc {
  width: 36px;
  height: 36px;
}

.htile-score-num {
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 800;
  color: #27c93f;
  line-height: 1;
}

.htile-score-sub {
  font-family: var(--font-main);
  font-size: 0.58rem;
  color: rgba(255,255,255,0.40);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Analytics chart */
.htile-spark-wrap {
  margin-bottom: 4px;
}

.htile-chart {
  display: block;
  width: 100%;
  height: auto;
}

/* Palette swatches */
.htile-swatches {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.htile-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.10);
}

.htile-token-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.htile-token-row {
  display: flex;
  justify-content: space-between;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.62rem;
}

.htile-token-name { color: #CFE8FF; }
.htile-token-val  { color: rgba(255,255,255,0.45); }

/* Code snippet */
.htile-code-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.5;
}

.htile-code-line { color: rgba(255,255,255,0.70); }
.htile-ind { padding-left: 12px; }
.htile-kw   { color: #CFE8FF; }
.htile-prop { color: #9AA6AE; }
.htile-val  { color: #27c93f; }

/* ---- Hero modal ---- */
.hero-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.hero-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  background: #0F181A;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 28px;
  max-width: 400px;
  width: calc(100vw - 48px);
  z-index: 900;
  box-shadow: 0 24px 72px rgba(0,0,0,0.65);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.hero-modal[hidden] { display: none; }

.hero-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  display: block;
}

.hero-modal h4 {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px;
  padding-right: 28px;
  letter-spacing: -0.02em;
}

.hero-modal p {
  font-family: var(--font-main);
  font-size: 0.88rem;
  color: #9AA6AE;
  line-height: 1.65;
  margin: 0 0 10px;
}

.hero-modal ul {
  margin: 0 0 12px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hero-modal ul li {
  font-family: var(--font-main);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
}

.hero-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.60);
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, color 150ms ease;
}

.hero-modal-close:hover {
  background: rgba(255,255,255,0.10);
  color: #ffffff;
}

.hero-modal-close:focus-visible {
  outline: 2px solid #CFE8FF;
  outline-offset: 2px;
}

/* ---- Responsive ---- */

/* Tablet / small desktop — stack columns */
@media (max-width: 1060px) {
  .hero-new-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-new-text {
    max-width: 100%;
  }

  .hero-new-tiles {
    max-width: 100%;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
  }
  .hero-tile--terminal   { grid-column: 1 / -1; }
  .hero-tile--lighthouse { grid-column: 1; }
  .hero-tile--analytics  { grid-column: 2; }
  .hero-tile--palette    { grid-column: 3; }
  .hero-tile--code       { grid-column: 1 / 3; }
}

/* Tablet portrait — 2-col tiles */
@media (max-width: 760px) {
  .hero-new {
    padding: 68px clamp(20px, 4vw, 48px) clamp(6vh, 9vh, 12vh);
  }

  .hero-new-tiles {
    max-width: 100%;
    grid-template-columns: 1fr 1fr;
  }
  .hero-tile--terminal   { grid-column: 1 / -1; }
  .hero-tile--lighthouse { grid-column: 1; }
  .hero-tile--analytics  { grid-column: 2; }
  .hero-tile--palette    { grid-column: 1; }
  .hero-tile--code       { grid-column: 2; }

  .hero-metric-chip {
    padding: 8px 12px;
  }
}

/* Landscape / short-height devices — prevent CTA clipping */
@media (max-height: 580px) {
  .hero-new {
    height: auto;
    max-height: none;
    padding-top: 80px;
    padding-bottom: 32px;
  }
  .hero-vignette { display: none; }
}

/* Mobile — single column, tiles reordered above chips */
@media (max-width: 600px) {
  .hero-new {
    height: auto;
    min-height: 100svh;
    min-height: 100vh;
    align-items: flex-start; /* prevent vertical centering leaving top gap */
    padding: 20px 20px 32px; /* #main-content already clears 68px for navbar */
  }

  /* Flatten grid into single flex column */
  .hero-new-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }

  /* display:contents lets tiles slot between text elements */
  .hero-new-text { display: contents; }

  /* Order: pill → h1 → subhead → tiles → chips → note → CTAs */
  .hero-eyebrow-pill { order: 1; margin-bottom: 10px; align-self: flex-start; }
  .hero-new-h1       { order: 2; font-size: clamp(2.2rem, 9vw, 3rem); margin-bottom: 10px; }
  .hero-new-subhead  { order: 3; font-size: 0.95rem; margin-bottom: 16px; max-width: 100%; }
  .hero-new-lead     { order: 4; display: none; }
  .hero-mobile-card  { display: none; }
  .hero-new-tiles    { order: 5; margin-bottom: 16px; }
  .hero-metrics      { order: 6; gap: 6px; margin-bottom: 6px; }
  .hero-metrics-note { order: 7; margin-bottom: 18px; }
  .hero-new-ctas     { order: 8; }

  /* CTAs full-width stacked */
  .hero-new-ctas {
    flex-direction: column;
    gap: 10px;
  }
  .hero-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }
  .hero-btn--secondary {
    border-color: rgba(255,255,255,0.40);
    color: #ffffff;
    background: rgba(255,255,255,0.06);
  }

  /* Metric chips — all 3 in one row */
  .hero-metrics { flex-wrap: nowrap; }
  .hero-metric-chip {
    padding: 8px 10px;
    flex: 1 1 0;
    min-width: 0;
  }
  .hero-metric-val   { font-size: 0.95rem; }
  .hero-metric-label { font-size: 0.60rem; }
}

/* Small mobile — extra compact */
@media (max-width: 420px) {
  .hero-new {
    padding: 16px 16px 28px;
  }

  .hero-eyebrow-pill {
    font-size: 0.64rem;
    padding: 4px 11px;
    margin-bottom: 8px;
  }

  .hero-new-h1 {
    font-size: clamp(2rem, 9.5vw, 2.8rem);
    margin-bottom: 8px;
  }

  .hero-new-subhead {
    font-size: 0.88rem;
    margin-bottom: 16px;
  }

  .hero-tile { padding: 10px; }

  .htile-line { font-size: 0.65rem; }
  .htile-label { font-size: 0.60rem; }
  .htile-code-lines { font-size: 0.62rem; }
}

/* Very small phones (360px and below) */
@media (max-width: 360px) {
  .hero-new {
    padding: 14px 14px 24px;
  }

  .hero-new-h1 {
    font-size: 1.9rem;
  }

  /* Keep 3-in-a-row even on very small screens */
  .hero-metric-chip {
    flex: 1 1 0;
  }

  .hero-tile { padding: 8px; }

  .htile-line,
  .htile-code-lines { font-size: 0.60rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow-dot,
  .htile-cursor,
  .hero-btn,
  .hero-metric-chip,
  .hero-modal,
  .hero-modal-backdrop {
    animation: none !important;
    transition: none !important;
  }
}
