/* ============================================================
   instantaaron.com — design system
   airpiehi.com's neobrutalist language, tuned calm & professional.
   Burnt-orange field, white panels, hard borders + offset shadows.
   ============================================================ */

:root {
  --bg-color: #d35400;
  --ink: #000000;
  --ink-soft: #2a2a2a;
  --paper: #ffffff;

  --panel-border: 3px solid #000000;
  --panel-shadow: 6px 6px 0 0 #000000;
  --panel-shadow-lg: 10px 10px 0 0 #000000;
  --panel-shadow-hover: 9px 9px 0 0 #000000;

  --accent-games: #a855f7;
  --accent-apps: #38bdf8;
  --accent-music: #fb7185;
  --accent-promo: #ffee00;
  --card-bg: #f7f3ec;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 10px;
  --r-hero: 30px;
  --maxw: 1000px;

  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(255, 210, 120, 0.18), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(120, 40, 0, 0.22), transparent 40%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.1rem, 4vw, 2.5rem);
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(2.75rem, 7vw, 5rem);
}

.panel { background: var(--paper); border: var(--panel-border); border-radius: var(--r-lg); box-shadow: var(--panel-shadow); }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s var(--ease-pop); transition-delay: var(--reveal-delay, 0ms); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

/* ================= HERO ================= */
.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.25rem, 4vw, 2.25rem);
  align-items: center;
  padding-top: clamp(0.5rem, 3vw, 2rem);
}
.hero-avatar {
  width: clamp(104px, 24vw, 168px);
  height: clamp(104px, 24vw, 168px);
  background: var(--paper);
  border: var(--panel-border);
  border-radius: var(--r-hero);
  box-shadow: var(--panel-shadow);
  padding: 8px;
  animation: heroFloat 6s ease-in-out infinite;
  transition: box-shadow .25s ease;
  will-change: transform;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -2px;
  color: var(--paper);
  text-shadow: 3px 3px 0 #000;
}
.hero-tagline {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(0.95rem, 3.2vw, 1.35rem);
  color: #1a1005;
  letter-spacing: 0.2px;
}

