/* ZCraft Studios — UI/UX polish overlay
   Loaded after the base site CSS. Keeps the same features/config-driven content while improving layout, motion, spacing, and card hierarchy. */

:root {
  --studio-surface: rgba(17, 20, 24, 0.78);
  --studio-surface-strong: rgba(22, 27, 34, 0.9);
  --studio-line: rgba(255, 255, 255, 0.09);
  --studio-line-hot: rgba(239, 68, 68, 0.32);
  --studio-glow-red: rgba(239, 68, 68, 0.22);
  --studio-glow-cyan: rgba(103, 232, 249, 0.16);
  --studio-radius-lg: 22px;
  --studio-radius-md: 16px;
  --studio-shadow: 0 26px 90px -52px rgba(0, 0, 0, 0.95);
  --studio-shadow-hot: 0 30px 90px -62px rgba(239, 68, 68, 0.78);
  --studio-ease: cubic-bezier(.2, .8, .2, 1);
}

html { scroll-padding-top: 86px; }

body {
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.16), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(103, 232, 249, 0.12), transparent 26rem),
    linear-gradient(180deg, #090b0e 0%, #0c0e10 42%, #090b0e 100%);
}

body::before {
  background:
    radial-gradient(circle at 16% 18%, rgba(239, 68, 68, 0.14), transparent 24%),
    radial-gradient(circle at 86% 20%, rgba(103, 232, 249, 0.12), transparent 22%),
    radial-gradient(circle at 50% 78%, rgba(251, 146, 60, 0.08), transparent 28%),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: auto, auto, auto, 54px 54px, 54px 54px;
  mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

.wrapper,
.topbar-inner,
.breadcrumbs,
.footer-inner {
  max-width: 1180px;
}

.wrapper {
  padding-left: clamp(16px, 4vw, 34px);
  padding-right: clamp(16px, 4vw, 34px);
}

.topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 13, 0.74);
  box-shadow: 0 20px 60px -48px rgba(0,0,0,0.95);
}

@supports (backdrop-filter: blur(18px)) {
  .topbar { backdrop-filter: blur(18px) saturate(150%); }
}

.topbar-inner { height: 64px; }

.topbar-logo {
  font-family: var(--sans);
  letter-spacing: -0.02em;
  color: var(--text);
}

.topbar-logo::before { content: ''; display: none; }

.topbar-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.08), 0 14px 38px -18px rgba(239,68,68,0.9);
}

.topbar-nav {
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  background: rgba(255,255,255,0.025);
}

.topbar-nav a {
  border-radius: 999px;
  padding: 7px 13px;
  transition: transform .22s var(--studio-ease), color .18s ease, background .18s ease, box-shadow .18s ease;
}

.topbar-nav a::before { content: ''; display: none; }

.topbar-nav a:hover,
.topbar-nav a.active {
  transform: translateY(-1px);
  background: rgba(239, 68, 68, 0.12);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.18);
}

.breadcrumbs {
  padding-top: 10px;
  padding-bottom: 16px;
}

.page-hero,
.hero {
  position: relative;
  padding-top: clamp(54px, 8vw, 96px);
  padding-bottom: clamp(34px, 5vw, 58px);
  margin-bottom: clamp(24px, 4vw, 46px);
  border-bottom: 0;
}

.page-hero::after,
.hero::after {
  content: '';
  display: block;
  width: min(760px, 88%);
  height: 1px;
  margin: clamp(26px, 4vw, 44px) auto 0;
  background: linear-gradient(90deg, transparent, rgba(239,68,68,0.48), rgba(103,232,249,0.28), transparent);
}

.page-label,
.hero-prompt,
.contact-kicker,
.resource-status {
  width: fit-content;
  margin-inline: auto;
  border: 1px solid rgba(103,232,249,0.18);
  background: rgba(103,232,249,0.055);
  color: var(--cyan);
  border-radius: 999px;
  padding: 5px 10px;
  line-height: 1;
}

