/* Sruthi Arts — soft blush theme, mobile first.
   Petal-pink ground, plum ink, berry for actions, rose-gold fillets around every piece. */
:root {
  color-scheme: light;
  --blush: #fff4f6;        /* page ground */
  --petal: #fde6ec;        /* tinted bands, chips */
  --paper: #ffffff;        /* frame mat, sheets */
  --plum: #3b1d2c;         /* primary text */
  --mauve: #7a5667;        /* secondary text */
  --rose: #e0789c;         /* decorative accent */
  --berry: #a8325e;        /* links, buttons, prices (AA on blush and white) */
  --rosegold: #c8927a;     /* frame fillet */
  --leaf: #2f8a5b;         /* in stock */
  --amber: #b86a12;        /* last one */
  --line: rgba(59, 29, 44, .12);
  --shadow: 0 18px 50px rgba(168, 50, 94, .14);

  --display: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --body: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: .8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 6vw + .25rem, 4rem);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --tabbar-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
html.sheet-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(900px 560px at 88% -8%, rgba(224, 120, 156, .16), transparent 62%),
    radial-gradient(700px 520px at -12% 28%, rgba(200, 146, 122, .10), transparent 60%),
    var(--blush);
  color: var(--plum);
  font: 400 var(--step-0)/1.6 var(--body);
  padding-inline: var(--gutter);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--berry); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; border-radius: 2px; }
h1, h2 { font-family: var(--display); font-weight: 400; text-wrap: balance; line-height: 1.08; margin: 0; }
h2 { font-size: var(--step-2); }
em { font-style: italic; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px;
  padding-block: 14px;
  background: linear-gradient(var(--blush) 62%, rgba(255, 244, 246, 0));
}
.brand { display: inline-block; line-height: 0; color: var(--plum); text-decoration: none; margin-block: -6px; }
.logo-mark { height: 58px; width: auto; overflow: visible; }
.lg-moon, .lg-spark { transform-box: fill-box; transform-origin: center; }
.top-nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.top-nav a { color: var(--mauve); text-decoration: none; font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; position: relative; padding-block: 6px; }
.top-nav a:not(.ig)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--berry); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.top-nav a:hover { color: var(--berry); }
.top-nav a:hover::after { transform: scaleX(1); }
.top-nav a.ig { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; color: var(--berry); font-weight: 500; }
.ig svg { width: 16px; height: 16px; flex: none; }

