/* ==========================================================================
   NeverMore 68 – ÚSTR Project Hub
   Light theme | WCAG 2.1 AA | Mobile-first | Bootstrap 5.3
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --nvm-bg:          #fafaf8;
  --nvm-bg-warm:     #f5f3ef;
  --nvm-bg-card:     #ffffff;
  --nvm-bg-hero:     #1a1a1a;
  --nvm-surface:     #f0eeea;
  --nvm-border:      #e2e0db;
  --nvm-border-h:    #d0cdc6;
  --nvm-text:        #1c1c1c;
  --nvm-text-body:   #3a3a3a;
  --nvm-text-muted:  #6b6b6b;
  --nvm-accent:      #c2272d;
  --nvm-accent-dark: #9e1f24;
  --nvm-accent-soft: rgba(194, 39, 45, 0.08);
  --nvm-accent-mid:  rgba(194, 39, 45, 0.15);
  --nvm-white:       #ffffff;
  --nvm-black:       #0a0a0a;
  --nvm-radius:      0.875rem;
  --nvm-radius-sm:   0.5rem;
  --nvm-radius-lg:   1.25rem;
  --nvm-transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nvm-shadow-sm:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --nvm-shadow:      0 4px 16px rgba(0,0,0,0.08);
  --nvm-shadow-lg:   0 12px 40px rgba(0,0,0,0.12);
  --nvm-font:        'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nvm-font-display:'Playfair Display', 'Georgia', serif;
}

/* ---------- Global ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--nvm-font);
  background-color: var(--nvm-bg);
  color: var(--nvm-text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- Skip Link (A11y) ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--nvm-accent);
  color: var(--nvm-white);
  font-weight: 600;
  border-radius: var(--nvm-radius-sm);
  text-decoration: none;
  transition: top var(--nvm-transition);
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--nvm-accent);
  outline-offset: 2px;
}

/* ---------- Focus (A11y) ---------- */
:focus-visible {
  outline: 3px solid var(--nvm-accent);
  outline-offset: 2px;
}
a:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--nvm-accent);
  color: var(--nvm-white);
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.25rem;
  background: var(--nvm-bg-hero);
  color: var(--nvm-white);
  overflow: hidden;
}

/* Subtle grain overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Gradient overlay at bottom for transition */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--nvm-bg));
  z-index: 2;
}

.hero > * {
  position: relative;
  z-index: 3;
}

/* Date badge */
.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.25rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.7s ease-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-date i {
  color: var(--nvm-accent);
}

/* Main title */
.hero-title {
  font-family: var(--nvm-font-display);
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 700;
  color: var(--nvm-white);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 0.25rem;
  animation: fadeInUp 0.7s ease-out 0.1s both;
}

.hero-title-accent {
  display: inline-block;
  font-family: var(--nvm-font-display);
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 700;
  color: var(--nvm-accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 1.5rem;
  animation: fadeInUp 0.7s ease-out 0.15s both;
}

.hero-theme {
  font-family: var(--nvm-font-display);
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255,255,255,0.6);
  margin: 0 0 2rem;
  letter-spacing: 0.01em;
  animation: fadeInUp 0.7s ease-out 0.2s both;
}

.hero-subtitle {
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  color: rgba(255,255,255,0.5);
  max-width: 48ch;
  margin: 0 auto 3rem;
  line-height: 1.7;
  animation: fadeInUp 0.7s ease-out 0.25s both;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  animation: fadeInUp 0.7s ease-out 0.3s both;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--nvm-radius-sm);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-meta-item i {
  color: rgba(255,255,255,0.35);
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: color var(--nvm-transition);
  animation: fadeIn 1s ease-out 0.5s both;
  z-index: 3;
}
.hero-scroll:hover {
  color: rgba(255,255,255,0.6);
}
.hero-scroll i {
  font-size: 1.125rem;
  animation: bounce 2.5s ease-in-out infinite;
}

/* ==================== USTR BANNER ==================== */
.ustr-banner {
  background: var(--nvm-white);
  border-bottom: 1px solid var(--nvm-border);
  padding: 1.75rem 0;
}

.ustr-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--nvm-text);
  transition: color var(--nvm-transition);
}

.ustr-banner-inner:hover {
  color: var(--nvm-accent);
}

.ustr-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--nvm-accent);
  color: var(--nvm-white);
  border-radius: var(--nvm-radius-sm);
  font-size: 1.125rem;
  flex-shrink: 0;
}

.ustr-banner-text {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
}

.ustr-banner-text small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--nvm-text-muted);
}

/* ==================== SECTION COMMON ==================== */
.section-projects {
  padding: 4rem 0 5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nvm-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.875rem;
}

.section-label::before,
.section-label::after {
  content: '';
  width: 2.5rem;
  height: 1px;
  background: var(--nvm-accent);
  opacity: 0.3;
}

.section-title {
  font-family: var(--nvm-font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--nvm-text);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 1rem;
  color: var(--nvm-text-muted);
  max-width: 52ch;
  margin: 0 auto;
  line-height: 1.7;
}

/* ==================== PROJECT CARDS ==================== */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--nvm-bg-card);
  border: 1px solid var(--nvm-border);
  border-radius: var(--nvm-radius);
  padding: 1.75rem;
  text-decoration: none;
  color: var(--nvm-text-body);
  transition: all var(--nvm-transition);
  height: 100%;
  overflow: hidden;
  box-shadow: var(--nvm-shadow-sm);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--nvm-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--nvm-border-h);
  box-shadow: var(--nvm-shadow);
  transform: translateY(-3px);
  color: var(--nvm-text-body);
}

