/* =============================================================
   anuragalladi.com: audit fixes (1 Nov 2026)
   Loaded after mobile-fix.css on every page.
   ============================================================= */

/* 1. Contrast: secondary text clears WCAG AA on every surface */
:root { --text2: #9090a4; }
[data-page="porsche"] { --accent: #ff3b55; }
[data-page="arbeiten"] { --sapphire: #5b8def; }
.step-num { opacity: 0.8 !important; }
.st-concept { color: #9090a4 !important; }
.st-won { color: #ff5a4e !important; }
[data-page="porsche"] .case-cta-links a.primary { background: #c8102e; }
[data-page="porsche"] .case-cta-links a.primary:hover { background: #a80d26; }

/* 2. Homepage nav: solid bar once you scroll, so content never runs
      underneath the name and links */
nav.is-scrolled {
  mix-blend-mode: normal;
  background: rgba(6, 6, 8, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.9rem !important;
  padding-bottom: 0.9rem !important;
  transition: background 0.3s, padding 0.3s;
}

/* 3. Project cards: real work in the thumbnail, not a gradient */
.p-card-visual .p-hero-img.p-photo { filter: brightness(0.8) saturate(0.95); }
.p-card:hover .p-hero-img.p-photo { filter: brightness(0.95) saturate(1); }

/* 4. "In 30 seconds" summary at the top of every case study */
.tldr {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}
.tldr > div { background: rgba(12, 12, 16, 0.92); padding: 1.1rem 1.25rem 1.2rem; }
.tldr .tldr-k {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}
.tldr p { margin: 0; font-size: 0.98rem; line-height: 1.5; color: var(--text, #eeeef0); }
.tldr-head {
  grid-column: 1 / -1;
  background: transparent !important;
  padding: 0.6rem 1.25rem !important;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text2);
}

/* 5. Mobile */
@media (max-width: 900px) {
  /* projects: native swipe instead of a long pinned scroll */
  .projects-section { height: auto !important; min-height: 0 !important; overflow: visible !important; }
  .projects-pin { overflow: visible !important; display: block !important; }
  .projects-track {
    transform: none !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 1.25rem 1.5rem !important;
    gap: 1rem !important;
    scrollbar-width: none;
  }
  .projects-track::-webkit-scrollbar { display: none; }
  .projects-track .p-card { scroll-snap-align: start; width: 82vw !important; height: auto !important; min-height: 460px; }
  .projects-track .p-card-visual { flex: none; height: 200px; max-height: none; }
  .swipe-hint {
    display: block;
    padding: 0 1.25rem 0.75rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text2);
  }

  .tldr { grid-template-columns: 1fr; }

  /* Porsche page: process reel and long project id no longer push the page sideways */
  .pr-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .pr-item { min-width: 0; }
  .back-nav .proj-id { max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 901px) { .swipe-hint { display: none; } }

@media (prefers-reduced-motion: reduce) {
  nav.is-scrolled { transition: none; }
}

/* 6. Keyboard users: visible focus and a skip link */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent, #c8ff00);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100001;
  background: var(--accent, #c8ff00); color: #060608; padding: 0.6rem 1rem;
  font: 600 0.85rem/1 var(--font-sans, system-ui); border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* 7. Cover image right after each case-study hero */
.case-cover { margin: 0; padding: 2.5rem 3rem 0; }
.case-cover img { width: 100%; max-height: 72vh; aspect-ratio: 21 / 9; object-fit: cover; display: block; border-radius: 14px; border: 1px solid rgba(255,255,255,.06); background: #0c0c10; }
.case-cover figcaption, .cover-cap { font-family: var(--font-mono, monospace); font-size: 0.75rem; letter-spacing: .04em; color: var(--text2); margin-top: .7rem; }
@media (max-width: 900px) {
  .case-cover { padding: 1.5rem 1.25rem 0; }
  .case-cover img { aspect-ratio: 4 / 3; max-height: none; }
}

/* 8. Positioning line reads before the manifesto */
.hero-eyebrow { font-size: 0.95rem !important; letter-spacing: 0.14em !important; color: var(--accent) !important; opacity: 1 !important; }
.hero-positioning { font-size: clamp(1.1rem, 1.6vw, 1.45rem) !important; }