main, .site-footer { max-width: var(--max); margin: 0 auto; }
section { padding-block: clamp(48px, 8vw, 96px); }

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(24px, 6vw, 72px) clamp(40px, 8vw, 96px); }
.eyebrow, .label-artist { font-family: var(--mono); font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase; color: var(--berry); margin: 0 0 16px; }
.hero h1 { font-size: var(--step-3); color: var(--plum); }
.hero h1 em { color: var(--rose); }
.lede { color: var(--mauve); max-width: 46ch; font-size: var(--step-1); line-height: 1.55; margin: 20px 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 22px; border: 1px solid var(--berry); border-radius: 999px;
  color: #fff; background: var(--berry); font: 700 var(--step-0)/1.2 var(--body); text-decoration: none;
  cursor: pointer; transition: background .2s, color .2s, transform .15s var(--ease), box-shadow .2s;
}
.btn:hover { background: transparent; color: var(--berry); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--berry); }
.btn.ghost:hover { background: var(--berry); color: #fff; }
.btn.small { min-height: 42px; font-size: .95rem; padding: 10px 18px; }
.btn.paypal { background: #ffc439; border-color: #ffc439; color: #111; }
.btn.paypal:hover { background: #f2b52e; border-color: #f2b52e; color: #111; }
.btn svg { width: 18px; height: 18px; flex: none; }

.hero-art { margin: 0; justify-self: center; width: min(100%, 420px); }
.hero-art img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.tilt { transition: transform .5s var(--ease); will-change: transform; }
.hero-art { position: relative; z-index: 1; }
.hero-copy { position: relative; z-index: 1; }
.hero h1 .w { display: inline-block; }
/* Ambient sparkles drifting around the hero */
.hero-sparkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-sparkles i { position: absolute; width: 14px; height: 14px; opacity: 0; background: var(--rose);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.hero-sparkles i:nth-child(1) { left: 6%; top: 18%; }
.hero-sparkles i:nth-child(2) { left: 44%; top: 8%; width: 10px; height: 10px; background: var(--rosegold); }
.hero-sparkles i:nth-child(3) { left: 52%; top: 72%; width: 8px; height: 8px; }
.hero-sparkles i:nth-child(4) { left: 92%; top: 14%; background: #f2c46b; }
.hero-sparkles i:nth-child(5) { left: 84%; top: 82%; width: 10px; height: 10px; background: var(--rosegold); }
.hero-sparkles i:nth-child(6) { left: 28%; top: 88%; width: 12px; height: 12px; background: #f2c46b; }
.hero-sparkles i:nth-child(7) { left: 66%; top: 38%; width: 7px; height: 7px; }

/* ---------- Frame: white mat inside a thin rose-gold fillet ---------- */
.frame {
  position: relative;
  background: var(--paper);
  padding: clamp(8px, 2.2vw, 18px);
  box-shadow: 0 0 0 1px var(--rosegold), var(--shadow);
}
.frame img { box-shadow: 0 0 0 1px rgba(59, 29, 44, .08); background: linear-gradient(110deg, var(--petal) 30%, #fff 50%, var(--petal) 70%) 0 0 / 300% 100%; }
/* Photos fade and sharpen in once loaded; the mat shimmers while waiting. */
.frame img:not(.is-loaded) { animation: shimmer 1.4s linear infinite; }
.frame img, .viewer-art img { transition: opacity .6s var(--ease), filter .6s var(--ease), transform .6s var(--ease); }
.frame img.is-loaded { animation: none; }
@keyframes shimmer { to { background-position: -300% 0; } }

/* Soft light sweep across a framed piece on hover */
.piece .frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); }
.piece button:hover .frame::after { transform: translateX(120%); transition: transform .9s var(--ease); }

/* Painted flourish under section headings */
.section-head h2, .about h2, .buy h2, .contact h2 { position: relative; padding-bottom: 12px; }
.section-head h2::after, .about h2::after, .buy h2::after, .contact h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 120px; height: 10px; transform-origin: left;
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23e0789c'/%3E%3Cstop offset='1' stop-color='%23c8927a' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M2 6c20-6 36 4 58-1s38-5 58 0' fill='none' stroke='url(%23g)' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- Shop ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: clamp(20px, 4vw, 40px); border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.filters { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; max-width: 100%; padding: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none; scroll-snap-align: center;
  font: 500 var(--step--1)/1 var(--body); color: var(--mauve); min-height: 38px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .15s var(--ease);
}
.filters button:active { transform: scale(.95); }
.filters button[aria-pressed="true"] { color: #fff; background: var(--berry); border-color: var(--berry); }
.filters button:hover:not([aria-pressed="true"]) { color: var(--berry); border-color: var(--rose); }
.filters .count { margin-left: 6px; font-family: var(--mono); font-size: .75rem; opacity: .7; }

.wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); }
.wall .empty { grid-column: 1 / -1; background: var(--paper); border: 1px dashed var(--rose); padding: 28px; color: var(--mauve); display: grid; gap: 6px; }
.wall .empty p { margin: 0; }
.wall .empty p:first-child { font-family: var(--display); font-size: var(--step-1); color: var(--plum); }
.piece { display: grid; gap: 14px; align-content: start; }
.piece button { all: unset; cursor: pointer; display: block; -webkit-tap-highlight-color: transparent; }
.piece button:focus-visible { outline: 2px solid var(--berry); outline-offset: 6px; }
.piece .frame { overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.piece .frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.piece button:hover .frame { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--rosegold), 0 26px 60px rgba(168, 50, 94, .22); }
.piece button:hover .frame img { transform: scale(1.04); }
.piece button:active .frame { transform: scale(.98); }
.piece.is-sold .frame img { filter: saturate(.6) opacity(.85); }
.ribbon { position: absolute; top: 14px; left: -34px; transform: rotate(-35deg); background: var(--berry); color: #fff; font: 700 .72rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; padding: 7px 40px; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }

/* Museum wall label */
.label { display: grid; gap: 2px; }
.label h3 { font-family: var(--display); font-weight: 400; font-size: var(--step-1); margin: 0; line-height: 1.2; }
.label-spec { font-family: var(--mono); font-size: var(--step--1); color: var(--mauve); margin: 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.price { font-family: var(--mono); color: var(--berry); font-variant-numeric: tabular-nums; }
.status { font-size: var(--step--1); color: var(--mauve); display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); flex: none; }
.status.last { color: var(--amber); }
.status.last::before { background: var(--amber); }
.status.sold::before { background: var(--rose); }
.note { color: var(--mauve); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(20px, 5vw, 64px); border-top: 1px solid var(--line); }
.about-body p { max-width: 62ch; margin: 0 0 1em; font-size: var(--step-1); line-height: 1.6; }
.about-body strong { color: var(--berry); font-weight: 500; }
.about-head { display: grid; gap: 20px; align-content: start; }
.about-photo { width: min(100%, 280px); aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper); padding: 10px; box-shadow: 0 0 0 1px var(--rosegold), var(--shadow); }

/* ---------- How to buy ---------- */
.buy { border-top: 1px solid var(--line); display: grid; gap: 28px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; counter-reset: step; }
.steps li { background: var(--paper); border: 1px solid var(--line); padding: 20px; counter-increment: step; display: grid; gap: 6px; border-radius: 14px; }
.steps li::before { content: counter(step); font-family: var(--display); font-size: var(--step-2); color: var(--rose); line-height: 1; }
.steps strong { font-weight: 700; }
.steps span { color: var(--mauve); font-size: .95rem; }

/* ---------- Contact ---------- */
.contact { border-top: 1px solid var(--line); display: grid; gap: 20px; }
.contact-body { display: grid; gap: 14px; max-width: 62ch; color: var(--mauve); }
.contact-body p { margin: 0; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }
.address { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.address code { font-family: var(--mono); color: var(--plum); background: var(--paper); padding: 8px 12px; border: 1px solid var(--line); user-select: all; overflow-wrap: anywhere; }
.copy { font: 500 var(--step--1)/1 var(--body); background: var(--paper); color: var(--berry); border: 1px solid var(--line); padding: 11px 14px; cursor: pointer; border-radius: 6px; }

.site-footer { border-top: 1px solid var(--line); padding-block: 28px 40px; color: var(--mauve); font-size: var(--step--1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--mauve); }

/* ---------- Phone tab bar ---------- */
.tabbar { display: none; }

/* ---------- Viewer ---------- */
.viewer {
  border: 0; padding: 0; background: transparent; color: var(--plum); overflow: visible;
  width: min(1100px, calc(100vw - 2 * var(--gutter))); max-width: none; max-height: calc(100dvh - 32px);
}
.viewer::backdrop { background: rgba(59, 29, 44, .45); backdrop-filter: blur(6px); }
.viewer-inner {
  display: grid; grid-template-columns: 1.2fr 1fr; position: relative; background: var(--paper);
  max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line), 0 40px 120px rgba(59, 29, 44, .28);
  transition: transform .3s var(--ease);
}
.viewer[open] .viewer-inner { animation: rise .45s var(--spring); }
.viewer[open]::backdrop { animation: fade .3s ease; }
.viewer.is-closing .viewer-inner { animation: sink .24s var(--ease) forwards; }
.viewer.is-closing::backdrop { animation: fade .24s ease reverse forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes sink { to { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.grabber { display: none; }
.viewer-art { background: var(--petal); padding: clamp(16px, 3vw, 36px); display: grid; place-items: center; overflow: hidden; touch-action: pan-y; }
.viewer-art img { max-height: calc(100dvh - 120px); width: auto; box-shadow: 0 0 0 1px var(--rosegold), 0 20px 50px rgba(59, 29, 44, .22); opacity: 0; transform: scale(.98); }
.viewer-art img.is-loaded { opacity: 1; transform: none; }
.viewer-art img.slide-l { animation: slideL .4s var(--ease); }
.viewer-art img.slide-r { animation: slideR .4s var(--ease); }
@keyframes slideL { from { transform: translateX(40px); opacity: 0; } }
@keyframes slideR { from { transform: translateX(-40px); opacity: 0; } }
.viewer-label { padding: clamp(22px, 4vw, 48px); display: grid; align-content: start; gap: 12px; }
.viewer-label h2 { font-size: clamp(1.9rem, 3vw + 1rem, 3rem); }
.label-desc { color: var(--mauve); font-size: var(--step-1); margin: 0; max-width: 40ch; }
.price-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.label-price { font-family: var(--mono); color: var(--berry); font-size: var(--step-1); margin: 0; }
.stock { font-size: var(--step--1); font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(47, 138, 91, .1); color: var(--leaf); }
.stock:empty { display: none; }
.stock.last { background: rgba(184, 106, 18, .12); color: var(--amber); }
.stock.sold { background: var(--petal); color: var(--berry); }
.viewer-actions { display: grid; gap: 12px; margin-top: 6px; }
.viewer-actions .fine, .checkout .fine { font-size: var(--step--1); color: var(--mauve); margin: 0; }
.viewer-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.viewer-nav button { font: 500 var(--step--1)/1 var(--body); background: none; border: 0; color: var(--mauve); cursor: pointer; padding: 12px 0; }
.viewer-nav button:hover { color: var(--berry); }
.close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--plum); font: 400 1.6rem/1 var(--body); cursor: pointer; transition: transform .2s var(--ease); }
.close:hover { color: var(--berry); transform: rotate(90deg); }

/* Checkout */
.checkout { display: grid; gap: 12px; }
.qty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 500; }
.qty .total { margin-left: auto; font-family: var(--mono); color: var(--berry); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 1.3rem; color: var(--berry); cursor: pointer; }
.stepper button:active { background: var(--petal); }
.stepper output { min-width: 28px; text-align: center; font: 700 1rem var(--mono); }
.stepper output.bump { animation: bump .3s var(--spring); }
@keyframes bump { 50% { transform: scale(1.35); } }
.paypal-box { min-height: 104px; }
.pp-skeleton { display: grid; gap: 10px; }
.pp-skeleton span { display: block; height: 48px; border-radius: 999px; background: linear-gradient(110deg, var(--petal) 30%, #fff 50%, var(--petal) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.checkout-msg { margin: 0; font-size: .95rem; color: var(--mauve); min-height: 1.2em; }
.checkout-msg:empty { display: none; }
.checkout-msg.error { color: #b3261e; }
.thanks { display: grid; gap: 10px; justify-items: start; padding: 18px; border-radius: 14px; background: var(--petal); animation: rise .5s var(--spring); }
.thanks h3 { font-family: var(--display); font-weight: 400; font-size: var(--step-2); margin: 0; }
.thanks p { margin: 0; color: var(--mauve); }
.tick { width: 52px; height: 52px; border-radius: 50%; background: var(--leaf); position: relative; animation: pop .5s var(--spring); }
.tick::after { content: ""; position: absolute; left: 18px; top: 12px; width: 12px; height: 22px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg); }
@keyframes pop { from { transform: scale(0); } }
.petals { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1000; }

#fairy-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero enters in a short stagger on load */
  .hero-copy > * { animation: up .8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-art { animation: up 1s .2s var(--ease) both; }
  .hero h1 .w { animation: wordUp .9s var(--ease) both; animation-delay: calc(.12s + var(--d, 0) * 70ms); }
  @keyframes wordUp { from { opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(4px); } }

  /* Logo: the flourish paints itself in, the moon rises, sparkles twinkle */
  .lg-flourish { stroke-dasharray: 240; stroke-dashoffset: 240; animation: lgDraw 1.6s .2s var(--ease) forwards; }
  .lg-word { animation: lgInk 1.2s .1s var(--ease) both; }
  .lg-moon { animation: lgMoon .9s .9s var(--spring) both; }
  .lg-spark { animation: twinkle 2.8s 1.3s ease-in-out infinite; }
  .lg-spark.s2 { animation-delay: 2.2s; }
  .lg-arts { animation: up .8s 1.1s var(--ease) both; }
  .brand:hover .lg-moon { animation: lgSwing 1.2s ease-in-out; }
  @keyframes lgDraw { to { stroke-dashoffset: 0; } }
  @keyframes lgInk { from { opacity: 0; filter: blur(3px); } }
  @keyframes lgMoon { from { opacity: 0; transform: translateY(8px) scale(.4) rotate(-40deg); } }
  @keyframes lgSwing { 30% { transform: rotate(-18deg); } 65% { transform: rotate(10deg); } }
  @keyframes twinkle { 50% { transform: scale(.45) rotate(45deg); opacity: .45; } }

  .hero-sparkles i { animation: drift 7s ease-in-out infinite; }
  .hero-sparkles i:nth-child(2n) { animation-duration: 9s; animation-delay: 1.4s; }
  .hero-sparkles i:nth-child(3n) { animation-duration: 11s; animation-delay: 2.6s; }
  @keyframes drift { 0%, 100% { opacity: 0; transform: translateY(10px) scale(.6) rotate(0); } 40%, 60% { opacity: .8; } 50% { transform: translateY(-14px) scale(1) rotate(90deg); } }

  .section-head h2::after, .about h2::after, .buy h2::after, .contact h2::after { animation: flourish 1.2s .3s var(--ease) both; }
  @keyframes flourish { from { transform: scaleX(0); opacity: 0; } }
  .btn:not(.ghost):not(.paypal) { background-image: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%); background-size: 250% 100%; background-position: 120% 0; }
  .btn:not(.ghost):not(.paypal):hover { animation: sheen .8s var(--ease); }
  @keyframes sheen { from { background-position: 120% 0; } to { background-position: -30% 0; } }
  .hero-art .frame { animation: float 7s 1.2s ease-in-out infinite; }
  @keyframes up { from { opacity: 0; transform: translateY(18px); } }
  @keyframes float { 50% { translate: 0 -8px; } }

  /* Cards settle in with a stagger whenever the shop filter changes */
  .wall.is-swapping .piece { animation: settle .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
  @keyframes settle { from { transform: translateY(14px) scale(.98); opacity: .2; } }

  /* Sections drift up as they scroll into view, where the browser supports scroll-driven animation */
  @supports (animation-timeline: view()) {
    .reveal, .piece { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    .section-head h2::after, .about h2::after, .buy h2::after, .contact h2::after { animation: flourish linear both; animation-timeline: view(); animation-range: entry 10% entry 70%; }
    .wall.is-swapping .piece { animation: settle .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
    @keyframes reveal { from { opacity: .15; transform: translateY(28px); } }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .viewer-art img { opacity: 1; transform: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { width: min(100%, 360px); justify-self: start; }
  .about { grid-template-columns: 1fr; }
  .viewer-inner { grid-template-columns: 1fr; }
  .viewer-art img { max-height: 55dvh; }
}

/* ---------- Phones: app-like layout ---------- */
@media (max-width: 700px) {
  :root { --tabbar-h: 64px; }
  .site-header { padding-block: 10px; }
  .logo-mark { height: 46px; }
  .top-nav a:not(.ig) { display: none; }
  .ig [data-ig-handle] { display: none; }
  .top-nav a.ig { width: 44px; height: 44px; justify-content: center; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
  .top-nav a.ig svg { width: 20px; height: 20px; }
  .hero-art { display: none; }
  .hero-cta .btn { flex: 1 1 100%; }
  section { padding-block: 44px; }
  .section-head { flex-direction: column; align-items: stretch; gap: 12px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .filters { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }

  /* Two-up grid like a shop feed */
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .frame { padding: 6px; }
  .label h3 { font-size: 1.05rem; }
  .label-spec { font-size: .72rem; }
  .label-row { flex-direction: column; align-items: flex-start; margin-top: 2px; }
  .status { font-size: .75rem; }
  .ribbon { top: 10px; left: -38px; font-size: .62rem; padding: 5px 40px; }

  /* Tab bar */
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--mauve); text-decoration: none; font-size: .7rem; font-weight: 500; border-radius: 12px; transition: color .2s, transform .15s var(--ease); }
  .tabbar a:active { transform: scale(.92); }
  .tabbar a.active { color: var(--berry); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.active svg { animation: pop .35s var(--spring); }
  .site-footer { padding-bottom: 24px; }

  /* Viewer becomes a bottom sheet */
  .viewer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; inset: 0; background: transparent; }
  .viewer-inner {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 94dvh; border-radius: 22px 22px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -20px 60px rgba(59, 29, 44, .25);
  }
  .viewer[open] .viewer-inner { animation: sheetUp .45s var(--spring); }
  .viewer.is-closing .viewer-inner { animation: sheetDown .24s var(--ease) forwards; }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  @keyframes sheetDown { to { transform: translateY(100%); } }
  .grabber { display: block; position: sticky; top: 0; z-index: 2; height: 22px; margin-bottom: -22px; }
  .grabber::before { content: ""; position: absolute; left: 50%; top: 8px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(59, 29, 44, .25); }
  .viewer-art { padding: 26px 16px 16px; }
  .viewer-art img { max-height: 48dvh; }
  .viewer-label { padding: 18px 20px 24px; }
  .label-desc { font-size: 1.05rem; }
  .close { top: 12px; right: 12px; }
}