.project-card:hover::before,
.project-card:focus-visible::before {
  transform: scaleX(1);
}

/* Icon */
.project-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--nvm-radius-sm);
  background: var(--nvm-accent-soft);
  color: var(--nvm-accent);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
  transition: all var(--nvm-transition);
}

.project-card:hover .project-icon {
  background: var(--nvm-accent);
  color: var(--nvm-white);
}

/* Title */
.project-card-title {
  font-family: var(--nvm-font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--nvm-text);
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

/* Description */
.project-card-desc {
  font-size: 0.875rem;
  color: var(--nvm-text-muted);
  line-height: 1.65;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}

/* Tag */
.project-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  background: var(--nvm-surface);
  border: 1px solid var(--nvm-border);
  border-radius: 2rem;
  font-size: 0.75rem;
  color: var(--nvm-text-muted);
  transition: all var(--nvm-transition);
  align-self: flex-start;
}

.project-card:hover .project-card-tag {
  background: var(--nvm-accent-soft);
  border-color: var(--nvm-accent-mid);
  color: var(--nvm-accent);
}

/* Arrow */
.project-card-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.875rem;
  color: var(--nvm-text-muted);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: all var(--nvm-transition);
}

.project-card:hover .project-card-arrow,
.project-card:focus-visible .project-card-arrow {
  opacity: 0.6;
  transform: translate(0, 0);
}

/* Featured card */
.project-card--featured {
  border-color: var(--nvm-accent-mid);
  background: linear-gradient(135deg, var(--nvm-white) 0%, rgba(194,39,45,0.03) 100%);
}

.project-card--featured::before {
  transform: scaleX(1);
}

.project-card--featured .project-icon {
  background: var(--nvm-accent);
  color: var(--nvm-white);
}

/* ==================== NM68 HIGHLIGHT SECTION ==================== */
.nm68-highlight {
  background: var(--nvm-bg-warm);
  border-top: 1px solid var(--nvm-border);
  border-bottom: 1px solid var(--nvm-border);
  padding: 4rem 0;
}

.nm68-card {
  background: var(--nvm-white);
  border: 1px solid var(--nvm-border);
  border-radius: var(--nvm-radius-lg);
  padding: 2.5rem;
  box-shadow: var(--nvm-shadow-sm);
}

.nm68-card-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: var(--nvm-accent);
  color: var(--nvm-white);
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.nm68-card-title {
  font-family: var(--nvm-font-display);
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 700;
  color: var(--nvm-text);
  margin: 0 0 1rem;
  line-height: 1.3;
}

.nm68-card-text {
  font-size: 0.9375rem;
  color: var(--nvm-text-muted);
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.nm68-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--nvm-border);
  font-size: 0.875rem;
  color: var(--nvm-text-body);
}

.nm68-detail:last-child {
  padding-bottom: 0;
}

.nm68-detail i {
  color: var(--nvm-accent);
  font-size: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.nm68-detail strong {
  color: var(--nvm-text);
  font-weight: 600;
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: var(--nvm-bg-hero);
  color: rgba(255,255,255,0.6);
  padding: 3rem 0 2rem;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1rem;
  text-decoration: none;
}

.footer-brand:hover {
  color: var(--nvm-white);
}

.footer-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--nvm-accent);
  color: var(--nvm-white);
  border-radius: var(--nvm-radius-sm);
  font-size: 0.875rem;
}

.footer-text {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  margin: 0 0 0.35rem;
  line-height: 1.6;
}

.footer-text a {
  color: rgba(255,255,255,0.6);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--nvm-transition);
}

.footer-text a:hover {
  color: var(--nvm-white);
}

.footer-divider {
  width: 3rem;
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 1.5rem auto;
}

/* ==================== SCROLL ANIMATIONS ==================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ==================== KEYFRAMES ==================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
  60% { transform: translateY(-2px); }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 575.98px) {
  .hero {
    min-height: 90vh;
    min-height: 90dvh;
    padding: 2.5rem 1.25rem;
  }
  .hero-scroll { display: none; }
  .hero-meta { gap: 0.5rem; }
  .hero-meta-item { font-size: 0.75rem; padding: 0.4rem 0.75rem; }
  .project-card { padding: 1.375rem; }
  .nm68-card { padding: 1.5rem; }
  .section-label::before,
  .section-label::after { width: 1.25rem; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .hero { padding: 3rem 1.5rem; }
  .project-card { padding: 1.5rem; }
  .nm68-card { padding: 2rem; }
}

/* ==================== HIGH CONTRAST ==================== */
@media (forced-colors: active) {
  .project-card { border: 2px solid ButtonText; }
  .project-card:hover,
  .project-card:focus-visible { border-color: Highlight; }
  .skip-link { background: Highlight; color: HighlightText; }
}

/* ==================== PRINT ==================== */
@media print {
  .hero { min-height: auto; background: white; color: black; padding: 2rem 0; }
  .hero::before, .hero::after, .hero-scroll, .ambient-glow { display: none; }
  .hero-title, .hero-title-accent { color: black; }
  .hero-theme, .hero-subtitle, .hero-date, .hero-meta-item { color: #333; }
  body { background: white; color: black; }
  .project-card { border: 1px solid #ccc; break-inside: avoid; box-shadow: none; }
  .site-footer { background: white; color: black; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 0.7em; color: #666; }
}
