/* avilasanti.com — Santi Ávila, artista visual
   Look: white gallery wall + black ink + the hot gradients of his canvases.
   Sticker / skate-deck shapes, no graffiti elements. */

:root {
  --ink: #0e0e10;
  --paper: #f7f4ee;
  --wall: #ffffff;
  --pink: #ff2d87;
  --orange: #ff7a1a;
  --yellow: #ffd60a;
  --cyan: #12b4e8;
  --green: #35d45a;
  --violet: #6b2bd6;
  --grad-hot: linear-gradient(100deg, #ffd60a 0%, #ff7a1a 38%, #ff2d87 72%, #6b2bd6 100%);
  --grad-cool: linear-gradient(100deg, #35d45a 0%, #12b4e8 55%, #6b2bd6 100%);
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- shared bits ---------- */
.display {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  line-height: .9; letter-spacing: .005em;
}
.label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
.tag {
  display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; padding: 6px 10px; border: 2px solid var(--ink);
  background: var(--yellow); color: var(--ink); border-radius: 999px; transform: rotate(-2deg);
}
.tag.pink { background: var(--pink); color: #fff; }
.tag.cyan { background: var(--cyan); }
.tag.white { background: #fff; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 14px 20px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--pink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--pink); }
.btn.alt { background: #fff; color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn.alt:hover { box-shadow: 6px 6px 0 var(--ink); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(247, 244, 238, .92);
  backdrop-filter: blur(10px); border-bottom: 2px solid var(--ink);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.nav .logo img { height: 46px; width: auto; }
.nav ul { display: flex; gap: clamp(12px, 2.2vw, 30px); align-items: center; }
.nav a.l { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav a.l:hover { border-color: var(--pink); }
.lang { display: flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; flex: none; }
.lang a { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 6px 11px; text-decoration: none; }
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }
@media (max-width: 760px) {
  .nav ul li.hide-s { display: none; }
  .nav .logo img { height: 38px; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(28px, 6vw, 80px) 0 clamp(40px, 6vw, 90px); background: var(--wall); overflow: hidden; }
.hero::before { /* halftone dots fading out of the corner */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--ink) 1.3px, transparent 1.6px);
  background-size: 14px 14px; opacity: .13;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 0% 100%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 60% 70% at 0% 100%, #000 0%, transparent 70%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.hero h1 { font-size: clamp(84px, 15.5vw, 250px); margin: 14px 0 0 -.03em; }
.hero h1 span { display: block; }
.hero h1 .fill {
  background: var(--grad-hot); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 0; padding: .2em .05em 0 0; margin-top: .05em;
}
.hero .role { font-family: var(--mono); font-weight: 700; font-size: clamp(13px, 1.3vw, 16px); letter-spacing: .14em; text-transform: uppercase; margin-top: 18px; }
.hero .lede { max-width: 34em; margin-top: 18px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.stack { position: relative; aspect-ratio: 1 / 1.02; width: 100%; max-width: 620px; margin-left: auto; }
.stack a { position: absolute; display: block; background: #fff; border: 2px solid var(--ink); padding: 8px; box-shadow: 8px 8px 0 var(--ink); transition: transform .25s ease; }
.stack a:hover { z-index: 5; transform: rotate(0deg) scale(1.03) !important; }
.stack .s1 { width: 54%; left: 2%; top: 3%; transform: rotate(-6deg); box-shadow: 8px 8px 0 var(--cyan); }
.stack .s2 { width: 46%; right: 1%; top: 16%; transform: rotate(5deg); box-shadow: 8px 8px 0 var(--pink); z-index: 2; }
.stack .s3 { width: 62%; left: 16%; bottom: 0; transform: rotate(-2deg); box-shadow: 8px 8px 0 var(--yellow); z-index: 3; }
.stack .tape { position: absolute; width: 84px; height: 24px; background: rgba(255, 214, 10, .85); top: -13px; left: 50%; margin-left: -42px; transform: rotate(-3deg); border-left: 2px dashed rgba(0,0,0,.25); border-right: 2px dashed rgba(0,0,0,.25); }
.badge { position: absolute; right: -6px; bottom: 6%; width: clamp(96px, 11vw, 150px); z-index: 6; animation: spin 22s linear infinite; }
.badge-core { position: absolute; right: -6px; bottom: 6%; width: clamp(96px, 11vw, 150px); aspect-ratio: 1; z-index: 7; display: grid; place-items: center; font-family: var(--display); font-size: clamp(20px, 2.4vw, 32px); color: var(--ink); pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stack { margin: 10px auto 0; max-width: 520px; }
  .hero h1 { font-size: clamp(96px, 33vw, 230px); }
}

/* ---------- marquee ---------- */
.marquee { background: var(--ink); color: var(--yellow); border-block: 2px solid var(--ink); overflow: hidden; transform: rotate(-1.2deg) scale(1.02); margin: -14px 0; position: relative; z-index: 3; }
.marquee .track { display: flex; width: max-content; animation: slide 38s linear infinite; }
.marquee span { font-family: var(--display); font-size: clamp(22px, 3vw, 40px); text-transform: uppercase; padding: 10px 0; white-space: nowrap; }
.marquee span i { font-style: normal; color: var(--pink); padding: 0 .55em; }
.marquee span:nth-child(even) i { color: var(--cyan); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { padding: clamp(64px, 9vw, 130px) 0; position: relative; }
.head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(18px, 4vw, 60px); align-items: end; margin-bottom: clamp(30px, 5vw, 60px); }
.head h2 { font-size: clamp(56px, 8.6vw, 124px); margin-top: 12px; }
.head h2 small { display: block; font-family: var(--mono); font-size: clamp(13px, 1.3vw, 16px); letter-spacing: .14em; line-height: 1.4; margin-top: 12px; text-transform: uppercase; font-weight: 700; }
.head p + p { margin-top: 1em; }
.head .intro { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; max-width: 36em; }
@media (max-width: 860px) { .head { grid-template-columns: 1fr; } }

/* statement */
.statement { background: var(--wall); border-block: 2px solid var(--ink); }
.statement .big { font-size: clamp(26px, 3.6vw, 52px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; max-width: 22em; }
.statement .big mark { background: none; color: inherit; background-image: linear-gradient(transparent 62%, var(--yellow) 62%); padding: 0 .06em; }
.statement .big mark.p { background-image: linear-gradient(transparent 62%, #ff9cc8 62%); }
.statement .big mark.c { background-image: linear-gradient(transparent 62%, #8fdcf7 62%); }
.statement .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 4vw, 60px); margin-top: clamp(28px, 4vw, 54px); }
@media (max-width: 760px) { .statement .cols { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(28px, 4vw, 48px); }
.chips li { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 2px solid var(--ink); border-radius: 999px; padding: 8px 14px; background: #fff; }
.chips li:nth-child(5n+1) { background: var(--yellow); }
.chips li:nth-child(5n+2) { background: var(--pink); color: #fff; }
.chips li:nth-child(5n+3) { background: var(--cyan); }
.chips li:nth-child(5n+4) { background: var(--green); }
.chips li:nth-child(odd) { transform: rotate(-1.5deg); }
.chips li:nth-child(even) { transform: rotate(1.5deg); }

/* work grids */
.sub { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 2px solid var(--ink); padding-top: 14px; margin: clamp(40px, 6vw, 80px) 0 clamp(18px, 3vw, 30px); }
.sub h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 4vw, 54px); line-height: 1; }
.sub p { max-width: 34em; font-size: 16px; }
.grid { columns: 3; column-gap: clamp(14px, 2.2vw, 30px); }
.grid.small { columns: auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 30px); align-items: start; }
.grid.small .work { margin: 0; }
@media (max-width: 1000px) { .grid { columns: 2; } .grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid.small { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.work { break-inside: avoid; margin: 0 0 clamp(14px, 2.2vw, 30px); }
.work a { display: block; border: 2px solid var(--ink); background: #fff; box-shadow: 6px 6px 0 var(--ink); transition: transform .18s ease, box-shadow .18s ease; cursor: zoom-in; }
.work:nth-child(4n+1) a { box-shadow: 6px 6px 0 var(--pink); }
.work:nth-child(4n+2) a { box-shadow: 6px 6px 0 var(--cyan); }
.work:nth-child(4n+3) a { box-shadow: 6px 6px 0 var(--yellow); }
.work:nth-child(4n+4) a { box-shadow: 6px 6px 0 var(--violet); }
.work a:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 10px 10px 0 var(--ink); }
.work img { width: 100%; }
.work figcaption { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-top: 14px; }
.work figcaption .t { display: block; font-family: var(--body); font-size: 17px; font-weight: 700; letter-spacing: -.01em; text-transform: none; line-height: 1.25; margin-bottom: 4px; }
.grid.small .work figcaption .t { font-size: 15px; }
.work figcaption .m { display: block; opacity: .7; }

/* curator text */
.sala { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(22px, 5vw, 80px); margin-top: clamp(50px, 8vw, 110px); align-items: start; }
.sala .poster { border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--orange); transform: rotate(-2deg); position: sticky; top: 96px; }
.sala blockquote p { margin-top: 1em; }
.sala blockquote p:first-of-type { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.45; font-weight: 500; }
.sala cite { display: block; margin-top: 18px; font-family: var(--mono); font-style: normal; font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.sala h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(36px, 5vw, 70px); line-height: .95; margin: 10px 0 6px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 2px solid var(--ink); margin-top: 28px; background: #fff; }
.facts div { padding: 14px 16px; border-bottom: 2px solid var(--ink); }
.facts div:nth-child(odd) { border-right: 2px solid var(--ink); }
.facts div:nth-last-child(-n+2) { border-bottom: 0; }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .65; }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
@media (max-width: 860px) { .sala { grid-template-columns: 1fr; } .sala .poster { position: static; max-width: 380px; } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts div, .facts div:nth-child(odd) { border-right: 0; border-bottom: 2px solid var(--ink); } .facts div:last-child { border-bottom: 0; } }

/* photo strips */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px); margin-top: clamp(26px, 4vw, 48px); }
.strip a { display: block; border: 2px solid var(--ink); overflow: hidden; cursor: zoom-in; }
.strip img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s ease; }
.strip a:hover img { transform: scale(1.04); }
@media (max-width: 640px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* dark sections (grip tape) */
.dark { background: var(--ink); color: #f4f1ea; }
.dark::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.2px), radial-gradient(rgba(255,255,255,.05) 1px, transparent 1.2px);
  background-size: 5px 5px, 7px 7px; background-position: 0 0, 2px 3px; }
.dark .wrap { position: relative; }
.dark .sub, .dark .facts, .dark .facts div { border-color: #f4f1ea; }
.dark .facts { background: transparent; }
.dark .btn { background: var(--yellow); color: var(--ink); border-color: var(--yellow); box-shadow: 4px 4px 0 var(--pink); }

/* bio */
.bio { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(26px, 6vw, 96px); align-items: center; }
.deck { position: relative; max-width: 420px; margin: 0 auto; }
.deck img { width: 100%; aspect-ratio: 1 / 2.35; object-fit: cover; object-position: 50% 30%; border-radius: 999px; border: 3px solid #f4f1ea; position: relative; z-index: 1; }
.deck::before, .deck::after { content: ""; position: absolute; inset: 0; border-radius: 999px; }
.deck::before { background: var(--grad-hot); transform: translate(16px, 14px) rotate(3deg); }
.deck::after { border: 3px solid var(--cyan); transform: translate(-14px, -10px) rotate(-3deg); }
.bio h2 { font-size: clamp(64px, 10vw, 150px); margin: 12px 0 22px; }
.bio p + p { margin-top: 1em; }
.bio .lead { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.45; font-weight: 500; }
@media (max-width: 860px) { .bio { grid-template-columns: 1fr; } .deck { max-width: 250px; } }

/* journal */
.posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); }
@media (max-width: 860px) { .posts { grid-template-columns: 1fr; } }
.post { border: 2px solid var(--ink); background: #fff; padding: clamp(20px, 3vw, 36px); box-shadow: 8px 8px 0 var(--cyan); }
.post:nth-child(2) { box-shadow: 8px 8px 0 var(--pink); }
.post time { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.post h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 3.6vw, 48px); line-height: .98; margin: 10px 0 4px; }
.post .kicker { font-weight: 700; margin-bottom: 14px; }
.post p + p { margin-top: 1em; }
.post .pull { font-size: 1.25em; font-weight: 700; line-height: 1.25; border-left: 6px solid var(--yellow); padding-left: 14px; }
.post details summary { cursor: pointer; font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-top: 16px; list-style: none; display: inline-block; border-bottom: 3px solid var(--pink); }
.post details summary::-webkit-details-marker { display: none; }
.post details[open] summary { margin-bottom: 14px; }
.post details[open] summary .more, .post details:not([open]) summary .less { display: none; }

/* rizoma */
.rizoma { background: var(--yellow); border-block: 2px solid var(--ink); }
.rizoma .strip a { box-shadow: 6px 6px 0 var(--ink); }
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 26px); align-items: start; }
.mosaic .work { margin: 0; }
.mosaic .work a, .mosaic .work:nth-child(n) a { box-shadow: 6px 6px 0 var(--ink); }
.mosaic .wide { grid-column: span 2; }
@media (max-width: 900px) { .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* contact */
.contact { background: var(--grad-hot); border-top: 2px solid var(--ink); text-align: left; overflow: hidden; }
.contact h2 { font-size: clamp(80px, 17vw, 280px); margin: 10px 0 0 -.03em; }
.contact .row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.contact p { max-width: 30em; font-size: clamp(18px, 1.7vw, 22px); font-weight: 500; margin-top: 16px; }
.contact .btn { box-shadow: 4px 4px 0 #fff; text-transform: none; letter-spacing: .02em; font-size: 15px; }
.contact .btn.alt { box-shadow: 4px 4px 0 var(--ink); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }

footer { background: var(--ink); color: #f4f1ea; padding: 44px 0 34px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
footer img { height: 84px; width: auto; }
footer p, footer a { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
footer p + p { margin-top: 6px; opacity: .7; }
footer a { text-underline-offset: 3px; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(14, 14, 16, .96); display: none; align-items: center; justify-content: center; padding: 56px 12px 64px; }
.lb.on { display: flex; }
.lb img { max-width: min(100%, 1400px); max-height: 100%; object-fit: contain; border: 2px solid #fff; background: #fff; }
.lb p { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #fff; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 0 60px; }
.lb button { position: absolute; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); width: 46px; height: 46px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; font-family: var(--mono); font-weight: 700; }
.lb button:hover { background: var(--pink); color: #fff; }
.lb .x { top: 10px; right: 12px; }
.lb .prev { left: 10px; top: 50%; margin-top: -23px; }
.lb .next { right: 10px; top: 50%; margin-top: -23px; }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
.no-js .rv { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee .track, .badge { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  .work a, .stack a, .btn { transition: none; }
}
@media print { .nav, .marquee, .lb, .badge, .badge-core { display: none; } .rv { opacity: 1; transform: none; } }
