/* Midnight hacker parchment - single stylesheet (mobile-first, responsive, accessible) */

:root{
  --bg: #efe7ce;            /* parchment base */
  --bg-dark: #d9d2ba;
  --text: #0b0b0b;           /* black text for hacker feel */
  --glass: rgba(255,255,255,0.28);
  --glass-border: rgba(0,0,0,0.18);
  --shadow: 0 12px 28px rgba(0,0,0,.25);
  --accent: #00ff88;          /* neon green accent for focus */
  --radius: 14px;
}

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

html, body { height: 100%; }
html { background: #e9e0c8; }
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.03) 50%), #efe7ce;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(0,0,0,0.04) 0 10%, transparent 10%),
    radial-gradient(circle at 85% 10%, rgba(0,0,0,0.04) 0 12%, transparent 12%),
    linear-gradient(135deg, #efe7ce 0%, #eae5d0 40%, #e6e0c6 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Layout: center the hero, keep it clean on small screens */
main {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  min-height: 60vh;
}

/* Frosted glass image frame (hero) */
.image-frame {
  width: min(94vw, 860px);
  padding: 1rem;
  border-radius: calc(var(--radius) * 1.1);
  background: rgba(255,255,255,0.28);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
}

/* Image inside the frame */
.image-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  filter: saturate(105%);
  /* optional subtle sepia for parchment vibe without images */
  /* filter: saturate(105%) contrast(105%); */
}

/* Footer and product ad styling (glass-like, accessible) */
footer {
  padding: 1.75rem 1rem;
  text-align: center;
  color: var(--text);
}

.product-ad {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.28);
  border: 1px solid var(--glass-border);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  margin-bottom: 0.75rem;
}

.product-ad h3 {
  font-size: 0.95rem;
  margin: 0;
  letter-spacing: .2px;
  font-weight: 700;
  text-transform: none;
}

.product-ad a {
  text-decoration: none;
  display: inline-block;
  width: 100%;
}

.product-ad a p {
  margin: 0;
  padding: 0.55rem 0.85rem;
  background: #111;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

/* Subtle brand line under ad (could be used by the page) */
footer p { margin: 0.35rem 0 0; font-size: 0.92rem; color: #111; }

/* Focus styles for accessibility (keyboard/navigation) */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Improve focus for links inside the ad */
.product-ad a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Hover/active polish for CTAs (the ad) */
.product-ad a:hover p,
.product-ad a:active p {
  background: #0b0b0b;
  transform: translateY(-1px);
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after { transition: none !important; animation: none !important; }
}

/* Desktop/tablet refinements */
@media (min-width: 768px) {
  main {
    padding: 2rem;
    min-height: 72vh;
  }

  .image-frame {
    padding: 1.25rem;
    border-radius: 18px;
  }

  .product-ad {
    padding: 0.85rem 1.25rem;
  }

  .product-ad h3 { font-size: 1rem; }
  .product-ad a p { padding: 0.65rem 1rem; font-size: 1rem; }
}

/* Very wide screens: keep a cyberpunk compact feel with more negative space */
@media (min-width: 1200px) {
  main { padding: 3rem; }
  .image-frame { width: min(78vw, 900px); }
}