.hero-prompt { margin-inline: 0; }
.hero-prompt::before { content: ''; }
.hero-name,
.page-hero h1,
.contact-title {
  text-wrap: balance;
  background: linear-gradient(135deg, #fff 0%, #e2e8f0 36%, #fca5a5 70%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc,
.page-copy,
.contact-copy,
.resource-highlight p,
.blog-body p,
.legal-detail p {
  color: color-mix(in srgb, var(--text2) 88%, white 12%);
}

.hero-grid {
  grid-template-columns: minmax(0, 1.06fr) minmax(280px, 390px);
  gap: clamp(24px, 6vw, 72px);
  align-items: center;
}

.window,
.resource-card,
.blog-card,
.contact-platform-card,
.contact-item,
.contact-note-card,
.team-member-card,
.legal-card,
.comparison-card,
.maintenance-card,
.request-form-card,
.contact-primary-card,
.resource-detail,
.blog-detail,
.legal-detail {
  border-radius: var(--studio-radius-md) !important;
  border-color: var(--studio-line) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), transparent 34%),
    var(--studio-surface) !important;
  box-shadow: var(--studio-shadow);
}

.window,
.resource-card,
.blog-card,
.team-member-card,
.contact-platform-card,
.contact-item,
.comparison-card {
  transform: translateZ(0);
  transition: transform .28s var(--studio-ease), border-color .24s ease, box-shadow .28s var(--studio-ease), background .24s ease;
}

.window:hover,
.resource-card:hover,
.blog-card:hover,
.team-member-card:hover,
.contact-platform-card:hover,
.contact-item:hover,
.comparison-card:hover {
  transform: translateY(-5px);
  border-color: var(--studio-line-hot) !important;
  box-shadow: var(--studio-shadow-hot);
}

.window-bar {
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
}

.window-body { padding: clamp(18px, 3vw, 30px); }

.page-grid,
.resources-grid,
.blog-grid,
.contact-platforms-grid,
.contact-grid-fluid,
.comparison-grid {
  gap: clamp(14px, 2.4vw, 22px) !important;
}

.resources-grid,
.blog-grid,
.comparison-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.resource-card,
.blog-card {
  overflow: hidden;
  min-height: 100%;
}

.resource-card img,
.blog-card img,
.resource-detail img,
.blog-detail img {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}

.tags,
.resource-tags,
.blog-tags {
  gap: 8px;
}

.tag,
.featured-pill,
.badge,
.resource-status {
  border-radius: 999px !important;
}

.btn {
  border-radius: 999px;
  padding: 11px 18px;
  transition: transform .2s var(--studio-ease), box-shadow .2s var(--studio-ease), border-color .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #120607;
  background: linear-gradient(135deg, #fb7185, #ef4444 48%, #fb923c);
  box-shadow: 0 18px 38px -24px rgba(239, 68, 68, 1);
}

.btn-primary:hover {
  box-shadow: 0 22px 48px -24px rgba(239, 68, 68, 1);
}

.btn-ghost {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.025);
}

.request-form input,
.request-form textarea,
.donation-field input,
select {
  border-radius: 14px !important;
  background: rgba(255,255,255,0.035) !important;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.request-form input:focus,
.request-form textarea:focus,
.donation-field input:focus,
select:focus {
  border-color: rgba(239,68,68,0.56) !important;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.13) !important;
}

.team-pyramid { gap: clamp(16px, 3vw, 26px); }
.team-pyramid-row { gap: clamp(12px, 2vw, 20px); }
.team-member-avatar { border-radius: 22px; }

.contact-shell {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.86fr);
  gap: clamp(18px, 4vw, 34px);
}

.footer-inner,
footer {
  border-color: rgba(255,255,255,0.08) !important;
}

footer {
  margin-top: clamp(40px, 7vw, 80px);
}

.footer-links a,
.breadcrumbs a {
  transition: color .18s ease, transform .18s ease;
}

.footer-links a:hover,
.breadcrumbs a:hover {
  transform: translateY(-1px);
}

@keyframes studioFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes studioSoftIn {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.window,
.resource-card,
.blog-card,
.team-member-card,
.contact-platform-card,
.contact-item,
.comparison-card,
.legal-card {
  animation-name: studioSoftIn;
  animation-duration: .62s;
  animation-timing-function: var(--studio-ease);
  animation-fill-mode: both;
}

.hero-skin-panel,
.contact-primary-card {
  animation: studioFloat 7s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .contact-shell,
  .page-grid {
    grid-template-columns: 1fr !important;
  }
  .topbar-nav {
    border-radius: 18px;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    min-height: 64px;
  }
  .topbar-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 6px;
  }
  .topbar-nav a {
    white-space: nowrap;
  }
  .page-label,
  .hero-prompt,
  .contact-kicker {
    margin-inline: auto;
  }
  .hero-actions,
  .window-actions,
  .resource-detail-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
}
