/* ============================================================
   Yhali — digital art shop
   Minimal canvas, funky psychedelic accents.
   ============================================================ */

:root {
  --bg:        #07060a;
  --bg-soft:   #0d0b14;
  --ink:       #f4f0ff;
  --muted:     #9a91b4;
  --line:      rgba(255,255,255,0.10);
  --card:      rgba(255,255,255,0.03);

  --c1: #ff2e97;   /* hot pink   */
  --c2: #7a04eb;   /* violet     */
  --c3: #00f0ff;   /* cyan       */
  --c4: #faff00;   /* acid yellow*/

  --grad: linear-gradient(110deg, var(--c1), var(--c2) 40%, var(--c3) 75%, var(--c4));
  --radius: 18px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* animated psychedelic glow behind everything */
.aura {
  position: fixed; inset: -20vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 15% 10%, rgba(255,46,151,0.28), transparent 60%),
    radial-gradient(42vmax 42vmax at 85% 15%, rgba(0,240,255,0.22), transparent 60%),
    radial-gradient(46vmax 46vmax at 50% 100%, rgba(122,4,235,0.30), transparent 60%);
  filter: saturate(1.2);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1.02) rotate(0deg); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.08) rotate(8deg); }
}
/* film grain */
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { font-family: "Syne", "Space Grotesk", sans-serif; font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; margin: 0; }

a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 200%;
  animation: hue 8s ease infinite;
}
@keyframes hue { 0%,100%{ background-position: 0% 50%; } 50%{ background-position: 100% 50%; } }

/* ---------- top bar ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(7,6,10,0.85), rgba(7,6,10,0.2));
  border-bottom: 1px solid var(--line);
}
.brand { font-family: "Syne", sans-serif; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; text-decoration: none; }
.brand span { font-weight: 500; color: var(--muted); font-family: "Space Grotesk", sans-serif; font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; display:block; margin-top:-2px;}
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav a.subtle { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.nav a.subtle:hover { color: var(--ink); }

.cart-btn {
  position: relative; cursor: pointer; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); border-radius: 999px; padding: 9px 18px; font: inherit; font-size: 0.9rem;
  transition: border-color .2s, transform .1s;
}
.cart-btn:hover { border-color: var(--c3); }
.cart-btn:active { transform: scale(0.97); }
.cart-count {
  position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--grad); color: #000; font-weight: 700; font-size: 0.72rem;
  display: grid; place-items: center;
}

/* ---------- hero ---------- */
.hero { padding: 90px 0 40px; position: relative; }
.hero h1 { font-size: clamp(2.8rem, 9vw, 6.4rem); }
.hero .lead { color: var(--muted); max-width: 46ch; margin-top: 22px; font-size: 1.1rem; }
.hero .pill { display:inline-block; font-size:0.75rem; letter-spacing:0.2em; text-transform:uppercase;
  color: var(--c3); border:1px solid var(--line); border-radius:999px; padding:6px 14px; margin-bottom:26px;}
.scroll-cue { margin-top: 34px; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase; }

/* ---------- gallery ---------- */
.section-head { display:flex; align-items:baseline; justify-content:space-between; margin: 40px 0 26px; gap: 20px; flex-wrap: wrap;}
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.section-head p { color: var(--muted); margin: 0; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-bottom: 90px; }
@media (max-width: 900px){ .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px){ .grid { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card);
  cursor: pointer; transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); border-color: transparent;
  box-shadow: 0 0 0 1px var(--c2), 0 18px 50px -20px var(--c1); }
.card .thumb { aspect-ratio: 1/1; overflow: hidden; position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display:block; transition: transform .5s ease; }
.card:hover .thumb img { transform: scale(1.06) rotate(0.5deg); }
.card .meta { padding: 16px 18px 20px; display:flex; flex-direction: column; gap: 4px; }
.card .meta .t { font-family: "Syne", sans-serif; font-weight: 700; font-size: 1.08rem; }
.card .meta .sub { color: var(--muted); font-size: 0.85rem; }
.card .meta .price { margin-top: 8px; font-weight: 700; }
.card .meta .price span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 70px; color: var(--muted); font-size: 0.9rem; }
.foot a { color: var(--c3); text-decoration: none; }