/* ================= PROMO ================= */
.promo {
  background: var(--accent-promo);
  border: var(--panel-border);
  border-radius: var(--r-lg);
  box-shadow: var(--panel-shadow-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}
.promo-body h2 { font-family: var(--font-display); font-size: clamp(1.3rem, 4vw, 1.9rem); font-weight: 700; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.promo-body h2 img { width: 1.5em; height: 1.5em; }
.promo-body p { font-weight: 500; max-width: 52ch; }
.promo-cta { display: flex; flex-direction: column; gap: 0.6rem; }

/* ================= BIO + CONTACT ================= */
.bio { display: flex; flex-direction: column; gap: 1.5rem; }
.bio-card { padding: clamp(1.5rem, 4vw, 2.25rem); }
.bio-card p { font-weight: 500; font-size: clamp(1rem, 2.6vw, 1.15rem); }
.bio-card p + p { margin-top: 1rem; }

.contact-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.contact-link {
  background: var(--paper);
  border: var(--panel-border);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-weight: 700;
  box-shadow: 4px 4px 0 0 #000;
  transition: transform .18s var(--ease-pop), box-shadow .18s ease;
}
.contact-link:hover, .contact-link:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 #000; outline: none; }
.contact-link:active { transform: translate(1px, 1px); box-shadow: 3px 3px 0 0 #000; }

/* ================= SECTIONS ================= */
.section { scroll-margin-top: 4.5rem; }
.section-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.5vw, 2.1rem);
  font-weight: 700;
  color: #fff;
  background: var(--section-accent, #a855f7);
  border: var(--panel-border);
  border-radius: var(--r-md);
  box-shadow: var(--panel-shadow);
  padding: 0.5rem 1.15rem;
  transform: rotate(-1.5deg);
}
.section-blurb { font-weight: 500; max-width: 60ch; color: #1a1a1a; background: rgba(255,255,255,0.55); padding: 0.35rem 0.7rem; border-radius: var(--r-sm); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.5rem); }

/* ================= CARD (button) ================= */
.card {
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: var(--card-bg);
  border: var(--panel-border);
  border-radius: var(--r-md);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s var(--ease-pop), box-shadow .2s ease;
}
.card:hover, .card:focus-visible { transform: translate(-3px, -3px); box-shadow: var(--panel-shadow-hover); outline: none; }
.card:active { transform: translate(1px, 1px); box-shadow: 3px 3px 0 0 #000; }

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #171717;
  border-bottom: var(--panel-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
/* blurred zoom of the same art fills the frame — no flat color mat */
.card-media .media-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.25);
  filter: blur(22px) saturate(1.15) brightness(0.92);
}
/* sharp, full image on top — never cropped, rounded corners */
.card-media .media-fg {
  position: relative; z-index: 1;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  min-width: 0; min-height: 0;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  transition: transform .3s var(--ease-pop);
}
.card:hover .card-media .media-fg { transform: scale(1.04); }
.card-media.fallback { display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--section-accent, #a855f7); }
.card-media.fallback .fb-title { font-family: var(--font-display); font-weight: 700; color: #fff; text-align: center; text-shadow: 2px 2px 0 rgba(0,0,0,0.4); font-size: 1.05rem; line-height: 1.15; }

.card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; background: #000; color: #fff; padding: 0.14rem 0.5rem; border-radius: 999px; }
.tag.role { background: var(--section-accent, #a855f7); }
.card-blurb { font-size: clamp(0.72rem, 1.6vw, 0.8rem); font-weight: 500; color: var(--ink-soft); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-weight: 800; font-family: var(--font-display);
  border: var(--panel-border); border-radius: var(--r-sm);
  padding: 0.7rem 1.2rem; background: #000; color: #fff;
  box-shadow: 4px 4px 0 0 #000; cursor: pointer;
  transition: transform .16s var(--ease-pop), box-shadow .16s ease;
}
.btn:hover, .btn:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 #000; outline: none; }
.btn:active { transform: translate(1px, 1px); box-shadow: 3px 3px 0 0 #000; }
.btn.store-badge { padding: 0; border: none; background: transparent; box-shadow: none; }
.btn.store-badge img { height: 44px; width: auto; }

/* ================= NAV ================= */
.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: center; gap: 1.1rem;
  padding: 0.6rem;
  background: rgba(211, 84, 0, 0.85);
  border-bottom: 3px solid rgba(0,0,0,0.22);
}
.topnav a {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(0.8rem, 2.6vw, 0.92rem);
  padding: 0.4rem 1rem; border-radius: 999px;
  border: 2px solid #000; color: #fff; box-shadow: 2px 2px 0 0 #000;
  transition: transform .16s var(--ease-pop), box-shadow .2s ease;
}
.topnav a[href="#games"] { background: var(--accent-games); }
.topnav a[href="#apps"]  { background: var(--accent-apps); }
.topnav a[href="#music"] { background: var(--accent-music); }
.topnav a:hover { transform: translateY(-2px); box-shadow: 3px 4px 0 0 #000; }
.topnav a.active { transform: translateY(-3px) scale(1.15); box-shadow: 5px 6px 0 0 #000; }

/* ================= FOOTER ================= */
.site-footer { text-align: center; padding: 2.5rem 1rem calc(2.5rem + env(safe-area-inset-bottom)); color: rgba(0,0,0,0.72); font-weight: 600; font-size: 0.9rem; }
.footer-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.footer-social a {
  background: var(--paper); border: 2px solid #000; border-radius: 999px;
  padding: 0.4rem 1.1rem; font-weight: 700; color: #000;
  box-shadow: 3px 3px 0 0 #000;
  transition: transform .18s var(--ease-pop), box-shadow .18s ease;
}
.footer-social a:hover, .footer-social a:focus-visible { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 0 #000; outline: none; }
.footer-social a:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 0 #000; }
.site-footer .edit-link { display: inline-block; margin-top: 0.6rem; font-weight: 700; border-bottom: 2px solid #000; transition: opacity .2s ease; }
.site-footer .edit-link:hover { opacity: 0.65; }

/* ================= MODAL ================= */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(0.75rem, 3vw, 2rem);
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(40, 15, 0, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .25s ease;
}
.modal.open .modal-backdrop { opacity: 1; }
.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 780px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border: var(--panel-border);
  border-radius: var(--r-lg);
  box-shadow: var(--panel-shadow-lg);
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  transition: transform .3s var(--ease-pop), opacity .25s ease;
}
.modal.open .modal-panel { transform: none; opacity: 1; }
.modal-close {
  position: absolute; top: 0.7rem; right: 0.7rem; z-index: 2;
  width: 38px; height: 38px; display: grid; place-items: center;
  background: #fff; color: #000;
  border: 2px solid #000; border-radius: 50%;
  box-shadow: 2px 2px 0 0 #000; cursor: pointer;
  transition: transform .16s var(--ease-pop), background .2s ease, color .2s ease;
}
.modal-close:hover { transform: rotate(90deg); background: #000; color: #fff; }
.modal-media {
  position: relative;
  background: #171717;
  border-bottom: var(--panel-border);
  border-radius: calc(var(--r-lg) - 3px) calc(var(--r-lg) - 3px) 0 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 1.75rem);
  min-height: 200px;
}
.modal-media .media-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.25);
  filter: blur(28px) saturate(1.15) brightness(0.9);
}
.modal-media .media-fg { position: relative; z-index: 1; max-width: 100%; max-height: 340px; width: auto; height: auto; border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
.modal-body { padding: clamp(1.1rem, 4vw, 1.75rem); display: flex; flex-direction: column; gap: 0.75rem; }
.modal-body h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 5vw, 1.7rem); line-height: 1.1; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.modal-meta .tag { font-size: 0.72rem; padding: 0.2rem 0.6rem; }
.modal-blurb { font-weight: 500; font-size: 1.02rem; line-height: 1.5; color: var(--ink-soft); }
.modal-link { align-self: flex-start; margin-top: 0.35rem; }

/* ================= RESPONSIVE ================= */
@media (max-width: 820px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .promo { grid-template-columns: 1fr; }
  .promo-cta { flex-direction: row; flex-wrap: wrap; }
  .section-blurb { font-size: 0.92rem; }
}
@media (max-width: 520px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .card-body { padding: 0.7rem 0.8rem 0.9rem; }
  .card-title { font-size: 0.95rem; }
  .card-blurb { -webkit-line-clamp: 4; }
  .contact-row { justify-content: center; }
}
@media (max-width: 360px) {
  .card-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