/* ---------- modal (artwork detail + checkout) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center;
  background: rgba(4,3,8,0.7); backdrop-filter: blur(6px); padding: 24px;
}
.overlay.open { display: flex; }
.modal {
  width: min(920px, 100%); max-height: 90vh; overflow: auto; border-radius: 22px;
  background: var(--bg-soft); border: 1px solid var(--line); position: relative;
  box-shadow: 0 0 0 1px var(--c2), 0 40px 120px -30px var(--c1);
}
.modal .close { position: absolute; top: 14px; right: 14px; z-index: 2; cursor: pointer;
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(0,0,0,0.4); color: var(--ink); font-size: 1.1rem; display:grid; place-items:center; }
.modal .close:hover { border-color: var(--c1); }

.detail { display: grid; grid-template-columns: 1.05fr 1fr; }
@media (max-width: 720px){ .detail { grid-template-columns: 1fr; } }
.detail .art { background:#000; }
.detail .art img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 260px; }
.detail .info { padding: 34px 32px; }
.detail .info h2 { font-size: 2rem; }
.detail .info .sub { color: var(--muted); margin: 6px 0 18px; }
.detail .info .desc { color: #cfc6ea; margin-bottom: 24px; }
.detail .info .bigprice { font-family:"Syne",sans-serif; font-weight:800; font-size: 2rem; margin-bottom: 20px; }

.btn {
  border: none; cursor: pointer; font: inherit; font-weight: 700; border-radius: 999px;
  padding: 14px 26px; color: #06040c; background: var(--grad); background-size: 200% 200%;
  transition: transform .12s, filter .2s; animation: hue 8s ease infinite;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); animation: none; }
.btn.ghost:hover { border-color: var(--c3); }
.btn.block { width: 100%; }
.btn[disabled]{ opacity: .5; cursor: not-allowed; }

/* checkout form */
.form { display: grid; gap: 14px; margin-top: 6px; }
.form label { font-size: 0.82rem; color: var(--muted); display:block; margin-bottom: 6px; letter-spacing: 0.04em; }
.form input {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.03); color: var(--ink); font: inherit;
}
.form input:focus { outline: none; border-color: var(--c3); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.demo-note { font-size: 0.78rem; color: var(--muted); background: rgba(0,240,255,0.06);
  border: 1px solid rgba(0,240,255,0.2); border-radius: 12px; padding: 10px 12px; }
.err { color: #ff6b9d; font-size: 0.86rem; min-height: 1em; }

/* success / download */
.success { text-align: center; padding: 44px 34px; }
.success .check { font-size: 3rem; }
.success h2 { margin: 12px 0 8px; }
.success p { color: var(--muted); }

/* cart drawer */
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); z-index: 90;
  background: var(--bg-soft); border-left: 1px solid var(--line); transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer header { padding: 22px 22px 14px; display:flex; justify-content: space-between; align-items:center; border-bottom: 1px solid var(--line); }
.drawer .items { flex: 1; overflow: auto; padding: 16px 22px; display: grid; gap: 14px; align-content: start; }
.drawer .foot { border-top: 1px solid var(--line); padding: 20px 22px; }
.line { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; }
.line img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.line .x { color: var(--muted); cursor: pointer; border: none; background: none; font-size: 1rem; }
.line .x:hover { color: var(--c1); }
.empty-cart { color: var(--muted); text-align:center; margin-top: 40px; }
.total-row { display:flex; justify-content: space-between; font-family:"Syne",sans-serif; font-weight:800; font-size: 1.3rem; margin-bottom: 16px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- galleries (display-only) ---------- */
.gallery-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  cursor: zoom-in; background: var(--card); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s; }
.gallery-card:hover { transform: translateY(-6px); border-color: transparent;
  box-shadow: 0 0 0 1px var(--c3), 0 18px 50px -20px var(--c2); }
.gallery-card .thumb { aspect-ratio: 1/1; overflow: hidden; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.gallery-card:hover img { transform: scale(1.06); }
.gallery-card .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 14px;
  font-family:"Syne",sans-serif; font-weight: 700; font-size: 0.98rem;
  background: linear-gradient(to top, rgba(4,3,8,0.85), transparent); }

/* ---------- lightbox ---------- */
#lightbox .lightbox-inner { max-width: min(1100px, 96vw); max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
#lightbox img { max-width: 100%; max-height: 82vh; border-radius: 14px; box-shadow: 0 0 0 1px var(--c2), 0 40px 120px -30px var(--c1); }
.lightbox-cap { margin-top: 14px; color: var(--ink); font-family:"Syne",sans-serif; font-weight: 700; text-align: center; }
#lightbox .close { top: -6px; right: -6px; }

/* contact */
#contact .clink { color: var(--c3); text-decoration: none; }
#contact .clink:hover { text-decoration: underline; }

/* shop filter */
.filter-wrap { display: flex; align-items: center; gap: 10px; }
.filter-wrap label { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.filter-wrap select {
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font: inherit; font-size: 0.9rem; cursor: pointer;
}
.filter-wrap select:focus { outline: none; border-color: var(--c3); }

/* type badge on shop cards */
.type-badge {
  display: inline-block; align-self: flex-start; margin-bottom: 6px;
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  color: var(--c3); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}

/* linkable section headings (home preview) */
h2.linkable { transition: color .2s; }
h2.linkable .arrow { display: inline-block; transition: transform .2s; opacity: 0.6; }
a:hover h2.linkable { color: var(--c3); }
a:hover h2.linkable .arrow { transform: translateX(6px); opacity: 1; }

/* gallery card without a cover image */
.empty-thumb { width: 100%; height: 100%; background:
  radial-gradient(60% 60% at 30% 30%, rgba(122,4,235,0.5), transparent),
  radial-gradient(60% 60% at 80% 70%, rgba(0,240,255,0.4), transparent), var(--bg-soft); }
